/* TV Manager V0.3 unified stylesheet */
/* Theme TV Manager v0.3 */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #e9f1fb;
  --bg-alt: #dde8f8;
  --surface: #f5f8ff;
  --surface-soft: #eaf1ff;
  --ink: #152033;
  --ink-soft: #4f5f7d;
  --border: #c8d8f6;
  --cyan: #1cc7ff;
  --blue: #3078ff;
  --pink: #ff4fc6;
  --violet: #854bff;
  --teal: #11b6a5;
  --danger: #df4366;
  --warning: #ff9a3d;
  --shadow: 0 16px 40px rgba(35, 82, 150, 0.12);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-sm: 11px;
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

html.theme-dark {
  color-scheme: dark;
}

body {
  font-family: "Manrope", "Avenir Next", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at -10% -20%, rgba(48, 120, 255, 0.14), transparent 60%),
    radial-gradient(700px 420px at 110% 0%, rgba(255, 79, 198, 0.12), transparent 60%),
    linear-gradient(180deg, #f2f7ff 0%, var(--bg) 100%);
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  top: -120px;
  right: -90px;
  background: radial-gradient(circle, rgba(255, 79, 198, 0.25), transparent 70%);
}

body::after {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  left: -140px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(28, 199, 255, 0.2), transparent 68%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - 44px));
  margin: 22px auto 36px;
}

.topbar {
  position: relative;
  z-index: 30;
  background: rgba(241, 247, 255, 0.86);
  border: 1px solid rgba(184, 206, 244, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 64px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(54, 98, 255, 0.18));
}

.brand-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.pill.primary {
  border-color: rgba(48, 120, 255, 0.26);
  background: linear-gradient(120deg, rgba(28, 199, 255, 0.2), rgba(133, 75, 255, 0.16));
  color: #0d3e8b;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 1rem;
  cursor: pointer;
}

.main-nav {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 14px;
  align-items: stretch;
  width: 100%;
}

.main-nav > a,
.nav-link-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  color: #234364;
  background: rgba(238, 245, 255, 0.86);
  border: 1px solid rgba(184, 206, 244, 0.95);
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font-family: inherit;
  line-height: 1.2;
  letter-spacing: 0;
}

.main-nav > a.active,
.nav-link-toggle.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(100deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.28);
}

.nav-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.nav-item.open {
  z-index: 25;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
  color: #234364;
  background: rgba(238, 245, 255, 0.86);
  border: 1px solid rgba(184, 206, 244, 0.95);
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font-family: inherit;
  line-height: 1.2;
  letter-spacing: 0;
}

.nav-toggle.active,
.nav-item.open .nav-toggle {
  color: white;
  border-color: transparent;
  background: linear-gradient(100deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.28);
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 100%;
  display: none;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  z-index: 40;
  box-sizing: border-box;
}

.nav-item.open .nav-submenu {
  display: grid;
}

.nav-submenu a {
  text-decoration: none;
  color: #234364;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 44px;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.nav-submenu a.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(100deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.28);
}

