:root {
  --bg: #f6f9fe;
  --surface: #ffffff;
  --surface-soft: #eef4fc;
  --text: #182338;
  --muted: #6a7890;
  --line: #dce5f2;
  --line-soft: #edf2f8;
  --accent: #3367d6;
  --accent-soft: #e8f0fe;
  --blue: #2f6fed;
  --black: #182338;
  --orange: #b45309;
  --pink: #be185d;
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px 18px;
  background: rgba(255, 255, 255, .96);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 20px;
  border-bottom: 1px solid var(--line-soft);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #dce7f5;
  box-shadow: 0 8px 18px rgba(39, 103, 177, .12);
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.brand-wordmark {
  color: #1c2b46;
  font-size: 18px;
  letter-spacing: -.02em;
}

.brand-mark {
  font-size: 0;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-button,
.refresh-button,
.chip,
.icon-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-button {
  width: 100%;
  padding: 11px 14px;
  border-radius: 11px;
  text-align: left;
  color: #344054;
}

.nav-button:hover,
.nav-button.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.nav-separator {
  height: 1px;
  background: var(--line-soft);
  margin: 10px 8px;
}

.acting-as {
  margin-top: auto;
  padding: 10px 12px 0;
  display: grid;
  gap: 6px;
}

.acting-as label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}

.detail-actions {
  margin-top: 10px;
}

.calendar-day-event {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

.refresh-button {
  padding: 10px 12px;
  border-radius: var(--radius);
  border-color: var(--line);
  background: var(--surface);
  color: #38506f;
}

.refresh-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(246, 249, 254, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding: 22px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1,
.section-title h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
  letter-spacing: 0;
}

.topbar p,
.section-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.topbar.calendar-topbar {
  min-height: 66px;
  padding: 13px 30px;
}

.topbar.calendar-topbar h1 {
  font-size: 20px;
}

.topbar.calendar-topbar p {
  display: none;
}

.view {
  padding: 30px 34px 42px;
  display: grid;
  gap: 22px;
}

.grid {
  display: grid;
  gap: 16px;
}

.stats-grid {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.two-col {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

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

.calendar-grid {
  grid-template-columns: repeat(7, minmax(210px, 1fr));
  overflow-x: auto;
}

.panel,
.stat-card,
.item-card,
.drawer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(48, 74, 112, .035);
}

.panel {
  padding: 18px;
}

.panel-header,
.filters,
.tabs,
.calendar-toolbar,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-header {
  margin-bottom: 14px;
}

.panel-header h2,
.item-card h3 {
  margin: 0;
  font-size: 16px;
}

.stat-card {
  padding: 16px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

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

.item-card {
  padding: 14px;
  display: grid;
  gap: 10px;
  cursor: pointer;
}

.item-card:hover {
  border-color: #b8c6d3;
  transform: translateY(-1px);
}

.meta,
.tags,
.thread-parts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.muted,
.meta {
  color: var(--muted);
  font-size: 13px;
}

.preview {
  margin: 0;
  line-height: 1.55;
  color: #344054;
}

.topbar-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.badge,
.score,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--surface-soft);
  color: #475467;
}

.platform-linkedin {
  background: #e7f0fb;
  color: var(--blue);
}

.platform-x {
  background: #eceff3;
  color: var(--black);
}

.platform-reddit {
  background: #fff0e3;
  color: var(--orange);
}

.platform-instagram {
  background: #fde7f1;
  color: var(--pink);
}

.platform-facebook {
  background: #e8f0fe;
  color: #1877f2;
}

.content-brand {
  background: #eef2f6;
  color: #475467;
}

.content-founder_led {
  background: #ecfdf3;
  color: #027a48;
}

.status-draft {
  background: #eef2f6;
  color: #475467;
}

.status-pending_approval {
  background: #fff7ed;
  color: #c2410c;
}

.status-approved,
.status-scheduled {
  background: #e3f4f0;
  color: var(--accent);
}

.status-rejected,
.status-cancelled {
  background: #fef3f2;
  color: #b42318;
}

.status-published {
  background: #e8f3ff;
  color: var(--blue);
}

.status-failed {
  background: #fdecec;
  color: #b42318;
}

.status-ready_to_publish {
  background: #fff7ed;
  color: #c2410c;
}

.status-simulated {
  background: #edf4ff;
  color: #2d61bd;
}

.workspace-badge {
  background: #eef4fc;
  color: #526987;
}

.score-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.qa-status-review {
  background: #fffaeb;
  color: #b54708;
}

.qa-status-revise {
  background: #fff7ed;
  color: #c2410c;
}

.qa-status-blocked {
  background: #fef3f2;
  color: #b42318;
}

.score {
  background: #ecfdf3;
  color: #027a48;
}

.score.medium {
  background: #fffaeb;
  color: #b54708;
}

.score.low {
  background: #fef3f2;
  color: #b42318;
}

.score-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.score-meter span {
  display: block;
  height: 100%;
  width: var(--score);
  background: var(--accent);
}

.filters,
.tabs {
  position: sticky;
  top: 74px;
  z-index: 8;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.input,
.select {
  height: 38px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
}

.input {
  min-width: 260px;
}

.chip {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: var(--radius);
  border-color: var(--line);
  background: var(--surface);
}

.chip.active,
.chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(8, minmax(100px, 1fr));
  gap: 10px;
}

.pipeline-step {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.pipeline-step strong {
  display: block;
  margin-bottom: 4px;
}

.calendar-day {
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.calendar-day h3 {
  margin: 0;
  font-size: 15px;
}

.calendar-post {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fcfdff;
  cursor: pointer;
}

.calendar-status-pending_approval {
  border-left: 3px solid #f97316;
}

.calendar-status-approved {
  border-left: 3px solid var(--accent);
}

.calendar-status-scheduled {
  border-left: 3px solid #2b6cb0;
}

.calendar-status-published {
  border-left: 3px solid #027a48;
}

.calendar-status-rejected,
.calendar-status-cancelled,
.calendar-status-failed {
  border-left: 3px solid #b42318;
}

.calendar-status-ready_to_publish {
  border-left: 3px solid #c2410c;
}

.post-text {
  white-space: pre-wrap;
  line-height: 1.55;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.26);
  display: flex;
  justify-content: flex-end;
}

.drawer {
  width: min(720px, 100%);
  height: 100%;
  overflow: auto;
  border-radius: 0;
  padding: 22px;
  box-shadow: -12px 0 32px rgba(16, 24, 40, 0.14);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.drawer h2 {
  margin: 8px 0 4px;
}

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

.detail-block {
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  margin-top: 14px;
}

.approval-actions {
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.approval-note {
  color: var(--text);
  font-weight: 700;
}

.action {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--surface);
}

.action.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.action.secondary:hover,
.action.primary:hover {
  transform: translateY(-1px);
}

.detail-block h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border-color: var(--line);
}

.empty,
.loading,
.error {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.skeleton {
  height: 96px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #eef2f6, #f7f8fb, #eef2f6);
  background-size: 180% 100%;
  animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (max-width: 1180px) {
  .stats-grid,
  .three-col,
  .two-col,
  .pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .main,
  .topbar,
  .view {
    min-width: 0;
  }

  .topbar,
  .view {
    padding: 18px;
  }

  .stats-grid,
  .three-col,
  .two-col,
  .pipeline,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .filters,
  .tabs {
    position: static;
  }

  .input,
  .select {
    width: 100%;
    min-width: 0;
  }
}

/* Production calendar workspace */
.production-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0 0;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.production-hero h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.production-hero p {
  max-width: 680px;
  margin: 8px 0 0;
  font-size: 15px;
}

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

.production-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #c8dafa;
  border-radius: 12px;
  background: linear-gradient(90deg, #f1f6ff, #fbfdff);
  color: #294d8e;
}

.production-notice strong,
.production-notice span {
  display: block;
}

.production-notice span:not(.notice-dot) {
  margin-top: 3px;
  color: #52736e;
  font-size: 13px;
}

.notice-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #3c73e8;
  box-shadow: 0 0 0 4px #deebff;
}

.production-stats {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.production-stat {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.production-stat:hover {
  border-color: var(--accent);
  box-shadow: 0 5px 16px rgba(19, 111, 99, .08);
}

.production-stat span,
.production-stat strong {
  display: block;
}

.production-stat span {
  color: var(--muted);
  font-size: 12px;
}

.production-stat strong {
  margin-top: 7px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.production-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 15px 0 0;
  border-top: 1px solid var(--line-soft);
}

.production-toolbar strong,
.production-toolbar .muted {
  display: block;
}

.production-toolbar .muted {
  margin-top: 3px;
}

.production-weekdays,
.production-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  min-width: 980px;
}

.production-weekdays {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.production-calendar-grid {
  gap: 8px;
  overflow-x: auto;
}

.production-day {
  min-height: 208px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.production-day:hover {
  border-color: #9ccdc4;
  box-shadow: 0 8px 18px rgba(16, 24, 40, .07);
  transform: translateY(-1px);
}

.production-day-empty {
  min-height: 0;
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.production-day-empty:hover {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.production-day.weekend {
  background: #fbfcfe;
}

.production-day.has-festival {
  border-color: #e8c27a;
  background: linear-gradient(180deg, #fffaf0, #fff);
}

.production-day-head,
.production-slot-top,
.production-slot-foot,
.asset-track,
.deliverable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.production-day-head {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-soft);
}

.day-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: #38557e;
  font-weight: 800;
}

.production-slot {
  display: grid;
  gap: 9px;
  padding-top: 11px;
}

.production-slot h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

.slot-type {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf2f7;
  color: #52606d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.slot-type.festival {
  background: #fff0c9;
  color: #95620c;
}

.slot-brief,
.festival-label {
  margin: 0;
  color: #586779;
  font-size: 12px;
  line-height: 1.45;
}

.slot-brief {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.festival-label {
  color: #9a6714;
  font-weight: 700;
}

.asset-track {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.asset-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f5f7fa;
  color: #7a8695;
  font-size: 10px;
  font-weight: 700;
}

.asset-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b7c0cc;
}

.asset-pill.ready {
  background: #e7f7ef;
  color: #157347;
}

.asset-pill.ready i {
  background: #22a06b;
}

.production-slot-foot {
  padding-top: 7px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
}

.production-empty-slot {
  margin-top: 80px;
  color: #98a2b3;
  font-size: 12px;
  text-align: center;
}

.production-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.production-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b7c0cc;
}

.legend-swatch.festival { background: #d99e28; }
.legend-swatch.image { background: #22a06b; }
.legend-swatch.video { background: #2b6cb0; }
.legend-swatch.review { background: #f97316; }

.production-note {
  margin: 10px 0;
  padding: 10px;
  border-left: 3px solid #e8c27a;
  border-radius: 0 8px 8px 0;
  background: #fffaf0;
}

.production-note p {
  margin: 7px 0 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.45;
}

.textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}

.deliverable-row {
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.deliverable-row strong,
.deliverable-row .muted {
  display: block;
}

.deliverable-row .muted {
  margin-top: 4px;
  max-width: 350px;
}

.file-action {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}

.file-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.production-next-step {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 13px;
  border-radius: 10px;
  background: #edf4ff;
  color: #2e5caf;
  font-size: 13px;
}

.production-next-step span {
  color: #607aa8;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .production-stats { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}

@media (max-width: 760px) {
  .production-hero { align-items: flex-start; flex-direction: column; }
  .production-stats { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}

/* Configurable content calendar */
.calendar-workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.calendar-sidebar-panel,
.calendar-stage,
.calendar-customize-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .93);
  box-shadow: 0 12px 32px rgba(39, 73, 124, .055);
}

.calendar-sidebar-panel {
  position: sticky;
  top: 104px;
  padding: 14px;
}

.calendar-new-button {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #3367d6, #4b82ed);
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  box-shadow: 0 7px 16px rgba(51, 103, 214, .18);
}

.calendar-new-button span { margin-right: 4px; font-size: 19px; vertical-align: -1px; }

.calendar-client-switcher {
  display: grid;
  gap: 5px;
  margin-top: 13px;
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--line-soft);
}

.calendar-client-switcher > span {
  color: #7b8aa0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.calendar-client-switcher select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d4dfed;
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: #344861;
  font-size: 12px;
  font-weight: 750;
}

.mini-calendar-head,
.sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-calendar-head { margin: 20px 2px 13px; color: #34435c; font-size: 13px; }

.mini-arrow,
.sidebar-section-head button {
  border: 0;
  background: transparent;
  color: #60718b;
  cursor: pointer;
}

.mini-arrow { width: 24px; height: 24px; border-radius: 7px; font-size: 21px; line-height: 1; }
.mini-arrow:hover { background: #edf4ff; color: var(--accent); }

.mini-calendar-weekdays,
.mini-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.mini-calendar-weekdays { color: #8a97aa; font-size: 10px; font-weight: 800; }
.mini-calendar-days { margin-top: 6px; }

.mini-calendar-day {
  width: 27px;
  height: 27px;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #52627b;
  cursor: pointer;
  font-size: 11px;
}

.mini-calendar-day:hover { background: #eef4ff; color: #2f64c7; }
.mini-calendar-day.selected { background: #3367d6; color: #fff; box-shadow: 0 3px 8px rgba(51, 103, 214, .24); }
.mini-calendar-day.festival:not(.selected) { color: #b17816; font-weight: 800; }

.sidebar-section {
  display: grid;
  gap: 9px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.sidebar-section-head { color: #4c5d76; font-size: 12px; }
.sidebar-section-head button { color: #376bcf; font-size: 11px; font-weight: 750; }

.calendar-source {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #596a82;
  cursor: pointer;
  font-size: 12px;
}

.calendar-source input { position: absolute; opacity: 0; pointer-events: none; }
.calendar-source i { width: 13px; height: 13px; border: 2px solid var(--source-color); border-radius: 4px; background: #fff; }
.calendar-source input:checked + i { background: var(--source-color); box-shadow: inset 0 0 0 2px #fff; }

.calendar-role-card { gap: 3px; padding: 13px; border: 1px solid #dce8fa; border-radius: 12px; background: #f7faff; }
.calendar-role-label { color: #7788a1; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.calendar-role-card strong { color: #315caa; font-size: 13px; }
.calendar-role-card p { margin: 2px 0 0; color: #73839a; font-size: 11px; line-height: 1.42; }

.calendar-sidebar-summary { display: grid; gap: 3px; margin: 19px 2px 1px; color: #7f8fa6; font-size: 11px; }
.calendar-sidebar-summary strong { color: #41526d; font-size: 12px; }

.calendar-stage { min-width: 0; overflow: hidden; }

.calendar-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line-soft);
}

.calendar-navigation,
.calendar-command-actions,
.calendar-arrows,
.calendar-view-switcher,
.density-switch {
  display: flex;
  align-items: center;
  gap: 7px;
}

.calendar-navigation { min-width: 0; }

.calendar-today,
.calendar-arrows button,
.calendar-customize-button,
.calendar-view-switcher button,
.calendar-select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #52627b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.calendar-today { padding: 0 12px; }
.calendar-arrows { gap: 2px; }
.calendar-arrows button { width: 29px; padding: 0; font-size: 20px; line-height: 1; }
.calendar-today:hover, .calendar-arrows button:hover, .calendar-customize-button:hover { border-color: #abc2ec; background: #f5f8ff; color: #315fb9; }

.calendar-navigation .eyebrow { margin: 0 0 2px 8px; font-size: 9px; }
.calendar-navigation h2 { margin: 0 0 0 8px; overflow: hidden; color: #263a5b; font-size: 21px; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }

.calendar-command-actions { justify-content: flex-end; flex-wrap: wrap; }
.calendar-select { min-width: 118px; padding: 0 28px 0 10px; }
.calendar-customize-button { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; }
.calendar-customize-button.active { border-color: #a9c2f3; background: #edf4ff; color: #2e61bf; }

.calendar-view-switcher { gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.calendar-view-switcher button { min-width: 54px; border: 0; border-right: 1px solid var(--line-soft); border-radius: 0; background: transparent; }
.calendar-view-switcher button:last-child { border-right: 0; }
.calendar-view-switcher button.active { background: #3367d6; color: #fff; }

.calendar-context {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 13px 20px 0;
  color: #77879c;
  font-size: 11px;
}

.context-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--client-accent, #4d7ee2); box-shadow: 0 0 0 4px #edf4ff; }

.calendar-client-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-left: 3px solid var(--client-accent, #3367d6);
  background: #f6f8fc;
  color: #52647e;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-customize-panel {
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(420px, 1.4fr);
  gap: 20px;
  margin: 14px 18px 0;
  padding: 15px 16px;
  border-color: #d7e5fa;
  border-radius: 13px;
  background: linear-gradient(90deg, #f7faff, #fff);
  box-shadow: none;
}

.calendar-customize-panel .eyebrow { margin-bottom: 3px; font-size: 9px; }
.calendar-customize-panel h3 { margin: 0; color: #31466a; font-size: 15px; }
.calendar-customize-panel p { margin: 4px 0 0; color: #71829b; font-size: 11px; line-height: 1.42; }

.customize-controls { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); align-items: center; gap: 11px; }
.customize-density { display: grid; gap: 6px; color: #71809a; font-size: 11px; }
.density-switch { gap: 3px; padding: 3px; border: 1px solid #dbe6f4; border-radius: 8px; background: #fff; }
.density-switch button { min-height: 25px; flex: 1; border: 0; border-radius: 5px; background: transparent; color: #6a7c96; cursor: pointer; font-size: 10px; font-weight: 750; }
.density-switch button.active { background: #eaf1ff; color: #2f64c7; }

.calendar-preference { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #5b6c85; cursor: pointer; font-size: 11px; }
.calendar-preference input { position: absolute; opacity: 0; }
.calendar-preference i { position: relative; width: 28px; height: 16px; border-radius: 999px; background: #cbd6e6; transition: background 150ms ease; }
.calendar-preference i::after { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .22); content: ""; transition: transform 150ms ease; }
.calendar-preference input:checked + i { background: #4a7ce0; }
.calendar-preference input:checked + i::after { transform: translateX(12px); }

.calendar-month-shell { min-width: 720px; margin-top: 13px; }
.calendar-weekday-row,
.calendar-month-grid { display: grid; grid-template-columns: repeat(7, minmax(104px, 1fr)); }
.calendar-weekday-row { padding: 0 10px 8px; color: #7e8da2; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.calendar-weekday-row span { padding-left: 8px; }
.calendar-month-grid { overflow: hidden; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }

.month-day-cell {
  position: relative;
  min-height: 151px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.density-compact .month-day-cell { min-height: 114px; }
.month-day-cell.weekend { background: #fbfcff; }
.month-day-cell.festival-day { background: linear-gradient(145deg, #fffbf2, #fff); }
.month-day-cell.selected { z-index: 1; box-shadow: inset 0 0 0 2px #78a0ee; }
.month-day-cell.outside-month { min-height: 28px; background: #f8fafc; }
.month-day-cell.weekend-hidden, .calendar-weekday-row .weekend-hidden, .week-day-headings .weekend-hidden, .week-all-day-cell.weekend-hidden, .week-focus-column.weekend-hidden { visibility: hidden; pointer-events: none; }

.month-day-number { display: grid; width: 25px; height: 25px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #55667f; cursor: pointer; font-size: 12px; font-weight: 800; }
.month-day-cell.selected .month-day-number { background: #3367d6; color: #fff; }
.month-empty { display: block; margin: 44px 0 0 5px; color: #b0bac8; font-size: 10px; }

.calendar-event {
  display: grid;
  grid-template-columns: 3px 1fr;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 7px 7px 7px 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  background: #f3f7ff;
  color: #30425f;
  cursor: pointer;
  text-align: left;
}

.calendar-event:hover { background: #e9f1ff; }
.calendar-event.festival { background: #fff7e4; }
.calendar-event .event-accent { grid-row: 1 / span 3; width: 3px; border-radius: 0 3px 3px 0; background: #4a7de1; }
.calendar-event.festival .event-accent { background: #d39a29; }
.event-title { overflow: hidden; color: #2f405b; font-size: 11px; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.event-brief { display: -webkit-box; overflow: hidden; margin-top: 2px; color: #6e7f98; font-size: 10px; line-height: 1.32; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.density-compact .event-brief { display: none; }
.event-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 5px; color: #8290a4; font-size: 9px; white-space: nowrap; }
.event-meta .badge { min-height: 17px; padding: 2px 5px; font-size: 8px; }

.calendar-week-shell { min-width: 720px; margin-top: 13px; border-top: 1px solid var(--line); }
.week-day-headings, .week-all-day-row { display: grid; grid-template-columns: 58px repeat(7, minmax(94px, 1fr)); }
.week-day-headings { border-bottom: 1px solid var(--line); background: #fbfcff; }
.week-day-headings button { display: grid; justify-items: center; gap: 3px; min-height: 53px; padding: 7px; border: 0; border-right: 1px solid var(--line-soft); background: transparent; color: #667793; cursor: pointer; }
.week-day-headings small { font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.week-day-headings strong { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; font-size: 12px; }
.week-day-headings button.selected { color: #3268d1; }
.week-day-headings button.selected strong { background: #3367d6; color: #fff; }

.week-all-day-row { min-height: 88px; border-bottom: 1px solid var(--line); }
.week-all-day-row > span { padding: 11px 7px; color: #8491a2; font-size: 10px; font-weight: 750; }
.week-all-day-cell { padding: 7px 5px; border-left: 1px solid var(--line-soft); }
.week-event { width: 100%; padding: 6px 7px; overflow: hidden; border: 0; border-left: 3px solid #4a7de1; border-radius: 5px; background: #eef4ff; color: #345078; cursor: pointer; font-size: 10px; font-weight: 800; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.week-event.festival { border-left-color: #d39a29; background: #fff6e2; color: #936515; }

.week-timeline { display: grid; grid-template-columns: 58px 1fr; min-height: 380px; }
.time-axis { display: grid; grid-template-rows: repeat(5, 1fr); color: #9aa5b4; font-size: 10px; text-align: right; }
.time-axis span { padding: 10px 8px 0 0; border-bottom: 1px solid var(--line-soft); }
.week-focus-grid { display: grid; grid-template-columns: repeat(7, minmax(94px, 1fr)); }
.week-focus-column { position: relative; min-height: 380px; border-left: 1px solid var(--line-soft); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(20% - 1px), var(--line-soft) calc(20% - 1px), var(--line-soft) 20%); }
.week-focus-card { position: absolute; top: 29%; right: 5px; left: 5px; display: grid; gap: 4px; padding: 8px; border: 0; border-left: 3px solid #628de8; border-radius: 6px; background: #eff5ff; color: #3f5c82; cursor: pointer; text-align: left; }
.week-focus-card.festival { border-left-color: #d39a29; background: #fff7e5; color: #8b651d; }
.week-focus-card span { color: #7590bd; font-size: 9px; font-weight: 800; }
.week-focus-card strong { overflow: hidden; font-size: 10px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.week-focus-card small { overflow: hidden; color: #8797ad; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.calendar-agenda { display: grid; gap: 2px; margin-top: 14px; }
.agenda-row { display: grid; grid-template-columns: 82px 1fr; gap: 11px; padding: 9px 19px; border-bottom: 1px solid var(--line-soft); }
.agenda-row.selected { background: #f7faff; }
.agenda-date { display: grid; align-content: start; gap: 2px; padding: 4px 0; border: 0; background: transparent; color: #73829a; cursor: pointer; text-align: left; }
.agenda-date strong { color: #3e70ce; font-size: 22px; line-height: 1; }
.agenda-date span { font-size: 10px; }
.agenda-event { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid #dfe8f5; border-left: 4px solid #4c7fe1; border-radius: 10px; background: #fff; color: #344760; cursor: pointer; text-align: left; }
.agenda-event:hover { border-color: #b5cbed; background: #fbfdff; }
.agenda-event.festival { border-left-color: #d49a27; background: #fffdf8; }
.agenda-event h3 { margin: 6px 0 0; font-size: 13px; }
.agenda-event p { display: -webkit-box; overflow: hidden; margin: 3px 0 0; color: #71829a; font-size: 11px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }
.agenda-event-meta { display: grid; justify-items: end; gap: 5px; color: #8492a5; font-size: 10px; white-space: nowrap; }

@media (max-width: 1180px) {
  .calendar-workspace { grid-template-columns: 205px minmax(0, 1fr); gap: 14px; }
  .calendar-command-bar { align-items: flex-start; flex-direction: column; }
  .calendar-command-actions { justify-content: flex-start; }
  .calendar-customize-panel { grid-template-columns: 1fr; }
  .customize-controls { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .calendar-workspace { grid-template-columns: 1fr; }
  .calendar-sidebar-panel { position: static; }
  .calendar-sidebar-panel .mini-calendar-head, .calendar-sidebar-panel .mini-calendar-weekdays, .calendar-sidebar-panel .mini-calendar-days, .calendar-role-card, .calendar-sidebar-summary { display: none; }
  .calendar-sidebar-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
  .calendar-sidebar-panel .sidebar-section { grid-column: 1 / -1; margin-top: 0; padding-top: 12px; }
  .calendar-navigation { align-items: flex-start; }
  .calendar-navigation h2 { font-size: 18px; }
  .calendar-command-actions { width: 100%; }
  .calendar-customize-panel { margin: 12px; }
  .customize-controls { grid-template-columns: 1fr; }
  .calendar-month-shell, .calendar-week-shell { overflow-x: auto; }
  .agenda-row { grid-template-columns: 54px 1fr; padding: 8px 12px; }
  .agenda-event { align-items: flex-start; flex-direction: column; gap: 9px; }
  .agenda-event-meta { justify-items: start; }
}

/* Executive dashboard */
.dashboard-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-intro h2 {
  margin: 0;
  color: #172844;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -.045em;
}

.dashboard-intro p {
  margin: 7px 0 0;
  font-size: 14px;
}

.dashboard-intro-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-date {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .65);
  color: #5e6e88;
  font-size: 12px;
  font-weight: 700;
}

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

.dashboard-kpi {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 14px rgba(48, 74, 112, .035);
}

.dashboard-kpi::after {
  position: absolute;
  right: -26px;
  bottom: -36px;
  width: 100px;
  height: 100px;
  border: 18px solid rgba(51, 103, 214, .05);
  border-radius: 50%;
  content: "";
}

.dashboard-kpi.violet::after { border-color: rgba(119, 92, 215, .06); }
.dashboard-kpi.amber::after { border-color: rgba(226, 154, 44, .08); }
.dashboard-kpi.green::after { border-color: rgba(31, 157, 105, .07); }

.kpi-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: #edf4ff;
  color: #3367d6;
  font-size: 16px;
  font-weight: 800;
}

.violet .kpi-icon { background: #f1efff; color: #7659c9; }
.amber .kpi-icon { background: #fff6df; color: #ba7a16; }
.green .kpi-icon { background: #eaf8f2; color: #218b63; }

.kpi-label {
  color: #71809a;
  font-size: 12px;
  font-weight: 750;
}

.dashboard-kpi > strong {
  display: block;
  margin-top: 15px;
  color: #172844;
  font-size: 31px;
  letter-spacing: -.05em;
}

.kpi-detail {
  display: block;
  margin-top: 3px;
  color: #7a879c;
  font-size: 11px;
}

.kpi-progress {
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f8;
}

.kpi-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d8fed, #3367d6);
}

.dashboard-grid {
  display: grid;
  gap: 14px;
}

.dashboard-grid-primary {
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, .9fr);
}

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

.dashboard-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 14px rgba(48, 74, 112, .03);
}

.dashboard-panel-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dashboard-panel h3 {
  margin: 0;
  color: #1b2c48;
  font-size: 15px;
}

.dashboard-panel-header p {
  margin: 4px 0 0;
  color: #7c8aa0;
  font-size: 12px;
}

.pulse-summary,
.mix-total {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.pulse-summary strong,
.mix-total strong {
  display: block;
  color: #315fbe;
  font-size: 34px;
  letter-spacing: -.06em;
}

.pulse-summary span,
.mix-total span {
  display: block;
  color: #7c8aa0;
  font-size: 12px;
}

.pulse-month {
  padding: 6px 9px;
  border-radius: 7px;
  background: #f1f5fb;
  color: #6c7b92 !important;
  font-size: 11px !important;
  font-weight: 700;
}

.dashboard-bars,
.mix-bars,
.opportunity-bars {
  display: grid;
  gap: 14px;
  padding-top: 17px;
}

.bar-label,
.mix-row,
.opportunity-bar .row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #60708a;
  font-size: 12px;
}

.bar-label strong,
.mix-row strong,
.opportunity-bar strong {
  color: #2e3e59;
  font-size: 12px;
}

.bar-label small {
  color: #a2adbc;
  font-size: 10px;
  font-weight: 600;
}

.dashboard-bar,
.mix-track {
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3f9;
}

.dashboard-bar > span,
.mix-track > span {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, #89a7f5, #3367d6);
}

.dashboard-bar > span.video { background: linear-gradient(90deg, #9ba9db, #6a78ba); }
.dashboard-bar > span.review { background: linear-gradient(90deg, #f3bf62, #e09a2f); }
.dashboard-bar > span.approved { background: linear-gradient(90deg, #69c59e, #239267); }

.pulse-foot,
.signal-foot {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  color: #8794a8;
  font-size: 11px;
}

.status-dot,
.mix-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: #4a7be5;
}

.dot-muted { background: #aab7c8; }

.runway {
  display: grid;
}

.runway-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  min-width: 0;
}

.runway-line {
  position: relative;
  display: flex;
  justify-content: center;
}

.runway-line i {
  position: absolute;
  top: 13px;
  bottom: -10px;
  width: 1px;
  background: #dbe5f3;
}

.runway-dot {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid #c2d2ed;
  border-radius: 50%;
  background: white;
}

.runway-dot.active {
  border-color: #4d7ae1;
  background: #4d7ae1;
  box-shadow: 0 0 0 4px #e5edff;
}

.runway-copy {
  min-width: 0;
  padding: 0 0 18px;
}

.runway-copy strong {
  display: block;
  overflow: hidden;
  max-width: 260px;
  color: #33435e;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runway-copy .meta {
  margin-top: 5px;
  font-size: 11px;
}

.mix-total {
  justify-content: flex-start;
  align-items: baseline;
  gap: 9px;
}

.mix-total strong { font-size: 31px; }

.mix-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mix-row > div:first-child {
  display: flex;
  align-items: center;
}

.mix-track {
  grid-column: 1 / -1;
  margin-top: -2px;
}

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

.attention-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 9px;
}

.attention-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #fff3e0;
  color: #b77618;
  font-size: 12px;
  font-weight: 800;
}

.attention-icon.festival { background: #fff6db; color: #c18a25; }

.attention-item strong,
.attention-item span {
  display: block;
}

.attention-item strong {
  overflow: hidden;
  color: #374761;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-item div span {
  margin-top: 3px;
  color: #8995a8;
  font-size: 11px;
}

.attention-clear {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0;
  color: #27865f;
}

.attention-clear > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #eaf8f2;
}

.attention-clear p {
  margin: 3px 0 0;
  color: #7e8da2;
  font-size: 11px;
}

.signal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-soft);
}

.signal-stats strong,
.signal-stats span {
  display: block;
}

.signal-stats strong {
  color: #2c4f91;
  font-size: 22px;
  letter-spacing: -.04em;
}

.signal-stats span {
  margin-top: 3px;
  color: #8995a8;
  font-size: 10px;
}

.signal-foot {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

@media (max-width: 1180px) {
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid-primary { grid-template-columns: 1fr; }
  .dashboard-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .dashboard-intro { align-items: flex-start; flex-direction: column; }
  .dashboard-kpis,
  .dashboard-grid-secondary { grid-template-columns: 1fr; }
}

/* SaaS visual polish: crisp surfaces, deliberate spacing, and restrained motion */
:root {
  --radius: 8px;
}

.sidebar,
.topbar {
  background: #fff;
  backdrop-filter: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
}

.panel,
.stat-card,
.item-card,
.drawer,
.dashboard-kpi,
.dashboard-panel,
.calendar-sidebar-panel,
.calendar-stage,
.calendar-customize-panel,
.production-stat,
.production-notice,
.calendar-role-card,
.agenda-event,
.approval-actions,
.refresh-button,
.action,
.input,
.select {
  border-radius: 8px;
  box-shadow: none !important;
}

.topbar {
  box-shadow: none;
}

.topbar.calendar-topbar {
  min-height: 60px;
  padding: 11px 28px;
}

.view {
  padding-top: 20px;
  background: #f8faff;
}

.calendar-workspace {
  gap: 16px;
}

.calendar-sidebar-panel,
.calendar-stage {
  border-color: #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.calendar-sidebar-panel {
  padding: 13px;
}

.calendar-new-button {
  border-radius: 7px;
  background: #356bd8;
  box-shadow: none;
}

.calendar-new-button:hover {
  background: #285cc5;
}

.calendar-command-bar {
  padding: 14px 16px;
  background: #fff;
}

.calendar-today,
.calendar-arrows button,
.calendar-customize-button,
.calendar-view-switcher,
.calendar-select {
  border-radius: 7px;
}

.calendar-context {
  margin: 11px 16px 0;
}

.context-dot {
  box-shadow: none;
}

.calendar-customize-panel {
  margin: 12px 14px 0;
  border-radius: 7px;
  background: #f8fbff;
}

.month-day-cell {
  min-height: 146px;
  background: #fff;
}

.density-compact .month-day-cell {
  min-height: 108px;
}

.month-day-cell.weekend {
  background: #fbfcfe;
}

.month-day-cell.festival-day {
  background: #fffdf8;
}

.month-day-cell.selected {
  box-shadow: inset 0 0 0 2px #4b7ee0;
}

.calendar-event {
  border-radius: 4px;
  background: #f2f6ff;
}

.calendar-event.festival {
  background: #fff8e9;
}

.calendar-event:hover {
  background: #e9f1ff;
}

.calendar-event.festival:hover {
  background: #fff2d2;
}

.week-event,
.week-focus-card {
  border-radius: 4px;
}

.agenda-row.selected {
  background: #f5f8fe;
}

.dashboard-kpi,
.dashboard-panel,
.panel,
.stat-card,
.item-card {
  border-radius: 8px;
}

.dashboard-kpi::after {
  display: none;
}

.drawer {
  border-left: 1px solid #dbe4f0;
  box-shadow: none !important;
}

.calendar-day-event,
.mini-calendar-day.selected,
.calendar-source input:checked + i,
.calendar-preference i::after,
.production-day:hover,
.dashboard-kpi,
.dashboard-panel,
.runway-dot.active {
  box-shadow: none !important;
}

button,
.calendar-event,
.agenda-event,
.item-card,
.nav-button,
.production-day,
.action,
.chip {
  transition: background-color 170ms ease, border-color 170ms ease, color 170ms ease, transform 170ms ease, opacity 170ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #4b7ee0;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .calendar-sidebar-panel,
  .calendar-stage,
  .dashboard-kpi,
  .dashboard-panel {
    animation: saas-enter 360ms cubic-bezier(.2, .8, .2, 1) both;
  }

  .calendar-stage { animation-delay: 45ms; }
  .dashboard-kpi:nth-child(2), .dashboard-panel:nth-child(2) { animation-delay: 45ms; }
  .dashboard-kpi:nth-child(3), .dashboard-panel:nth-child(3) { animation-delay: 90ms; }
  .dashboard-kpi:nth-child(4) { animation-delay: 135ms; }

  .month-day-cell:not(.outside-month) {
    animation: calendar-cell-in 280ms cubic-bezier(.2, .8, .2, 1) both;
  }

  .calendar-event:hover,
  .agenda-event:hover,
  .item-card:hover,
  .production-day:hover {
    transform: translateY(-1px);
  }

  .calendar-view-switcher button.active {
    animation: view-selection 210ms cubic-bezier(.2, .8, .2, 1) both;
  }

  .drawer {
    animation: drawer-slide-in 260ms cubic-bezier(.2, .8, .2, 1) both;
  }
}

@keyframes saas-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes calendar-cell-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes view-selection {
  from { transform: scale(.96); }
  to { transform: scale(1); }
}

@keyframes drawer-slide-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 10px;
  }

  .view {
    padding: 16px;
  }

  .calendar-workspace {
    grid-template-columns: 1fr;
  }

  .calendar-sidebar-panel {
    position: static;
    display: grid;
    grid-template-columns: minmax(185px, .7fr) minmax(250px, 1.3fr) minmax(190px, .7fr);
    gap: 14px;
    align-items: center;
  }

  .calendar-sidebar-panel .calendar-new-button {
    grid-row: span 2;
  }

  .calendar-sidebar-panel .calendar-client-switcher {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    padding: 0;
    border-bottom: 0;
  }

  .calendar-sidebar-panel .mini-calendar-head,
  .calendar-sidebar-panel .mini-calendar-weekdays,
  .calendar-sidebar-panel .mini-calendar-days {
    grid-column: 2;
  }

  .calendar-sidebar-panel .mini-calendar-head { margin: 0; }
  .calendar-sidebar-panel .mini-calendar-weekdays { margin-top: 8px; }
  .calendar-sidebar-panel .mini-calendar-days { margin-top: -2px; }
  .calendar-sidebar-panel .sidebar-section { grid-column: 3; grid-row: 1 / span 3; margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--line-soft); }
  .calendar-sidebar-panel .calendar-role-card,
  .calendar-sidebar-panel .calendar-sidebar-summary { display: none; }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 10px 12px;
    gap: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0;
    border-bottom: 0;
  }

  .brand span {
    display: none;
  }

  .nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar { display: none; }
  .nav-button { width: auto; padding: 8px 11px; white-space: nowrap; font-size: 13px; }
  .nav-separator, .acting-as, .refresh-button { display: none; }

  .topbar.calendar-topbar {
    min-height: 52px;
    padding: 9px 12px;
  }

  .topbar.calendar-topbar h1 { font-size: 17px; }
  .topbar-badges { display: none; }
  .view { padding: 12px; }

  .calendar-sidebar-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .calendar-sidebar-panel .calendar-new-button,
  .calendar-sidebar-panel .calendar-client-switcher,
  .calendar-sidebar-panel .sidebar-section {
    grid-column: auto;
    grid-row: auto;
  }

  .calendar-sidebar-panel .mini-calendar-head,
  .calendar-sidebar-panel .mini-calendar-weekdays,
  .calendar-sidebar-panel .mini-calendar-days {
    display: none;
  }

  .calendar-sidebar-panel .sidebar-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 0 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .sidebar-section-head { grid-column: 1 / -1; }
  .calendar-source { font-size: 10px; }
  .calendar-command-bar { padding: 12px; }
  .calendar-navigation { width: 100%; }
  .calendar-command-actions { width: 100%; gap: 5px; }
  .calendar-select { flex: 1; min-width: 106px; }
  .calendar-customize-button span { display: none; }
  .calendar-view-switcher { flex: 1; }
  .calendar-view-switcher button { flex: 1; min-width: 0; }
  .calendar-customize-panel { margin: 10px; }
  .calendar-month-shell,
  .calendar-week-shell { width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .calendar-weekday-row,
  .calendar-month-grid { min-width: 680px; }
  .week-day-headings,
  .week-all-day-row,
  .week-timeline { min-width: 700px; }
  .agenda-row { grid-template-columns: 46px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Secure workspace access and actionable dashboard queue */
.session-identity {
  display: grid;
  gap: 3px;
  margin-top: auto;
  padding: 11px 12px;
  border-top: 1px solid var(--line-soft);
}

.session-identity span {
  color: #7c8aa1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.session-identity strong { color: #3c4e68; font-size: 12px; }

.logout-button {
  min-height: 36px;
  margin: 0 8px;
  border: 1px solid #d9e2ef;
  border-radius: 7px;
  background: #fff;
  color: #667790;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.logout-button:hover { border-color: #9fb7dd; color: #315fb9; }

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #f5f8fd;
}

.auth-card {
  width: min(100%, 420px);
  padding: 28px;
  border: 1px solid #d9e3f0;
  border-radius: 10px;
  background: #fff;
}

.auth-brand { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.auth-brand img { width: 34px; height: 34px; object-fit: contain; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { color: #223653; font-size: 17px; }
.auth-brand span { margin-top: 1px; color: #8090a5; font-size: 11px; }
.auth-copy { margin-top: 23px; }
.auth-copy > span { color: #356bd8; font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.auth-copy h1 { margin: 5px 0 0; color: #243858; font-size: 26px; letter-spacing: -.035em; }
.auth-copy p { margin: 7px 0 0; color: #71829b; font-size: 13px; line-height: 1.5; }
.auth-form { display: grid; gap: 14px; margin-top: 23px; }
.auth-form label { display: grid; gap: 6px; color: #586a84; font-size: 12px; font-weight: 700; }
.auth-form input { min-height: 41px; border: 1px solid #d4dfed; border-radius: 7px; padding: 0 10px; color: #263a58; }
.auth-form .action { margin-top: 4px; }
.auth-error { margin: 18px 0 -5px; padding: 9px 10px; border-left: 3px solid #c2473b; background: #fff5f4; color: #a5352c; font-size: 12px; line-height: 1.4; }
.auth-note { margin: 18px 0 0; color: #8795a8; font-size: 11px; line-height: 1.45; }

.attention-summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #7d8da4;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.attention-list { gap: 0; border-top: 1px solid var(--line-soft); }

.attention-item {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.attention-item:hover { background: #f8faff; }
.attention-priority { height: 32px; border-radius: 0; background: #4e7fe1; }
.attention-priority.review { background: #d98b32; }
.attention-priority.festival { background: #c99a32; }
.attention-copy { min-width: 0; }
.attention-copy > div { display: flex; justify-content: space-between; gap: 10px; }
.attention-copy strong { overflow: hidden; color: #344762; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attention-date { flex: 0 0 auto; color: #7d8da5; font-size: 11px; }
.attention-copy p { margin: 4px 0 0; color: #7c8ca2; font-size: 11px; }
.attention-action { color: #376bcf; font-size: 11px; font-weight: 800; white-space: nowrap; }
.attention-action i { font-size: 14px; font-style: normal; }

.calendar-research-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid #d8e3f3;
  background: #fbfdff;
}
.calendar-research-summary > div:first-child { display: grid; gap: 3px; min-width: 0; }
.calendar-research-summary .eyebrow { color: #4878d8; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.calendar-research-summary strong { overflow: hidden; color: #29415f; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-research-summary p { margin: 0; color: #74859d; font-size: 11px; }
.research-summary-meta { display: grid; flex: 0 0 auto; gap: 4px; color: #55708f; font-size: 11px; text-align: right; }

@media (max-width: 760px) {
  .session-identity, .logout-button { display: none; }
  .auth-screen { padding: 16px; }
  .auth-card { padding: 22px; }
  .attention-copy > div { display: grid; gap: 2px; }
  .calendar-research-summary { align-items: flex-start; flex-direction: column; }
  .research-summary-meta { text-align: left; }
}
