:root{
  --theme-bg:#f6f8fc;
  --theme-bg-soft:#fbfdff;
  --theme-surface:#ffffff;
  --theme-surface-strong:#ffffff;
  --theme-border:#dbe3ee;
  --theme-text:#0f172a;
  --theme-muted:#64748b;
  --theme-accent:#f97316;
  --theme-accent-strong:#c2410c;
  --theme-shadow:0 28px 80px rgba(15,23,42,.08);
}

:root[data-theme="dark"]{
  --theme-bg:#09111f;
  --theme-bg-soft:#0f172a;
  --theme-surface:#0f1b31;
  --theme-surface-strong:#13213b;
  --theme-border:#223556;
  --theme-text:#e5edf8;
  --theme-muted:#9fb0c9;
  --theme-accent:#fb923c;
  --theme-accent-strong:#fdba74;
  --theme-shadow:0 28px 80px rgba(2,6,23,.42);
  --bg:#09111f;
  --card:#0f1b31;
  --panel:#0f1b31;
  --panel-strong:#13213b;
  --panel-soft:#13213b;
  --surface:#0f1b31;
  --surface-strong:#13213b;
  --line:#223556;
  --b:#223556;
  --text:#e5edf8;
  --t:#e5edf8;
  --muted:#9fb0c9;
  --accent-soft:rgba(251,146,60,.14);
  --card-soft:#13213b;
  --bg-soft:#0f172a;
}

html,
body{
  background:var(--theme-bg);
  color:var(--theme-text);
}

body,
input,
select,
textarea,
button{
  color:var(--theme-text);
}

:root[data-theme="dark"] body{
  background:
    radial-gradient(circle at top right, rgba(251,146,60,.08), transparent 22%),
    linear-gradient(180deg,#08111f 0%, #0b1426 100%) !important;
  color:var(--theme-text) !important;
}

:root[data-theme="dark"] a,
:root[data-theme="dark"] strong,
:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] h5,
:root[data-theme="dark"] h6,
:root[data-theme="dark"] label,
:root[data-theme="dark"] th,
:root[data-theme="dark"] td,
:root[data-theme="dark"] span,
:root[data-theme="dark"] p,
:root[data-theme="dark"] li{
  color:inherit;
}

:root[data-theme="dark"] header,
:root[data-theme="dark"] .app-header,
:root[data-theme="dark"] .shell,
:root[data-theme="dark"] .wrap,
:root[data-theme="dark"] .planner-hero,
:root[data-theme="dark"] .planner-side,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .mini-card,
:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .hero-side,
:root[data-theme="dark"] .hero-stat,
:root[data-theme="dark"] .progress-card,
:root[data-theme="dark"] .control-card,
:root[data-theme="dark"] .client-brief,
:root[data-theme="dark"] .meta-card,
:root[data-theme="dark"] .month-chip,
:root[data-theme="dark"] .stats-card,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .box,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .board-panel,
:root[data-theme="dark"] .control-panel,
:root[data-theme="dark"] .hero-main,
:root[data-theme="dark"] .section-panel,
:root[data-theme="dark"] .modal-box,
:root[data-theme="dark"] .day,
:root[data-theme="dark"] .day-col,
:root[data-theme="dark"] .retro,
:root[data-theme="dark"] .retro-box,
:root[data-theme="dark"] .retro-card,
:root[data-theme="dark"] .client-card,
:root[data-theme="dark"] .task,
:root[data-theme="dark"] .control-group,
:root[data-theme="dark"] .week-nav button,
:root[data-theme="dark"] .top-controls select,
:root[data-theme="dark"] .top-controls input,
:root[data-theme="dark"] .top-controls textarea,
:root[data-theme="dark"] .top-controls button,
:root[data-theme="dark"] .modal-box input,
:root[data-theme="dark"] .modal-box select,
:root[data-theme="dark"] .modal-box textarea,
:root[data-theme="dark"] .retro-field input,
:root[data-theme="dark"] .input,
:root[data-theme="dark"] .select,
:root[data-theme="dark"] .btn,
:root[data-theme="dark"] .nav button,
:root[data-theme="dark"] .nav a,
:root[data-theme="dark"] .nav-top a,
:root[data-theme="dark"] .logo,
:root[data-theme="dark"] .btn-logout,
:root[data-theme="dark"] button,
:root[data-theme="dark"] table,
:root[data-theme="dark"] thead,
:root[data-theme="dark"] tbody,
:root[data-theme="dark"] tr{
  background:var(--theme-surface) !important;
  color:var(--theme-text) !important;
  border-color:var(--theme-border) !important;
  box-shadow:none;
}