.page {
  margin-top: 18px;
  background: rgba(240, 247, 255, 0.74);
  border: 1px solid rgba(184, 206, 244, 0.95);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 20px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page h1 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.page-head .badge,
.page-head > .btn,
.page-head > a.btn,
.page-head > button.btn {
  min-height: 44px;
}

.muted {
  color: var(--ink-soft);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 14px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px;
}

.card.glow {
  background:
    radial-gradient(700px 140px at -5% 0%, rgba(28, 199, 255, 0.18), transparent 60%),
    radial-gradient(700px 160px at 110% 10%, rgba(255, 79, 198, 0.15), transparent 60%),
    var(--surface);
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

/* KPI cards
   - .kpi-card: carte métrique standard
   - .kpi-card--featured: variante de synthèse mise en avant
   Les anciennes classes .kpi et .glow restent compatibles. */
.kpi,
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.kpi .label,
.kpi-card .label {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 600;
}

.kpi .value,
.kpi-card .value {
  font-size: 1.45rem;
  font-weight: 800;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(197, 216, 244, 0.96);
  background: rgba(244, 248, 255, 0.92);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: transparent;
}

thead th {
  background: rgba(226, 236, 251, 0.78);
  color: #4c6287;
  text-align: left;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 0.84rem;
  white-space: nowrap;
}

tbody td {
  padding: 13px 14px;
  border-top: 1px solid #d6e4fb;
  font-size: 0.93rem;
  vertical-align: middle;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  padding: 0 14px;
  border: 1px solid transparent;
}

.badge.neon {
  color: white;
  background: linear-gradient(95deg, var(--blue), var(--pink));
}

.badge.blue { color: #0e4f9b; background: #e8f4ff; border-color: #bcdfff; }
.badge.cyan { color: #0c6f89; background: #e6fbff; border-color: #aae6f7; }
.badge.pink { color: #8a2d76; background: #ffe8f8; border-color: #ffc6ec; }
.badge.green { color: #146b4f; background: #e8fff6; border-color: #b8efd8; }
.badge.orange { color: #925012; background: #fff3e6; border-color: #ffd8b2; }
.badge.red { color: #902840; background: #ffe8ef; border-color: #f7bfd0; }

.day-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
}

.day-badge-success {
  border-color: #97e4c2;
  background: #e8fff4;
  color: #146b4f;
}

.day-badge-warning {
  border-color: #ffd6a5;
  background: #fff4e5;
  color: #93540e;
}

.day-badge-danger {
  border-color: #f5a6bc;
  background: #ffe9f0;
  color: #932545;
}

.filters {
  display: grid;
  gap: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: #2f4f7b;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.83rem;
  font-weight: 700;
}

.input,
.select,
button,
textarea {
  font-family: inherit;
}

.input,
.select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

body[data-page] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
body[data-page] select:not([multiple]),
body[data-page] textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
}

body[data-page] select:not([multiple]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23325584' d='M1.2 1.1a1 1 0 0 1 1.4 0L6 4.5l3.4-3.4a1 1 0 1 1 1.4 1.4L6.7 6.6a1 1 0 0 1-1.4 0L1.2 2.5a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

body[data-page] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):focus,
body[data-page] select:not([multiple]):focus,
body[data-page] textarea:focus {
  outline: none;
  border-color: #8ebeff;
  box-shadow: 0 0 0 3px rgba(88, 153, 255, 0.14);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #1f3f67;
  font-weight: 800;
  border-radius: 11px;
  padding: 0 16px;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.btn.secondary-btn {
  border-color: var(--border);
  background: var(--surface-soft);
  color: #2a486d;
}

.btn.secondary-btn:hover:not(:disabled) {
  border-color: #9ebce8;
  background: #eef5ff;
  box-shadow: 0 8px 18px rgba(113, 152, 219, 0.18);
}

.btn:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  filter: saturate(0.55);
}

.btn.primary {
  border: 0;
  color: white;
  background: linear-gradient(95deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.24);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(72, 100, 212, 0.28);
}

.arrow-toggle-btn,
.day-nav-btn,
.chart-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: #2a486d;
  box-shadow: inset 0 0 0 1px rgba(87, 127, 184, 0.06);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.arrow-toggle-btn,
.chart-zoom-btn {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1;
}

.day-nav-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.arrow-toggle-btn:hover:not(:disabled),
.day-nav-btn:hover:not(:disabled),
.chart-zoom-btn:hover:not(:disabled) {
  border-color: #9ebce8;
  background: #eef5ff;
  box-shadow: 0 8px 18px rgba(113, 152, 219, 0.16);
  transform: translateY(-1px);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: #294a74;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: inset 0 0 0 1px rgba(87, 127, 184, 0.06);
}

.filter-chip:hover:not(:disabled) {
  border-color: #9ebce8;
  background: #eef5ff;
  box-shadow: 0 8px 18px rgba(113, 152, 219, 0.16);
  transform: translateY(-1px);
}

.filter-chip.active {
  border-color: #65b7ff;
  background: linear-gradient(100deg, rgba(48, 120, 255, 0.16), rgba(255, 79, 198, 0.15));
  color: #1a4f9f;
  box-shadow: 0 8px 18px rgba(101, 183, 255, 0.18);
}

.filter-chip:disabled,
.filter-chip[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn.success {
  border-color: #9edec6;
  background: #dcf9ed;
  color: #0e6a47;
}

.btn.warn {
  border-color: #ffd6b0;
  background: #fff1e5;
  color: #925012;
}

.btn.danger {
  border-color: #f7bfd0;
  background: #ffe8ef;
  color: #8f2840;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: center;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.footer-note {
  margin-top: 14px;
  color: #6b7f9f;
  font-size: 0.83rem;
}

.auth-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.auth-card {
  background: rgba(241, 247, 255, 0.86);
  border: 1px solid rgba(184, 206, 244, 0.95);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 26px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
}

.hero-neon {
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    radial-gradient(300px 180px at 20% 18%, rgba(28, 199, 255, 0.22), transparent 70%),
    radial-gradient(260px 170px at 88% 85%, rgba(255, 79, 198, 0.2), transparent 68%),
    var(--surface);
  padding: 16px;
}

.hero-neon img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(48, 120, 255, 0.22));
}

.info-block {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
}

.grid-1 { display: grid; gap: 14px; grid-template-columns: 1fr; }

.split-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.v03-card-head > div > p,
.split-head > div > p,
.program-filters-head + p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.stack {
  display: grid;
  gap: 10px;
}

.list-rows {
  display: grid;
  gap: 8px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.list-row strong {
  font-weight: 800;
}

.list-row .value {
  color: #234364;
  font-weight: 700;
}

.hero-card {
  background:
    radial-gradient(520px 220px at 10% 8%, rgba(28, 199, 255, 0.2), transparent 70%),
    radial-gradient(520px 220px at 90% 88%, rgba(255, 79, 198, 0.18), transparent 68%),
    var(--surface);
}

.cols-2 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-hero {
  display: grid;
  align-content: start;
  gap: 10px;
}

.auth-hero-title {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1.12;
}

.auth-brand-fallback {
  display: none;
}

.auth-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 14px 14px 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.auth-panel h2 {
  margin: 0;
}

.auth-page .auth-shell {
  min-height: calc(100vh - 44px);
}

.auth-page-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 140px);
}

.auth-page-main .auth-wrap {
  margin-top: auto;
  margin-bottom: auto;
}

.page.page-with-footer.auth-page-main > .v03-footer-spacer {
  display: none;
}

.page.page-with-footer.auth-page-main > .v03-footer {
  margin-top: 18px;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form .input {
  min-height: 44px;
  border-width: 2px;
}

.auth-form .input:focus {
  outline: none;
  border-color: rgba(48, 120, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(48, 120, 255, 0.14);
}

.auth-form label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.auth-form .btn.primary {
  width: 100%;
  margin-top: 2px;
}

.auth-switch {
  margin: 6px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.auth-switch a {
  color: #285ca7;
  font-weight: 800;
}

.auth-session-active .auth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-session-active .auth-form .btn {
  margin: 0;
  min-width: 180px;
}

.auth-session-active .auth-form .btn.primary {
  width: auto;
}

.auth-session-active .feedback {
  margin-top: 0;
}

.center-card {
  width: min(760px, calc(100% - 44px));
  margin: 70px auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.theme-toggle.floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  box-shadow: var(--shadow);
}

body.theme-dark {
  --bg: #0d1422;
  --bg-alt: #121c30;
  --surface: #162239;
  --surface-soft: #111a2b;
  --ink: #e8f0ff;
  --ink-soft: #9fb3d6;
  --border: #2b3f60;
  --shadow: 0 16px 40px rgba(6, 12, 24, 0.5);
}

html.theme-dark body {
  --bg: #0d1422;
  --bg-alt: #121c30;
  --surface: #162239;
  --surface-soft: #111a2b;
  --ink: #e8f0ff;
  --ink-soft: #9fb3d6;
  --border: #2b3f60;
  --shadow: 0 16px 40px rgba(6, 12, 24, 0.5);
}

body.theme-dark {
  background:
    radial-gradient(1200px 500px at -10% -20%, rgba(48, 120, 255, 0.22), transparent 60%),
    radial-gradient(700px 420px at 110% 0%, rgba(255, 79, 198, 0.16), transparent 60%),
    linear-gradient(180deg, #0e1627 0%, var(--bg) 100%);
}

html.theme-dark body {
  background:
    radial-gradient(1200px 500px at -10% -20%, rgba(48, 120, 255, 0.22), transparent 60%),
    radial-gradient(700px 420px at 110% 0%, rgba(255, 79, 198, 0.16), transparent 60%),
    linear-gradient(180deg, #0e1627 0%, var(--bg) 100%);
}

body.theme-dark .topbar,
body.theme-dark .auth-card,
body.theme-dark .page {
  background: rgba(20, 31, 52, 0.82);
  border-color: rgba(57, 79, 118, 0.95);
}

html.theme-dark .topbar,
html.theme-dark .auth-card,
html.theme-dark .page {
  background: rgba(20, 31, 52, 0.82);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark .auth-panel {
  border-color: rgba(57, 79, 118, 0.95);
  background: rgba(16, 27, 46, 0.86);
}

body.theme-dark .auth-form .input:focus {
  border-color: rgba(120, 167, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(74, 123, 255, 0.25);
}

body.theme-dark .main-nav > a,
body.theme-dark .nav-link-toggle {
  color: #c9dbff;
  background: rgba(21, 34, 56, 0.9);
  border-color: rgba(57, 79, 118, 0.95);
}

html.theme-dark .main-nav > a,
html.theme-dark .nav-link-toggle {
  color: #c9dbff;
  background: rgba(21, 34, 56, 0.9);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark .nav-toggle {
  color: #c9dbff;
  background: rgba(21, 34, 56, 0.9);
  border-color: rgba(57, 79, 118, 0.95);
}

html.theme-dark .nav-toggle {
  color: #c9dbff;
  background: rgba(21, 34, 56, 0.9);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark .nav-submenu {
  background: var(--surface);
  border-color: var(--border);
}

html.theme-dark .nav-submenu {
  background: var(--surface);
  border-color: var(--border);
}

body.theme-dark .nav-submenu a {
  color: #d6e5ff;
  background: rgba(19, 30, 49, 0.92);
  border-color: rgba(57, 79, 118, 0.95);
}

html.theme-dark .nav-submenu a {
  color: #d6e5ff;
  background: rgba(19, 30, 49, 0.92);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark .badge.blue { color: #86bbff; background: #15365f; border-color: #27558e; }
body.theme-dark .badge.cyan { color: #89f1ff; background: #124454; border-color: #1d697f; }
body.theme-dark .badge.pink { color: #ffb2ed; background: #54254a; border-color: #7d3d71; }
body.theme-dark .badge.green { color: #96f5cf; background: #174838; border-color: #296d58; }
body.theme-dark .badge.orange { color: #ffd39f; background: #5c3b1e; border-color: #87562d; }
body.theme-dark .badge.red { color: #ffb6c8; background: #582537; border-color: #83405a; }
body.theme-dark .day-badge {
  border-color: #3e5f8f;
  background: #1a2a45;
  color: #dbe7ff;
}
body.theme-dark .day-badge-success {
  border-color: #2f7c63;
  background: #173d31;
  color: #96f5cf;
}
body.theme-dark .day-badge-warning {
  border-color: #8a5d2d;
  background: #3f2d1a;
  color: #ffd39f;
}
body.theme-dark .day-badge-danger {
  border-color: #8a425e;
  background: #3d2030;
  color: #ffc4d2;
}

body.theme-dark .table-wrap,
body.theme-dark .audience-table-wrap,
body.theme-dark .v03-finance-table-wrap {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(21, 33, 54, 0.9);
}

body.theme-dark .arrow-toggle-btn,
body.theme-dark .day-nav-btn,
body.theme-dark .chart-zoom-btn {
  border-color: #3d5f95;
  background: #1b2b48;
  color: #d2e4ff;
  box-shadow: inset 0 0 0 1px rgba(86, 118, 172, 0.14);
}

body.theme-dark .arrow-toggle-btn:hover:not(:disabled),
body.theme-dark .day-nav-btn:hover:not(:disabled),
body.theme-dark .chart-zoom-btn:hover:not(:disabled) {
  border-color: #74a0dd;
  background: #223a60;
}

body.theme-dark .btn.success { border-color: #2d6f58; background: #174838; color: #a3f5d5; }
body.theme-dark .btn.warn { border-color: #8a5a2a; background: #52361d; color: #ffd6a7; }
body.theme-dark .btn.danger { border-color: #88455f; background: #5a2b3c; color: #ffc4d4; }
body.theme-dark .btn.secondary-btn { border-color: #3d5f95; background: #1b2b48; color: #d2e4ff; }
body.theme-dark .btn.secondary-btn:hover:not(:disabled) { border-color: #74a0dd; background: #223a60; }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .cols-2 { grid-template-columns: 1fr; }

  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-wrap {
    width: 100%;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .main-nav {
    flex-wrap: wrap;
  }

  .nav-item {
    width: 100%;
    flex: 1 1 100%;
  }

  .nav-toggle {
    width: 100%;
    text-align: left;
  }

  .nav-submenu {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .auth-session-active .auth-form .btn {
    width: 100%;
    min-width: 0;
  }
}


/* ===== V0.3-specific additions ===== */

.v03-source {
  display: none !important;
}

body,
body *,
body::before,
body::after {
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    color 0.22s ease,
    box-shadow 0.28s ease,
    background-image 0.34s ease;
}

body.theme-dark .page {
  background: rgba(20, 31, 52, 0.82);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark #v03TopBank {
  color: #f4fbff;
  border-color: rgba(156, 216, 255, 0.6);
  background: linear-gradient(95deg, #1f6dff, #8a56ff);
}

/* Mode sombre: violet moins lumineux sur l'ensemble des actions primaires */
body.theme-dark .pill.primary,
body.theme-dark #v03TopBank,
body.theme-dark .btn.primary,
body.theme-dark .main-nav > a.active,
body.theme-dark .nav-link-toggle.active,
body.theme-dark .nav-toggle.active,
body.theme-dark .nav-item.open .nav-toggle,
body.theme-dark .nav-submenu a.active,
body.theme-dark .badge.neon,
body.theme-dark .v03-planner-page #publishDayBtn,
body.theme-dark .v03-policy-buttons .btn.active {
  color: #eef5ff;
  border-color: rgba(122, 151, 214, 0.45);
  background: linear-gradient(98deg, #2f5fb8, #7b4cb3);
  box-shadow: 0 6px 14px rgba(58, 96, 168, 0.26);
}

body.theme-dark .btn.primary:hover:not(:disabled),
body.theme-dark .main-nav > a.active:hover,
body.theme-dark .nav-link-toggle.active:hover,
body.theme-dark .nav-toggle.active:hover,
body.theme-dark .nav-item.open .nav-toggle:hover,
body.theme-dark .nav-submenu a.active:hover,
body.theme-dark .v03-planner-page #publishDayBtn:hover:not(:disabled),
body.theme-dark .v03-policy-buttons .btn.active:hover:not(:disabled) {
  background: linear-gradient(98deg, #396bc7, #8b55c2);
  box-shadow: 0 8px 16px rgba(68, 108, 184, 0.32);
}

#v03PrioritiesList,
#v03AudienceList,
#v03ProductionDetails {
  margin-top: 10px;
}

.v03-section-gap-md {
  margin-top: 14px;
}

.v03-section-gap-sm {
  margin-top: 12px;
}

.v03-top-grid-2 {
  margin-top: 10px;
  align-items: stretch;
}

.v03-kpi-grid {
  margin-top: 10px;
  align-items: stretch;
}

.v03-kpi-grid > .card.kpi,
.v03-kpi-grid > .kpi,
.v03-kpi-grid > .card.kpi-card,
.v03-kpi-grid > .kpi-card {
  min-height: 128px;
  justify-content: space-between;
  padding: 18px;
  border-radius: 20px;
}

.v03-kpi-grid .kpi .label,
.v03-kpi-grid .kpi-card .label {
  display: block;
  font-size: 0.9rem;
}

.v03-kpi-grid .kpi .value,
.v03-kpi-grid .kpi-card .value {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.6rem, 2vw, 2.05rem);
  line-height: 1.05;
}

.card.kpi-card--featured,
.card.glow.kpi,
.card.glow.kpi-card {
  background:
    radial-gradient(700px 140px at -5% 0%, rgba(28, 199, 255, 0.18), transparent 60%),
    radial-gradient(700px 160px at 110% 10%, rgba(255, 79, 198, 0.15), transparent 60%),
    var(--surface);
}

.v03-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.v03-priority-kpis {
  margin-top: 10px;
}

#v03PrioritiesList .list-row,
#v03AudienceList .list-row,
#v03ProductionDetails .list-row {
  min-height: 58px;
}

#v03ProductionDetails .card {
  min-height: 142px;
  display: flex;
  align-items: center;
  font-size: 1.8rem;
  line-height: 1.05;
  font-weight: 700;
}

#v03ProductionDetails .list-row {
  align-items: center;
}

#v03ProductionDetails .list-row > div {
  display: grid;
  gap: 2px;
}

#v03AudienceList .list-row strong.value {
  font-size: 1.9rem;
  line-height: 1;
}

body.theme-dark #v03AudienceList .list-row strong,
body.theme-dark #v03AudienceList .list-row .value {
  color: #d9e8ff;
}

body.theme-dark #v03AudienceList .list-row strong.value {
  color: #b8d8ff;
}

#v03AudienceList .list-row.v03-player-row {
  border-color: #74d8b0;
  background: #e9fff5;
}

body.theme-dark #v03AudienceList .list-row.v03-player-row {
  border-color: #2a8a6a;
  background: rgba(19, 78, 58, 0.45);
}

.v03-theme-mode-row {
  margin-top: 10px;
}

.v03-theme-mode-btn {
  width: 100%;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.v03-theme-mode-btn.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(100deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.24);
}

body.theme-dark .v03-theme-mode-btn.active {
  background: linear-gradient(100deg, #3f63d6, #a04fd0);
  box-shadow: 0 8px 18px rgba(77, 92, 173, 0.3);
}

body.theme-dark .v03-account-theme-card .v03-theme-mode-btn:not(.active) {
  color: #d9e8ff;
  border-color: #3e5f8f;
  background: #1a2a45;
}

body.theme-dark .v03-account-theme-card .v03-theme-mode-btn:not(.active):hover {
  border-color: #6f9cdd;
  background: #203555;
  box-shadow: 0 8px 18px rgba(74, 123, 255, 0.28);
}

.v03-mode-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.v03-theme-mode-btn span {
  line-height: 1;
}

.v03-account-theme-card {
  margin-bottom: 12px;
}

.v03-account-theme-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.v03-account-theme-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.v03-account-theme-head h2 {
  margin: 0;
}

.v03-account-grid {
  align-items: stretch;
}

.v03-account-feedback {
  margin-top: 4px;
}

.v03-account-modal-card {
  width: min(540px, calc(100vw - 32px));
}

.feedback {
  min-height: 20px;
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.card > .feedback:empty,
.page > .feedback:empty {
  display: none;
}

.feedback.success {
  color: #127b52;
}

.feedback.warning {
  color: #9a5f1b;
}

.feedback.error {
  color: #be304d;
}

body.theme-dark .feedback.success {
  color: #70f1bf;
}

body.theme-dark .feedback.warning {
  color: #ffd39f;
}

body.theme-dark .feedback.error {
  color: #ff8aa2;
}

.v03-toast-host {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.v03-toast {
  min-width: min(360px, calc(100vw - 32px));
  max-width: min(420px, calc(100vw - 32px));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(245, 248, 255, 0.96);
  box-shadow: 0 18px 36px rgba(18, 35, 70, 0.18);
  color: var(--ink);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.v03-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.v03-toast-text {
  font-size: 0.94rem;
  line-height: 1.45;
  font-weight: 700;
}

.v03-toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
}

.v03-toast-close:hover {
  opacity: 1;
}

.v03-toast-success {
  border-color: #a6e7cb;
  background: linear-gradient(135deg, rgba(232, 255, 246, 0.98), rgba(243, 251, 255, 0.98));
  color: #146b4f;
}

.v03-toast-warning {
  border-color: #f2c58c;
  background: linear-gradient(135deg, rgba(255, 243, 230, 0.98), rgba(255, 248, 240, 0.98));
  color: #925012;
}

.v03-toast-error {
  border-color: #f1b4c6;
  background: linear-gradient(135deg, rgba(255, 232, 239, 0.98), rgba(255, 244, 247, 0.98));
  color: #9d2946;
}

.v03-toast-info {
  border-color: #bcdfff;
  background: linear-gradient(135deg, rgba(232, 244, 255, 0.98), rgba(243, 249, 255, 0.98));
  color: #0e4f9b;
}

body.theme-dark .v03-toast {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(21, 33, 54, 0.96);
  box-shadow: 0 20px 40px rgba(4, 10, 20, 0.4);
  color: #e8f0ff;
}

body.theme-dark .v03-toast-success {
  border-color: #2f7c63;
  background: linear-gradient(135deg, rgba(23, 61, 49, 0.98), rgba(21, 42, 61, 0.96));
  color: #96f5cf;
}

body.theme-dark .v03-toast-warning {
  border-color: #8a5d2d;
  background: linear-gradient(135deg, rgba(63, 45, 26, 0.98), rgba(27, 36, 59, 0.96));
  color: #ffd39f;
}

body.theme-dark .v03-toast-error {
  border-color: #8a425e;
  background: linear-gradient(135deg, rgba(61, 32, 48, 0.98), rgba(28, 37, 61, 0.96));
  color: #ffc4d2;
}

body.theme-dark .v03-toast-info {
  border-color: #27558e;
  background: linear-gradient(135deg, rgba(21, 54, 95, 0.98), rgba(23, 41, 67, 0.96));
  color: #86bbff;
}

@media (max-width: 700px) {
  .v03-toast-host {
    right: 12px;
    left: 12px;
    bottom: 12px;
    align-items: stretch;
  }

  .v03-toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

.site-legal-footer {
  margin: 16px auto 20px;
  width: min(980px, calc(100% - 44px));
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(245, 248, 255, 0.78);
  box-shadow: 0 12px 30px rgba(35, 82, 150, 0.1);
}

.site-legal-footer.in-card {
  width: 100%;
  margin: 14px 0 0;
}

.site-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.25;
}

.site-legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  line-height: 1;
  transform: translateY(1px);
  color: #355984;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid transparent;
}

.site-legal-links a:hover,
.site-legal-links a:focus-visible {
  border-bottom-color: currentColor;
}

.site-legal-separator {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  line-height: 1;
  transform: translateY(1px);
  color: #7891b2;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(980px, calc(100% - 24px));
  z-index: 60;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(245, 248, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.cookie-banner-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.cookie-banner-text a {
  color: #285ca7;
  font-weight: 700;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #1f3f67;
  font-weight: 800;
  border-radius: 11px;
  padding: 9px 13px;
  cursor: pointer;
}

.cookie-btn.cookie-btn-primary {
  border: 0;
  color: white;
  background: linear-gradient(95deg, var(--blue), var(--pink));
}

body.theme-dark .site-legal-footer {
  background: rgba(20, 31, 52, 0.88);
  border-color: rgba(57, 79, 118, 0.95);
  box-shadow: 0 14px 30px rgba(6, 12, 24, 0.4);
}

body.theme-dark .site-legal-links a {
  color: #b4caef;
}

body.theme-dark .site-legal-separator {
  color: #6f88aa;
}

body.theme-dark .cookie-banner {
  background: rgba(15, 24, 41, 0.95);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark .cookie-banner-text {
  color: #b7cae8;
}

body.theme-dark .cookie-banner-text a {
  color: #85b8ff;
}

body.theme-dark .cookie-btn {
  border-color: #3d5f95;
  background: #1b2b48;
  color: #d2e4ff;
}

@media (max-width: 900px) {
  .site-legal-footer {
    width: min(980px, calc(100% - 26px));
    margin: 12px auto 16px;
  }

  .cookie-banner {
    grid-template-columns: 1fr;
    width: min(980px, calc(100% - 18px));
    padding: 12px;
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.v03-versions-list {
  margin-top: 6px;
}

.v03-version-items {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.v03-version-items.is-collapsed {
  display: none !important;
}

.v03-version-items li {
  color: var(--ink);
  line-height: 1.45;
}

.v03-version-items code {
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.v03-version-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.v03-version-toggle-btn {
  min-width: 36px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: 12px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-weight: 900;
  font-size: 0.95rem;
}

body.theme-dark .v03-version-toggle-btn {
  color: #d9e8ff;
  border-color: #3e5f8f;
  background: #1a2a45;
}

body.theme-dark .v03-version-toggle-btn:hover {
  border-color: #6f9cdd;
  background: #203555;
  box-shadow: 0 8px 18px rgba(74, 123, 255, 0.28);
}

.v03-footer {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 5px 18px;
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
  align-items: center;
  line-height: 1.2;
}

.v03-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  line-height: 1.2;
  color: #294a74;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  vertical-align: middle;
}

.v03-footer a:hover {
  text-decoration: underline;
}

body.theme-dark .v03-footer a {
  color: #c6dbff;
}

.v03-footer-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  line-height: 1.2;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 1rem;
  vertical-align: middle;
}

.page.page-with-footer {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.page > .v03-footer {
  margin-top: 18px;
}

.page.page-with-footer > .v03-footer {
  margin-top: 0;
}

.page.page-with-footer > .v03-footer-spacer {
  flex: 1 0 auto;
  min-height: 18px;
}

.shell {
  min-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  #v03ProductionKpis {
    grid-template-columns: 1fr;
  }
}
.v03-page-subtitle {
  color: var(--ink-soft);
  margin: 4px 0 0;
  font-size: 1.02rem;
  line-height: 1.35;
}

.v03-channels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.v03-channels-list {
  display: grid;
  gap: 12px;
}

.v03-own-channel-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.v03-own-channel-line {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.v03-own-channel-canal {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.v03-own-channel-info {
  min-width: 0;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.v03-own-channel-status {
  font-weight: 800;
  justify-self: start;
}

.v03-expand-btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.v03-expand-btn:hover {
  border-color: var(--blue);
}

.v03-rename-panel {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.v03-rename-panel[hidden] {
  display: none !important;
}

.v03-rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.v03-rename-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 0.95rem;
}

.v03-rename-form button {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: linear-gradient(95deg, var(--blue), var(--pink));
  color: #fff;
  font-weight: 800;
  padding: 9px 14px;
  cursor: pointer;
}

.v03-competitors-table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}

.v03-competitors-row {
  display: grid;
  grid-template-columns: 62px minmax(130px, 1.1fr) minmax(120px, 0.95fr) minmax(118px, 0.9fr);
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.v03-competitors-row:last-child {
  border-bottom: 0;
}

.v03-competitors-head {
  background: var(--surface-soft);
  font-weight: 800;
  color: var(--ink-soft);
}

.v03-competitors-cell {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.theme-dark .v03-competitors-row {
  border-color: rgba(82, 110, 156, 0.7);
}

.v03-competitors-canal {
  font-weight: 800;
}

.v03-own-compare-row,
.v03-own-compare-head {
  grid-template-columns: 72px minmax(150px, 1.15fr) minmax(130px, 0.95fr) minmax(150px, 0.95fr) 112px 74px;
}

.v03-own-compare-edit-row {
  grid-template-columns: 1fr;
  padding: 10px 14px 12px;
  background: var(--surface-soft);
}

.v03-own-compare-edit-row[hidden] {
  display: none !important;
}

.v03-own-compare-edit-cell {
  grid-column: 1 / -1;
}

.v03-compare-expand-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.v03-topbar-bank {
  color: #f4fbff;
  border-color: rgba(156, 216, 255, 0.6);
  background: linear-gradient(95deg, #1f6dff, #8a56ff);
}

.v03-top-link {
  text-decoration: none;
}

.icon-btn.v03-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#v03TopVersionLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v03-notif-group {
  position: relative;
  display: inline-flex;
  z-index: 40;
}

.v03-notif-group.open {
  z-index: 60;
}

.v03-notif-trigger {
  position: relative;
}

.v03-icon-svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-btn .v03-icon-svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.theme-toggle .v03-icon-svg {
  width: 17px;
  height: 17px;
}

.theme-toggle span {
  line-height: 1;
}

.theme-toggle:visited,
.theme-toggle:hover,
.theme-toggle:active {
  color: var(--ink);
  text-decoration: none;
}

.v03-notif-count {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 900;
  color: #fff;
  background: #ff4b67;
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.v03-notif-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(390px, 92vw);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 40px rgba(22, 34, 61, 0.22);
  overflow: hidden;
  z-index: 1200;
}

.v03-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.v03-notif-head strong {
  font-size: 0.95rem;
}

.v03-notif-list {
  max-height: 360px;
  overflow: auto;
}

.v03-notif-empty {
  padding: 13px 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.v03-notif-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid #4ca5ff;
}

.v03-notif-item:last-child {
  border-bottom: 0;
}

.v03-notif-item.warning {
  border-left-color: #f6b35a;
}

.v03-notif-item.danger {
  border-left-color: #f56565;
}

.v03-notif-item.info {
  border-left-color: #5eb8ff;
}

.v03-notif-text {
  min-width: 0;
}

.v03-notif-text strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.v03-notif-text p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.3;
}

.v03-notif-remove {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.v03-notif-remove:hover {
  color: var(--ink);
  border-color: var(--blue);
}

body.theme-dark .v03-notif-panel {
  box-shadow: 0 16px 48px rgba(3, 8, 18, 0.65);
}

@media (max-width: 1240px) {
  .v03-channels-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .v03-own-channel-line {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .v03-own-channel-canal {
    font-size: 1.3rem;
  }

  .v03-rename-form {
    grid-template-columns: 1fr;
  }

  .v03-competitors-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 8px;
  }

  .v03-own-compare-row,
  .v03-own-compare-head {
    grid-template-columns: 64px minmax(0, 1fr) 72px;
  }

  .v03-competitors-row .v03-competitors-cell:nth-child(3),
  .v03-competitors-row .v03-competitors-cell:nth-child(4) {
    display: none;
  }

  .v03-own-compare-row .v03-competitors-cell:nth-child(3),
  .v03-own-compare-row .v03-competitors-cell:nth-child(4),
  .v03-own-compare-head .v03-competitors-cell:nth-child(3),
  .v03-own-compare-head .v03-competitors-cell:nth-child(4) {
    display: none;
  }
}

.ranking-list {
  display: grid;
  gap: 8px;
}

body[data-page="audiences"] .audience-panel-card {
  display: grid;
  gap: 12px;
}

body[data-page="audiences"] .audience-panel-card > h2,
body[data-page="audiences"] .audience-panel-card > .chart-head {
  margin: 0;
}

body[data-page="audiences"] .audience-panel-card > .muted {
  margin: -6px 0 0;
}

.ranking-row {
  display: grid;
  grid-template-columns: 58px 1fr 100px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.ranking-row.player-row {
  border-color: #74d8b0;
  background: #e9fff5;
}

body.theme-dark .ranking-row.player-row {
  border-color: #2a8a6a;
  background: rgba(19, 78, 58, 0.45);
}

.audience-average-indicators {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 0;
}

.audience-average-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.audience-average-card h3 {
  margin: 0;
  padding: 12px 14px 0;
  font-size: 1rem;
}

.audience-average-card > .muted {
  margin: 4px 14px 10px;
}

.audience-average-card > p:not(.muted) {
  margin: 0;
  padding: 0 14px 14px;
}

.audience-average-card .audience-table {
  min-width: 0;
}

.audience-average-card .audience-table tr.player-row td {
  font-weight: 900;
  color: #1f7a5f;
}

body.theme-dark .audience-average-card {
  background: rgba(17, 26, 43, 0.78);
}

body.theme-dark .audience-average-card .audience-table tr.player-row td {
  color: #86efc9;
}

.ranking-rank {
  font-weight: 900;
}

.ranking-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.ranking-share {
  text-align: right;
  font-weight: 900;
  color: #234364;
}

body.theme-dark .ranking-row .ranking-share {
  color: #cfe2ff;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.chart-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-zoom-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
}

.audience-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--ink);
}

.chart-legend-item input {
  margin: 0;
}

.chart-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(24, 42, 74, 0.3);
}

.audience-chart-wrap {
  overflow-x: auto;
  border: 1px solid rgba(197, 216, 244, 0.96);
  border-radius: 18px;
  background: rgba(244, 248, 255, 0.92);
}

body.theme-dark .audience-chart-wrap {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(17, 26, 43, 0.78);
}

.audience-chart {
  display: block;
}

.audience-chart text {
  fill: rgba(37, 63, 107, 0.98) !important;
}

body.theme-dark .audience-chart text {
  fill: rgba(233, 241, 255, 0.94) !important;
}

.audience-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(197, 216, 244, 0.96);
  border-radius: 18px;
  background: rgba(244, 248, 255, 0.92);
}

.audience-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.audience-table th,
.audience-table td {
  border-top: 1px solid var(--border);
  padding: 9px 10px;
  text-align: left;
}

.audience-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(226, 236, 251, 0.78);
  color: #4c6287;
  font-weight: 800;
}

.audience-table .player-cell {
  font-weight: 900;
  color: #1f7a5f;
}

body.theme-dark .audience-table .player-cell {
  color: #86efc9;
}

@media (max-width: 1180px) {
  .audience-average-indicators {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .audience-average-indicators {
    grid-template-columns: 1fr;
  }
}

/* =========================
   V0.3 — Grille TV
   ========================= */

.v03-planner-page .planner-days-nav {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.v03-planner-page .day-nav-btn {
  margin: 0;
  color: #2a486d;
}

.v03-planner-page .day-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.v03-planner-page .planner-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  gap: 8px;
}

.v03-planner-page .day-tab {
  margin: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  cursor: pointer;
}

.v03-planner-page .day-tab-weekday {
  font-size: 0.83rem;
}

.v03-planner-page .day-tab-date {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.v03-planner-page .day-tab-badge {
  font-size: 0.73rem;
  font-weight: 800;
  color: #a8642d;
}

.v03-planner-page .day-tab.active {
  border-color: #85b9ff;
  background: linear-gradient(120deg, rgba(28, 199, 255, 0.12), rgba(133, 75, 255, 0.12));
}

.v03-planner-page .day-tab-badge.day-tab-published {
  color: #1f7a5f;
}

.v03-planner-page .planner-grid {
  display: grid;
  grid-template-columns: minmax(290px, 0.95fr) minmax(450px, 1.55fr);
  gap: 14px;
}

.v03-planner-page .card h2 {
  margin-bottom: 12px;
}

.v03-planner-page .program-library {
  display: grid;
  gap: 8px;
}

.v03-planner-page .program-filters-advanced {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.v03-planner-page .program-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.v03-planner-page .program-filters-head span {
  font-weight: 800;
}

.v03-planner-page .program-filters-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.v03-planner-page .library-filters-body {
  display: grid;
  gap: 10px;
}

.v03-planner-page .library-filters-body.collapsed {
  display: none;
}

.v03-planner-page .filter-group {
  display: grid;
  gap: 6px;
}

.v03-planner-page .filter-label {
  font-size: 0.83rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.v03-planner-page .filter-chip-row {
  gap: 8px;
}

.v03-planner-page .filter-chip {
  margin: 0;
  min-height: 42px;
  padding: 0 16px;
  background: var(--surface-soft);
  font-size: 0.92rem;
}

.v03-planner-page .filter-chip.active {
  border-color: #65b7ff;
  background: linear-gradient(100deg, rgba(48, 120, 255, 0.16), rgba(255, 79, 198, 0.15));
  color: #1a4f9f;
  box-shadow: 0 8px 18px rgba(101, 183, 255, 0.18);
}

.v03-planner-page .program-category {
  border: 1px solid var(--border);
  border-left: 4px solid #88b2f0;
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.v03-planner-page .category-toggle {
  margin: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
}

.v03-planner-page .category-content {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.v03-planner-page .category-content.collapsed {
  display: none;
}

.v03-planner-page .library-card {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--surface-soft);
  color: var(--ink);
  cursor: grab;
}

.v03-planner-page .program-meta-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}

.v03-planner-page .program-title {
  min-width: 0;
  font-weight: 700;
}

.v03-planner-page .program-submeta {
  color: var(--ink-soft);
  font-size: 0.84rem;
  line-height: 1.2;
}

.v03-planner-page .program-meta-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  row-gap: 8px;
  margin-left: 12px;
}

.v03-planner-page .program-duration,
.v03-planner-page .program-diffusions {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.v03-planner-page .program-diffusions {
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .v03-planner-page .library-card {
    align-items: flex-start;
  }

  .v03-planner-page .program-meta-right {
    max-width: 44%;
    gap: 8px;
  }
}

.v03-planner-page .library-empty {
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.86rem;
}

.v03-planner-page .feedback {
  font-size: 0.86rem;
  min-height: 18px;
  margin: 8px 0;
}

.v03-planner-page .schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v03-planner-page .day-controls-row {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(210px, 1fr);
  gap: 8px;
  margin: 8px 0 4px;
  align-items: center;
}

.v03-planner-page .day-controls-row.is-published {
  grid-template-columns: auto auto minmax(260px, 1fr);
}

.v03-planner-page .day-controls-row.is-published .day-select {
  grid-column: auto;
}

.v03-planner-page .day-controls-row button,
.v03-planner-page .clear-slot-btn,
.v03-planner-page .add-row-btn {
  margin: 0;
  min-height: 44px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: #2a486d;
  font-weight: 800;
  cursor: pointer;
  padding: 0 12px;
  box-shadow: inset 0 0 0 1px rgba(87, 127, 184, 0.06);
}

.v03-planner-page .day-controls-row button:disabled,
.v03-planner-page .clear-slot-btn:disabled,
.v03-planner-page .add-row-btn:disabled {
  cursor: not-allowed;
}

.v03-planner-page .day-controls-row button:hover,
.v03-planner-page .clear-slot-btn:hover,
.v03-planner-page .add-row-btn:hover {
  border-color: #7eb3ff;
}

.v03-planner-page #publishDayBtn {
  border: 0;
  color: #fff;
  background: linear-gradient(95deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.25);
}

.v03-planner-page .day-select,
.v03-planner-page .series-input {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}

.v03-planner-page .day-select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
}

.v03-planner-page .arrow-toggle-btn {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.v03-planner-page .planner-compliance-block {
  margin: 8px 0 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.v03-planner-page .planner-compliance-block.has-violations {
  border-color: #f1b26b;
  background: linear-gradient(115deg, rgba(255, 154, 61, 0.12), var(--surface-soft));
  box-shadow: inset 0 0 0 1px rgba(255, 154, 61, 0.2);
}

.v03-planner-page .v03-compliance-badge {
  margin-left: auto;
  margin-right: 4px;
}

.v03-planner-page .planner-compliance-body {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.v03-planner-page .planner-compliance-body.collapsed {
  display: none;
}

.v03-planner-page .planner-compliance-warnings,
.v03-planner-page .details-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.v03-planner-page .planner-compliance-warnings {
  color: #9f5e25;
  font-size: 0.84rem;
}

.v03-planner-page .day-slots {
  display: grid;
  gap: 10px;
}

.v03-planner-page .segment-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px;
}

.v03-planner-page .segment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.v03-planner-page .segment-title {
  margin: 0;
  font-size: 1rem;
}

.v03-planner-page .segment-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
  margin: 6px 0 10px;
}

.v03-planner-page .segment-metric {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 800;
  background: var(--surface);
  color: var(--ink-soft);
}

.v03-planner-page .segment-metric.segment-remaining {
  color: #a8642d;
  border-color: #ffd8b2;
  background: #fff3e6;
}

.v03-planner-page .segment-metric.segment-filled {
  color: #1f7a5f;
  border-color: #b8efd8;
  background: #e8fff6;
}

.v03-planner-page .segment-metric.summary-overflow {
  color: #b93558;
  border-color: #f7bfd0;
  background: #ffe8ef;
}

.v03-planner-page .segment-metric.segment-cost {
  color: #0e4f9b;
  border-color: #bcdfff;
  background: #e8f4ff;
}

.v03-planner-page .segment-rows {
  display: grid;
  gap: 8px;
}

.v03-planner-page .slot-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) minmax(220px, auto) 108px;
  gap: 8px;
  align-items: center;
}

.v03-planner-page .slot-time {
  font-weight: 800;
  color: var(--ink);
}

.v03-planner-page .overflow-time {
  color: #9f5e25;
}

.v03-planner-page .slot-program {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  min-height: 52px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  row-gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.v03-planner-page .slot-program-title {
  order: 1;
  flex: 1 1 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.2;
  max-height: 2.4em;
  font-weight: 700;
}

.v03-planner-page .slot-program-inline-meta {
  order: 3;
  margin-left: 0;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.v03-planner-page .slot-program-episode {
  order: 2;
  color: var(--ink-soft);
  font-weight: 700;
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.v03-planner-page .slot-program.drag-over {
  border-color: #58b4ff;
  box-shadow: 0 0 0 2px rgba(88, 180, 255, 0.2);
}

.v03-planner-page .slot-program.validated-slot,
.v03-planner-page .slot-program.locked {
  border-style: solid;
}

.v03-planner-page .slot-meta {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.v03-planner-page .slot-meta-empty {
  color: var(--ink-soft);
}

.v03-planner-page .series-fields {
  display: grid;
  grid-template-columns: auto minmax(92px, 112px) auto minmax(92px, 112px);
  align-items: center;
  gap: 6px;
}

.v03-planner-page .series-input {
  width: 100%;
  min-width: 92px;
  max-width: 112px;
  padding: 3px 10px;
}

.v03-planner-page .series-label {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.v03-planner-page .hidden-clear {
  visibility: hidden;
  pointer-events: none;
}

.v03-planner-page .status-badge,
.v03-production-tracking-page .status-badge,
.v03-market-page .status-badge {
  min-width: 96px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  background: var(--surface);
  color: var(--ink-soft);
}

body[data-page="market"] .status-badge {
  min-width: 96px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  background: var(--surface);
  color: var(--ink-soft);
}

.v03-planner-page .status-badge.inedit {
  color: #146b4f;
  background: #e8fff6;
  border-color: #b8efd8;
}

.v03-planner-page .status-badge.rediffusion {
  color: #925012;
  background: #fff3e6;
  border-color: #ffd8b2;
}

.v03-planner-page .status-badge.direct {
  color: #1b47ba;
  background: #dce8ff;
  border-color: #94b4ff;
}

.v03-planner-page .program-cost-badge,
.v03-market-page .program-cost-badge {
  min-width: 106px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #bcdfff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0e4f9b;
  background: #e8f4ff;
}

.v03-planner-page .film-class-badge {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.78rem;
  min-height: 44px;
  padding: 0 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v03-planner-page .film-class-badge.stars {
  min-width: 86px;
  justify-content: flex-start;
  gap: 1px;
}

.v03-planner-page .film-class-badge .stars-filled,
.v03-market-page .film-class-badge .stars-filled {
  color: #f5c45a;
}

.v03-planner-page .film-class-badge .stars-filled {
  color: #f5c45a;
}

.v03-market-page .film-class-badge .stars-half,
.v03-planner-page .film-class-badge .stars-half {
  color: transparent;
  background: linear-gradient(90deg, #f5c45a 50%, #8b99b5 50%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.v03-planner-page .film-class-badge .stars-empty {
  color: #8b99b5;
}

.v03-planner-page .film-class-badge.age[data-age-rating="tp"] {
  color: #146b4f;
  border-color: #9edec6;
  background: #dcf9ed;
}

.v03-planner-page .film-class-badge.age[data-age-rating="m10"] {
  color: #0e4f9b;
  border-color: #bcdfff;
  background: #e8f4ff;
}

.v03-planner-page .film-class-badge.age[data-age-rating="m12"] {
  color: #925012;
  border-color: #ffd8b2;
  background: #fff3e6;
}

.v03-planner-page .film-class-badge.age[data-age-rating="m16"] {
  color: #65459c;
  border-color: #d0c0ff;
  background: #efe9ff;
}

.v03-planner-page .film-class-badge.age[data-age-rating="m18"] {
  color: #902840;
  border-color: #f7bfd0;
  background: #ffe8ef;
}

.v03-planner-page .category-information {
  --category-rgb: 74, 192, 255;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-divertissement {
  --category-rgb: 246, 196, 83;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-films {
  --category-rgb: 232, 121, 249;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-series {
  --category-rgb: 167, 139, 250;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-magazines {
  --category-rgb: 251, 113, 133;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-jeunesse {
  --category-rgb: 249, 115, 22;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-documentaires {
  --category-rgb: 34, 211, 238;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-realite {
  --category-rgb: 244, 63, 94;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .category-culture {
  --category-rgb: 96, 165, 250;
  border-left-color: rgb(var(--category-rgb));
}

.v03-planner-page .library-card:is(
  .category-information,
  .category-divertissement,
  .category-films,
  .category-series,
  .category-magazines,
  .category-jeunesse,
  .category-documentaires,
  .category-realite,
  .category-culture
) {
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.34);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.16), rgba(var(--category-rgb), 0.06));
}

.v03-planner-page .slot-program:is(
  .category-information,
  .category-divertissement,
  .category-films,
  .category-series,
  .category-magazines,
  .category-jeunesse,
  .category-documentaires,
  .category-realite,
  .category-culture
) {
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.38);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.2), rgba(var(--category-rgb), 0.08));
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1800;
  padding: 14px;
  background: rgba(14, 22, 38, 0.58);
  backdrop-filter: blur(4px);
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: min(560px, calc(100% - 28px));
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 22px 56px rgba(18, 33, 61, 0.32);
  padding: 20px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.modal-card h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.modal-body-text {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 4px 0 12px;
}

.modal-body-text p {
  margin: 0 0 8px;
}

.modal-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.modal-list li {
  margin: 0 0 6px;
  color: var(--ink-soft);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.modal-actions .btn {
  min-height: 44px;
}

body.theme-dark .v03-planner-page .filter-chip {
  color: #cfe1ff;
  background: rgba(21, 33, 54, 0.9);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark .v03-planner-page .filter-chip.active {
  color: #ffffff;
}

body.theme-dark .v03-planner-page .segment-metric.segment-remaining {
  color: #ffd39f;
  border-color: #8a5a2a;
  background: #52361d;
}

body.theme-dark .v03-planner-page .segment-metric.segment-filled {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark .v03-planner-page .segment-metric.summary-overflow {
  color: #ffb6c8;
  border-color: #88455f;
  background: #5a2b3c;
}

body.theme-dark .v03-planner-page .segment-metric.segment-cost,
body.theme-dark .v03-planner-page .program-cost-badge {
  color: #86bbff;
  border-color: #27558e;
  background: #15365f;
}

body.theme-dark .v03-planner-page .status-badge.rediffusion {
  color: #ffd39f;
  border-color: #8a5a2a;
  background: #52361d;
}

body.theme-dark .v03-planner-page .status-badge.inedit,
body.theme-dark .v03-planner-page .status-badge.direct {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark .v03-planner-page .status-badge.direct {
  color: #bdd4ff;
  border-color: #4566a8;
  background: #1f3158;
}

body.theme-dark .v03-planner-page .status-badge.inedit {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark .modal-card {
  border-color: #3c5b87;
  background: #172740;
  color: #dbe7ff;
  box-shadow: 0 24px 64px rgba(6, 12, 24, 0.64);
}

body.theme-dark .modal-body-text,
body.theme-dark .modal-list li {
  color: #a9bfdc;
}

body.theme-dark .v03-planner-page .planner-compliance-block.has-violations {
  border-color: #8a5a2a;
  background: linear-gradient(115deg, rgba(255, 154, 61, 0.22), rgba(17, 26, 43, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 154, 61, 0.28);
}

body.theme-dark .v03-planner-page .day-tab.active {
  border-color: #5b8fe0;
}

body.theme-dark .v03-planner-page .day-controls-row button,
body.theme-dark .v03-planner-page .clear-slot-btn,
body.theme-dark .v03-planner-page .add-row-btn,
body.theme-dark .v03-planner-page .arrow-toggle-btn {
  color: #dce9ff;
  border-color: #4a6893;
  background: #20324f;
  box-shadow: inset 0 0 0 1px rgba(147, 189, 255, 0.08);
}

body.theme-dark .v03-planner-page .day-controls-row button:hover:not(:disabled),
body.theme-dark .v03-planner-page .clear-slot-btn:hover:not(:disabled),
body.theme-dark .v03-planner-page .add-row-btn:hover:not(:disabled),
body.theme-dark .v03-planner-page .arrow-toggle-btn:hover:not(:disabled) {
  border-color: #73a3e4;
  background: #274167;
  box-shadow: 0 8px 18px rgba(66, 124, 215, 0.24);
}

body.theme-dark .v03-planner-page .day-controls-row button:disabled,
body.theme-dark .v03-planner-page .clear-slot-btn:disabled,
body.theme-dark .v03-planner-page .add-row-btn:disabled,
body.theme-dark .v03-planner-page .arrow-toggle-btn:disabled {
  color: #8094b8;
  border-color: #324866;
  background: #172740;
  opacity: 0.72;
}

@media (max-width: 1260px) {
  .v03-planner-page .planner-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .v03-planner-page .day-controls-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .v03-planner-page .day-controls-row .day-select {
    grid-column: 1 / -1;
  }

  .v03-planner-page .slot-row {
    grid-template-columns: 1fr;
  }

  .v03-planner-page .slot-meta {
    justify-content: flex-start;
  }

  .v03-planner-page .planner-days {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }
}

@media (max-width: 700px) {
  .v03-planner-page .segment-metrics-row {
    grid-template-columns: 1fr;
  }

  .v03-planner-page .planner-days {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .v03-planner-page .day-controls-row {
    grid-template-columns: 1fr;
  }
}

/* V0.3 — Productions en cours */
.v03-production-tracking-page .production-tracking-page-card {
  display: grid;
  gap: 18px;
}

.v03-production-tracking-page .production-tracking-list {
  display: grid;
  gap: 16px;
}

.v03-production-tracking-page .library-empty {
  margin: 0;
  padding: 22px 24px;
  border: 1px dashed rgba(177, 204, 239, 0.96);
  border-radius: 18px;
  background: rgba(244, 249, 255, 0.74);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}

.v03-production-tracking-page #productionTrackingFeedback {
  margin: 0;
}

.v03-production-tracking-page #productionTrackingFeedback:empty {
  display: none;
}

.v03-production-tracking-page .production-tracking-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}

.v03-production-tracking-page .production-tracking-card.category-information { --category-rgb: 74, 192, 255; }
.v03-production-tracking-page .production-tracking-card.category-divertissement { --category-rgb: 246, 196, 83; }
.v03-production-tracking-page .production-tracking-card.category-films { --category-rgb: 232, 121, 249; }
.v03-production-tracking-page .production-tracking-card.category-series { --category-rgb: 167, 139, 250; }
.v03-production-tracking-page .production-tracking-card.category-magazines { --category-rgb: 251, 113, 133; }
.v03-production-tracking-page .production-tracking-card.category-jeunesse { --category-rgb: 249, 115, 22; }
.v03-production-tracking-page .production-tracking-card.category-documentaires { --category-rgb: 34, 211, 238; }
.v03-production-tracking-page .production-tracking-card.category-realite { --category-rgb: 244, 63, 94; }
.v03-production-tracking-page .production-tracking-card.category-culture { --category-rgb: 96, 165, 250; }

.v03-production-tracking-page .production-tracking-card[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.3);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.13), rgba(var(--category-rgb), 0.05));
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.14);
}

.v03-production-tracking-page .production-tracking-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.v03-production-tracking-page .production-tracking-head-left {
  flex: 1 1 auto;
  min-width: 0;
}

.v03-production-tracking-page .production-tracking-head h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.v03-production-tracking-page .production-tracking-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.v03-production-tracking-page .production-tracking-badges .day-badge {
  min-width: 0;
  justify-content: center;
}

.v03-production-tracking-page .production-tracking-badges .day-badge[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.32);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.18), rgba(var(--category-rgb), 0.08));
  color: #1e3554;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.14);
}

.v03-production-tracking-page .production-tracking-badges .btn.secondary-btn,
.v03-production-tracking-page .production-episode-actions .btn.secondary-btn {
  margin: 0;
  min-width: 118px;
  justify-content: center;
}

.v03-production-tracking-page .arrow-toggle-btn,
.v03-production-tracking-page .production-tracking-toggle {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(184, 206, 244, 0.95);
  background: rgba(238, 245, 255, 0.86);
  color: #234364;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.v03-production-tracking-page .arrow-toggle-btn:hover,
.v03-production-tracking-page .production-tracking-toggle:hover {
  border-color: #8abaff;
  background: rgba(224, 237, 255, 0.94);
}

.v03-production-tracking-page .production-tracking-summary {
  display: grid;
  gap: 8px;
}

.v03-production-tracking-page .production-tracking-summary strong {
  font-size: 1rem;
}

.v03-production-tracking-page .production-tracking-summary.collapsed,
.v03-production-tracking-page .production-episodes-list.collapsed {
  display: none;
}

.v03-production-tracking-page .production-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(188, 223, 255, 0.95);
  background: rgba(232, 244, 255, 0.9);
}

.v03-production-tracking-page .production-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4e7cf4 0%, #f35bc5 100%);
}

.v03-production-tracking-page .production-episodes-list {
  display: grid;
  gap: 12px;
}

.v03-production-tracking-page .production-episode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(188, 223, 255, 0.95);
  background: rgba(244, 249, 255, 0.78);
}

.v03-production-tracking-page .production-episode-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.v03-production-tracking-page .production-episode-left > span:last-child {
  color: var(--ink-soft);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.v03-production-tracking-page .production-episode-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.v03-production-tracking-page .production-episode-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.v03-production-tracking-page .production-ready-date {
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.v03-production-tracking-page .status-badge {
  min-width: 156px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
}

.v03-production-tracking-page .status-badge.inedit {
  color: #146b4f;
  background: #e8fff6;
  border-color: #b8efd8;
}

.v03-production-tracking-page .status-badge.rediffusion {
  color: #925012;
  background: #fff3e6;
  border-color: #ffd8b2;
}

.v03-production-tracking-page .status-badge.direct {
  color: #1b47ba;
  background: #dce8ff;
  border-color: #94b4ff;
}

.v03-production-tracking-page .modal-card label {
  display: block;
  margin-bottom: 8px;
}

body[data-page="studio-productions"] .studio-modal-card {
  width: min(900px, calc(100vw - 28px));
}

body[data-page="studio-productions"] .studio-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

body[data-page="studio-productions"] .studio-production-form {
  display: grid;
  gap: 10px;
}

body[data-page="studio-productions"] .studio-form-grid {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}

body[data-page="studio-productions"] .studio-form-grid label {
  grid-column: 1;
  color: var(--ink-soft);
  margin: 0;
}

body[data-page="studio-productions"] .studio-form-grid > :not(label) {
  grid-column: 2;
  min-width: 0;
}

body[data-page="studio-productions"] .studio-form-grid .hidden {
  display: none !important;
}

body[data-page="studio-productions"] .studio-recurring-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-page="studio-productions"] .studio-recurring-day {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

body[data-page="studio-productions"] .studio-recurring-day input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #3f75df;
}

body[data-page="studio-productions"] .studio-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body[data-page="studio-productions"] .studio-form-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

body[data-page="studio-productions"] .studio-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body[data-page="studio-productions"] .studio-modal-card .feedback {
  margin-top: 8px;
}

body.theme-dark .v03-production-tracking-page .library-empty {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(26, 40, 67, 0.88);
  color: #d9e8ff;
}

body.theme-dark .v03-production-tracking-page .production-tracking-card[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.44);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.18), rgba(var(--category-rgb), 0.08));
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.2);
}

body.theme-dark .v03-production-tracking-page .production-tracking-badges .day-badge[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.52);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.24), rgba(var(--category-rgb), 0.12));
  color: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.24);
}

body.theme-dark .v03-production-tracking-page .arrow-toggle-btn,
body.theme-dark .v03-production-tracking-page .production-tracking-toggle {
  border-color: #3d5f95;
  background: #1b2b48;
  color: #d2e4ff;
}

body.theme-dark .v03-production-tracking-page .arrow-toggle-btn:hover,
body.theme-dark .v03-production-tracking-page .production-tracking-toggle:hover {
  border-color: #74a0dd;
  background: #223a60;
}

body.theme-dark .v03-production-tracking-page .production-progress-bar {
  border-color: rgba(67, 100, 151, 0.92);
  background: rgba(20, 33, 57, 0.9);
}

body.theme-dark .v03-production-tracking-page .production-episode-row {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(26, 40, 67, 0.88);
}

body.theme-dark .v03-production-tracking-page .production-episode-left > span:last-child,
body.theme-dark .v03-production-tracking-page .production-ready-date {
  color: #c7d8f4;
}

body.theme-dark .v03-production-tracking-page .status-badge.rediffusion {
  color: #ffd1a3;
  background: rgba(106, 62, 16, 0.38);
  border-color: rgba(255, 183, 107, 0.42);
}

body.theme-dark .v03-production-tracking-page .status-badge.inedit,
body.theme-dark .v03-production-tracking-page .status-badge.direct {
  color: #c9ffe7;
  background: rgba(18, 97, 70, 0.34);
  border-color: rgba(115, 224, 187, 0.34);
}

body.theme-dark .v03-production-tracking-page .status-badge.direct {
  color: #bdd4ff;
  background: rgba(33, 57, 104, 0.52);
  border-color: rgba(112, 148, 232, 0.4);
}

body.theme-dark .v03-production-tracking-page .status-badge.inedit {
  color: #c9ffe7;
  background: rgba(18, 97, 70, 0.34);
  border-color: rgba(115, 224, 187, 0.34);
}

body.theme-dark[data-page="studio-productions"] .studio-form-grid label,
body.theme-dark[data-page="studio-productions"] .modal-card .studio-recurring-day {
  color: #bfd0ea;
}

body.theme-dark[data-page="studio-productions"] .studio-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.theme-dark[data-page="studio-productions"] .studio-form-grid select {
  border-color: #4a6996;
  background: #1e3150;
  color: #eff6ff;
}

@media (max-width: 980px) {
  .v03-production-tracking-page .production-tracking-head,
  .v03-production-tracking-page .production-episode-row {
    flex-direction: column;
    align-items: stretch;
  }

  .v03-production-tracking-page .production-tracking-badges,
  .v03-production-tracking-page .production-episode-right {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .v03-production-tracking-page .production-tracking-card,
  .v03-production-tracking-page .production-episode-row {
    padding: 14px;
  }

  body[data-page="studio-productions"] .studio-form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body[data-page="studio-productions"] .studio-form-grid label,
  body[data-page="studio-productions"] .studio-form-grid > :not(label) {
    grid-column: 1;
  }

  .v03-production-tracking-page .production-tracking-badges .day-badge,
  .v03-production-tracking-page .production-tracking-badges .btn.secondary-btn,
  .v03-production-tracking-page .production-episode-actions .btn.secondary-btn,
  .v03-production-tracking-page .status-badge {
    width: 100%;
    min-width: 0;
  }
}

/* V0.3 — Régie pub */
.v03-ads-top-grid {
  margin-top: 10px;
}

.v03-ads-page .library-empty {
  margin: 0;
  padding: 22px 24px;
  border: 1px dashed rgba(177, 204, 239, 0.96);
  border-radius: 18px;
  background: rgba(244, 249, 255, 0.74);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
  width: 100%;
}

/* V0.3 — Marché des programmes */
.v03-market-page .v03-market-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.v03-market-page .v03-market-filters-card,
.v03-market-page .v03-market-list-card {
  align-self: start;
}

.v03-market-page .v03-market-filters-card {
  position: sticky;
  top: 0;
  z-index: 4;
}

.v03-market-page .arrow-toggle-btn {
  color: #2a486d;
}

.v03-market-page .arrow-toggle-btn:hover {
  border-color: #9ebce8;
  background: #eef5ff;
}

.v03-market-page .program-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.v03-market-page .v03-card-head {
  align-items: center;
}

.v03-market-page .v03-card-head .v03-market-sort-row {
  margin-top: -10px;
}

.v03-market-page .program-filters-head span {
  font-weight: 800;
}

.v03-market-page .program-filters-head-actions,
.v03-market-page .v03-market-sort-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.v03-market-page .v03-market-sort-row {
  justify-content: flex-end;
  white-space: nowrap;
}

.v03-market-page .v03-market-sort-label {
  margin: 0;
  white-space: nowrap;
}

.v03-market-page .v03-market-list-card > .feedback {
  min-height: 0;
  margin: 2px 0 0;
}

.v03-market-page .v03-market-list-card > .feedback:empty {
  display: none;
}

.v03-market-page .library-filters-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.v03-market-page .library-filters-body.collapsed {
  display: none;
}

.v03-market-page .filter-group {
  display: grid;
  gap: 6px;
}

.v03-market-page .filter-label {
  font-size: 0.84rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.v03-market-page .filter-chip-row {
  gap: 8px;
}

.v03-market-page .filter-chip {
  margin: 0;
  min-height: 42px;
  padding: 0 16px;
  background: var(--surface-soft);
  font-size: 0.92rem;
}

.v03-market-page .filter-chip:hover:not(.active):not(:disabled) {
  border-color: #9ebce8;
  background: var(--surface-soft);
  box-shadow: 0 8px 18px rgba(113, 152, 219, 0.16);
  transform: translateY(-1px);
}

.v03-market-page .filter-chip.active {
  border-color: #65b7ff;
  background: linear-gradient(100deg, rgba(48, 120, 255, 0.16), rgba(255, 79, 198, 0.15));
  color: #1a4f9f;
  box-shadow: 0 8px 18px rgba(101, 183, 255, 0.18);
}

.v03-market-page .program-search-input,
.v03-market-page .day-select,
.v03-finance-month-select {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  padding: 0 12px;
}

.v03-market-page .day-select,
.v03-planner-page .day-select,
.v03-finance-month-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23325584' d='M1.2 1.1a1 1 0 0 1 1.4 0L6 4.5l3.4-3.4a1 1 0 1 1 1.4 1.4L6.7 6.6a1 1 0 0 1-1.4 0L1.2 2.5a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

.v03-market-page .day-select,
.v03-planner-page .day-select,
.v03-finance-month-select,
body.theme-dark .v03-market-page .day-select,
body.theme-dark .v03-planner-page .day-select,
body.theme-dark .v03-finance-month-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
}

.v03-market-page .day-select::-ms-expand,
.v03-planner-page .day-select::-ms-expand,
.v03-finance-month-select::-ms-expand {
  display: none;
}

.v03-market-page .v03-market-sort-row .day-select {
  width: clamp(150px, 16vw, 220px);
  min-width: 150px;
  flex: 0 1 220px;
}

.v03-market-page .v03-market-sort-row .btn {
  flex: 0 0 auto;
}

.v03-market-page .v03-market-content {
  display: grid;
  gap: 12px;
}

.v03-market-page .v03-market-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(197, 216, 244, 0.96);
  background: rgba(244, 248, 255, 0.92);
}

.v03-market-page .v03-market-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.v03-market-page .v03-market-table thead th {
  text-align: left;
  font-size: 0.81rem;
  font-weight: 800;
  color: #4c6287;
  padding: 10px 16px;
  background: rgba(226, 236, 251, 0.78);
  border-top: 1px solid rgba(197, 216, 244, 0.96);
  border-bottom: 1px solid rgba(197, 216, 244, 0.96);
  white-space: nowrap;
}

.v03-market-page .v03-market-table thead th:first-child {
  border-left: 1px solid rgba(197, 216, 244, 0.96);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.v03-market-page .v03-market-table thead th:last-child {
  border-right: 1px solid rgba(197, 216, 244, 0.96);
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.v03-market-page .v03-market-table tbody tr:not(.owned-table-detail-row) td {
  padding: 12px;
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.v03-market-page .v03-market-table tbody tr:not(.owned-table-detail-row) td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.v03-market-page .v03-market-table tbody tr:not(.owned-table-detail-row) td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.v03-market-page .v03-market-table tbody tr.category-information td:first-child { border-left-color: rgb(74, 192, 255); box-shadow: inset 3px 0 0 rgb(74, 192, 255); }
.v03-market-page .v03-market-table tbody tr.category-divertissement td:first-child { border-left-color: rgb(246, 196, 83); box-shadow: inset 3px 0 0 rgb(246, 196, 83); }
.v03-market-page .v03-market-table tbody tr.category-films td:first-child { border-left-color: rgb(232, 121, 249); box-shadow: inset 3px 0 0 rgb(232, 121, 249); }
.v03-market-page .v03-market-table tbody tr.category-series td:first-child { border-left-color: rgb(167, 139, 250); box-shadow: inset 3px 0 0 rgb(167, 139, 250); }
.v03-market-page .v03-market-table tbody tr.category-magazines td:first-child { border-left-color: rgb(251, 113, 133); box-shadow: inset 3px 0 0 rgb(251, 113, 133); }
.v03-market-page .v03-market-table tbody tr.category-jeunesse td:first-child { border-left-color: rgb(249, 115, 22); box-shadow: inset 3px 0 0 rgb(249, 115, 22); }
.v03-market-page .v03-market-table tbody tr.category-documentaires td:first-child { border-left-color: rgb(34, 211, 238); box-shadow: inset 3px 0 0 rgb(34, 211, 238); }
.v03-market-page .v03-market-table tbody tr.category-realite td:first-child { border-left-color: rgb(244, 63, 94); box-shadow: inset 3px 0 0 rgb(244, 63, 94); }
.v03-market-page .v03-market-table tbody tr.category-culture td:first-child { border-left-color: rgb(96, 165, 250); box-shadow: inset 3px 0 0 rgb(96, 165, 250); }

.v03-market-page .owned-title-btn {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.v03-market-page .owned-title-btn.disabled,
.v03-market-page .owned-title-btn.not-clickable {
  cursor: default;
}

body[data-page="owned"] .owned-title-grid {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
}

body[data-page="market"] .owned-title-grid {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
}

body[data-page="owned"] .owned-detail-toggle-btn {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}

body[data-page="market"] .owned-detail-toggle-btn {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}

body[data-page="owned"] .owned-name-cell .owned-title-btn {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
}

body[data-page="market"] .owned-name-cell .owned-title-btn {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
}

body[data-page="owned"] .owned-name-cell .owned-program-meta-stack {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

body[data-page="market"] .owned-name-cell .owned-program-meta-stack {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}

body[data-page="owned"] .owned-name-cell .market-program-meta {
  margin-top: 0;
  padding-left: 0;
  line-height: 1.25;
  white-space: normal;
}

body[data-page="market"] .owned-name-cell .market-program-meta {
  margin-top: 0;
  padding-left: 0;
  line-height: 1.25;
  white-space: normal;
}

.v03-market-page .market-program-meta {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.v03-market-page .market-type-cell {
  min-width: 180px;
}

.v03-market-page .market-type-cell .day-badge {
  margin: 0;
}

.v03-market-page .market-type-cell .day-badge[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.38);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.18), rgba(var(--category-rgb), 0.08));
  color: #24476c;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.16);
}

.v03-market-page .status-badge {
  min-width: 96px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  background: var(--surface);
  color: var(--ink-soft);
}

.v03-market-page .status-badge.inedit {
  color: #146b4f;
  background: #e8fff6;
  border-color: #b8efd8;
}

body[data-page="market"] .status-badge.inedit {
  color: #146b4f;
  background: #e8fff6;
  border-color: #b8efd8;
}

.v03-market-page .status-badge.rediffusion {
  color: #925012;
  background: #fff3e6;
  border-color: #ffd8b2;
}

body[data-page="market"] .status-badge.rediffusion {
  color: #925012;
  background: #fff3e6;
  border-color: #ffd8b2;
}

.v03-market-page .status-badge.direct {
  color: #1b47ba;
  background: #dce8ff;
  border-color: #94b4ff;
}

body[data-page="market"] .status-badge.direct {
  color: #1b47ba;
  background: #dce8ff;
  border-color: #94b4ff;
}

body[data-page="owned"] .status-badge {
  min-width: 96px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  background: var(--surface);
  color: var(--ink-soft);
}

body[data-page="owned"] .status-badge.inedit {
  color: #146b4f;
  background: #e8fff6;
  border-color: #b8efd8;
}

body[data-page="owned"] .status-badge.rediffusion {
  color: #925012;
  background: #fff3e6;
  border-color: #ffd8b2;
}

body[data-page="owned"] .status-badge.direct {
  color: #1b47ba;
  background: #dce8ff;
  border-color: #94b4ff;
}

.v03-market-page .program-cost-badge {
  min-width: 106px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid #bcdfff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0e4f9b;
  background: #e8f4ff;
}

.v03-market-page .film-class-badge {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-weight: 800;
  font-size: 0.78rem;
  min-height: 44px;
  padding: 0 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v03-market-page .film-class-badge.stars {
  min-width: 86px;
  justify-content: flex-start;
  gap: 1px;
}

.v03-market-page .film-class-badge .stars-empty {
  color: #8b99b5;
}

.v03-market-page .film-class-badge.age[data-age-rating="tp"] {
  color: #146b4f;
  border-color: #9edec6;
  background: #dcf9ed;
}

.v03-market-page .film-class-badge.age[data-age-rating="m10"] {
  color: #0e4f9b;
  border-color: #bcdfff;
  background: #e8f4ff;
}

.v03-market-page .film-class-badge.age[data-age-rating="m12"] {
  color: #925012;
  border-color: #ffd8b2;
  background: #fff3e6;
}

.v03-market-page .film-class-badge.age[data-age-rating="m16"] {
  color: #65459c;
  border-color: #d0c0ff;
  background: #efe9ff;
}

.v03-market-page .film-class-badge.age[data-age-rating="m18"] {
  color: #902840;
  border-color: #f7bfd0;
  background: #ffe8ef;
}

.v03-market-page .category-information { --category-rgb: 74, 192, 255; }
.v03-market-page .category-divertissement { --category-rgb: 246, 196, 83; }
.v03-market-page .category-films { --category-rgb: 232, 121, 249; }
.v03-market-page .category-series { --category-rgb: 167, 139, 250; }
.v03-market-page .category-magazines { --category-rgb: 251, 113, 133; }
.v03-market-page .category-jeunesse { --category-rgb: 249, 115, 22; }
.v03-market-page .category-documentaires { --category-rgb: 34, 211, 238; }
.v03-market-page .category-realite { --category-rgb: 244, 63, 94; }
.v03-market-page .category-culture { --category-rgb: 96, 165, 250; }

.v03-market-page .market-buy-btn {
  min-width: 110px;
}

.v03-market-page .owned-table-detail-row td {
  padding: 8px 12px 12px 12px;
  border: 0;
  background: transparent;
}

.v03-market-page .owned-program-details {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: grid;
  gap: 12px;
}

.v03-market-page .owned-season-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.v03-market-page .owned-season-summary-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.v03-market-page .owned-season-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.v03-market-page .owned-season-summary-head strong {
  font-size: 1rem;
}

.v03-market-page .owned-season-summary-body {
  display: grid;
  gap: 6px;
}

.v03-market-page .owned-season-summary-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.v03-market-page .owned-episodes-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v03-market-page .owned-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.v03-market-page .owned-episode-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.v03-market-page .owned-episode-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.v03-market-page .owned-episode-card-title {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

.v03-market-page .owned-episode-card-body {
  display: grid;
  gap: 6px;
}

.v03-market-page .owned-episode-card-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.v03-market-page .owned-episode-pill {
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 10px;
}

.v03-market-page .owned-episode-pill.inedit {
  color: #146b4f;
  border-color: #b8efd8;
  background: #e8fff6;
}

.v03-market-page .owned-episode-pill.rediffusion {
  color: #925012;
  border-color: #ffd8b2;
  background: #fff3e6;
}

.v03-market-page .library-empty {
  margin: 0;
  padding: 22px 24px;
  border: 1px dashed rgba(177, 204, 239, 0.96);
  border-radius: 18px;
  background: rgba(244, 249, 255, 0.74);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}

body.theme-dark .v03-market-page .filter-chip {
  color: #cfe1ff;
  background: rgba(21, 33, 54, 0.9);
  border-color: rgba(57, 79, 118, 0.95);
}

body.theme-dark .v03-market-page .filter-chip.active {
  color: #ffffff;
}

body.theme-dark .v03-market-page .program-search-input,
body.theme-dark .v03-market-page .day-select {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(26, 40, 67, 0.88);
  color: #eff6ff;
}

body.theme-dark .v03-market-page .day-select,
body.theme-dark .v03-planner-page .day-select,
body.theme-dark .v03-finance-month-select,
body.theme-dark .v03-final-assignment-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23d5e7ff' d='M1.2 1.1a1 1 0 0 1 1.4 0L6 4.5l3.4-3.4a1 1 0 1 1 1.4 1.4L6.7 6.6a1 1 0 0 1-1.4 0L1.2 2.5a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

body.theme-dark .v03-market-page .day-select option,
body.theme-dark .v03-planner-page .day-select option,
body.theme-dark .v03-finance-month-select option {
  background: #1a2a45;
  color: #eff6ff;
}

body.theme-dark .v03-market-page .arrow-toggle-btn {
  border-color: #3d5f95;
  background: #1b2b48;
  color: #d2e4ff;
}

body.theme-dark .v03-market-page .arrow-toggle-btn:hover {
  border-color: #74a0dd;
  background: #223a60;
}

body.theme-dark .v03-market-page .v03-market-table thead th,
body.theme-dark .v03-market-page .filter-label,
body.theme-dark .v03-market-page .market-program-meta,
body.theme-dark .v03-market-page .library-empty {
  color: #bfd0ea;
}

body.theme-dark .v03-market-page .v03-market-table-wrap {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(18, 29, 49, 0.94);
}

body.theme-dark .v03-market-page .v03-market-table {
  background: transparent;
}

body.theme-dark .v03-market-page .v03-market-table thead th {
  background: rgba(31, 47, 77, 0.92);
  border-top-color: rgba(67, 100, 151, 0.96);
  border-bottom-color: rgba(67, 100, 151, 0.96);
}

body.theme-dark .v03-market-page .v03-market-table thead th:first-child {
  border-left-color: rgba(67, 100, 151, 0.96);
}

body.theme-dark .v03-market-page .v03-market-table thead th:last-child {
  border-right-color: rgba(67, 100, 151, 0.96);
}

body.theme-dark .v03-market-page .v03-market-table tbody tr:not(.owned-table-detail-row) td,
body.theme-dark .v03-market-page .owned-program-details,
body.theme-dark .v03-market-page .owned-season-summary-card,
body.theme-dark .v03-market-page .owned-episode-card,
body.theme-dark .v03-market-page .owned-episode-pill,
body.theme-dark .v03-market-page .library-empty {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(26, 40, 67, 0.88);
}

body.theme-dark .v03-market-page .owned-title-btn {
  color: #eff6ff;
}

body.theme-dark .v03-market-page .owned-program-details {
  background: transparent;
}

body.theme-dark .v03-market-page .owned-season-summary-body p {
  color: #bfd0ea;
}

body.theme-dark .v03-market-page .owned-episode-card-title {
  color: #eff6ff;
}

body.theme-dark .v03-market-page .owned-episode-card-body p {
  color: #bfd0ea;
}

body.theme-dark .v03-market-page .market-type-cell .day-badge[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.56);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.24), rgba(var(--category-rgb), 0.12));
  color: #f4f8ff;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.22);
}

body.theme-dark .v03-market-page .program-cost-badge {
  color: #86bbff;
  border-color: #27558e;
  background: #15365f;
}

body.theme-dark .v03-market-page .status-badge.rediffusion {
  color: #ffd39f;
  border-color: #8a5a2a;
  background: #52361d;
}

body.theme-dark[data-page="market"] .status-badge.rediffusion {
  color: #ffd39f;
  border-color: #8a5a2a;
  background: #52361d;
}

body.theme-dark .v03-market-page .status-badge.inedit,
body.theme-dark .v03-market-page .status-badge.direct {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark[data-page="market"] .status-badge.inedit,
body.theme-dark[data-page="market"] .status-badge.direct {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark .v03-market-page .status-badge.direct {
  color: #bdd4ff;
  border-color: #4566a8;
  background: #1f3158;
}

body.theme-dark[data-page="market"] .status-badge.direct {
  color: #bdd4ff;
  border-color: #4566a8;
  background: #1f3158;
}

body.theme-dark .v03-market-page .status-badge.inedit {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark[data-page="market"] .status-badge.inedit {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark[data-page="owned"] .status-badge.rediffusion {
  color: #ffd39f;
  border-color: #8a5a2a;
  background: #52361d;
}

body.theme-dark[data-page="owned"] .status-badge.inedit,
body.theme-dark[data-page="owned"] .status-badge.direct {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark[data-page="owned"] .status-badge.direct {
  color: #bdd4ff;
  border-color: #4566a8;
  background: #1f3158;
}

body.theme-dark[data-page="owned"] .status-badge.inedit {
  color: #96f5cf;
  border-color: #2d6f58;
  background: #174838;
}

body.theme-dark .v03-market-page .owned-season-btn.active {
  border-color: #5b8fe0;
  background: linear-gradient(100deg, rgba(58, 116, 226, 0.34), rgba(212, 77, 183, 0.24));
  color: #ffffff;
}

body.theme-dark .v03-market-page .owned-episode-pill.inedit {
  color: #c9ffe7;
  background: rgba(18, 97, 70, 0.34);
  border-color: rgba(115, 224, 187, 0.34);
}

body.theme-dark .v03-market-page .owned-episode-pill.rediffusion {
  color: #ffd1a3;
  background: rgba(106, 62, 16, 0.38);
  border-color: rgba(255, 183, 107, 0.42);
}

@media (max-width: 1100px) {
  .v03-market-page .v03-market-filters-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .v03-market-page .v03-market-table,
  .v03-market-page .v03-market-table thead,
  .v03-market-page .v03-market-table tbody,
  .v03-market-page .v03-market-table th,
  .v03-market-page .v03-market-table td,
  .v03-market-page .v03-market-table tr {
    display: block;
  }

  .v03-market-page .v03-market-table thead {
    display: none;
  }

  .v03-market-page .v03-market-table tbody tr:not(.owned-table-detail-row) td {
    border-radius: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  .v03-market-page .v03-market-table tbody tr:not(.owned-table-detail-row) td:first-child {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  .v03-market-page .v03-market-table tbody tr:not(.owned-table-detail-row) td:last-child {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
  }
}

/* V0.3 — Recrutement */
.v03-recruitment-page .v03-recruitment-filters-card,
.v03-recruitment-page .v03-recruitment-list-card {
  align-self: start;
}

.v03-recruitment-page .v03-recruitment-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v03-recruitment-page #staffRecruitFilters {
  display: grid;
  gap: 12px;
}

.v03-recruitment-page .v03-recruitment-filters-grid {
  display: grid;
  gap: 12px;
  margin-top: 0;
  align-items: start;
}

.v03-recruitment-page .v03-recruitment-profile {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.v03-staff-page .v03-staff-profile {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.v03-recruitment-page .v03-recruitment-specialty {
  display: inline-flex;
  max-width: 240px;
  white-space: normal;
  line-height: 1.3;
}

.v03-staff-page .v03-staff-specialty {
  display: inline-flex;
  max-width: 240px;
  white-space: normal;
  line-height: 1.3;
}

.v03-recruitment-page .v03-recruitment-money-pill {
  min-width: 86px;
}

.v03-staff-page .v03-staff-stat-pill,
.v03-staff-page .v03-staff-impact-pill {
  min-width: 86px;
  min-height: 44px;
  justify-content: center;
}

.v03-staff-page .staff-fire-btn,
.v03-notif-head #v03NotifClearBtn {
  min-height: 44px;
  font-weight: 800;
}

body.theme-dark .v03-staff-page .staff-fire-btn,
body.theme-dark .v03-notif-head #v03NotifClearBtn {
  color: #d2e4ff;
  border-color: #3d5f95;
  background: #1b2b48;
  box-shadow: inset 0 0 0 1px rgba(147, 189, 255, 0.08);
}

body.theme-dark .v03-staff-page .staff-fire-btn:hover:not(:disabled),
body.theme-dark .v03-notif-head #v03NotifClearBtn:hover:not(:disabled) {
  border-color: #74a0dd;
  background: #223a60;
}

body[data-page="staff-owned"] .staff-modal-card {
  width: min(760px, calc(100vw - 32px));
  border-radius: 28px;
  border: 1px solid rgba(180, 204, 238, 0.96);
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.98), rgba(243, 248, 255, 0.98));
  box-shadow: 0 28px 80px rgba(17, 36, 74, 0.22);
  padding: 26px 30px 22px;
}

body[data-page="staff-owned"] .staff-modal-card h2 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 3.6vw, 2.35rem);
  line-height: 1.04;
}

body[data-page="staff-owned"] .staff-modal-card .modal-body-text {
  color: #4f648a;
  font-size: 1rem;
  line-height: 1.55;
}

body[data-page="staff-owned"] .staff-modal-card .modal-body-text p {
  margin: 0 0 14px;
}

body[data-page="staff-owned"] .staff-modal-list {
  margin: 0 0 18px 18px;
  padding: 0;
  color: #4f648a;
}

body[data-page="staff-owned"] .staff-modal-list li {
  margin: 0 0 8px;
  line-height: 1.45;
}

body[data-page="staff-owned"] .staff-modal-actions {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 20px;
}

body[data-page="staff-owned"] .staff-modal-actions .btn {
  min-width: 154px;
}

body.theme-dark[data-page="staff-owned"] .staff-modal-card {
  border-color: rgba(67, 100, 151, 0.96);
  background: linear-gradient(180deg, rgba(16, 27, 47, 0.98), rgba(22, 37, 63, 0.98));
  box-shadow: 0 32px 80px rgba(4, 10, 22, 0.56);
}

body.theme-dark[data-page="staff-owned"] .staff-modal-card .modal-body-text,
body.theme-dark[data-page="staff-owned"] .staff-modal-list {
  color: #bfd0ea;
}

.v03-recruitment-page .v03-staff-stat-pill,
.v03-recruitment-page .v03-staff-impact-pill {
  min-width: 86px;
  min-height: 44px;
  justify-content: center;
}

.v03-recruitment-page .v03-market-table td:last-child {
  white-space: nowrap;
}

.v03-finance-page {
  display: grid;
  gap: 14px;
}

.v03-finance-hero-card {
  padding: 14px;
}

.v03-finance-tab-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.v03-finance-tab-btn {
  justify-content: center;
  font-weight: 800;
  min-height: 44px;
}

.v03-finance-tab-btn.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(100deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.28);
}

body.theme-dark .v03-finance-tab-btn.active {
  color: #eef5ff;
  border-color: rgba(122, 151, 214, 0.45);
  background: linear-gradient(98deg, #2f5fb8, #7b4cb3);
  box-shadow: 0 6px 14px rgba(58, 96, 168, 0.26);
}

body.theme-dark .v03-finance-tab-btn {
  color: #d2e4ff;
  border-color: #3d5f95;
  background: #1b2b48;
  box-shadow: inset 0 0 0 1px rgba(147, 189, 255, 0.08);
}

body.theme-dark .v03-finance-tab-btn:hover:not(.active):not(:disabled) {
  border-color: #74a0dd;
  background: #223a60;
}

body.theme-dark .v03-finance-tab-btn.active:hover:not(:disabled) {
  background: linear-gradient(98deg, #396bc7, #8b55c2);
  box-shadow: 0 8px 16px rgba(68, 108, 184, 0.32);
}

.v03-finance-panel {
  display: grid;
  gap: 14px;
}

.v03-finance-card-copy {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.v03-finance-kpi-grid {
  margin-top: 12px;
}

.v03-finance-kpi-card {
  min-height: 108px;
  justify-content: center;
  background:
    radial-gradient(240px 120px at 0% 0%, rgba(73, 187, 255, 0.12), transparent 60%),
    radial-gradient(220px 120px at 100% 0%, rgba(255, 120, 200, 0.12), transparent 60%),
    var(--surface-soft);
}

.v03-finance-kpi-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v03-finance-kpi-card .value.kpi-positive,
.v03-finance-table td.kpi-positive {
  color: #0f9f6e;
}

.v03-finance-kpi-card .value.kpi-negative,
.v03-finance-table td.kpi-negative {
  color: #cc4b68;
}

body.theme-dark .v03-finance-kpi-card .value.kpi-positive,
body.theme-dark .v03-finance-table td.kpi-positive {
  color: #6de6b2;
}

body.theme-dark .v03-finance-kpi-card .value.kpi-negative,
body.theme-dark .v03-finance-table td.kpi-negative {
  color: #ff95ae;
}

.v03-finance-month-select {
  width: clamp(150px, 16vw, 220px);
  min-width: 150px;
  max-width: 220px;
  flex: 0 1 220px;
}

body.theme-dark .v03-finance-month-select {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(26, 40, 67, 0.88);
  color: #eff6ff;
}

.v03-finance-split-grid {
  margin-top: 12px;
  align-items: start;
}

.v03-finance-subcard {
  padding: 0;
  overflow: hidden;
}

.v03-finance-subcard h3 {
  margin: 0;
  padding: 16px 18px 0;
}

.v03-finance-table-wrap {
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid rgba(197, 216, 244, 0.96);
  background: rgba(244, 248, 255, 0.92);
}

.v03-finance-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: transparent;
}

.v03-finance-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  font-size: 0.85rem;
  color: #35537a;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}

.v03-finance-table tbody td {
  padding: 13px 14px;
  border-top: 1px solid #d6e4fb;
  font-size: 0.93rem;
  vertical-align: middle;
}

.v03-finance-table tbody tr:hover td {
  background: rgba(89, 149, 255, 0.04);
}

.v03-finance-table-compact {
  min-width: 620px;
}

.v03-finance-empty-row td {
  color: var(--ink-soft);
  font-style: italic;
}

body.theme-dark .v03-finance-kpi-card {
  background:
    radial-gradient(240px 120px at 0% 0%, rgba(73, 187, 255, 0.14), transparent 60%),
    radial-gradient(220px 120px at 100% 0%, rgba(181, 106, 255, 0.14), transparent 60%),
    #17253d;
}

body.theme-dark .v03-finance-table thead th {
  color: #cfe1ff;
  background: #1b2c47;
  border-bottom-color: #344d74;
}

body.theme-dark .v03-finance-table tbody td {
  border-top-color: #2c4266;
}

body.theme-dark .v03-finance-table tbody tr:hover td {
  background: rgba(89, 149, 255, 0.1);
}

.v03-bank-page {
  display: grid;
  gap: 14px;
}

.v03-bank-top-grid {
  align-items: start;
}

.v03-bank-card-copy {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.v03-bank-summary-grid,
.v03-bank-preview-grid {
  margin-top: 12px;
  align-items: stretch;
}

.v03-bank-summary-card,
.v03-bank-preview-card {
  min-height: 104px;
  justify-content: center;
  background:
    radial-gradient(220px 110px at 0% 0%, rgba(73, 187, 255, 0.12), transparent 60%),
    radial-gradient(220px 110px at 100% 0%, rgba(255, 120, 200, 0.11), transparent 60%),
    var(--surface-soft);
}

.v03-bank-form {
  display: grid;
  gap: 10px;
}

.v03-bank-form label {
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.v03-bank-form-hint {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #9a5f1b;
}

.v03-bank-loan-list {
  display: grid;
  gap: 12px;
}

.v03-bank-loan-card {
  display: grid;
  gap: 12px;
  background:
    radial-gradient(220px 100px at 0% 0%, rgba(73, 187, 255, 0.09), transparent 60%),
    radial-gradient(220px 100px at 100% 0%, rgba(255, 120, 200, 0.08), transparent 60%),
    var(--surface);
}

.v03-bank-loan-card h3 {
  margin: 0;
}

.v03-bank-loan-detail {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.v03-bank-loan-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v03-bank-loan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.theme-dark .v03-bank-summary-card,
body.theme-dark .v03-bank-preview-card {
  background:
    radial-gradient(220px 110px at 0% 0%, rgba(73, 187, 255, 0.14), transparent 60%),
    radial-gradient(220px 110px at 100% 0%, rgba(181, 106, 255, 0.14), transparent 60%),
    #17253d;
}

body.theme-dark .v03-bank-loan-card {
  background:
    radial-gradient(220px 100px at 0% 0%, rgba(73, 187, 255, 0.12), transparent 60%),
    radial-gradient(220px 100px at 100% 0%, rgba(181, 106, 255, 0.12), transparent 60%),
    #152338;
}

body.theme-dark .v03-bank-form-hint {
  color: #ffd39f;
}

@media (max-width: 900px) {
  .v03-recruitment-page .v03-recruitment-filters-grid {
    grid-template-columns: 1fr;
  }

  .v03-finance-tab-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .v03-recruitment-page .market-type-cell {
    min-width: 0;
  }

  .v03-finance-table,
  .v03-finance-table thead,
  .v03-finance-table tbody,
  .v03-finance-table tr,
  .v03-finance-table th,
  .v03-finance-table td {
    display: block;
    width: 100%;
  }

  .v03-finance-table thead {
    display: none;
  }

  .v03-finance-table tbody tr {
    margin-bottom: 10px;
  }

  .v03-finance-table tbody td {
    border-top: none;
    border-bottom: 1px solid var(--border);
  }

  .v03-finance-table tbody td:first-child {
    border-top: 1px solid var(--border);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }

  .v03-finance-table tbody td:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }

  .v03-bank-loan-actions {
    justify-content: stretch;
  }

  .v03-bank-loan-actions .btn {
    width: 100%;
  }
}

/* V0.3 — Vos programmes */
body[data-page="owned"] .owned-status-cell {
  display: inline-grid;
  gap: 8px;
  align-content: center;
  justify-items: start;
  vertical-align: middle;
}

body[data-page="owned"] .owned-confiscated-badge {
  color: #902840;
  background: #ffe8ef;
  border-color: #f7bfd0;
}

body[data-page="owned"] .owned-table-detail-row td {
  padding: 8px 12px 12px 12px;
}

body[data-page="owned"] .owned-program-details {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

body[data-page="owned"] .v03-owned-details {
  display: grid;
  gap: 12px;
}

body[data-page="owned"] .owned-season-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

body[data-page="market"] .owned-season-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

body[data-page="owned"] .owned-season-summary-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
}

body[data-page="market"] .owned-season-summary-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
}

body[data-page="owned"] .owned-season-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="market"] .owned-season-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="owned"] .owned-season-summary-head strong {
  font-size: 1rem;
}

body[data-page="market"] .owned-season-summary-head strong {
  font-size: 1rem;
}

body[data-page="owned"] .owned-season-summary-body {
  display: grid;
  gap: 6px;
}

body[data-page="market"] .owned-season-summary-body {
  display: grid;
  gap: 6px;
}

body[data-page="owned"] .owned-season-summary-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

body[data-page="market"] .owned-season-summary-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

body[data-page="owned"] .owned-season-detail-btn {
  justify-self: start;
}

body[data-page="market"] .owned-season-detail-btn {
  justify-self: start;
}

body[data-page="owned"] .owned-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

body[data-page="market"] .owned-episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

body[data-page="owned"] .owned-episode-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
}

body[data-page="market"] .owned-episode-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 10px;
}

body[data-page="owned"] .owned-episode-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="market"] .owned-episode-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-page="owned"] .owned-episode-card-title {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

body[data-page="market"] .owned-episode-card-title {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.1;
}

body[data-page="owned"] .owned-episode-card-body {
  display: grid;
  gap: 6px;
}

body[data-page="market"] .owned-episode-card-body {
  display: grid;
  gap: 6px;
}

body[data-page="owned"] .owned-episode-card-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

body[data-page="market"] .owned-episode-card-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

body[data-page="owned"] .owned-inline-season-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

body[data-page="owned"] .owned-inline-season-btn {
  margin: 0;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

body[data-page="owned"] .owned-inline-season-btn:hover {
  border-color: #85b9ff;
  background: rgba(226, 236, 251, 0.74);
  color: #1a4f9f;
}

body[data-page="owned"] .owned-season-modal-card {
  width: min(860px, calc(100vw - 32px));
}

body[data-page="market"] .owned-season-modal-card {
  width: min(860px, calc(100vw - 32px));
}

#seasonDetailsModal {
  align-items: flex-start;
  overflow-y: auto;
}

#marketSeasonDetailsModal {
  align-items: flex-start;
  overflow-y: auto;
}

#seasonDetailsModal .studio-modal-card {
  margin: auto 0;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

#marketSeasonDetailsModal .studio-modal-card {
  margin: auto 0;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

body[data-page="owned"] .studio-modal-card {
  width: min(760px, calc(100vw - 32px));
  border-radius: 28px;
  border: 1px solid rgba(180, 204, 238, 0.96);
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.98), rgba(243, 248, 255, 0.98));
  box-shadow: 0 28px 80px rgba(17, 36, 74, 0.22);
  padding: 26px 30px 22px;
}

body[data-page="market"] .studio-modal-card {
  width: min(760px, calc(100vw - 32px));
  border-radius: 28px;
  border: 1px solid rgba(180, 204, 238, 0.96);
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.98), rgba(243, 248, 255, 0.98));
  box-shadow: 0 28px 80px rgba(17, 36, 74, 0.22);
  padding: 26px 30px 22px;
}

body[data-page="owned"] .owned-program-modal-card h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.4rem);
  line-height: 1;
}

body[data-page="market"] .owned-program-modal-card h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 2.4rem);
  line-height: 1;
}

body[data-page="owned"] .owned-program-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body[data-page="market"] .owned-program-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body[data-page="owned"] .owned-season-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

body[data-page="owned"] .owned-season-summary-card .status-badge,
body[data-page="owned"] .owned-episode-card .status-badge {
  min-width: auto;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.76rem;
}

body[data-page="market"] .owned-season-summary-card .status-badge,
body[data-page="market"] .owned-episode-card .status-badge {
  min-width: auto;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.76rem;
}

body[data-page="owned"] .owned-season-stars-row,
body[data-page="market"] .owned-season-stars-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body[data-page="owned"] .owned-season-stars-label,
body[data-page="market"] .owned-season-stars-label {
  color: var(--muted-text);
  font-weight: 600;
}

body.theme-dark[data-page="owned"] .owned-confiscated-badge {
  color: #ffb6c8;
  border-color: #83405a;
  background: #582537;
}

body.theme-dark[data-page="owned"] .owned-program-details {
  border-color: transparent;
  background: transparent;
}

body.theme-dark[data-page="owned"] .owned-season-summary-card {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(26, 40, 67, 0.88);
}

body.theme-dark[data-page="market"] .studio-modal-card {
  border-color: rgba(67, 100, 151, 0.96);
  background: linear-gradient(180deg, rgba(17, 28, 46, 0.98), rgba(20, 33, 55, 0.98));
  box-shadow: 0 28px 80px rgba(2, 8, 20, 0.56);
}

body.theme-dark[data-page="market"] .owned-season-summary-card {
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(26, 40, 67, 0.88);
}

body.theme-dark[data-page="owned"] .owned-season-summary-body p {
  color: #bfd0ea;
}

body.theme-dark[data-page="owned"] .owned-episode-card {
  border-color: rgba(57, 79, 118, 0.95);
  background: rgba(21, 33, 54, 0.9);
}

body.theme-dark[data-page="owned"] .owned-episode-card-title,
body.theme-dark[data-page="owned"] .owned-episode-card-body p {
  color: #cfe1ff;
}

body.theme-dark[data-page="market"] .owned-episode-card-title,
body.theme-dark[data-page="market"] .owned-episode-card-body p,
body.theme-dark[data-page="market"] .owned-program-modal-card h2 {
  color: #cfe1ff;
}

body.theme-dark[data-page="owned"] .owned-inline-season-btn {
  color: #d2e4ff;
  border-color: #3d5f95;
  background: #1b2b48;
}

body.theme-dark[data-page="owned"] .owned-inline-season-btn:hover {
  color: #ffffff;
  border-color: #74a0dd;
  background: #223a60;
}

@media (max-width: 720px) {
  body[data-page="owned"] .v03-market-table {
    display: block;
  }

  body[data-page="owned"] .v03-market-table thead {
    display: none;
  }

  body[data-page="owned"] .v03-market-table tbody,
  body[data-page="owned"] .v03-market-table tr {
    display: block;
  }

  body[data-page="owned"] .v03-market-table th,
  body[data-page="owned"] .v03-market-table td {
    display: block;
    width: 100%;
  }

  body[data-page="owned"] .v03-market-table tbody tr:not(.owned-table-detail-row) td {
    border-radius: 0;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
  }

  body[data-page="owned"] .v03-market-table tbody tr:not(.owned-table-detail-row) td:first-child {
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
  }

  body[data-page="owned"] .v03-market-table tbody tr:not(.owned-table-detail-row) td:last-child {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
  }
}


body.theme-dark[data-page="owned"] .studio-modal-card {
  border-color: rgba(67, 100, 151, 0.96);
  background: linear-gradient(180deg, rgba(16, 27, 47, 0.98), rgba(22, 37, 63, 0.98));
  box-shadow: 0 32px 80px rgba(4, 10, 22, 0.56);
}

.v03-ads-policy-card,
.v03-ads-report-card,
.v03-ads-days-card {
  border-radius: 16px;
}

.v03-policy-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.v03-policy-buttons .btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(100deg, var(--blue), var(--pink));
  box-shadow: 0 8px 18px rgba(48, 120, 255, 0.28);
}

.v03-policy-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.v03-policy-description {
  margin: 10px 0 0;
}

.v03-ads-page .feedback {
  min-height: 18px;
  margin: 10px 2px 0;
  font-size: 0.9rem;
}

.v03-ads-days-card {
  margin-top: 14px;
}

.v03-ads-top-grid .v03-ads-policy-card,
.v03-ads-top-grid .v03-ads-report-card {
  margin-top: 0;
}

.v03-ads-days-grid {
  margin-top: 10px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 24px) / 3);
  gap: 12px;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.v03-ads-days-grid.is-empty {
  display: block;
  overflow: visible;
}

.v03-ads-day {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 10px;
  display: grid;
  gap: 10px;
  height: 100%;
  align-content: start;
  scroll-snap-align: start;
}

.v03-ads-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.v03-ads-day-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.v03-ads-day-head p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.v03-day-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.v03-day-actions .btn {
  min-height: 44px;
  height: auto;
  width: 100%;
  padding: 0 12px;
  font-weight: 800;
}

.v03-day-actions .v03-ads-apply-day {
  grid-column: 1 / -1;
}

.v03-ads-rows {
  display: grid;
  gap: 8px;
  align-content: start;
  align-self: start;
}

.v03-ad-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 9px 10px;
  min-height: 44px;
}

.v03-ad-row.program {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.v03-ad-time {
  font-weight: 800;
  color: #31527b;
}

.v03-ad-title {
  font-weight: 700;
  min-width: 0;
}

.v03-ad-row.pub-slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.v03-ad-meta {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.v03-ad-pill {
  min-width: 92px;
  justify-content: center;
}

.v03-ad-row.pub-slot.disabled {
  border-color: rgba(223, 67, 102, 0.45);
  background: rgba(223, 67, 102, 0.08);
}

body.theme-dark .v03-ad-time {
  color: #b4cbf1;
}

body.theme-dark .v03-ad-row.pub-slot.disabled {
  border-color: rgba(245, 101, 101, 0.55);
  background: rgba(141, 45, 62, 0.28);
}

body.theme-dark .v03-ads-page .library-empty {
  color: #bfd0ea;
  border-color: rgba(67, 100, 151, 0.96);
  background: rgba(18, 29, 49, 0.72);
}

@media (max-width: 1300px) {
  .v03-ads-days-grid {
    grid-auto-columns: calc((100% - 12px) / 2);
  }
}

@media (max-width: 980px) {
  .v03-ads-days-grid {
    grid-auto-columns: minmax(280px, 88%);
  }

  .v03-day-actions {
    grid-template-columns: 1fr;
  }
}

/* V0.3 — Régie finale */
.v03-final-regie-page .page-head {
  margin-bottom: 14px;
}

.v03-final-top-grid {
  margin-top: 4px;
}

.v03-final-kpis {
  margin-top: 10px;
}

.v03-final-days {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.v03-final-day-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  min-height: 52px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v03-final-day-left {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.v03-final-day-left strong {
  font-size: 0.88rem;
}

.v03-final-day-left span {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.v03-final-assignment-card {
  margin-top: 18px !important;
}

.v03-final-assignment-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.v03-final-assignment-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.v03-final-assignment-label {
  font-weight: 800;
  color: #294a74;
}

.v03-final-assignment-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23325584' d='M1.2 1.1a1 1 0 0 1 1.4 0L6 4.5l3.4-3.4a1 1 0 1 1 1.4 1.4L6.7 6.6a1 1 0 0 1-1.4 0L1.2 2.5a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

.v03-final-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.v03-final-regie-page .feedback {
  margin: 10px 2px 0;
  min-height: 18px;
}

.v03-final-empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  padding: 14px 12px;
}

body.theme-dark .v03-final-day-row,
body.theme-dark .v03-final-assignment-row {
  border-color: #3c5b87;
  background: #1c2d49;
}

body.theme-dark .v03-final-assignment-label {
  color: #cfe0fb;
}

body.theme-dark .v03-final-day-left span {
  color: #9bb2d7;
}

body.theme-dark .v03-final-assignment-select {
  border-color: #3e5f8f;
  background: #1a2a45;
  color: #d9e8ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23d5e7ff' d='M1.2 1.1a1 1 0 0 1 1.4 0L6 4.5l3.4-3.4a1 1 0 1 1 1.4 1.4L6.7 6.6a1 1 0 0 1-1.4 0L1.2 2.5a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

body.theme-dark .v03-final-empty {
  border-color: #3e5f8f;
  background: #172740;
  color: #b9cae7;
}

/* V0.3.2 — Pool monteur */
.v03-editing-pool-page .page-head {
  margin-bottom: 14px;
}

.v03-editing-request-list,
.v03-editing-editor-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.v03-editing-request-list {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.v03-editing-request-row,
.v03-editing-editor-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(120px) fit-content(96px) fit-content(140px);
  align-items: center;
  gap: 12px;
}

.v03-editing-editor-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 18px;
  min-height: 0;
}

.v03-editing-request-main,
.v03-editing-editor-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.v03-editing-editor-main {
  align-content: center;
}

.v03-editing-request-main strong,
.v03-editing-editor-main strong {
  font-size: 0.92rem;
}

.v03-editing-request-meta,
.v03-editing-request-detail {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.v03-editing-request-side,
.v03-editing-editor-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.v03-editing-request-side {
  display: contents;
}

.v03-editing-editor-stats {
  flex-wrap: nowrap;
  align-self: center;
}

.v03-editing-request-badge {
  width: auto;
  min-width: 0;
  justify-content: center;
  justify-self: end;
}

.v03-editing-request-badge--status {
  justify-self: end;
}

.v03-editing-request-row.category-information { --category-rgb: 74, 192, 255; }
.v03-editing-request-row.category-divertissement { --category-rgb: 246, 196, 83; }
.v03-editing-request-row.category-films { --category-rgb: 232, 121, 249; }
.v03-editing-request-row.category-series { --category-rgb: 167, 139, 250; }
.v03-editing-request-row.category-magazines { --category-rgb: 251, 113, 133; }
.v03-editing-request-row.category-jeunesse { --category-rgb: 249, 115, 22; }
.v03-editing-request-row.category-documentaires { --category-rgb: 34, 211, 238; }
.v03-editing-request-row.category-realite { --category-rgb: 244, 63, 94; }
.v03-editing-request-row.category-culture { --category-rgb: 96, 165, 250; }

.v03-editing-request-row[class*="category-"] {
  border-left-color: rgb(var(--category-rgb));
  box-shadow: inset 4px 0 0 rgb(var(--category-rgb));
}

body.theme-dark .v03-editing-request-row[class*="category-"] {
  border-left-color: rgb(var(--category-rgb));
  box-shadow: inset 4px 0 0 rgb(var(--category-rgb));
}

.v03-editing-editor-card {
  margin-top: 18px !important;
}

body.theme-dark .v03-editing-request-row,
body.theme-dark .v03-editing-editor-row {
  border-color: #3c5b87;
  background: #1c2d49;
}

body.theme-dark .v03-editing-request-meta,
body.theme-dark .v03-editing-request-detail {
  color: #9bb2d7;
}

body.theme-dark .v03-editing-request-list {
  scrollbar-color: #5478ae #1b2b45;
}

@media (max-width: 760px) {
  .v03-final-assignment-row {
    grid-template-columns: 1fr;
  }

  .v03-final-actions {
    flex-direction: column;
  }

  .v03-editing-request-row,
  .v03-editing-editor-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .v03-editing-request-side,
  .v03-editing-editor-stats {
    justify-content: flex-start;
  }

  .v03-editing-request-side {
    grid-template-columns: 1fr;
  }
}

/* V0.3 — Studio */
.v03-studio-page {
  --text: var(--ink);
  --muted: var(--ink-soft);
  --accent: #3078ff;
  --border-soft: 1px solid var(--border);
  --border-strong: 1px solid var(--border);
  --control-height: 40px;
  --badge-height: 34px;
}

.v03-studio-page .studio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.v03-studio-page .studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v03-studio-page .studio-item-head {
  margin-top: 4px;
}

.v03-studio-page .studio-head h2,
.v03-studio-page .studio-head h3 {
  margin: 0;
}

.v03-studio-page #studioCardBody {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.v03-studio-page .game-block.studio-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: var(--surface);
  box-shadow: none;
}

.v03-studio-page .studio-head h2,
.v03-studio-page .studio-subtitle,
.v03-studio-page .studio-capabilities h3,
.v03-studio-page .studio-metrics h3 {
  color: var(--ink);
}

.v03-studio-page .studio-metric,
.v03-studio-page .studio-presenter-badge,
.v03-studio-page .studio-planning-mode-badge,
.v03-studio-page .studio-production-types .studio-capability-chip {
  line-height: 1.1;
}

.v03-studio-page .studio-section {
  margin-top: 8px;
}

.v03-studio-page .studio-section-head {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.v03-studio-page .studio-section-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.v03-studio-page .studio-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.v03-studio-page .studio-production-dot {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #8fd8b8;
  background: #ddf9ec;
  color: #0f6f4d;
  font-size: 0.84rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.v03-studio-page .studio-section-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.v03-studio-page .studio-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.v03-studio-page .studio-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v03-studio-page .studio-production-types .studio-capability-chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(87, 127, 184, 0.08);
}

.v03-studio-page .studio-metric {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #bcdfff;
  background: #e8f4ff;
  color: #0e4f9b;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  padding: 8px 14px;
  border-radius: 999px;
}

.v03-studio-page .studio-section-head {
  margin-top: 10px;
}

.v03-studio-page .studio-section-body.hidden,
.v03-studio-page #studioCardBody.hidden {
  display: none !important;
}

.v03-studio-page .studio-tech-assign-row,
.v03-studio-page .studio-upgrade-row,
.v03-studio-page .studio-planning-day,
.v03-studio-page .studio-planning-event,
.v03-studio-page .studio-external-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  border-color: var(--border);
  background: var(--surface-soft);
}

.v03-studio-page .studio-tech-assign-list,
.v03-studio-page .studio-upgrades-list,
.v03-studio-page .studio-planning-list,
.v03-studio-page .studio-external-list {
  display: grid;
  gap: 8px;
}

.v03-studio-page .studio-upgrades-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v03-studio-page .studio-tech-assign-row {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  box-shadow: inset 0 0 0 1px rgba(89, 126, 183, 0.08);
}

.v03-studio-page .studio-tech-assign-row.staff-missing {
  border-color: rgba(231, 93, 124, 0.44);
  background: linear-gradient(120deg, rgba(231, 93, 124, 0.11), rgba(231, 93, 124, 0.03));
}

.v03-studio-page .studio-tech-assign-controls,
.v03-studio-page .studio-tech-assignment-slots {
  display: grid;
  gap: 6px;
}

.v03-studio-page .studio-tech-assignment-slot {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.v03-studio-page .studio-tech-assignment-slot-label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.v03-studio-page .studio-tech-assign-label,
.v03-studio-page .studio-upgrade-title,
.v03-studio-page .studio-planning-event-title {
  color: var(--ink);
}

.v03-studio-page .studio-tech-assign-meta,
.v03-studio-page .studio-upgrade-current,
.v03-studio-page .studio-upgrade-next,
.v03-studio-page .studio-planning-range,
.v03-studio-page .studio-planning-day-empty,
.v03-studio-page .studio-presenter-empty,
.v03-studio-page .studio-external-note {
  color: var(--ink-soft);
}

.v03-studio-page .studio-tech-assign-label {
  display: block;
  font-weight: 800;
  line-height: 1.2;
}

.v03-studio-page .studio-tech-assign-meta {
  display: block;
  margin-top: 2px;
  line-height: 1.25;
  font-weight: 700;
}

.v03-studio-page .studio-tech-assign-meta.warn {
  color: #932545;
  font-weight: 700;
}

.v03-studio-page .studio-presenter-row,
.v03-studio-page .studio-planning-day {
  border-color: var(--border);
  background: var(--surface-soft);
}

.v03-studio-page .studio-presenter-badge {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink-soft);
}

.v03-studio-page .studio-presenter-badge.strong {
  border-color: #97e4c2;
  background: #e8fff4;
  color: #146b4f;
}

.v03-studio-page .studio-presenter-badge.warn {
  border-color: #ffd6a5;
  background: #fff4e5;
  color: #93540e;
}

.v03-studio-page .studio-presenter-main {
  display: grid;
  gap: 2px;
}

.v03-studio-page .studio-presenter-name {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}

.v03-studio-page .studio-presenter-meta {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.v03-studio-page .studio-planning-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.v03-studio-page .studio-planning-calendar {
  display: grid;
  gap: 8px;
}

.v03-studio-page .studio-planning-filters {
  margin: 4px 0 8px;
}

.v03-studio-page .studio-planning-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  margin: 0 0 8px;
}

.v03-studio-page .studio-planning-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.v03-studio-page .studio-planning-range {
  font-size: 0.82rem;
  color: var(--ink-soft);
  min-width: 220px;
  text-align: center;
  font-weight: 700;
}

.v03-studio-page .studio-planning-filter-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.v03-studio-page .studio-planning-day {
  min-height: 140px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.v03-studio-page .studio-planning-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.v03-studio-page .studio-planning-day-head strong {
  font-size: 0.82rem;
  text-transform: capitalize;
}

.v03-studio-page .studio-planning-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #8fd8b8;
  background: #ddf9ec;
  color: #0f6f4d;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
}

.v03-studio-page .studio-planning-day-body {
  padding: 8px 10px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.v03-studio-page .studio-planning-day-empty,
.v03-studio-page .studio-planning-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.v03-studio-page .studio-planning-event {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 6px 8px;
  text-align: left;
  border-left-width: 3px;
}

.v03-studio-page .studio-planning-event.studio-planning-event-external {
  border-style: solid;
}

.v03-studio-page .studio-planning-event-hour {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2f5f9f;
}

.v03-studio-page .studio-planning-event-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.v03-studio-page .studio-planning-event-hour-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.v03-studio-page .studio-planning-event-hour-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.v03-studio-page .studio-planning-event-title {
  min-width: 0;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v03-studio-page .studio-planning-event-clickable {
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.v03-studio-page .studio-planning-event-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(41, 117, 217, 0.2);
}

.v03-studio-page .studio-planning-event.player-owned {
  border-width: 1px;
  box-shadow: none;
}

.v03-studio-page .studio-planning-event .studio-planning-owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #8fb3e6;
  background: #eef6ff;
  color: #2d5f9c;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.v03-studio-page .studio-planning-mode-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.v03-studio-page .studio-planning-event.single {
  border-color: rgba(66, 131, 221, 0.45);
  background: rgba(66, 131, 221, 0.12);
}

.v03-studio-page .studio-planning-event.recurring {
  border-color: rgba(46, 181, 124, 0.45);
  background: rgba(46, 181, 124, 0.12);
}

.v03-studio-page .studio-planning-event.production-shoot {
  border-color: rgba(255, 160, 66, 0.55);
  background: rgba(255, 160, 66, 0.14);
}

.v03-studio-page .studio-external-card {
  padding: 10px;
}

.v03-studio-page .studio-external-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.v03-studio-page .studio-external-head h3 {
  margin: 0;
  font-size: 1rem;
}

.v03-studio-page .studio-external-body {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.v03-studio-page .studio-external-body.hidden {
  display: none;
}

.v03-studio-page .studio-external-note {
  margin: 0;
  font-size: 0.84rem;
}

.v03-studio-page .studio-upgrade-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  align-content: space-between;
  min-height: 170px;
}

.v03-studio-page .studio-upgrade-main {
  display: grid;
  gap: 4px;
}

.v03-studio-page .studio-upgrade-progress-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.v03-studio-page .studio-upgrade-progress-level {
  font-weight: 700;
}

.v03-studio-page .studio-upgrade-progress-value {
  color: var(--ink);
  font-weight: 700;
}

.v03-studio-page .studio-upgrade-progress-bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(48, 120, 255, 0.1);
  border: 1px solid var(--border);
  overflow: hidden;
}

.v03-studio-page .studio-upgrade-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fbde0 0%, #38d39f 100%);
}

.v03-studio-page .studio-upgrade-progress-fill.max {
  background: linear-gradient(90deg, #38d39f 0%, #4ae0ab 100%);
}

.v03-studio-page .studio-planning-nav button,
.v03-studio-page .studio-planning-filter-buttons button,
.v03-studio-page .arrow-toggle-btn,
.v03-studio-page .studio-card-toggle-btn {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: #2a486d;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(87, 127, 184, 0.06);
}

.v03-studio-page .arrow-toggle-btn,
.v03-studio-page .studio-card-toggle-btn {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v03-studio-page .studio-upgrade-btn,
.v03-studio-page .studio-validate-btn {
  justify-self: end;
}

.v03-studio-page .studio-tech-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.v03-studio-page .studio-tech-inline-feedback {
  margin: 0;
  min-height: 20px;
  flex: 1 1 280px;
}

.v03-studio-page .studio-tech-actions-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.v03-studio-page .studio-tech-actions .studio-auto-btn,
.v03-studio-page .studio-tech-actions .studio-validate-btn {
  min-width: 136px;
}

.v03-studio-page .studio-planning-filter-buttons button.active-menu {
  border-color: rgba(48, 120, 255, 0.55);
  background: rgba(48, 120, 255, 0.12);
  color: #0e4f9b;
}

.v03-studio-page .studio-tech-assignment-slot select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
}

.v03-studio-page .studio-production-form,
body[data-page="studio"] .studio-production-form {
  display: grid;
  gap: 10px;
}

.v03-studio-page .studio-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.v03-studio-page .studio-chip-row .filter-chip {
  margin: 0;
}

.v03-studio-page .studio-chip-disabled {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.v03-studio-page .studio-range-field {
  display: grid;
  gap: 8px;
}

.v03-studio-page .studio-range-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 0;
  min-height: 30px;
  height: auto;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.v03-studio-page .studio-range-field input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(28, 199, 255, 0.45), rgba(255, 79, 198, 0.35));
  border: 1px solid rgba(184, 206, 244, 0.95);
}

.v03-studio-page .studio-range-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid rgba(21, 32, 51, 0.9);
  background: linear-gradient(135deg, var(--blue), var(--pink));
  box-shadow: 0 0 0 3px rgba(48, 120, 255, 0.14);
}

.v03-studio-page .studio-range-field input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(28, 199, 255, 0.45), rgba(255, 79, 198, 0.35));
  border: 1px solid rgba(184, 206, 244, 0.95);
}

.v03-studio-page .studio-range-field input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(21, 32, 51, 0.9);
  background: linear-gradient(135deg, var(--blue), var(--pink));
  box-shadow: 0 0 0 3px rgba(48, 120, 255, 0.14);
}

.v03-studio-page .studio-range-value {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.v03-studio-page .studio-production-presenters-wrap {
  display: grid;
  gap: 10px;
}

.v03-studio-page .studio-production-presenter-slot {
  display: grid;
  gap: 5px;
}

.v03-studio-page .studio-production-presenter-slot .v03-final-assignment-select {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 12px;
}

.v03-studio-page .studio-production-presenter-slot label,
.v03-studio-page .studio-production-shoot-time-label {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.v03-studio-page .studio-production-shoot-times {
  display: grid;
  gap: 8px;
}

.v03-studio-page .studio-production-shoot-time-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.v03-studio-page .studio-production-page-card {
  display: grid;
  gap: 18px;
  padding: 0;
  margin: 0;
}

.v03-studio-page .studio-production-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.v03-studio-page .studio-production-left,
.v03-studio-page .studio-production-right {
  min-width: 0;
}

.v03-studio-page .studio-production-left {
  display: grid;
  gap: 16px;
}

.v03-studio-page .studio-form-panel {
  display: grid;
  gap: 16px;
  padding: 18px 20px;
}

.v03-studio-page .studio-production-right {
  position: sticky;
  top: 0;
  align-self: start;
  z-index: 2;
}

.v03-studio-page .studio-form-sections {
  display: grid;
  gap: 14px;
}

.v03-studio-page .studio-form-section {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(184, 206, 244, 0.95);
  background: rgba(234, 242, 255, 0.86);
  box-shadow: none;
}

.v03-studio-page .studio-form-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v03-studio-page .studio-form-section-head h2 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}

.v03-studio-page .studio-form-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #bcdfff;
  background: #e8f4ff;
  color: #0e4f9b;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
}

.v03-studio-page .is-locked,
body[data-page="studio-launch-season"] .is-locked {
  cursor: not-allowed;
}

.v03-studio-page input.is-locked,
.v03-studio-page select.is-locked,
body[data-page="studio-launch-season"] input.is-locked,
body[data-page="studio-launch-season"] select.is-locked {
  opacity: 0.88;
  color: rgba(25, 42, 72, 0.92);
}

.v03-studio-page .studio-capacity-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.v03-studio-page .studio-capabilities-label {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.v03-studio-page .studio-production-sim {
  position: static;
  display: grid;
  gap: 12px;
  padding: 18px;
}

.v03-studio-page .studio-production-sim h2 {
  margin: 0;
  color: var(--ink);
}

.v03-studio-page .studio-production-sim-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.v03-studio-page .studio-production-sim-card {
  min-height: 142px;
}

.v03-studio-page .studio-form-actions-panel {
  padding-top: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.v03-studio-page .studio-production-page-card > .feedback {
  margin-top: 0;
}

.v03-studio-page .studio-production-page-card > .feedback:empty {
  display: none;
  min-height: 0;
  margin: 0;
}

.v03-studio-page #productionTypeButtons .filter-chip:is(
  .category-information,
  .category-divertissement,
  .category-films,
  .category-series,
  .category-magazines,
  .category-jeunesse,
  .category-documentaires,
  .category-realite,
  .category-culture
) {
  border-color: rgba(var(--category-rgb), 0.28);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.16), rgba(var(--category-rgb), 0.06));
  color: #294a74;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.14);
}

.v03-studio-page #productionTypeButtons .filter-chip.active:is(
  .category-information,
  .category-divertissement,
  .category-films,
  .category-series,
  .category-magazines,
  .category-jeunesse,
  .category-documentaires,
  .category-realite,
  .category-culture
) {
  border-color: rgba(var(--category-rgb), 0.78);
  background: linear-gradient(100deg, rgba(var(--category-rgb), 0.42), rgba(var(--category-rgb), 0.18));
  color: #153a69;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.32), 0 6px 14px rgba(var(--category-rgb), 0.14);
}

.v03-studio-page .studio-modal-card,
body[data-page="studio"] .studio-modal-card {
  width: min(900px, calc(100vw - 28px));
}

#studioProductionModal {
  align-items: flex-start;
  overflow-y: auto;
}

#studioProductionModal .studio-modal-card {
  margin: auto 0;
}

.v03-studio-page .studio-form-grid,
body[data-page="studio"] .studio-form-grid {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}

.v03-studio-page .studio-form-grid label,
body[data-page="studio"] .studio-form-grid label {
  grid-column: 1;
  color: var(--ink-soft);
}

.v03-studio-page .studio-form-grid > :not(label),
body[data-page="studio"] .studio-form-grid > :not(label) {
  grid-column: 2;
}

.v03-studio-page .studio-form-grid .hidden,
body[data-page="studio"] .studio-form-grid .hidden {
  display: none !important;
}

.v03-studio-page .studio-modal-head,
body[data-page="studio"] .studio-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.v03-studio-page .studio-cost-help,
body[data-page="studio"] .studio-cost-help {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.v03-studio-page .studio-recurring-days,
body[data-page="studio"] .studio-recurring-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.v03-studio-page .studio-recurring-day,
body[data-page="studio"] .studio-recurring-day {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.v03-studio-page .studio-recurring-day input[type="checkbox"],
body[data-page="studio"] .studio-recurring-day input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #3f75df;
}

.v03-studio-page .category-information { --category-rgb: 74, 192, 255; }
.v03-studio-page .category-divertissement { --category-rgb: 246, 196, 83; }
.v03-studio-page .category-films { --category-rgb: 232, 121, 249; }
.v03-studio-page .category-series { --category-rgb: 167, 139, 250; }
.v03-studio-page .category-magazines { --category-rgb: 251, 113, 133; }
.v03-studio-page .category-jeunesse { --category-rgb: 249, 115, 22; }
.v03-studio-page .category-documentaires { --category-rgb: 34, 211, 238; }
.v03-studio-page .category-realite { --category-rgb: 244, 63, 94; }
.v03-studio-page .category-culture { --category-rgb: 96, 165, 250; }

.v03-studio-page .studio-production-types .studio-capability-chip[class*="category-"] {
  border: 1px solid rgba(var(--category-rgb), 0.3);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.12), rgba(var(--category-rgb), 0.04));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.14);
}

.v03-studio-page .studio-planning-event[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.44);
  border-left-color: rgba(var(--category-rgb), 0.92);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.16), rgba(var(--category-rgb), 0.05));
}

.v03-studio-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.v03-studio-page select,
body[data-page="studio"] .studio-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body[data-page="studio"] .studio-form-grid select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

.v03-studio-page select,
body[data-page="studio"] .studio-form-grid select,
.v03-studio-page .studio-tech-assignment-slot select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 34px;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23325584' d='M1.2 1.1a1 1 0 0 1 1.4 0L6 4.5l3.4-3.4a1 1 0 1 1 1.4 1.4L6.7 6.6a1 1 0 0 1-1.4 0L1.2 2.5a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

.v03-studio-page .studio-form-static,
body[data-page="studio"] .studio-form-static {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
}

.v03-studio-page .studio-form-static,
body[data-page="studio"] .studio-form-static {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  box-sizing: border-box;
}

.v03-studio-page .studio-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.v03-studio-page .studio-form-grid select,
body[data-page="studio"] .studio-form-grid input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body[data-page="studio"] .studio-form-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  box-sizing: border-box;
}

body[data-page="studio"] #studioProductionModal .studio-modal-card {
  width: min(860px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
}

body[data-page="studio"] .studio-modal-card .feedback {
  margin-top: 8px;
}

body[data-page="studio"] .studio-form-actions button {
  min-height: 44px;
}

.v03-studio-page .studio-form-actions,
body[data-page="studio"] .studio-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.v03-studio-page .studio-form-actions .btn {
  min-height: 44px;
  padding-inline: 16px;
}

body.theme-dark .v03-studio-page {
  --text: #dbe7ff;
  --muted: #9fb6da;
  --border-soft: 1px solid #39557f;
  --border-strong: 1px solid #44638f;
}

body.theme-dark .v03-studio-page .game-block.studio-card,
body.theme-dark .v03-studio-page .studio-tech-assign-row,
body.theme-dark .v03-studio-page .studio-upgrade-row,
body.theme-dark .v03-studio-page .studio-planning-day,
body.theme-dark .v03-studio-page .studio-presenter-row,
body.theme-dark .v03-studio-page .studio-external-card {
  border-color: #3c5b87;
  background: #1c2d49;
}

body.theme-dark .v03-studio-page .studio-planning-event {
  border-color: #496d9f;
  background: #1a2d4d;
}

body.theme-dark .v03-studio-page .studio-planning-event-hour {
  color: #a5c4ee;
}