:root[data-theme="dark"] .task small,
:root[data-theme="dark"] .note,
:root[data-theme="dark"] .retro-subtitle,
:root[data-theme="dark"] .retro-row-label,
:root[data-theme="dark"] .counter-label,
:root[data-theme="dark"] .field-note,
:root[data-theme="dark"] .date,
:root[data-theme="dark"] .hero-copy,
:root[data-theme="dark"] .control-label,
:root[data-theme="dark"] .app-header__subtitle{
  color:var(--theme-muted) !important;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder{
  color:var(--theme-muted) !important;
}

:root[data-theme="dark"] .hero-kicker,
:root[data-theme="dark"] .package-badge,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .btn-soft,
:root[data-theme="dark"] .btn--accent{
  background:rgba(251,146,60,.14) !important;
  color:var(--theme-accent-strong) !important;
  border-color:rgba(251,146,60,.4) !important;
}

:root[data-theme="dark"] .task.done{
  background:#123322;
  border-color:#1f9f5a;
}

:root[data-theme="dark"] .day.today,
:root[data-theme="dark"] .day-col.today{
  background:#18253b;
  border-color:var(--theme-accent);
}

:root[data-theme="dark"] .primary,
:root[data-theme="dark"] .btn-primary,
:root[data-theme="dark"] .app-header__link.is-active{
  background:var(--theme-accent) !important;
  border-color:var(--theme-accent) !important;
  color:#111827 !important;
}

:root[data-theme="dark"] .app-header,
:root[data-theme="dark"] header{
  background:rgba(9,17,31,.88) !important;
  border-bottom-color:rgba(34,53,86,.96) !important;
}

:root[data-theme="dark"] .app-header__brand,
:root[data-theme="dark"] .app-header__logo,
:root[data-theme="dark"] .app-header__title,
:root[data-theme="dark"] .logo,
:root[data-theme="dark"] .header-inner,
:root[data-theme="dark"] .nav{
  color:var(--theme-text) !important;
}

:root[data-theme="dark"] .app-header__logo-accent,
:root[data-theme="dark"] .logo .accent{
  color:var(--theme-accent) !important;
}

:root[data-theme="dark"] .chip-type,
:root[data-theme="dark"] .progress-pill,
:root[data-theme="dark"] .legend-pill{
  background:var(--theme-surface-strong) !important;
  color:var(--theme-text) !important;
  border-color:var(--theme-border) !important;
}

:root[data-theme="dark"] main,
:root[data-theme="dark"] section,
:root[data-theme="dark"] article,
:root[data-theme="dark"] aside,
:root[data-theme="dark"] form,
:root[data-theme="dark"] fieldset{
  color:var(--theme-text);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] option{
  background:var(--theme-surface-strong) !important;
  color:var(--theme-text) !important;
  border-color:var(--theme-border) !important;
}

:root[data-theme="dark"] .hero,
:root[data-theme="dark"] .hero-side,
:root[data-theme="dark"] .hero-stat-grid,
:root[data-theme="dark"] .brand-panel,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .brand-point,
:root[data-theme="dark"] .client-brief,
:root[data-theme="dark"] .control-group,
:root[data-theme="dark"] .control-card,
:root[data-theme="dark"] .planner-head,
:root[data-theme="dark"] .lane-shell,
:root[data-theme="dark"] .queue-panel,
:root[data-theme="dark"] .board-panel,
:root[data-theme="dark"] .chat-shell,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .chat-main,
:root[data-theme="dark"] .hero-stat,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .summary-box,
:root[data-theme="dark"] .pending-item,
:root[data-theme="dark"] .aggregate-day,
:root[data-theme="dark"] .aggregate-entry,
:root[data-theme="dark"] .user-card,
:root[data-theme="dark"] .message,
:root[data-theme="dark"] .attachment,
:root[data-theme="dark"] .composer textarea,
:root[data-theme="dark"] .search,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea{
  background:var(--theme-surface) !important;
  color:var(--theme-text) !important;
  border-color:var(--theme-border) !important;
}

:root[data-theme="dark"] [class*="panel"],
:root[data-theme="dark"] [class*="Panel"],
:root[data-theme="dark"] [class*="card"],
:root[data-theme="dark"] [class*="Card"],
:root[data-theme="dark"] [class*="hero"],
:root[data-theme="dark"] [class*="Hero"],
:root[data-theme="dark"] [class*="stat"],
:root[data-theme="dark"] [class*="Stat"],
:root[data-theme="dark"] [class*="metric"],
:root[data-theme="dark"] [class*="Metric"],
:root[data-theme="dark"] [class*="summary"],
:root[data-theme="dark"] [class*="Summary"],
:root[data-theme="dark"] [class*="control"],
:root[data-theme="dark"] [class*="Control"],
:root[data-theme="dark"] [class*="group"],
:root[data-theme="dark"] [class*="Group"],
:root[data-theme="dark"] [class*="brief"],
:root[data-theme="dark"] [class*="Brief"],
:root[data-theme="dark"] [class*="calendar"],
:root[data-theme="dark"] [class*="Calendar"],
:root[data-theme="dark"] [class*="asset"],
:root[data-theme="dark"] [class*="Asset"],
:root[data-theme="dark"] [class*="queue"],
:root[data-theme="dark"] [class*="Queue"],
:root[data-theme="dark"] [class*="board"],
:root[data-theme="dark"] [class*="Board"],
:root[data-theme="dark"] [class*="lane"],
:root[data-theme="dark"] [class*="Lane"],
:root[data-theme="dark"] [class*="message"],
:root[data-theme="dark"] [class*="Message"],
:root[data-theme="dark"] [class*="chat"],
:root[data-theme="dark"] [class*="Chat"],
:root[data-theme="dark"] [class*="sidebar"],
:root[data-theme="dark"] [class*="Sidebar"],
:root[data-theme="dark"] [class*="modal"],
:root[data-theme="dark"] [class*="Modal"],
:root[data-theme="dark"] [class*="box"],
:root[data-theme="dark"] [class*="Box"],
:root[data-theme="dark"] [class*="cell"],
:root[data-theme="dark"] [class*="Cell"],
:root[data-theme="dark"] [class*="day"],
:root[data-theme="dark"] [class*="Day"],
:root[data-theme="dark"] [class*="avatar"],
:root[data-theme="dark"] [class*="Avatar"],
:root[data-theme="dark"] [class*="shell"],
:root[data-theme="dark"] [class*="Shell"]{
  border-color:var(--theme-border) !important;
}

:root[data-theme="dark"] .hero-main,
:root[data-theme="dark"] .hero-side,
:root[data-theme="dark"] .planner-hero,
:root[data-theme="dark"] .control-card,
:root[data-theme="dark"] .control-group,
:root[data-theme="dark"] .client-brief,
:root[data-theme="dark"] .progress-card,
:root[data-theme="dark"] .hero-stat,
:root[data-theme="dark"] .metric,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .panel-head,
:root[data-theme="dark"] .panel-body,
:root[data-theme="dark"] .asset-shell,
:root[data-theme="dark"] .asset-card,
:root[data-theme="dark"] .calendar-shell,
:root[data-theme="dark"] .lane-shell,
:root[data-theme="dark"] .queue-panel,
:root[data-theme="dark"] .board-panel,
:root[data-theme="dark"] .chat-shell,
:root[data-theme="dark"] .chat-main,
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .message,
:root[data-theme="dark"] .attachment,
:root[data-theme="dark"] .brand-panel,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .brand-point,
:root[data-theme="dark"] .avatar-card,
:root[data-theme="dark"] .pending-item,
:root[data-theme="dark"] .aggregate-day,
:root[data-theme="dark"] .retro-box,
:root[data-theme="dark"] .retro-card{
  background:var(--theme-surface) !important;
  color:var(--theme-text) !important;
}

:root[data-theme="dark"] .meta-card,
:root[data-theme="dark"] .month-chip,
:root[data-theme="dark"] .user-card,
:root[data-theme="dark"] .task,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .pill,
:root[data-theme="dark"] .cell,
:root[data-theme="dark"] .day,
:root[data-theme="dark"] .day-cell,
:root[data-theme="dark"] .composer textarea,
:root[data-theme="dark"] .search,
:root[data-theme="dark"] .input,
:root[data-theme="dark"] .select,
:root[data-theme="dark"] .btn,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea{
  background:var(--theme-surface-strong) !important;
  color:var(--theme-text) !important;
  border-color:var(--theme-border) !important;
}

:root[data-theme="dark"] .cell.weekend,
:root[data-theme="dark"] .day.weekend,
:root[data-theme="dark"] .day-cell.weekend-blocked,
:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .cell.muted{
  background:#0c1628 !important;
}

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .cp-header,
:root[data-theme="dark"] .app-header{
  background:rgba(9,17,31,.92) !important;
  color:var(--theme-text) !important;
  border-color:rgba(34,53,86,.96) !important;
}

:root[data-theme="dark"] .drawer,
:root[data-theme="dark"] .task__note,
:root[data-theme="dark"] .empty,
:root[data-theme="dark"] .modal .box{
  background:#13213b !important;
  color:var(--theme-text) !important;
  border-color:var(--theme-border) !important;
}

:root[data-theme="dark"] .queue-panel,
:root[data-theme="dark"] .board-panel,
:root[data-theme="dark"] .day,
:root[data-theme="dark"] .day-cell,
:root[data-theme="dark"] .cell,
:root[data-theme="dark"] .pill,
:root[data-theme="dark"] .task,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .client-card,
:root[data-theme="dark"] .progress-card,
:root[data-theme="dark"] .control-card,
:root[data-theme="dark"] .hero-stat,
:root[data-theme="dark"] .brand-point,
:root[data-theme="dark"] .modal .box{
  box-shadow:none !important;
}

:root[data-theme="dark"] .brief-copy,
:root[data-theme="dark"] .package-copy,
:root[data-theme="dark"] .progress-meta,
:root[data-theme="dark"] .panel-copy,
:root[data-theme="dark"] .panel__subtitle,
:root[data-theme="dark"] .hero p,
:root[data-theme="dark"] .brand-copy,
:root[data-theme="dark"] .sidebar-copy,
:root[data-theme="dark"] .user-preview,
:root[data-theme="dark"] .message__meta,
:root[data-theme="dark"] .attachment__meta span,
:root[data-theme="dark"] .pending-meta,
:root[data-theme="dark"] .empty,
:root[data-theme="dark"] small{
  color:var(--theme-muted) !important;
}

:root[data-theme="dark"] .page-toolbar,
:root[data-theme="dark"] .progress-grid,
:root[data-theme="dark"] .hero-stats{
  color:var(--theme-text) !important;
}

:root[data-theme="dark"] .pill.st-draft{
  background:#1a263b !important;
  border-color:#334155 !important;
}

:root[data-theme="dark"] .pill.st-ready{
  background:#3a2b13 !important;
  border-color:#92400e !important;
}

:root[data-theme="dark"] .pill.st-approved{
  background:#123322 !important;
  border-color:#166534 !important;
}

:root[data-theme="dark"] .pill.st-posted{
  background:#142847 !important;
  border-color:#1e3a8a !important;
}

:root[data-theme="dark"] [style*="background:#fff"],
:root[data-theme="dark"] [style*="background: #fff"],
:root[data-theme="dark"] [style*="background:#ffffff"],
:root[data-theme="dark"] [style*="background: #ffffff"],
:root[data-theme="dark"] [style*="background:#fbfdff"],
:root[data-theme="dark"] [style*="background: #fbfdff"],
:root[data-theme="dark"] [style*="background:#f8fafc"],
:root[data-theme="dark"] [style*="background: #f8fafc"],
:root[data-theme="dark"] [style*="background:#fffaf5"],
:root[data-theme="dark"] [style*="background: #fffaf5"],
:root[data-theme="dark"] [style*="background:rgba(255,255,255"],
:root[data-theme="dark"] [style*="background: rgba(255,255,255"]{
  background:var(--theme-surface-strong) !important;
  color:var(--theme-text) !important;
  border-color:var(--theme-border) !important;
}

:root[data-theme="dark"] [style*="color:#64748b"],
:root[data-theme="dark"] [style*="color: #64748b"],
:root[data-theme="dark"] [style*="color:#6b7280"],
:root[data-theme="dark"] [style*="color: #6b7280"],
:root[data-theme="dark"] [style*="color:#94a3b8"],
:root[data-theme="dark"] [style*="color: #94a3b8"],
:root[data-theme="dark"] [style*="color:#475569"],
:root[data-theme="dark"] [style*="color: #475569"]{
  color:var(--theme-muted) !important;
}

:root[data-theme="dark"] .modal{
  background:rgba(2,6,23,.72) !important;
}

.theme-fab,
.app-header__theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--theme-border);
  background:var(--theme-surface);
  color:var(--theme-text);
  border-radius:999px;
  padding:10px 14px;
  font:inherit;
  cursor:pointer;
  transition:transform .16s ease, border-color .16s ease, background .16s ease;
}