body.theme-dark .v03-studio-page .studio-form-section {
  border-color: #3c5b87;
  background: #1c2d49;
}

body.theme-dark .filter-chip {
  border-color: #3d5f95;
  background: #1b2b48;
  color: #d2e4ff;
}

body.theme-dark .filter-chip:hover:not(:disabled) {
  border-color: #74a0dd;
  background: #223a60;
}

body.theme-dark .filter-chip.active {
  border-color: #5a9ef3;
  color: #dcecff;
  background: linear-gradient(100deg, rgba(48, 120, 255, 0.24), rgba(255, 79, 198, 0.18));
}

body.theme-dark .v03-studio-page .studio-form-step {
  border-color: #27558e;
  background: #15365f;
  color: #86bbff;
}

body.theme-dark .v03-studio-page .studio-form-section {
  border-color: #3c5b87;
  background: rgba(24, 40, 67, 0.9);
}

.page.v03-studio-page > .v03-footer {
  margin-top: 0;
}

body.theme-dark .v03-studio-page .studio-production-sim-card span,
body.theme-dark .v03-studio-page .studio-form-section-head h2,
body.theme-dark .v03-studio-page .studio-production-sim h2 {
  color: #dbe7ff;
}

body.theme-dark .v03-studio-page .studio-range-value,
body.theme-dark .v03-studio-page .studio-production-presenter-slot label,
body.theme-dark .v03-studio-page .studio-production-shoot-time-label {
  color: #a9bfdc;
}

body.theme-dark .v03-studio-page .studio-metric,
body.theme-dark .v03-studio-page .studio-presenter-badge,
body.theme-dark .v03-studio-page .studio-form-static {
  border-color: #3e5f8f;
  background: #1a2a45;
  color: #cfe0fb;
}

body.theme-dark .v03-studio-page .studio-metric {
  border-color: #27558e;
  background: #15365f;
  color: #86bbff;
}

body.theme-dark[data-page="studio"] .studio-form-static {
  border-color: #3e5f8f;
  background: #1a2a45;
  color: #cfe0fb;
}

body.theme-dark .v03-studio-page .studio-planning-day-count {
  border-color: #2f7c63;
  background: #173d31;
  color: #96f5cf;
}

body.theme-dark .v03-studio-page .studio-presenter-name,
body.theme-dark .v03-studio-page .studio-upgrade-progress-value {
  color: #f1f6ff;
}

body.theme-dark .v03-studio-page .studio-presenter-meta {
  color: #a9bfdc;
}

body.theme-dark[data-page="studio"] .studio-recurring-day {
  color: #a9bfdc;
}

body.theme-dark .v03-studio-page .studio-tech-assign-meta.warn {
  color: #ffb9ca;
}

body.theme-dark .v03-studio-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.theme-dark .v03-studio-page select,
body.theme-dark .v03-studio-page .studio-planning-nav button,
body.theme-dark .v03-studio-page .studio-planning-filter-buttons button,
body.theme-dark .v03-studio-page .arrow-toggle-btn,
body.theme-dark .v03-studio-page .studio-card-toggle-btn {
  border-color: #3e5f8f;
  background: #1a2a45;
  color: #d8e6ff;
}