.theme-fab:hover,
.app-header__theme-toggle:hover{
  transform:translateY(-1px);
  border-color:var(--theme-accent);
}

.theme-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:1200;
  box-shadow:var(--theme-shadow);
}

.theme-toggle__icon{
  font-size:14px;
  line-height:1;
}

.theme-toggle__label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hero-copy,
.panel-copy,
.panel__subtitle,
.stat__hint,
.brief-subtitle,
.progress-meta,
.asset-note,
.calendar-note,
.sidebar-copy,
.brand-copy,
.bottom-note,
.modal-copy,
.mini-panel p,
#retroSubtitle,
#heroClientSubtitle,
#postProgressMeta,
#reelProgressMeta,
#calendarHint,
#employeePanelCopy{
  display:none !important;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid var(--theme-border);
  background:var(--theme-surface-strong);
  color:var(--theme-text);
  font-size:12px;
  font-weight:800;
  letter-spacing:.04em;
  line-height:1;
  white-space:nowrap;
}

.status-pill--draft{background:#e2e8f0;border-color:#cbd5e1;color:#334155}
.status-pill--ready{background:#fef3c7;border-color:#fcd34d;color:#92400e}
.status-pill--approved{background:#bbf7d0;border-color:#4ade80;color:#166534}
.status-pill--posted{background:#dbeafe;border-color:#60a5fa;color:#1d4ed8}
.status-pill--pending{background:#fef3c7;border-color:#f59e0b;color:#92400e}
.status-pill--rejected{background:#fee2e2;border-color:#f87171;color:#b91c1c}
.status-pill--vacation{background:#ede9fe;border-color:#a78bfa;color:#5b21b6}
.status-pill--wfh{background:#cffafe;border-color:#22d3ee;color:#155e75}

:root[data-theme="dark"] .status-pill{
  background:var(--theme-surface-strong);
  border-color:var(--theme-border);
  color:var(--theme-text);
}

:root[data-theme="dark"] .status-pill--draft{background:#18263b;border-color:#334155;color:#dbe5f4}
:root[data-theme="dark"] .status-pill--ready{background:#3a2b13;border-color:#f59e0b;color:#fde68a}
:root[data-theme="dark"] .status-pill--approved{background:#14532d;border-color:#22c55e;color:#dcfce7}
:root[data-theme="dark"] .status-pill--posted{background:#142847;border-color:#60a5fa;color:#dbeafe}
:root[data-theme="dark"] .status-pill--pending{background:#3a2b13;border-color:#f59e0b;color:#fde68a}
:root[data-theme="dark"] .status-pill--rejected{background:#3a1414;border-color:#f87171;color:#fee2e2}
:root[data-theme="dark"] .status-pill--vacation{background:#2a1f4d;border-color:#a78bfa;color:#ede9fe}
:root[data-theme="dark"] .status-pill--wfh{background:#123243;border-color:#22d3ee;color:#cffafe}