body.theme-dark .v03-studio-page select,
body.theme-dark[data-page="studio"] .studio-form-grid select,
body.theme-dark .v03-studio-page .studio-tech-assignment-slot select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23d5e7ff' d='M1.2 1.1a1 1 0 0 1 1.4 0L6 4.5l3.4-3.4a1 1 0 1 1 1.4 1.4L6.7 6.6a1 1 0 0 1-1.4 0L1.2 2.5a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E");
}

.v03-studio-page .studio-tech-assignment-slot select,
.v03-studio-page .studio-production-presenter-slot .v03-final-assignment-select,
body.theme-dark .v03-studio-page .studio-tech-assignment-slot select,
body.theme-dark .v03-studio-page .studio-production-presenter-slot .v03-final-assignment-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
  padding-right: 34px !important;
}

.v03-studio-page .v03-final-assignment-select,
body.theme-dark .v03-studio-page .v03-final-assignment-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
  padding-right: 34px !important;
}

body.theme-dark .v03-studio-page .studio-planning-filter-buttons button.active-menu {
  border-color: #5a8dd0;
  background: rgba(68, 128, 217, 0.25);
  color: #d8e6ff;
}

body.theme-dark .v03-studio-page .studio-planning-toolbar {
  border-color: #3e5f8f;
  background: #1a2a45;
}

body.theme-dark .v03-studio-page .studio-tech-assign-row.staff-missing {
  border-color: rgba(237, 118, 146, 0.54);
  background: linear-gradient(120deg, rgba(237, 118, 146, 0.2), rgba(237, 118, 146, 0.08));
}

body.theme-dark .v03-studio-page .studio-upgrade-progress-bar {
  background: rgba(124, 162, 219, 0.12);
  border-color: #3e5f8f;
}

body.theme-dark .v03-studio-page .studio-production-types .studio-capability-chip[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.44);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.16), rgba(var(--category-rgb), 0.06));
  color: #dfeaff;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.22);
}

body.theme-dark .v03-studio-page #productionTypeButtons .filter-chip:is(
  .category-information,
  .category-divertissement,
  .category-films,
  .category-series,
  .category-magazines,
  .category-jeunesse,
  .category-documentaires,
  .category-realite,
  .category-culture
) {
  border-color: rgba(var(--category-rgb), 0.48);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.2), rgba(var(--category-rgb), 0.08));
  color: #dfeaff;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.22);
}

body.theme-dark .v03-studio-page #productionTypeButtons .filter-chip.active:is(
  .category-information,
  .category-divertissement,
  .category-films,
  .category-series,
  .category-magazines,
  .category-jeunesse,
  .category-documentaires,
  .category-realite,
  .category-culture
) {
  border-color: rgba(var(--category-rgb), 0.86);
  background: linear-gradient(100deg, rgba(var(--category-rgb), 0.38), rgba(var(--category-rgb), 0.16));
  color: #f3f8ff;
  box-shadow: inset 0 0 0 1px rgba(var(--category-rgb), 0.3), 0 8px 18px rgba(12, 20, 37, 0.24);
}

body.theme-dark .v03-studio-page .studio-planning-event[class*="category-"] {
  border-color: rgba(var(--category-rgb), 0.56);
  border-left-color: rgba(var(--category-rgb), 0.95);
  background: linear-gradient(90deg, rgba(var(--category-rgb), 0.22), rgba(var(--category-rgb), 0.11));
}

body.theme-dark .v03-studio-page .studio-planning-event.player-owned {
  border-color: #496d9f !important;
  box-shadow: none;
}

body.theme-dark .v03-studio-page .studio-production-dot {
  border-color: #2f7c63;
  background: #173d31;
  color: #96f5cf;
}

@media (max-width: 1200px) {
  .v03-studio-page .studio-upgrades-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v03-studio-page .studio-planning-calendar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .v03-studio-page .studio-upgrades-list {
    grid-template-columns: 1fr;
  }

  .v03-studio-page .studio-tech-assign-row {
    grid-template-columns: 1fr;
  }

  .v03-studio-page .studio-tech-assignment-slot {
    grid-template-columns: 1fr;
  }

  .v03-studio-page .studio-planning-calendar-grid {
    grid-template-columns: 1fr;
  }

  .v03-studio-page .studio-form-grid,
  body[data-page="studio"] .studio-form-grid {
    grid-template-columns: 1fr;
  }

  .v03-studio-page .studio-production-layout {
    grid-template-columns: 1fr;
  }

  .v03-studio-page .studio-production-sim-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v03-studio-page .studio-production-shoot-time-row {
    grid-template-columns: 1fr;
  }

  .v03-studio-page .studio-form-grid label,
  .v03-studio-page .studio-form-grid > :not(label),
  body[data-page="studio"] .studio-form-grid label,
  body[data-page="studio"] .studio-form-grid > :not(label) {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .v03-studio-page .studio-production-right {
    position: static;
  }

  .v03-studio-page .studio-production-sim {
    position: static;
  }

  .v03-studio-page .studio-production-sim-grid {
    grid-template-columns: 1fr;
  }
}

body.theme-dark[data-page="studio"] #studioProductionModal .studio-modal-card {
  background: #172740;
  border-color: #3c5b87;
  color: #dbe7ff;
}

.v03-admin-page {
  display: grid;
  gap: 20px;
}

.v03-legal-page {
  display: grid;
  gap: 16px;
}

.v03-legal-head {
  align-items: flex-start;
}

.v03-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v03-legal-hero-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  background:
    radial-gradient(340px 180px at 0% 0%, rgba(73, 187, 255, 0.16), transparent 62%),
    radial-gradient(340px 180px at 100% 0%, rgba(255, 120, 200, 0.14), transparent 62%),
    var(--surface);
}

.v03-legal-hero-card h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
}

.v03-legal-hero-card p {
  margin: 0;
  max-width: 72ch;
  color: var(--ink-soft);
  line-height: 1.55;
}

.v03-legal-kicker {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4d6ea1;
}

.v03-legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.v03-legal-section {
  display: grid;
  gap: 10px;
  align-content: start;
}

.v03-legal-section h2,
.v03-legal-section p,
.v03-legal-section ul {
  margin: 0;
}

.v03-legal-section p,
.v03-legal-section li {
  color: var(--ink-soft);
  line-height: 1.55;
}

.v03-legal-section ul {
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.v03-legal-section a {
  color: #2c67bb;
}

.v03-legal-section--full {
  grid-column: 1 / -1;
}

body.theme-dark .v03-legal-kicker {
  color: #9ec3ff;
}

body.theme-dark .v03-legal-hero-card {
  background:
    radial-gradient(340px 180px at 0% 0%, rgba(73, 187, 255, 0.18), transparent 62%),
    radial-gradient(340px 180px at 100% 0%, rgba(181, 106, 255, 0.16), transparent 62%),
    #17253d;
}

body.theme-dark .v03-legal-section a {
  color: #9ec3ff;
}

@media (max-width: 900px) {
  .v03-legal-grid {
    grid-template-columns: 1fr;
  }

  .v03-legal-section--full {
    grid-column: auto;
  }
}

.v03-admin-page .page-head {
  align-items: flex-start;
  gap: 16px;
}

.v03-admin-quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.v03-admin-grid,
.v03-admin-page .v03-admin-grid {
  align-items: stretch;
}

.v03-admin-scope-card,
.v03-admin-action-card,
.v03-admin-logs-card {
  gap: 16px;
}

.v03-admin-card-copy {
  margin: 6px 0 0;
  color: var(--muted);
}

.v03-admin-scope-row,
.v03-admin-funds-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v03-admin-scope-hint,
.v03-admin-status {
  margin: 0;
  color: var(--muted);
}

.v03-admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.v03-admin-pill-list,
.market-regenerate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.v03-admin-logs-list,
.cron-logs-list {
  display: grid;
  gap: 12px;
  max-height: 350px;
  overflow: auto;
  padding-right: 4px;
}

.v03-plain-viewer {
  width: 100%;
  min-height: 60vh;
  margin: 0;
  padding: 20px;
  border: 1px solid rgba(95, 146, 255, 0.2);
  border-radius: 24px;
  background: rgba(20, 30, 58, 0.72);
  color: var(--text-main);
  font: 500 15px/1.6 "SF Pro Display", "Segoe UI", sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.v03-html-viewer {
  width: 100%;
  min-height: 75vh;
  border: 1px solid rgba(95, 146, 255, 0.2);
  border-radius: 24px;
  background: #fff;
}


.cron-log-row {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(95, 146, 255, 0.2);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(235, 244, 255, 0.88), rgba(255, 239, 248, 0.72));
}

.cron-log-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.cron-log-badge,
.cron-log-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(95, 146, 255, 0.24);
  background: rgba(255, 255, 255, 0.7);
  color: #355991;
  font-weight: 700;
}

.cron-log-date {
  color: var(--muted);
  font-weight: 600;
}

.cron-log-message,
.cron-log-meta,
.cron-logs-empty {
  margin: 0;
}

.cron-log-message {
  color: var(--text);
  font-weight: 600;
}

.cron-log-meta,
.cron-logs-empty {
  color: var(--muted);
}

.cron-log-success {
  border-color: rgba(74, 160, 122, 0.26);
}

.cron-log-error {
  border-color: rgba(215, 88, 88, 0.26);
}

.cron-log-partial {
  border-color: rgba(218, 164, 67, 0.26);
}

body.theme-dark .cron-log-row {
  background: linear-gradient(135deg, rgba(21, 39, 64, 0.95), rgba(33, 45, 80, 0.88));
  border-color: rgba(115, 158, 255, 0.28);
}

body.theme-dark .cron-log-badge,
body.theme-dark .cron-log-pill {
  background: rgba(16, 28, 49, 0.72);
  border-color: rgba(115, 158, 255, 0.24);
  color: #dbe7ff;
}

body.theme-dark .cron-log-date,
body.theme-dark .cron-log-meta,
body.theme-dark .cron-logs-empty,
body.theme-dark .v03-admin-scope-hint,
body.theme-dark .v03-admin-status,
body.theme-dark .v03-admin-card-copy {
  color: #9db3d9;
}

@media (max-width: 980px) {
  .v03-admin-page .page-head {
    align-items: stretch;
  }

  .v03-admin-quick-links {
    justify-content: flex-start;
  }

  .v03-admin-scope-row,
  .v03-admin-funds-row {
    grid-template-columns: 1fr;
  }
}
