:root {
  color-scheme: light;
  --bg: #eef3f9;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe4f0;
  --line-strong: #b9c7d9;
  --accent: #2563eb;
  --blue: #2563eb;
  --accent-2: #0ea5e9;
  --accent-soft: #eff6ff;
  --danger: #b42318;
  --success: #16a34a;
  --warning: #f59e0b;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
  --radius: 14px;
}

.sample-search-shell {
  display: grid;
  gap: 14px;
}

.sample-search-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 220px) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.sample-search-form label {
  min-width: 0;
}

.sample-search-meta,
.sample-selected-head,
.sample-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.sample-search-meta strong,
.sample-selected-head strong {
  color: var(--ink);
}

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

.sample-selected-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-selected-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.sample-results {
  display: grid;
  gap: 10px;
}

.sample-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.sample-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.sample-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.sample-snippet {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}

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

.sample-links a {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

/* Dara Production Studio refresh */
.production-studio-shell {
  display: grid;
  gap: 18px;
  padding: 6px;
  background:
    radial-gradient(circle at 0 0, rgba(99, 102, 241, 0.12), transparent 34%),
    radial-gradient(circle at 100% 6%, rgba(20, 184, 166, 0.13), transparent 30%);
}

.production-studio-topbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(220px, 0.42fr);
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.production-studio-brand,
.production-studio-user {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.production-studio-brand i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, #4f6cf7, #17b69b);
  color: #fff;
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
}

.production-studio-brand strong,
.production-studio-user strong {
  display: block;
  color: #111827;
  font-size: 16px;
  line-height: 1.1;
}

.production-studio-brand span,
.production-studio-user span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.production-studio-user {
  justify-content: end;
  padding: 11px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
}

.production-studio-topbar .production-view-switcher {
  margin: 0 auto;
  padding: 6px;
  background: #e9eff7;
  border: 0;
  box-shadow: none;
}

.production-studio-topbar .production-view-switcher button.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1), inset 0 0 0 2px #2563eb;
}

.production-studio-view {
  display: grid;
  gap: 18px;
}

.production-focus-strip,
.production-owner-focus-strip,
.production-owner-metrics {
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) repeat(4, minmax(150px, 0.72fr));
  gap: 12px;
  padding: 12px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.production-owner-metrics {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.production-focus-card,
.production-metric-card,
.production-clock-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #dfe8f4;
  border-radius: 20px;
  background: #fff;
}

.production-focus-card {
  display: grid;
  gap: 5px;
  background: linear-gradient(135deg, #14213d, #425073);
  color: #fff;
}

.production-focus-card span,
.production-kicker,
.production-metric-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-focus-card span,
.production-focus-card em {
  color: rgba(255, 255, 255, 0.76);
}

.production-focus-card strong {
  overflow: hidden;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-focus-card em,
.production-metric-card em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.production-metric-card {
  display: grid;
  gap: 4px;
}

.production-metric-card strong {
  overflow: hidden;
  color: #111827;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-clock-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.production-clock-card strong {
  font-size: 28px;
}

.production-clock-card button {
  min-width: 112px;
  background: linear-gradient(135deg, #23c58f, #14b8a6);
  color: #fff;
}

.production-staff-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 18px;
  align-items: start;
}

.production-current-card {
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: transparent;
  box-shadow: none;
}

.production-current-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at right, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(135deg, #17233e, #4b5b80);
  color: #fff;
}

.production-current-hero h2 {
  max-width: 760px;
  color: #fff;
  font-size: clamp(44px, 5.4vw, 68px);
  line-height: 0.96;
}

.production-current-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.45;
}

.production-current-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.production-current-pills span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.production-current-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-self: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.production-current-meta label,
.production-current-meta span {
  display: grid;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.production-current-meta label {
  grid-column: 1 / -1;
}

.production-current-meta b {
  color: rgba(255, 255, 255, 0.62);
}

.production-current-meta select,
.production-version-row select,
.production-owner-timeline-head select {
  min-height: 44px;
  border-radius: 13px;
  background: #fff;
  color: #0f172a;
  font-weight: 850;
}

.production-ai-card {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 14px;
  border-color: rgba(124, 58, 237, 0.18);
  background: linear-gradient(135deg, #f4f0ff, rgba(255, 255, 255, 0.94));
}

.production-workflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 16px;
  margin-top: 14px;
}

.production-workflow-layout > aside {
  display: grid;
  gap: 12px;
  align-content: start;
}

.production-workflow-steps,
.production-version-row,
.production-mini-deadlines,
.production-checkin-card,
.production-activity-feed,
.production-owner-timeline-card,
.production-owner-card {
  border: 1px solid #dfe8f4;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.06);
}

.production-workflow-steps,
.production-version-row,
.production-mini-deadlines,
.production-checkin-card,
.production-activity-feed {
  padding: 16px;
}

.production-step-timeline button {
  min-height: 58px;
  border-radius: 18px;
  box-shadow: none;
}

.production-step-timeline i {
  background: #dcfce7;
  color: #047857;
}

.production-step-timeline button.active i {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
}

.production-rail-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
}

.production-rail-title,
.production-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.production-rail-title span,
.production-card-head span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
}

.production-rail-card button {
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
}

.production-rail-card button em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.production-owner-timeline-card {
  overflow: hidden;
}

.production-owner-timeline-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5edf7;
}

.production-owner-timeline-head h3,
.production-owner-card h3,
.production-time-table-card h3 {
  margin: 0;
  font-size: 20px;
}

.production-owner-timeline-head p,
.production-owner-card p,
.production-time-table-card p {
  margin: 4px 0 0;
  color: #64748b;
  font-weight: 750;
}

.production-owner-timeline-head > div:last-child {
  display: grid;
  gap: 10px;
}

.production-simple-timeline {
  overflow-x: auto;
  padding: 14px 14px 18px;
}

.production-simple-timeline-head,
.production-simple-timeline-row {
  display: grid;
  grid-template-columns: 260px repeat(20, minmax(54px, 1fr));
  min-width: 1320px;
}

.production-simple-timeline-head {
  align-items: center;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
}

.production-simple-timeline-head b {
  padding: 8px 4px;
  text-align: center;
}

.production-simple-timeline-head b.today {
  border-radius: 999px;
  background: #6366f1;
  color: #fff;
}

.production-simple-timeline-row {
  min-height: 78px;
  align-items: stretch;
  margin-top: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.production-simple-project {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid #e2e8f0;
}

.production-simple-project span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.production-simple-track {
  position: relative;
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(var(--timeline-days), minmax(54px, 1fr));
}

.production-simple-track > span {
  border-right: 1px solid #e2e8f0;
}

.production-simple-track > span.today {
  background: rgba(99, 102, 241, 0.08);
}

.production-simple-bar {
  position: absolute;
  top: 23px;
  left: calc((var(--bar-start) - 1) * (100% / var(--timeline-days)));
  width: calc((var(--bar-end) - var(--bar-start)) * (100% / var(--timeline-days)));
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(var(--bar-hue), 84%, 68%), hsl(calc(var(--bar-hue) + 52), 82%, 51%));
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 18px 32px hsla(var(--bar-hue), 60%, 44%, 0.18);
}

.production-mini-marker,
.production-final-marker {
  position: absolute;
  top: 18px;
  left: calc((var(--mark-day) - 0.5) * (100% / var(--timeline-days)));
  width: 4px;
  height: 42px;
  border-radius: 999px;
  background: #c27a11;
  transform: translateX(-50%);
}

.production-final-marker {
  background: #ef476f;
}

.production-owner-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  gap: 18px;
}

.production-worker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.production-workload-row {
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
}

.production-worker-person {
  display: grid;
  gap: 3px;
}

.production-worker-person em,
.production-workload-row small {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.production-workload-row > b {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.production-workload-row > b.active {
  background: #dcfce7;
  color: #047857;
}

.production-workload-row small {
  grid-column: 1 / -1;
}

.production-issue-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: #fff1f2;
}

.production-issue-card strong {
  color: #9f1239;
}

.production-issue-card p {
  margin: 0;
  color: #7f1d1d;
}

.production-issue-card span {
  color: #9f1239;
  font-size: 12px;
  font-weight: 850;
}

.production-time-table-card {
  padding: 20px;
}

.production-time-table {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.production-time-head,
.production-time-table > div:not(.production-time-head) {
  display: grid;
  grid-template-columns: 130px 220px 150px 80px 140px 140px 80px minmax(220px, 1fr);
  min-width: 1160px;
}

.production-time-head span,
.production-time-table > div:not(.production-time-head) span {
  padding: 11px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.production-time-head span {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .production-studio-topbar,
  .production-focus-strip,
  .production-owner-focus-strip,
  .production-owner-metrics,
  .production-staff-cockpit,
  .production-workflow-layout,
  .production-current-hero,
  .production-owner-timeline-head,
  .production-owner-bottom-grid {
    grid-template-columns: 1fr;
  }

  .production-studio-topbar .production-view-switcher {
    margin: 0;
    width: 100%;
  }

  .production-studio-topbar .production-view-switcher button {
    flex: 1;
  }

  .production-studio-user {
    justify-content: start;
  }

  .production-current-hero h2 {
    font-size: 42px;
  }

  .production-current-meta {
    grid-template-columns: 1fr;
  }

  .production-worker-grid {
    grid-template-columns: 1fr;
  }
}

/* Final production workspace overrides must stay at the end because this file
   has older repeated production sections above. */
body[data-active-view="staff"] #productionWorkspace .production-studio-topbar {
  display: grid !important;
}

#productionWorkspace .production-phone-timer .production-clock-card strong,
#productionWorkspace.production-workspace .production-phone-timer .production-clock-card strong,
body[data-active-view="staff"] #productionWorkspace .production-phone-timer .production-clock-card strong {
  font-size: clamp(52px, 10vw, 82px) !important;
  line-height: 0.95;
  letter-spacing: 0;
}

/* Owner command center: compact rows, visible deadlines, staff-colored bars. */
#productionWorkspace .production-command-grid-head,
#productionWorkspace .production-command-project-row {
  grid-template-columns: minmax(255px, 0.34fr) minmax(680px, 1fr) !important;
  min-width: 1040px !important;
}

#productionWorkspace .production-command-project-row {
  min-height: 84px !important;
  height: 84px !important;
  max-height: 84px !important;
  overflow: hidden !important;
}

#productionWorkspace .production-command-summary-wrap {
  grid-template-rows: minmax(0, 1fr) auto !important;
}

#productionWorkspace .production-command-summary-cell {
  display: grid !important;
  gap: 6px !important;
  height: 58px !important;
  overflow: hidden !important;
  padding: 8px 12px 4px !important;
}

#productionWorkspace .production-command-summary-cell > strong {
  font-size: 14px !important;
  line-height: 1.18 !important;
}

#productionWorkspace .production-command-row-status {
  width: fit-content;
  padding: 3px 7px !important;
  font-size: 9px !important;
}

#productionWorkspace .production-command-row-meta {
  display: none !important;
  align-items: center;
  gap: 5px;
}

#productionWorkspace .production-command-row-details,
#productionWorkspace .production-command-row-deadlines {
  display: flex !important;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow: hidden;
  margin: 0 !important;
}

#productionWorkspace .production-command-row-details b,
#productionWorkspace .production-command-row-details em,
#productionWorkspace .production-command-row-details small,
#productionWorkspace .production-command-row-deadlines i {
  width: fit-content;
  margin: 0 !important;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 10px !important;
  font-style: normal;
  font-weight: 950;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productionWorkspace .production-command-row-deadlines i:last-child {
  background: #ffe4e6;
  color: #be123c;
}

#productionWorkspace .production-command-row-actions {
  display: flex;
  gap: 8px;
  height: 22px;
  padding: 0 12px 7px;
}

#productionWorkspace .production-command-remove-row,
#productionWorkspace .production-command-archive-row {
  margin: 0 !important;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

#productionWorkspace .production-command-remove-row {
  color: #2563eb;
}

#productionWorkspace .production-command-archive-row {
  color: #be123c;
}

#productionWorkspace .production-command-track {
  min-height: 84px !important;
  height: 84px !important;
  max-height: 84px !important;
  overflow: hidden !important;
}

#productionWorkspace .production-command-bar {
  top: 22px !important;
  height: 30px !important;
  background: linear-gradient(90deg, var(--staff-accent, #22c55e), #3b82f6 62%, #6366f1) !important;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--staff-accent, #2563eb) 24%, transparent) !important;
}

#productionWorkspace .production-command-bar b,
#productionWorkspace .production-command-bar em {
  font-size: 11px !important;
}

#productionWorkspace .production-command-marker {
  top: 9px !important;
  min-width: 86px;
}

#productionWorkspace .production-command-marker::before {
  width: 10px !important;
  height: 10px !important;
  margin-bottom: 2px !important;
  background: #f59e0b !important;
}

#productionWorkspace .production-command-marker.final {
  top: 6px !important;
}

#productionWorkspace .production-command-marker.final::before {
  width: 4px !important;
  height: 60px !important;
  background: #e11d48 !important;
}

#productionWorkspace .production-command-marker span {
  display: inline-block !important;
  max-width: 118px !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: #fff7ed !important;
  color: #9a3412 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

#productionWorkspace .production-command-marker.final span {
  background: #ffe4e6 !important;
  color: #be123c !important;
}

@media (max-width: 720px) {
  #productionWorkspace .production-command-grid-head,
  #productionWorkspace .production-command-project-row {
    min-width: 920px !important;
    grid-template-columns: 230px minmax(620px, 1fr) !important;
  }
}

/* Command Center row rewrite: keep the graph visible instead of pushing it
   off-screen behind a wide spreadsheet. */
#productionWorkspace .production-command-grid {
  overflow-x: auto !important;
}

#productionWorkspace .production-command-grid-head,
#productionWorkspace .production-command-project-row {
  grid-template-columns: minmax(320px, 380px) minmax(540px, 1fr) !important;
  min-width: 0 !important;
}

#productionWorkspace .production-command-grid-head > span {
  min-height: 44px !important;
  padding: 13px 16px !important;
}

#productionWorkspace .production-command-date-axis,
#productionWorkspace .production-command-track {
  grid-template-columns: repeat(var(--timeline-days, 20), minmax(34px, 1fr)) !important;
}

#productionWorkspace .production-command-date-axis b {
  min-height: 44px !important;
  padding: 13px 4px !important;
  font-size: 10px !important;
}

#productionWorkspace .production-command-project-row {
  min-height: 124px !important;
}

#productionWorkspace .production-command-summary-cell {
  display: grid !important;
  gap: 8px !important;
  align-content: center !important;
  border: 0 !important;
  border-right: 1px solid #dbe7f4 !important;
  background: linear-gradient(135deg, #ffffff, #f8fbff) !important;
  color: var(--cmd-ink) !important;
  text-align: left !important;
  padding: 16px !important;
  font: inherit !important;
  cursor: pointer !important;
}

#productionWorkspace .production-command-summary-cell:hover {
  background: linear-gradient(135deg, #f8fbff, #eef6ff) !important;
}

#productionWorkspace .production-command-row-status {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.02em;
}

#productionWorkspace .production-command-row-status.late,
#productionWorkspace .production-command-row-status.blocked {
  background: #fee2e2;
  color: #b91c1c;
}

#productionWorkspace .production-command-row-status.at-risk,
#productionWorkspace .production-command-row-status.needs-review {
  background: #ffedd5;
  color: #c2410c;
}

#productionWorkspace .production-command-summary-cell > strong {
  font-size: 17px;
  line-height: 1.16;
}

#productionWorkspace .production-command-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

#productionWorkspace .production-command-row-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

#productionWorkspace .production-command-row-details b,
#productionWorkspace .production-command-row-details em,
#productionWorkspace .production-command-row-details small {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

#productionWorkspace .production-command-row-details small {
  background: #ecfdf5;
  color: #047857;
}

#productionWorkspace .production-command-row-deadlines {
  display: grid;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

#productionWorkspace .production-command-row-deadlines i {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

#productionWorkspace .production-command-track {
  min-height: 124px !important;
}

#productionWorkspace .production-command-bar {
  top: 44px !important;
  height: 38px !important;
}

#productionWorkspace .production-command-marker {
  top: 29px !important;
}

#productionWorkspace .production-command-marker.final::before {
  height: 66px !important;
}

@media (max-width: 760px) {
  #productionWorkspace .production-command-grid-head,
  #productionWorkspace .production-command-project-row {
    grid-template-columns: minmax(260px, 300px) minmax(620px, 1fr) !important;
    min-width: 920px !important;
  }

  #productionWorkspace .production-command-summary-cell {
    padding: 13px !important;
  }

  #productionWorkspace .production-command-summary-cell > strong {
    font-size: 15px;
  }
}

/* Owner / Manager Production Command Center */
#productionWorkspace .production-command-center {
  --cmd-ink: #0f172a;
  --cmd-muted: #64748b;
  --cmd-line: #dbe7f4;
  --cmd-soft: #f8fbff;
  --cmd-blue: #2563eb;
  --cmd-green: #0f9f6e;
  --cmd-orange: #f59e0b;
  --cmd-red: #e11d48;
  display: grid;
  gap: 18px;
}

#productionWorkspace .production-command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 5%, rgba(37, 99, 235, 0.14), transparent 38%),
    linear-gradient(135deg, #102033, #243655 58%, #48638e);
  color: white;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

#productionWorkspace .production-command-hero p {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c7d2fe;
}

#productionWorkspace .production-command-hero h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 62px);
  line-height: 0.95;
  color: white;
}

#productionWorkspace .production-command-hero span {
  display: block;
  max-width: 760px;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

#productionWorkspace .production-command-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, auto));
  gap: 10px;
  align-items: center;
}

#productionWorkspace .production-command-save-state {
  grid-column: 1 / -1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 12px;
  font-weight: 950;
}

#productionWorkspace .production-command-save-state.failed-to-save,
#productionWorkspace .production-command-save-state.failed {
  background: rgba(254, 226, 226, 0.94);
  color: #991b1b;
}

#productionWorkspace .production-command-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
}

#productionWorkspace .production-command-kpi {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 22px;
  background: linear-gradient(145deg, white, #f8fbff);
  color: var(--cmd-ink);
  text-align: left;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.07);
  cursor: pointer;
}

#productionWorkspace .production-command-kpi strong {
  display: block;
  color: var(--cmd-blue);
  font-size: 34px;
  line-height: 1;
}

#productionWorkspace .production-command-kpi span,
#productionWorkspace .production-command-kpi em {
  display: block;
  margin-top: 8px;
  color: var(--cmd-muted);
  font-style: normal;
  font-weight: 850;
}

#productionWorkspace .production-command-kpi.active {
  border-color: #2563eb;
  box-shadow: inset 4px 0 0 #2563eb, 0 22px 42px rgba(37, 99, 235, 0.13);
}

#productionWorkspace .production-command-kpi.warning strong { color: var(--cmd-orange); }
#productionWorkspace .production-command-kpi.danger strong { color: var(--cmd-red); }
#productionWorkspace .production-command-kpi.time strong { color: var(--cmd-green); }

#productionWorkspace .production-command-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#productionWorkspace .production-command-filters button {
  border: 1px solid var(--cmd-line);
  border-radius: 999px;
  background: white;
  color: #1e293b;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

#productionWorkspace .production-command-filters button.active {
  background: #12213a;
  border-color: #12213a;
  color: white;
}

#productionWorkspace .production-command-filters b {
  margin-left: 5px;
  color: inherit;
}

#productionWorkspace .production-command-board,
#productionWorkspace .production-owner-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

#productionWorkspace .production-command-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid #e2e8f0;
  background: #fbfdff;
}

#productionWorkspace .production-command-board-head h3 {
  margin: 0;
  font-size: 22px;
}

#productionWorkspace .production-command-board-head p {
  margin: 4px 0 0;
  color: var(--cmd-muted);
  font-weight: 750;
}

#productionWorkspace .production-command-versions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  color: var(--cmd-muted);
  font-size: 12px;
  font-weight: 850;
}

#productionWorkspace .production-command-versions > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#productionWorkspace .production-command-versions button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  padding: 8px 10px;
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
}

#productionWorkspace .production-command-add-project-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
}

#productionWorkspace .production-command-add-project-panel label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#productionWorkspace .production-command-add-project-panel select {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 850;
  padding: 0 12px;
}

#productionWorkspace .production-command-grid {
  overflow: auto;
  background: linear-gradient(90deg, #fbfdff, #f7fbff);
}

#productionWorkspace .production-command-grid-head,
#productionWorkspace .production-command-project-row {
  display: grid;
  grid-template-columns: 230px 170px 130px 155px 190px 160px 95px minmax(560px, 1fr);
  min-width: 1720px;
}

#productionWorkspace .production-command-grid-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#productionWorkspace .production-command-grid-head > span,
#productionWorkspace .production-command-date-axis b {
  min-height: 48px;
  padding: 14px 12px;
  border-right: 1px solid #e2e8f0;
}

#productionWorkspace .production-command-date-axis {
  display: grid;
  grid-template-columns: repeat(var(--timeline-days, 20), minmax(54px, 1fr));
}

#productionWorkspace .production-command-date-axis b {
  text-align: center;
  white-space: nowrap;
  border-right: 1px solid #e2e8f0;
}

#productionWorkspace .production-command-date-axis b.today {
  color: white;
  background: #6366f1;
}

#productionWorkspace .production-command-project-row {
  border-bottom: 1px solid #e2e8f0;
  min-height: 98px;
}

#productionWorkspace .production-command-summary-wrap {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  border-right: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.78);
}

#productionWorkspace .production-command-summary-cell {
  border: 0;
  background: transparent;
  color: var(--cmd-ink);
  text-align: left;
  padding: 15px 13px;
  font: inherit;
  cursor: pointer;
}

#productionWorkspace .production-command-remove-row {
  justify-self: start;
  margin: 0 13px 13px;
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

#productionWorkspace .production-command-summary-cell:hover,
#productionWorkspace .production-command-bar:hover,
#productionWorkspace .production-command-marker:hover {
  filter: brightness(0.97);
  outline: 2px solid rgba(37, 99, 235, 0.2);
}

#productionWorkspace .production-command-table-cell strong,
#productionWorkspace .production-command-date-cell b,
#productionWorkspace .production-command-stage-cell b {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

#productionWorkspace .production-command-table-cell span,
#productionWorkspace .production-command-date-cell span,
#productionWorkspace .production-command-stage-cell span {
  display: block;
  margin-top: 6px;
  color: var(--cmd-muted);
  font-size: 12px;
  font-weight: 850;
}

#productionWorkspace .production-command-team-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}

#productionWorkspace .production-person-dot {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: -6px;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--staff-soft);
  color: var(--staff-ink);
  font-size: 11px;
  font-weight: 950;
}

#productionWorkspace .production-unassigned-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 950;
}

#productionWorkspace .production-command-time-cell {
  font-size: 16px;
  font-weight: 950;
  color: #1d4ed8 !important;
}

#productionWorkspace .production-command-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--timeline-days), minmax(54px, 1fr));
  min-height: 98px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.55), rgba(239, 246, 255, 0.72));
}

#productionWorkspace .production-command-track > span {
  border-right: 1px solid #dbe7f4;
}

#productionWorkspace .production-command-track > span.today {
  background: rgba(99, 102, 241, 0.08);
  box-shadow: inset 2px 0 0 #6366f1;
}

#productionWorkspace .production-command-bar {
  position: absolute;
  top: 31px;
  left: calc((var(--bar-start) - 1) * (100% / var(--timeline-days)) + 8px);
  width: calc(var(--bar-span) * (100% / var(--timeline-days)) - 16px);
  min-width: 84px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #3b82f6 58%, #6366f1);
  color: white;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
  cursor: pointer;
}

#productionWorkspace .production-command-bar.at-risk {
  background: linear-gradient(90deg, #f97316, #f59e0b);
}

#productionWorkspace .production-command-bar.late,
#productionWorkspace .production-command-bar.blocked {
  background: linear-gradient(90deg, #fb7185, #dc2626);
}

#productionWorkspace .production-command-bar.needs-review {
  background: linear-gradient(90deg, #a855f7, #6366f1);
}

#productionWorkspace .production-command-bar b,
#productionWorkspace .production-command-bar em {
  display: inline-block;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

#productionWorkspace .production-command-marker {
  position: absolute;
  top: 22px;
  left: calc((var(--mark-day) - 0.5) * (100% / var(--timeline-days)));
  z-index: 3;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
}

#productionWorkspace .production-command-marker::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto 4px;
  border: 3px solid white;
  border-radius: 4px;
  background: #f59e0b;
  transform: rotate(45deg);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

#productionWorkspace .production-command-marker.final::before {
  width: 5px;
  height: 54px;
  border: 0;
  border-radius: 99px;
  background: #e11d48;
  transform: none;
}

#productionWorkspace .production-command-marker span {
  display: none;
  max-width: 120px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #111827;
  color: white;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

#productionWorkspace .production-command-marker:hover span {
  display: block;
}

#productionWorkspace .production-command-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(5px);
}

#productionWorkspace .production-command-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 91;
  width: min(620px, 96vw);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #f8fbff;
  box-shadow: -24px 0 70px rgba(15, 23, 42, 0.26);
}

#productionWorkspace .production-command-drawer header,
#productionWorkspace .production-command-drawer footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid #dbe7f4;
  background: white;
  position: relative;
  z-index: 3;
}

#productionWorkspace .production-command-drawer footer {
  border-top: 1px solid #dbe7f4;
  border-bottom: 0;
  box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.08);
}

#productionWorkspace .production-command-drawer header p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#productionWorkspace .production-command-drawer header h3 {
  margin: 0;
  font-size: 24px;
}

#productionWorkspace .production-command-drawer header button {
  border: 1px solid #dbe7f4;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
  font-weight: 950;
  cursor: pointer;
}

#productionWorkspace .production-command-drawer-body {
  overflow: auto;
  padding: 20px 22px 28px;
  min-height: 0;
}

#productionWorkspace .production-command-drawer label,
#productionWorkspace .production-command-drawer-section label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 950;
}

#productionWorkspace .production-command-drawer input,
#productionWorkspace .production-command-drawer select,
#productionWorkspace .production-command-drawer textarea {
  width: 100%;
  border: 1px solid #bfd0e5;
  border-radius: 14px;
  background: white;
  color: #0f172a;
  padding: 12px;
  font: inherit;
  font-weight: 800;
}

#productionWorkspace .production-command-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

#productionWorkspace .production-command-drawer-section {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbe7f4;
  border-radius: 20px;
  background: white;
}

#productionWorkspace .production-command-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

#productionWorkspace .production-command-section-head h4 {
  margin: 0;
  font-size: 16px;
}

#productionWorkspace .production-command-section-head span {
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 950;
}

#productionWorkspace .production-command-milestone-row,
#productionWorkspace .production-command-add-row,
#productionWorkspace .production-command-team-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 130px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

#productionWorkspace .production-command-add-row {
  grid-template-columns: minmax(0, 1fr) 160px auto;
}

#productionWorkspace .production-command-add-row button,
#productionWorkspace .production-command-team-list button,
#productionWorkspace .production-command-milestone-row button {
  min-height: 42px;
  border: 1px solid #bfdbfe;
  border-radius: 13px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 950;
  cursor: pointer;
}

#productionWorkspace .production-command-team-list article {
  grid-template-columns: minmax(0, 1fr) 140px auto;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fbfdff;
}

#productionWorkspace .danger-text {
  color: #dc2626 !important;
  background: #fff1f2 !important;
  border-color: #fecdd3 !important;
}

@media (max-width: 1100px) {
  #productionWorkspace .production-command-hero,
  #productionWorkspace .production-command-board-head {
    grid-template-columns: 1fr;
  }

  #productionWorkspace .production-command-actions {
    grid-template-columns: 1fr 1fr;
  }

  #productionWorkspace .production-command-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  #productionWorkspace .production-command-hero {
    padding: 20px;
    border-radius: 22px;
  }

  #productionWorkspace .production-command-hero h2 {
    font-size: 34px;
  }

  #productionWorkspace .production-command-actions,
  #productionWorkspace .production-command-kpis,
  #productionWorkspace .production-command-add-project-panel,
  #productionWorkspace .production-command-form-grid,
  #productionWorkspace .production-command-milestone-row,
  #productionWorkspace .production-command-add-row,
  #productionWorkspace .production-command-team-list article {
    grid-template-columns: 1fr;
  }

  #productionWorkspace .production-command-grid-head,
  #productionWorkspace .production-command-project-row {
    min-width: 1280px;
    grid-template-columns: 210px 150px 110px 140px 170px 150px 84px minmax(460px, 1fr);
  }

  #productionWorkspace .production-command-drawer {
    width: 100vw;
  }
}

@media (max-width: 620px) {
  body[data-active-view="staff"] #productionWorkspace .production-stage-progress {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 10px !important;
    margin: 8px -18px 4px;
    padding: 8px 18px 12px !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  body[data-active-view="staff"] #productionWorkspace .production-stage-progress::before {
    left: 34px !important;
    right: 34px !important;
    top: 30px !important;
  }

  body[data-active-view="staff"] #productionWorkspace .production-stage-progress button {
    flex: 0 0 64px;
    scroll-snap-align: center;
  }

  body[data-active-view="staff"] #productionWorkspace .production-stage-progress i {
    width: 34px !important;
    height: 34px !important;
  }

  body[data-active-view="staff"] #productionWorkspace .production-stage-progress span {
    max-width: 64px !important;
    min-height: 24px !important;
    font-size: 10px !important;
  }

  body[data-active-view="staff"] #productionWorkspace .production-phone-timer {
    margin-top: 8px !important;
  }
}

/* 2026-06-10 production workspace polish */
.production-language-select {
  display: grid;
  gap: 4px;
  min-width: 120px;
}

.production-language-select span {
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.production-language-select select {
  min-height: 36px;
  padding: 8px 34px 8px 12px;
  border: 1px solid #d8e4f5;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 850;
}

.production-clock-card .production-today-time {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.production-clock-card:not(.active) .production-today-time {
  background: #eef6ff;
  color: #1d4ed8;
}

.production-phone-timer .production-clock-card strong,
.production-cockpit-view .production-phone-timer .production-clock-card strong,
body[data-active-view="staff"] .production-phone-timer .production-clock-card strong {
  font-size: clamp(52px, 10vw, 82px) !important;
  letter-spacing: 0;
  line-height: 0.95;
}

.production-phone-timer .production-clock-card button,
.production-cockpit-view .production-phone-timer .production-clock-card button,
body[data-active-view="staff"] .production-phone-timer .production-clock-card button {
  min-height: 58px;
  padding-inline: clamp(18px, 4vw, 34px);
  font-size: clamp(16px, 2vw, 22px);
}

.production-simple-bar {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.production-simple-bar:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

.production-simple-bar:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.production-owner-timeline-card .production-simple-timeline {
  overflow-x: auto;
}

.production-owner-timeline-card .production-simple-timeline-head,
.production-owner-timeline-card .production-simple-timeline-row {
  min-width: 1180px;
}

body[data-active-view="staff"] #productionWorkspace .production-studio-topbar {
  display: grid;
}

.production-owner-timeline-head .ghost-button {
  width: fit-content;
}

.public-call-actions #printSheet::after {
  content: " / Save as PDF";
}

@media (max-width: 720px) {
  .production-studio-user {
    grid-template-columns: 1fr;
  }

  .production-language-select {
    width: 100%;
  }

  .production-clock-card .production-today-time {
    color: #bfdbfe;
  }

  .production-clock-card:not(.active) .production-today-time {
    color: #1d4ed8;
  }
}

/* Dara Production cockpit final layer.
   Keep this at the end so older Staff/Production rules cannot override it. */
body[data-active-view="staff"] .main > .topbar,
body[data-active-view="staff"] .main > .pipeline-controls,
body[data-active-view="staff"] .main > .metric-strip,
body[data-active-view="staff"] #staffView > .staff-hero-header,
body[data-active-view="staff"] #staffTodayPanel,
body[data-active-view="staff"] .staff-gantt-panel {
  display: none !important;
}

body[data-active-view="staff"] .main {
  background:
    radial-gradient(circle at 85% 8%, rgba(124, 92, 255, 0.16), transparent 18rem),
    radial-gradient(circle at 4% 14%, rgba(34, 197, 94, 0.11), transparent 16rem),
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 52%, #eef4fb 100%);
}

body[data-active-view="staff"] #staffView {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

body[data-active-view="staff"] #productionWorkspace {
  order: -20;
}

body[data-active-view="staff"] #productionWorkspace.production-workspace {
  margin: 0;
}

body[data-active-view="staff"] .staff-daily-layout {
  order: 4;
}

body[data-active-view="staff"] #staffBench,
body[data-active-view="staff"] #staffSummary,
body[data-active-view="staff"] .staff-layout:not(.staff-daily-layout),
body[data-active-view="staff"] #staffPayPanel {
  order: 8;
}

body[data-active-view="staff"] .staff-feed-panel .staff-update-feed {
  max-height: min(520px, 58vh);
  overflow-y: auto;
  padding-right: 8px;
}

body[data-active-view="staff"] .production-studio-shell {
  padding: 0;
  background: transparent;
}

body[data-active-view="staff"] .production-studio-topbar {
  display: none !important;
}

body[data-active-view="staff"] .production-cockpit-view {
  --cockpit-bg: #07111f;
  --cockpit-panel: #0c1728;
  --cockpit-panel-2: #111f35;
  --cockpit-line: rgba(148, 163, 184, 0.18);
  --cockpit-text: #f8fafc;
  --cockpit-muted: #91a1b7;
  --cockpit-blue: #7c5cff;
  --cockpit-green: #24d18d;
  --cockpit-red: #fb7185;
  --cockpit-gold: #f6c453;
  display: grid;
  gap: 16px;
  color: var(--cockpit-text);
}

body[data-active-view="staff"] .production-cockpit-view .production-cockpit-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 14%, rgba(124, 92, 255, 0.18), transparent 14rem),
    linear-gradient(135deg, #07111f, #111e34);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.18);
}

body[data-active-view="staff"] .production-cockpit-header > div:first-child {
  display: grid;
  gap: 2px;
}

body[data-active-view="staff"] .production-cockpit-header span {
  color: #fff;
  font-size: 19px;
  font-weight: 950;
}

body[data-active-view="staff"] .production-cockpit-header strong {
  color: var(--cockpit-muted);
  font-size: 13px;
  font-weight: 800;
}

body[data-active-view="staff"] .production-cockpit-view .production-staff-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.32fr);
  gap: 18px;
  align-items: start;
}

body[data-active-view="staff"] .production-cockpit-view .production-phone-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 76% 20%, rgba(124, 92, 255, 0.18), transparent 24%),
    radial-gradient(circle at 14% 90%, rgba(34, 197, 94, 0.1), transparent 20rem),
    linear-gradient(180deg, #0b1424, #08111f);
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.28);
}

body[data-active-view="staff"] .production-phone-project-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

body[data-active-view="staff"] .production-phone-project-head h2 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

body[data-active-view="staff"] .production-phone-project-head .production-kicker {
  color: #a78bfa;
}

body[data-active-view="staff"] .production-phone-project-head span {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.18);
  color: #b9a7ff;
  font-weight: 900;
}

body[data-active-view="staff"] .production-icon-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-weight: 900;
  cursor: pointer;
}

body[data-active-view="staff"] .production-stage-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 12px 0 4px;
}

body[data-active-view="staff"] .production-stage-progress::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 6%;
  right: 6%;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

body[data-active-view="staff"] .production-stage-progress button {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cockpit-muted);
  cursor: pointer;
}

body[data-active-view="staff"] .production-stage-progress i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #0c1728;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.7);
}

body[data-active-view="staff"] .production-stage-progress button.done i {
  border-color: rgba(34, 197, 94, 0.42);
  background: linear-gradient(135deg, #174936, #2563eb);
  color: #dcfce7;
}

body[data-active-view="staff"] .production-stage-progress button.active i {
  border-color: rgba(196, 181, 253, 0.8);
  background: radial-gradient(circle, #a78bfa, #6d28d9);
  color: #fff;
  box-shadow: 0 0 28px rgba(124, 92, 255, 0.72);
}

body[data-active-view="staff"] .production-stage-progress span {
  max-width: 86px;
  min-height: 32px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

body[data-active-view="staff"] .production-stage-progress button.active span {
  color: #fff;
}

body[data-active-view="staff"] .production-current-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.28fr);
  gap: 16px;
  align-items: end;
}

body[data-active-view="staff"] .production-current-stage-row > div {
  display: grid;
  gap: 4px;
}

body[data-active-view="staff"] .production-current-stage-row span,
body[data-active-view="staff"] .production-current-stage-row label,
body[data-active-view="staff"] .production-phone-stat span,
body[data-active-view="staff"] .production-deadline-card span {
  color: var(--cockpit-muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-active-view="staff"] .production-current-stage-row strong {
  color: #fff;
  font-size: 26px;
  line-height: 1.05;
}

body[data-active-view="staff"] .production-current-stage-row button {
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.15);
  color: #c4b5fd;
  font-weight: 900;
  cursor: pointer;
}

body[data-active-view="staff"] .production-current-stage-row select,
body[data-active-view="staff"] .production-quick-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-weight: 900;
}

body[data-active-view="staff"] .production-phone-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body[data-active-view="staff"] .production-deadline-card,
body[data-active-view="staff"] .production-phone-stat {
  position: relative;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  text-align: left;
}

body[data-active-view="staff"] .production-phone-stat {
  cursor: pointer;
}

body[data-active-view="staff"] .production-deadline-card strong,
body[data-active-view="staff"] .production-phone-stat strong {
  display: inline-block;
  margin-top: 8px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

body[data-active-view="staff"] .production-deadline-card.next strong {
  color: var(--cockpit-red);
}

body[data-active-view="staff"] .production-phone-stat.progress strong {
  color: var(--cockpit-green);
}

body[data-active-view="staff"] .production-deadline-card b {
  display: inline-flex;
  margin-left: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.18);
  color: var(--cockpit-gold);
  font-size: 11px;
  font-weight: 950;
}

body[data-active-view="staff"] .production-deadline-card b.is-overdue,
body[data-active-view="staff"] .production-deadline-card b.overdue {
  background: rgba(251, 113, 133, 0.18);
  color: #fb7185;
}

body[data-active-view="staff"] .production-deadline-card em,
body[data-active-view="staff"] .production-phone-stat em {
  display: block;
  margin-top: 8px;
  color: var(--cockpit-muted);
  font-style: normal;
  font-weight: 780;
}

body[data-active-view="staff"] .production-phone-timer {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 22%, rgba(124, 92, 255, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(31, 27, 84, 0.88));
}

body[data-active-view="staff"] .production-phone-timer .production-clock-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-view="staff"] .production-phone-timer .production-clock-card span {
  color: var(--cockpit-muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-active-view="staff"] .production-phone-timer .production-clock-card strong {
  color: #fff;
  font-size: clamp(38px, 7vw, 54px);
}

body[data-active-view="staff"] .production-phone-timer .production-clock-card small {
  color: #94a3b8;
}

body[data-active-view="staff"] .production-phone-timer .production-clock-card button {
  min-height: 60px;
  min-width: 170px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2dd983, #22c55e);
  font-size: 19px;
}

body[data-active-view="staff"] .production-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body[data-active-view="staff"] .production-action-grid button {
  display: grid;
  gap: 9px;
  place-items: center;
  min-height: 86px;
  padding: 10px 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 15px;
  background: rgba(8, 17, 31, 0.8);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

body[data-active-view="staff"] .production-action-grid i {
  color: #c4b5fd;
  font-style: normal;
}

body[data-active-view="staff"] .production-quick-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 20px;
  background: rgba(13, 24, 42, 0.96);
  color: #fff;
}

body[data-active-view="staff"] .production-quick-panel textarea {
  min-height: 104px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

body[data-active-view="staff"] .production-quick-panel .production-workflow-steps,
body[data-active-view="staff"] .production-quick-panel .production-version-row,
body[data-active-view="staff"] .production-quick-panel .production-checkin-card,
body[data-active-view="staff"] .production-quick-panel .production-activity-feed {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-active-view="staff"] .production-quick-panel .production-step-timeline button {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
}

body[data-active-view="staff"] .production-quick-panel .production-step-timeline button.active {
  border-color: rgba(124, 92, 255, 0.7);
  background: rgba(124, 92, 255, 0.24);
}

body[data-active-view="staff"] .production-activity-feed {
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(13, 24, 42, 0.74);
  color: #fff;
}

body[data-active-view="staff"] .production-activity-feed h3,
body[data-active-view="staff"] .production-activity-feed strong {
  color: #fff;
}

body[data-active-view="staff"] .production-activity-feed article {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

body[data-active-view="staff"] .production-cockpit-view .production-side-rail {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 14px;
}

body[data-active-view="staff"] .production-cockpit-view .production-rail-card,
body[data-active-view="staff"] .production-cockpit-view .production-side-rail .production-activity-feed {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

body[data-active-view="staff"] .production-cockpit-view .production-side-rail .production-activity-feed h3,
body[data-active-view="staff"] .production-cockpit-view .production-side-rail .production-activity-feed strong {
  color: #0f172a;
}

@media (max-width: 980px) {
  body[data-active-view="staff"] {
    background: #050d18;
  }

  body[data-active-view="staff"] .main {
    padding: 0 0 calc(18px + env(safe-area-inset-bottom));
    background: #050d18;
  }

  body[data-active-view="staff"] #staffView {
    gap: 12px;
  }

  body[data-active-view="staff"] .staff-daily-layout,
  body[data-active-view="staff"] .staff-layout:not(.staff-daily-layout),
  body[data-active-view="staff"] #staffPayPanel,
  body[data-active-view="staff"] #staffBench,
  body[data-active-view="staff"] #staffSummary {
    margin: 0 10px;
  }

  body[data-active-view="staff"] .production-cockpit-view {
    padding: 0 10px 12px;
  }

  body[data-active-view="staff"] .production-cockpit-view .production-cockpit-header {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 -10px 0;
    border-radius: 0 0 24px 24px;
    padding: calc(13px + env(safe-area-inset-top)) 18px 14px;
  }

  body[data-active-view="staff"] .production-cockpit-view .production-staff-cockpit {
    grid-template-columns: 1fr;
  }

  body[data-active-view="staff"] .production-cockpit-view .production-phone-card {
    padding: 18px;
    border-radius: 26px;
  }

  body[data-active-view="staff"] .production-phone-project-head {
    display: grid;
  }

  body[data-active-view="staff"] .production-phone-project-head h2 {
    font-size: clamp(28px, 9vw, 40px);
  }

  body[data-active-view="staff"] .production-stage-progress {
    gap: 0;
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    padding-bottom: 10px;
  }

  body[data-active-view="staff"] .production-stage-progress::before {
    left: 38px;
    right: 38px;
  }

  body[data-active-view="staff"] .production-current-stage-row,
  body[data-active-view="staff"] .production-phone-metrics {
    grid-template-columns: 1fr 1fr;
  }

  body[data-active-view="staff"] .production-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  body[data-active-view="staff"] .production-phone-timer .production-clock-card {
    grid-template-columns: 1fr;
  }

  body[data-active-view="staff"] .production-phone-timer .production-clock-card button {
    width: 100%;
  }

  body[data-active-view="staff"] .production-cockpit-view .production-side-rail {
    position: static;
  }
}

@media (max-width: 620px) {
  body[data-active-view="staff"] .sidebar {
    display: none;
  }

  body[data-active-view="staff"] .production-cockpit-header .production-clock-card {
    display: none;
  }

  body[data-active-view="staff"] .production-current-stage-row {
    grid-template-columns: minmax(0, 1fr) minmax(118px, 0.42fr);
    gap: 12px;
  }

  body[data-active-view="staff"] .production-phone-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-active-view="staff"] .production-stage-progress {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: visible;
  }

  body[data-active-view="staff"] .production-stage-progress i {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }

  body[data-active-view="staff"] .production-stage-progress::before {
    top: 28px;
    left: 7%;
    right: 7%;
  }

  body[data-active-view="staff"] .production-stage-progress span {
    max-width: 44px;
    min-height: 28px;
    font-size: 9px;
  }

  body[data-active-view="staff"] .production-phone-timer .production-clock-card {
    grid-template-columns: 1fr;
  }

  body[data-active-view="staff"] .production-phone-timer .production-clock-card button {
    width: 100%;
    min-width: 0;
  }

  body[data-active-view="staff"] .production-action-grid button {
    min-height: 78px;
    font-size: 12px;
  }

  body[data-active-view="staff"] .production-deadline-card,
  body[data-active-view="staff"] .production-phone-stat {
    min-height: 100px;
  }

  body[data-active-view="staff"] .staff-daily-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  body[data-active-view="staff"] .production-current-stage-row,
  body[data-active-view="staff"] .production-phone-metrics,
  body[data-active-view="staff"] .production-phone-timer .production-clock-card {
    grid-template-columns: 1fr;
  }
}

/* v391 final lock: this must stay after all legacy production CSS. */
.production-cockpit-view .production-phone-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 76% 20%, rgba(124, 92, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #0b1424, #08111f);
  color: #f8fafc;
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.28);
}

.production-cockpit-view .production-phone-project-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.production-cockpit-view .production-phone-project-head h2,
.production-cockpit-view .production-current-stage-row strong,
.production-cockpit-view .production-activity-feed h3,
.production-cockpit-view .production-activity-feed strong {
  color: #fff;
}

.production-cockpit-view .production-phone-project-head h2 {
  margin: 4px 0 8px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.production-cockpit-view .production-phone-project-head span {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.18);
  color: #b9a7ff;
  font-weight: 900;
}

.production-cockpit-view .production-icon-button,
.production-cockpit-view .production-current-stage-row button,
.production-cockpit-view .production-action-grid button,
.production-cockpit-view .production-phone-stat {
  cursor: pointer;
}

.production-cockpit-view .production-stage-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 12px 0 4px;
}

.production-cockpit-view .production-stage-progress::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 6%;
  right: 6%;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.production-cockpit-view .production-stage-progress button {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #91a1b7;
  box-shadow: none;
}

.production-cockpit-view .production-stage-progress i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #0c1728;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.7);
}

.production-cockpit-view .production-stage-progress button.done i {
  border-color: rgba(34, 197, 94, 0.42);
  background: linear-gradient(135deg, #174936, #2563eb);
  color: #dcfce7;
}

.production-cockpit-view .production-stage-progress button.active i {
  border-color: rgba(196, 181, 253, 0.8);
  background: radial-gradient(circle, #a78bfa, #6d28d9);
  color: #fff;
  box-shadow: 0 0 28px rgba(124, 92, 255, 0.72);
}

.production-cockpit-view .production-stage-progress span {
  max-width: 86px;
  min-height: 32px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.production-cockpit-view .production-current-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.28fr);
  gap: 16px;
  align-items: end;
}

.production-cockpit-view .production-current-stage-row > div {
  display: grid;
  gap: 4px;
}

.production-cockpit-view .production-current-stage-row span,
.production-cockpit-view .production-current-stage-row label,
.production-cockpit-view .production-phone-stat span,
.production-cockpit-view .production-deadline-card span {
  color: #91a1b7;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-cockpit-view .production-current-stage-row select,
.production-cockpit-view .production-quick-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-weight: 900;
}

.production-cockpit-view .production-phone-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.production-cockpit-view .production-deadline-card,
.production-cockpit-view .production-phone-stat {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  text-align: left;
  box-shadow: none;
}

.production-cockpit-view .production-deadline-card strong,
.production-cockpit-view .production-phone-stat strong {
  display: inline-block;
  margin-top: 8px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.production-cockpit-view .production-deadline-card.next strong {
  color: #fb7185;
}

.production-cockpit-view .production-phone-stat.progress strong {
  color: #24d18d;
}

.production-cockpit-view .production-deadline-card b {
  display: inline-flex;
  margin-left: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.18);
  color: #f6c453;
  font-size: 11px;
  font-weight: 950;
}

.production-cockpit-view .production-deadline-card em,
.production-cockpit-view .production-phone-stat em {
  display: block;
  margin-top: 8px;
  color: #91a1b7;
  font-style: normal;
  font-weight: 780;
}

.production-cockpit-view .production-phone-timer {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 22%, rgba(124, 92, 255, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(31, 27, 84, 0.88));
}

.production-cockpit-view .production-phone-timer .production-clock-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.production-cockpit-view .production-phone-timer .production-clock-card strong {
  color: #fff;
  font-size: clamp(38px, 7vw, 54px);
}

.production-cockpit-view .production-phone-timer .production-clock-card button {
  min-height: 60px;
  min-width: 170px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2dd983, #22c55e);
  color: #fff;
  font-size: 19px;
}

.production-cockpit-view .production-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.production-cockpit-view .production-action-grid button {
  display: grid;
  gap: 9px;
  place-items: center;
  min-height: 86px;
  padding: 10px 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 15px;
  background: rgba(8, 17, 31, 0.8);
  color: #fff;
  font-weight: 900;
  box-shadow: none;
}

.production-cockpit-view .production-quick-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 20px;
  background: rgba(13, 24, 42, 0.96);
  color: #fff;
}

.production-cockpit-view .production-quick-panel textarea {
  min-height: 104px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

.production-cockpit-view .production-quick-panel .production-workflow-steps,
.production-cockpit-view .production-quick-panel .production-version-row,
.production-cockpit-view .production-quick-panel .production-activity-feed {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.production-cockpit-view .production-activity-feed {
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(13, 24, 42, 0.74);
  color: #fff;
}

@media (max-width: 980px) {
  .production-cockpit-view .production-phone-card {
    padding: 18px;
    border-radius: 26px;
  }

  .production-cockpit-view .production-phone-project-head {
    display: grid;
  }

  .production-cockpit-view .production-phone-project-head h2 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .production-cockpit-view .production-stage-progress {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .production-cockpit-view .production-current-stage-row,
  .production-cockpit-view .production-phone-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .production-cockpit-view .production-action-grid {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .production-cockpit-view .production-phone-timer .production-clock-card {
    grid-template-columns: 1fr;
  }

  .production-cockpit-view .production-phone-timer .production-clock-card button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .production-cockpit-view .production-current-stage-row,
  .production-cockpit-view .production-phone-metrics {
    grid-template-columns: 1fr;
  }

  .production-cockpit-view .production-action-grid button {
    min-height: 78px;
    font-size: 12px;
  }
}

/* Production cockpit v391: staff workspace should feel like a modern mobile control room. */
.production-cockpit-view {
  --cockpit-bg: #07111f;
  --cockpit-panel: #0c1728;
  --cockpit-panel-2: #111f35;
  --cockpit-line: rgba(148, 163, 184, 0.18);
  --cockpit-text: #f8fafc;
  --cockpit-muted: #91a1b7;
  --cockpit-blue: #7c5cff;
  --cockpit-green: #24d18d;
  --cockpit-red: #fb7185;
  --cockpit-gold: #f6c453;
  color: var(--cockpit-text);
}

.production-cockpit-view .production-cockpit-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, #07111f, #111e34);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.2);
}

.production-cockpit-header > div:first-child {
  display: grid;
  gap: 2px;
}

.production-cockpit-header span {
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.production-cockpit-header strong {
  color: var(--cockpit-muted);
  font-size: 13px;
  font-weight: 800;
}

.production-cockpit-view .production-staff-cockpit {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.32fr);
  align-items: start;
}

.production-phone-card {
  gap: 16px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 76% 20%, rgba(124, 92, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #0b1424, #08111f);
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.28);
}

.production-phone-project-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.production-phone-project-head h2 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: 0;
}

.production-phone-project-head .production-kicker {
  color: #a78bfa;
}

.production-phone-project-head span {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.18);
  color: #b9a7ff;
  font-weight: 900;
}

.production-icon-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-weight: 900;
  cursor: pointer;
}

.production-stage-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  padding: 12px 0 4px;
}

.production-stage-progress::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 6%;
  right: 6%;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.production-stage-progress button {
  position: relative;
  display: grid;
  gap: 8px;
  place-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cockpit-muted);
  cursor: pointer;
}

.production-stage-progress i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #0c1728;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.7);
}

.production-stage-progress button.done i {
  border-color: rgba(34, 197, 94, 0.42);
  background: linear-gradient(135deg, #174936, #2563eb);
  color: #dcfce7;
}

.production-stage-progress button.active i {
  border-color: rgba(196, 181, 253, 0.8);
  background: radial-gradient(circle, #a78bfa, #6d28d9);
  color: #fff;
  box-shadow: 0 0 28px rgba(124, 92, 255, 0.72);
}

.production-stage-progress span {
  max-width: 86px;
  min-height: 32px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.production-stage-progress button.active span {
  color: #fff;
}

.production-current-stage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.28fr);
  gap: 16px;
  align-items: end;
}

.production-current-stage-row > div {
  display: grid;
  gap: 4px;
}

.production-current-stage-row span,
.production-current-stage-row label,
.production-phone-stat span,
.production-deadline-card span {
  color: var(--cockpit-muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-current-stage-row strong {
  color: #fff;
  font-size: 26px;
  line-height: 1.05;
}

.production-current-stage-row button {
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.15);
  color: #c4b5fd;
  font-weight: 900;
  cursor: pointer;
}

.production-current-stage-row select,
.production-quick-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-weight: 900;
}

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

.production-deadline-card,
.production-phone-stat {
  position: relative;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.58);
  color: #fff;
  text-align: left;
}

.production-phone-stat {
  cursor: pointer;
}

.production-deadline-card strong,
.production-phone-stat strong {
  display: inline-block;
  margin-top: 8px;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.production-deadline-card.next strong {
  color: var(--cockpit-red);
}

.production-deadline-card b {
  display: inline-flex;
  margin-left: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(246, 196, 83, 0.18);
  color: var(--cockpit-gold);
  font-size: 11px;
  font-weight: 950;
}

.production-deadline-card b.is-overdue,
.production-deadline-card b.overdue {
  background: rgba(251, 113, 133, 0.18);
  color: #fb7185;
}

.production-deadline-card em,
.production-phone-stat em {
  display: block;
  margin-top: 8px;
  color: var(--cockpit-muted);
  font-style: normal;
  font-weight: 780;
}

.production-phone-stat.progress strong {
  color: var(--cockpit-green);
}

.production-phone-timer {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(124, 92, 255, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 78% 22%, rgba(124, 92, 255, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(31, 27, 84, 0.88));
}

.production-phone-timer .production-clock-card {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.production-phone-timer .production-clock-card span {
  color: var(--cockpit-muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-phone-timer .production-clock-card strong {
  color: #fff;
  font-size: clamp(38px, 7vw, 54px);
}

.production-phone-timer .production-clock-card small {
  color: #94a3b8;
}

.production-phone-timer .production-clock-card button {
  min-height: 60px;
  min-width: 170px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2dd983, #22c55e);
  font-size: 19px;
}

.production-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.production-action-grid button {
  display: grid;
  gap: 9px;
  place-items: center;
  min-height: 86px;
  padding: 10px 8px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 15px;
  background: rgba(8, 17, 31, 0.8);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.production-action-grid i {
  color: #c4b5fd;
  font-style: normal;
}

.production-quick-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 20px;
  background: rgba(13, 24, 42, 0.96);
  color: #fff;
}

.production-quick-panel .section-title-row h3,
.production-quick-panel .production-workflow-steps h3,
.production-quick-panel .production-version-row h3 {
  color: #fff;
}

.production-quick-panel textarea {
  min-height: 104px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
}

.production-quick-panel .production-workflow-steps,
.production-quick-panel .production-version-row,
.production-quick-panel .production-checkin-card,
.production-quick-panel .production-activity-feed {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.production-quick-panel .production-step-timeline button {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.74);
  color: #fff;
}

.production-quick-panel .production-step-timeline button.active {
  border-color: rgba(124, 92, 255, 0.7);
  background: rgba(124, 92, 255, 0.24);
}

.production-issue-chips button {
  min-height: 38px;
  border-radius: 999px;
  cursor: pointer;
}

.production-activity-feed {
  overflow: hidden;
  border-color: rgba(148, 163, 184, 0.14);
  background: rgba(13, 24, 42, 0.74);
  color: #fff;
}

.production-activity-feed .section-title-row {
  align-items: center;
}

.production-activity-feed h3,
.production-activity-feed strong {
  color: #fff;
}

.production-activity-feed article {
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

.production-activity-feed article i {
  background: rgba(124, 92, 255, 0.18);
  color: #d8b4fe;
}

.production-cockpit-view .production-side-rail {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 14px;
}

.production-cockpit-view .production-rail-card,
.production-cockpit-view .production-side-rail .production-activity-feed {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

.production-cockpit-view .production-side-rail .production-activity-feed h3,
.production-cockpit-view .production-side-rail .production-activity-feed strong {
  color: #0f172a;
}

@media (max-width: 980px) {
  .production-studio-shell {
    padding: 0;
    background: #050d18;
  }

  .production-studio-topbar {
    display: none;
  }

  .production-cockpit-view .production-cockpit-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-radius: 0 0 24px 24px;
  }

  .production-cockpit-view .production-staff-cockpit {
    grid-template-columns: 1fr;
  }

  .production-phone-card {
    padding: 18px;
    border-radius: 26px;
  }

  .production-phone-project-head {
    display: grid;
  }

  .production-phone-project-head h2 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .production-stage-progress {
    gap: 0;
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    padding-bottom: 10px;
  }

  .production-stage-progress::before {
    left: 38px;
    right: 38px;
  }

  .production-current-stage-row,
  .production-phone-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .production-action-grid {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .production-phone-timer .production-clock-card {
    grid-template-columns: 1fr;
  }

  .production-phone-timer .production-clock-card button {
    width: 100%;
  }

  .production-cockpit-view .production-side-rail {
    position: static;
  }
}

@media (max-width: 620px) {
  .production-cockpit-header {
    padding: 14px;
  }

  .production-cockpit-header .production-clock-card {
    display: none;
  }

  .production-current-stage-row,
  .production-phone-metrics {
    grid-template-columns: 1fr;
  }

  .production-action-grid button {
    min-height: 78px;
    font-size: 12px;
  }

  .production-deadline-card,
  .production-phone-stat {
    min-height: 100px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.16), transparent 28rem),
    radial-gradient(circle at 94% 16%, rgba(14, 165, 233, 0.13), transparent 30rem),
    linear-gradient(135deg, #f8fbff 0%, #eef4fb 50%, #f7f9fc 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

::selection {
  background: rgba(37, 99, 235, 0.18);
}

body.login-locked {
  overflow: hidden;
}

body.login-locked .app-shell {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
select,
textarea {
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

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

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(37, 99, 235, 0.74)),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.22), transparent 22rem);
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(100%, 440px);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 42px;
}

.login-brand {
  margin-bottom: 0;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(180, 35, 24, 0.22);
  border-radius: 10px;
  background: #fff4f2;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.78)),
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 16rem);
  border-right: 1px solid rgba(203, 213, 225, 0.8);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

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

.sidebar .brand {
  cursor: pointer;
}

.brand-logo {
  display: block;
  width: min(100%, 180px);
  height: auto;
  object-fit: contain;
}

.login-logo {
  width: min(100%, 220px);
}

.sidebar-logo {
  width: min(100%, 150px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
}

.brand-subtitle,
.eyebrow,
.archive-header p,
.task-header p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.nav-tabs {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
}

.mobile-view-select {
  display: none;
}

.nav-tab,
.ghost-button,
.secondary-button,
.primary-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  min-height: 40px;
  padding: 10px 13px;
  font-weight: 800;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.nav-tab {
  position: relative;
  text-align: left;
  color: #334155;
}

.nav-tab.active {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
  border-color: rgba(15, 23, 42, 0.92);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

.sync-tab {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent);
  background: rgba(239, 246, 255, 0.9);
}

.sidebar-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel-title {
  font-weight: 900;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
  color: #344054;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 10px 11px;
  min-height: 42px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #93a4bb;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: rgba(37, 99, 235, 0.68);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
  resize: vertical;
}

select[multiple] {
  min-height: 120px;
}

.main {
  min-width: 0;
  padding: 30px;
}

.topbar,
.archive-header,
.task-header,
.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 16px;
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  align-items: center;
  gap: 10px;
  justify-content: end;
}

.global-search {
  width: 100%;
  min-height: 44px;
  border-color: rgba(148, 163, 184, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.secondary-button {
  background: #eef6ff;
  border-color: rgba(37, 99, 235, 0.22);
  color: #1d4ed8;
}

.secondary-button:hover,
.ghost-button:hover,
.nav-tab:hover {
  border-color: rgba(37, 99, 235, 0.5);
  background: #f8fbff;
  color: var(--accent);
  transform: translateY(-1px);
}

.danger {
  color: var(--danger);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.metric-strip .metric {
  min-height: 72px;
  padding: 14px 14px 12px 16px;
  border-radius: 14px;
}

.metric-strip .metric span {
  font-size: 25px;
  line-height: 1;
}

.metric-strip .metric label {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.1;
}

.pipeline-controls {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(120px, 180px) minmax(145px, auto) minmax(110px, auto) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  margin: 18px 0 12px;
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.86)),
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.08), transparent 16rem);
  box-shadow: var(--shadow-soft);
}

.quick-range-buttons,
.quick-task-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.quick-range-buttons button,
.quick-chip {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.quick-range-buttons button.active,
.quick-chip:hover {
  border-color: rgba(37, 99, 235, 0.55);
  background: #eff6ff;
  color: var(--accent);
}

.quick-task-chips {
  margin: 10px 0 12px;
}

.search-results-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid #2563eb;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.search-result-header,
.conversion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-result-header span,
.conversion-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.search-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.search-result-card {
  display: grid;
  gap: 7px;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.search-result-card small {
  color: var(--muted);
  font-weight: 800;
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 86px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.08), transparent 8rem);
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.9), rgba(14, 165, 233, 0.4));
  opacity: 0.9;
}

.metric span {
  position: relative;
  display: block;
  font-size: 28px;
  font-weight: 950;
}

.metric label {
  position: relative;
  margin-top: 4px;
  color: var(--muted);
}

.metric.accent {
  background:
    linear-gradient(135deg, #0f172a, #172554),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.28), transparent 9rem);
  color: #fff;
  border-color: rgba(15, 23, 42, 0.9);
}

.metric.accent label {
  color: #cbd5e1;
}

.metric-button {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
}

.metric-button:hover {
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.metric {
  cursor: default;
}

.metric-strip .metric,
.home-summary-grid > .metric:not(.home-income-panel) {
  cursor: pointer;
}

.metric-strip .metric:hover,
.home-summary-grid > .metric:not(.home-income-panel):hover {
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

#metricWon {
  cursor: pointer;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 320px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  height: min(720px, calc(100vh - 330px));
  min-height: 520px;
  padding: 4px 0 22px;
  align-items: stretch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.kanban::-webkit-scrollbar {
  height: 13px;
}

.kanban::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.75);
  border-radius: 999px;
}

.kanban::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.45);
  border: 3px solid rgba(226, 232, 240, 0.75);
  border-radius: 999px;
}

.board-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.board-view-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.board-toolbar-actions,
.board-scroll-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-filter-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.board-scroll-buttons .icon-button {
  width: 38px;
  min-height: 36px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.kanban.board-list-layout {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  grid-template-columns: 1fr;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: 0 0 18px;
}

.kanban.board-list-layout .stage-column {
  height: auto;
  min-height: 0;
}

.kanban.board-list-layout .stage-list {
  min-height: 110px;
  max-height: none;
  overflow: visible;
}

.mobile-stage-picker {
  display: none;
}

.stage-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.72));
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  scroll-snap-align: start;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 15px 13px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, #ffffff, #f8fbff),
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.1), transparent 8rem);
}

.stage-header strong {
  font-size: 14px;
}

.stage-header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.stage-count {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.stage-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  overscroll-behavior: contain;
}

.stage-list.drag-over {
  background: rgba(37, 99, 235, 0.08);
}

.lead-card {
  display: grid;
  gap: 7px;
  --source-color: var(--accent);
  --source-soft: rgba(37, 99, 235, 0.08);
  --payment-color: var(--source-color);
  --payment-soft: var(--source-soft);
  padding: 10px 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at top right, var(--payment-soft), transparent 10rem);
  border: 1px solid #dde5ef;
  border-left: 5px solid var(--payment-color);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  cursor: grab;
}

.lead-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.1);
}

.lead-card.source-google {
  --source-color: #2563eb;
  --source-soft: rgba(37, 99, 235, 0.16);
}

.lead-card.source-yelp {
  --source-color: #d32323;
  --source-soft: rgba(211, 35, 35, 0.14);
}

.lead-card.source-bark {
  --source-color: #7c3aed;
  --source-soft: rgba(124, 58, 237, 0.14);
}

.lead-card.source-repeat {
  --source-color: #16a34a;
  --source-soft: rgba(22, 163, 74, 0.14);
}

.lead-card.source-referral {
  --source-color: #f59e0b;
  --source-soft: rgba(245, 158, 11, 0.16);
}

.lead-card.source-vendor {
  --source-color: #0f766e;
  --source-soft: rgba(15, 118, 110, 0.14);
}

.lead-card.source-instagram {
  --source-color: #db2777;
  --source-soft: rgba(219, 39, 119, 0.14);
}

.lead-card.source-website {
  --source-color: #0891b2;
  --source-soft: rgba(8, 145, 178, 0.14);
}

.lead-card.source-other {
  --source-color: #64748b;
  --source-soft: rgba(100, 116, 139, 0.12);
}

.lead-card.payment-none,
.project-card.payment-none {
  --payment-color: #dc2626;
  --payment-soft: rgba(220, 38, 38, 0.12);
  border-left-color: #dc2626;
}

.lead-card.payment-deposit,
.project-card.payment-deposit {
  --payment-color: #2563eb;
  --payment-soft: rgba(37, 99, 235, 0.14);
  border-left-color: #2563eb;
}

.lead-card.payment-paid,
.project-card.payment-paid {
  --payment-color: #16a34a;
  --payment-soft: rgba(22, 163, 74, 0.14);
  border-left-color: #16a34a;
}

.lead-card:active {
  cursor: grabbing;
}

.lead-card h3 {
  font-size: 14px;
  line-height: 1.14;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.card-delete-button {
  min-height: 30px;
  padding: 6px 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border-radius: 999px;
  background: #eef4fb;
  color: #344054;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
}

.pill.gold {
  background: #fff4d6;
  color: #7a4d00;
}

.pill.green {
  background: #dbeafe;
  color: #1d4ed8;
}

.payment-pill.payment-none {
  background: #fee2e2;
  color: #991b1b;
}

.payment-pill.payment-deposit {
  background: #dbeafe;
  color: #1d4ed8;
}

.payment-pill.payment-paid {
  background: #dcfce7;
  color: #166534;
}

.source-pill {
  background: var(--source-soft);
  color: var(--source-color);
  border-color: rgba(15, 23, 42, 0.08);
}

.age-pill {
  background: #f5f3ff;
  color: #5b21b6;
}

.lead-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.dashboard-grid [draggable="true"] {
  cursor: grab;
}

.dashboard-grid [draggable="true"].dragging {
  opacity: 0.55;
  outline: 2px dashed var(--accent);
}

.dashboard-controls {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(120px, 180px) minmax(260px, 1fr);
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.86));
  box-shadow: var(--shadow-soft);
}

.finance-grid {
  display: grid;
  gap: 10px;
}

.finance-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fff, #f8fbff);
  color: inherit;
  cursor: default;
  text-align: left;
}

.finance-detail-button,
.bar-row-button {
  cursor: pointer;
}

.finance-detail-button:hover,
.bar-row-button:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.finance-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.finance-stat strong {
  color: var(--accent);
  font-size: 18px;
}

.checkbox-line {
  display: flex;
  grid-template-columns: unset;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
}

.check-pill {
  display: inline-flex;
  grid-template-columns: unset;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
}

.check-pill input {
  width: 15px;
  min-height: 15px;
}

.contact-match-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #f2cf7d;
  border-radius: 12px;
  background: #fff8e6;
}

.match-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #7a4d00;
  font-size: 13px;
}

.match-header span {
  color: #8a5c0a;
  font-weight: 800;
}

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

.match-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #f2cf7d;
  border-radius: 12px;
  background: #fff;
}

.match-card p,
.match-card small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.settings-grid label {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.settings-grid .wide {
  grid-column: 1 / -1;
}

.settings-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88));
  box-shadow: var(--shadow-soft);
}

.settings-tools p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.settings-tool-actions label {
  min-width: 170px;
}

.settings-filter-actions {
  align-items: end;
}

.home-grid,
.home-summary-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
}

.home-summary-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin-bottom: 16px;
}

#homeRevenueMetric,
#homeReceivedMetric,
#homePendingMetric,
#homeInvoicePendingMetric {
  grid-row: 2;
}

#homeRevenueMetric {
  grid-column: 1 / 2;
}

#homeReceivedMetric {
  grid-column: 2 / 3;
}

#homePendingMetric {
  grid-column: 3 / 4;
}

#homeInvoicePendingMetric {
  grid-column: 4 / 5;
}

.home-income-panel {
  grid-column: 1 / -1;
  grid-row: 3;
}

.home-income-header,
.report-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mini-income-list,
.income-breakdown-list {
  display: grid;
  gap: 10px;
}

.mini-income-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.mini-income-row,
.income-breakdown-row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.income-detail-button {
  width: 100%;
  min-height: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.income-detail-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.brand-lv-studios {
  --brand-color: #2563eb;
  --brand-color-2: #38bdf8;
  border-color: rgba(37, 99, 235, 0.28);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 9rem);
}

.brand-lv-llc {
  --brand-color: #0f766e;
  --brand-color-2: #14b8a6;
  border-color: rgba(15, 118, 110, 0.28);
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.18), transparent 9rem);
}

.brand-lakpathy {
  --brand-color: #7c3aed;
  --brand-color-2: #f59e0b;
  border-color: rgba(124, 58, 237, 0.28);
  background:
    linear-gradient(135deg, rgba(245, 243, 255, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 9rem);
}

.mini-income-row strong,
.income-breakdown-row strong {
  color: var(--brand-color, var(--ink));
}

.mini-income-row span,
.mini-income-row small,
.income-breakdown-top span,
.income-breakdown-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.income-breakdown-top,
.income-breakdown-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.income-breakdown-bar {
  height: 9px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.income-breakdown-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-color, var(--accent)), var(--brand-color-2, #60a5fa));
}

.brand-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.detail-sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.78);
}

.detail-sort-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.brand-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.brand-detail-row small,
.brand-detail-money span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.brand-detail-row .debug-date-line,
.settings-note {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

.brand-detail-money {
  display: grid;
  gap: 4px;
}

.revenue-metric {
  background:
    linear-gradient(135deg, #ecfdf5, #ffffff),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 9rem);
  border-color: rgba(22, 163, 74, 0.34);
}

.revenue-metric::before {
  background: linear-gradient(180deg, #16a34a, rgba(45, 212, 191, 0.55));
}

.revenue-metric span {
  color: #15803d;
}

.revenue-metric:hover {
  border-color: rgba(22, 163, 74, 0.58);
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.14);
}

.filter-notice {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: var(--radius);
  background: #eff6ff;
}

.backup-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.backup-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.backup-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.health-card {
  align-items: stretch;
  flex-direction: column;
}

.health-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  width: 100%;
}

.health-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 10px;
  background: #f8fbff;
}

.health-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.leaderboard-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fff, #f8fbff);
}

.leaderboard-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 950;
}

.leaderboard-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

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

.velocity-section {
  display: grid;
  gap: 8px;
}

.velocity-section h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.velocity-row {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fff, #f8fbff);
  color: var(--ink);
  text-align: left;
}

.velocity-row:hover {
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.velocity-row span,
.velocity-row strong,
.velocity-row small {
  display: block;
}

.velocity-row span {
  font-weight: 950;
}

.velocity-row strong {
  color: var(--accent);
  font-size: 19px;
}

.velocity-row small {
  color: var(--muted);
  font-weight: 800;
}

.revenue-metric span {
  color: var(--accent);
}

.task-summary-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.task-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.task-summary-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.32);
}

.task-summary-card > div {
  display: grid;
  gap: 4px;
}

.task-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.task-summary-card.completed {
  border-left-color: var(--muted);
  opacity: 0.72;
}

.task-summary-list.compact,
#homeTaskList {
  gap: 8px;
  margin-top: 10px;
}

#homeTaskList .task-summary-card {
  padding: 10px 12px;
  border-radius: 10px;
}

.task-done-button {
  min-width: 70px;
}

.task-edit-button {
  min-width: 58px;
}

.quick-task-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.4fr) minmax(180px, 0.9fr) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.88));
  box-shadow: var(--shadow-soft);
}

.task-archive-panel {
  margin-top: 18px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.permissions-panel {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.import-panel {
  margin-bottom: 18px;
}

.lead-attachment-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.attachment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
}

.attachment-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-preview {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.attachment-thumb {
  display: block;
  width: 68px;
  height: 52px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  cursor: zoom-in;
}

.attachment-thumb:hover {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}

.attachment-preview img {
  width: 68px;
  height: 52px;
  object-fit: cover;
  border-radius: inherit;
}

.attachment-preview div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.attachment-inline-reference {
  display: none;
  grid-column: 1 / -1;
  max-height: 62vh;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.attachment-preview.expanded .attachment-inline-reference {
  display: block;
}

.attachment-inline-reference img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
}

.attachment-preview strong,
.attachment-preview span,
.attachment-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.attachment-preview span,
.attachment-preview small {
  color: var(--muted);
  font-size: 12px;
}

.attachment-viewer {
  position: fixed;
  top: 18px;
  right: 18px;
  left: auto;
  width: min(46vw, 760px);
  max-width: calc(100vw - 36px);
  max-height: calc(100dvh - 36px);
  margin: 0;
  overflow: hidden;
  z-index: 30;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.attachment-viewer-body {
  display: grid;
  place-items: center;
  min-height: min(58vh, 720px);
  max-height: calc(100dvh - 170px);
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(135deg, #0f172a, #1e293b);
}

.attachment-viewer-body img {
  display: block;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.attachment-reference-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 100000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(42vw, 680px);
  max-width: calc(100vw - 36px);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

#leadDialog .attachment-reference-panel {
  position: fixed;
}

.attachment-reference-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.attachment-reference-header h3 {
  margin: 2px 0 3px;
  font-size: 16px;
}

.attachment-reference-header small {
  color: var(--muted);
  font-weight: 800;
}

.attachment-reference-body {
  min-height: min(58vh, 680px);
  max-height: calc(100dvh - 130px);
  overflow: auto;
  padding: 12px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.attachment-reference-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.task-summary-card small {
  color: var(--muted);
  font-weight: 850;
}

.task-context-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.task-context-link:hover {
  text-decoration: underline;
}

.report-panel,
.archive-header {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.report-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 14rem);
}

.report-panel.wide {
  grid-column: 1 / -1;
}

.status-form,
.status-feed {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.status-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.ai-assistant-shell {
  display: grid;
  gap: 14px;
  max-width: 980px;
}

.ai-messages {
  display: grid;
  gap: 12px;
  min-height: 420px;
  max-height: min(62vh, 680px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.94)),
    #fff;
  box-shadow: var(--shadow);
}

.ai-message {
  width: min(760px, 92%);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.ai-message.user {
  justify-self: end;
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.ai-message strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ai-message p {
  margin: 0;
  color: inherit;
  line-height: 1.5;
  white-space: pre-wrap;
}

.ai-pending-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: var(--radius);
  background: #eff6ff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

.ai-pending-action p {
  margin: 4px 0 0;
  color: var(--muted);
}

.ai-action-buttons,
.ai-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.ai-form textarea {
  flex: 1;
  resize: vertical;
}

.status-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.status-card p {
  margin: 0;
  color: #344054;
  line-height: 1.45;
}

.status-card small {
  color: var(--muted);
  font-weight: 700;
}

.bar-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.bar-row {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.bar-row-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
}

.bar-track {
  height: 10px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.source-grid,
.archive-list,
.project-list,
.contact-list,
.calendar-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.source-item,
.archive-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fff, #f8fbff);
}

.source-detail-button,
.lead-intake-button {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.source-detail-button:hover,
.lead-intake-button:hover {
  border-color: rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.09);
}

.lead-intake-chart {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.lead-intake-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.82)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 10rem);
}

.lead-intake-row.has-conversions {
  border-color: rgba(22, 163, 74, 0.34);
  background:
    linear-gradient(135deg, rgba(240, 253, 244, 0.95), rgba(239, 246, 255, 0.84)),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.2), transparent 10rem);
}

.lead-intake-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 900;
}

.lead-intake-top span {
  color: var(--muted);
}

.lead-intake-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.lead-intake-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  height: 100%;
  border-radius: inherit;
}

.lead-intake-bar .intake-total-fill {
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.lead-intake-bar .intake-converted-fill {
  z-index: 2;
  background: linear-gradient(90deg, #16a34a, #86efac);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.intake-conversion-callout {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  justify-content: start;
  gap: 6px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-weight: 950;
}

.intake-conversion-callout strong {
  font-size: 18px;
}

.intake-conversion-callout span,
.intake-conversion-callout small {
  font-size: 12px;
}

.intake-conversion-callout.muted {
  background: #f1f5f9;
  color: var(--muted);
}

.source-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.source-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 850;
  border: 1px solid var(--line);
}

.source-chip.won-chip {
  border-color: rgba(22, 163, 74, 0.25);
  background: #dcfce7;
  color: #166534;
}

.conversion-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fff, #f8fbff);
}

.conversion-meter {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 48px;
  gap: 10px;
  align-items: center;
  min-width: 230px;
  font-weight: 950;
}

.project-list {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.project-list.compact {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.crew-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.crew-member-filter {
  min-width: 180px;
  font-size: 12px;
  font-weight: 850;
  color: var(--muted);
}

.crew-bottom-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at left top, rgba(37, 99, 235, 0.08), transparent 14rem);
  box-shadow: var(--shadow-soft);
}

.crew-bottom-tools .crew-member-filter {
  display: grid;
  gap: 5px;
  min-width: 180px;
}

.crew-bottom-tools button {
  min-height: 42px;
}

.crew-rate-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 0.9fr) minmax(280px, 1.5fr);
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at right, rgba(37, 99, 235, 0.14), transparent 14rem);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.crew-access-panel,
.crew-availability-panel,
.project-crew-bench {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.crew-access-panel {
  justify-content: end;
}

.crew-access-details {
  width: min(100%, 920px);
}

.crew-access-details summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.08);
}

.crew-access-details summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.crew-access-details[open] summary {
  margin-bottom: 12px;
}

.project-crew-bench {
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.crew-access-details[open] {
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.crew-access-header,
.project-crew-bench {
  align-items: center;
}

.crew-access-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.crew-access-header strong,
.project-crew-bench strong,
.crew-access-header small,
.project-crew-bench small {
  display: block;
}

.crew-access-header small,
.project-crew-bench small {
  color: var(--muted);
  font-weight: 750;
  margin-top: 3px;
}

.crew-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.crew-access-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: #fff;
}

.crew-access-card small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.crew-access-actions,
.project-crew-chips,
.project-assignee-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-crew-chip,
.project-assignee-chip,
.project-assignee-empty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: #eff6ff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.project-crew-chip {
  cursor: grab;
}

.project-crew-chip:active {
  cursor: grabbing;
}

.project-assignee-chip button {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: var(--accent);
  font-weight: 950;
  cursor: pointer;
}

.project-assignee-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
}

.project-card.crew-drop-active {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  transform: translateY(-2px);
}

.crew-rate-panel strong,
.crew-rate-panel small {
  display: block;
}

.crew-rate-panel small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
}

.crew-rate-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.crew-rate-form {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(90px, 0.7fr) auto;
  gap: 8px;
  align-items: end;
}

.crew-rate-form input {
  min-height: 40px;
  border-radius: 12px;
}

.crew-rate-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.crew-rate-item .icon-button {
  width: 38px;
  height: auto;
  min-height: 40px;
  color: var(--danger);
}

.crew-rate-chip {
  display: grid;
  gap: 2px;
  min-width: 96px;
  padding: 9px 12px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
  cursor: grab;
}

.crew-rate-chip:active {
  cursor: grabbing;
}

.crew-rate-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.crew-rate-chip strong {
  color: var(--accent);
  font-size: 16px;
}

.crew-availability-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.crew-availability-head,
.crew-availability-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.crew-availability-head strong,
.crew-availability-head small,
.crew-availability-item strong,
.crew-availability-item span,
.crew-availability-item small {
  display: block;
}

.crew-availability-head small,
.crew-availability-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.crew-availability-head > span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
}

.crew-availability-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.crew-availability-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.crew-availability-form input {
  min-height: 38px;
  border-radius: 12px;
}

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

.crew-availability-item {
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed, #fff);
}

.crew-summary-card,
.crew-project-card,
.crew-calendar-day {
  border: 1px solid rgba(137, 166, 220, 0.45);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 255, 0.82));
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(20, 42, 82, 0.08);
}

.crew-summary-card {
  padding: 18px;
}

.crew-payment-summary {
  margin-top: 18px;
}

.crew-summary-card[data-crew-summary] {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.crew-summary-card[data-crew-summary]:hover,
.crew-summary-card[data-crew-summary]:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 22px 56px rgba(37, 99, 235, 0.16);
  outline: none;
}

.crew-summary-card.paid {
  border-color: rgba(22, 163, 74, 0.3);
  background: linear-gradient(145deg, #ecfdf3, #ffffff);
}

.crew-summary-card.unpaid {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(145deg, #fff1f2, #ffffff);
}

.crew-summary-card.paid strong {
  color: #16a34a;
}

.crew-summary-card.unpaid strong {
  color: #dc2626;
}

.staff-pay-summary-card {
  grid-column: span 2;
  align-content: start;
  border-color: rgba(37, 99, 235, 0.24);
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.86));
}

.staff-pay-summary-card.ytd {
  border-color: rgba(20, 184, 166, 0.28);
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(240, 253, 250, 0.98), rgba(255, 255, 255, 0.9));
}

.staff-pay-summary-card > strong {
  font-size: clamp(28px, 3vw, 44px);
  color: #2563eb;
}

.staff-pay-summary-card.ytd > strong {
  color: #0f766e;
}

.staff-pay-summary-card > em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.staff-pay-panel-tools {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.staff-pay-total-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
}

.staff-pay-total-strip .staff-pay-summary-card {
  grid-column: auto;
}

.crew-owed-breakdown {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 0.5fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.crew-owed-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.crew-owed-list div {
  padding: 12px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.crew-owed-list strong,
.crew-owed-list span,
.crew-owed-list small {
  display: block;
}

.crew-owed-list strong {
  margin-top: 4px;
  color: #dc2626;
  font-size: 20px;
}

.crew-owed-list small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 850;
}

.crew-summary-card strong {
  display: block;
  color: var(--blue);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1;
}

.crew-summary-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.crew-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.crew-feedback-panel {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.13), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 255, 0.78));
  box-shadow: 0 18px 48px rgba(67, 56, 202, 0.09);
}

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

.crew-feedback-head h3 {
  margin: 2px 0 4px;
  font-size: clamp(20px, 2vw, 28px);
}

.crew-feedback-head small {
  color: var(--muted);
  font-weight: 800;
}

.crew-feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.crew-feedback-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.crew-feedback-card.empty {
  border-style: dashed;
}

.crew-feedback-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crew-feedback-person strong,
.crew-feedback-person small {
  display: block;
}

.crew-feedback-person small,
.crew-feedback-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.crew-feedback-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crew-feedback-card li {
  position: relative;
  padding: 9px 10px 9px 30px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.82), rgba(239, 246, 255, 0.74));
  color: #312e81;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.crew-feedback-card li::before {
  content: "✓";
  position: absolute;
  left: 10px;
  top: 9px;
  color: #7c3aed;
  font-weight: 950;
}

.crew-feedback-preview {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(245, 243, 255, 0.78);
}

.crew-feedback-preview span,
.crew-feedback-preview small {
  display: block;
}

.crew-feedback-preview span {
  color: #5b21b6;
  font-weight: 950;
}

.crew-feedback-preview small {
  color: var(--muted);
  font-weight: 800;
  white-space: pre-wrap;
}

.crew-project-list,
.crew-calendar-list,
.crew-payment-list {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.crew-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}

.crew-project-card.soon,
.crew-project-card.today,
.crew-project-card.upcoming {
  border-color: rgba(37, 99, 235, 0.34);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 16rem),
    linear-gradient(145deg, #ffffff, #eff6ff);
}

.crew-project-card.past {
  opacity: 0.78;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(241, 245, 249, 0.78));
}

.crew-project-card h3 {
  margin: 4px 0 8px;
  line-height: 1.1;
}

.crew-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.crew-project-meta a,
.crew-call-summary a,
.crew-call-sheet a,
.crew-detail-pay-row a {
  color: #1d4ed8;
  font-weight: 950;
  text-decoration: none;
}

.crew-project-meta a:hover,
.crew-call-summary a:hover,
.crew-call-sheet a:hover,
.crew-detail-pay-row a:hover {
  text-decoration: underline;
}

.crew-project-title-button {
  color: var(--ink);
  text-align: left;
}

.crew-date-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 950;
}

.crew-date-pill.today {
  color: #166534;
  background: #dcfce7;
}

.crew-date-pill.soon {
  color: #92400e;
  background: #fef3c7;
}

.crew-date-pill.past {
  color: #64748b;
  background: #e2e8f0;
}

.crew-pay-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto minmax(84px, max-content);
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-sizing: border-box;
  overflow: hidden;
}

.crew-pay-row > * {
  min-width: 0;
}

.crew-call-sheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 11rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.crew-call-sheet.empty {
  background: rgba(248, 250, 252, 0.76);
}

.crew-call-sheet > div:not(.crew-call-actions) {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
}

.crew-call-sheet span,
.crew-call-facts b,
.crew-call-summary-head strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.crew-call-sheet strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.crew-call-sheet small {
  display: block;
  margin-top: 4px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.crew-call-sheet .crew-call-locations {
  grid-column: 1 / -1;
}

.crew-call-locations small {
  padding: 6px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.crew-call-locations small:first-of-type {
  border-top: 0;
}

.crew-call-locations b {
  color: var(--muted);
  font-weight: 950;
}

.crew-call-sheet p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  background: #eff6ff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.crew-call-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crew-call-actions .primary-button,
.crew-call-actions .secondary-button,
.crew-call-actions .ghost-button {
  min-height: 38px;
  border-radius: 12px;
}

.crew-pay-row.paid-row {
  border-color: rgba(22, 163, 74, 0.24);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.94), rgba(255, 255, 255, 0.84));
}

.crew-pay-row.unpaid-row {
  border-color: rgba(239, 68, 68, 0.22);
  background: linear-gradient(135deg, rgba(255, 241, 242, 0.94), rgba(255, 255, 255, 0.84));
}

.crew-pay-row.drag-over {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.crew-name {
  font-weight: 900;
  overflow-wrap: anywhere;
}

.crew-pay-amount {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: normal;
}

.crew-pay-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
}

.crew-pay-breakdown span,
.crew-pay-total {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.crew-pay-breakdown .crew-pay-bonus {
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, #fef3c7, #fff7ed);
  color: #92400e;
}

.crew-pay-breakdown .crew-pay-expense {
  border: 1px solid rgba(14, 165, 233, 0.24);
  background: linear-gradient(135deg, #e0f2fe, #eff6ff);
  color: #075985;
}

.crew-pay-breakdown .crew-pay-base {
  border: 1px solid rgba(100, 116, 139, 0.16);
}

.crew-feedback-strip {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 9rem),
    rgba(239, 246, 255, 0.78);
  color: #1e3a8a;
}

.crew-feedback-strip strong {
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.crew-feedback-strip span {
  color: #334155;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.crew-pay-total {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.12);
}

.crew-pay-input {
  display: grid;
  gap: 4px;
  min-width: 0;
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.crew-pay-input input,
.crew-call-grid input,
.crew-call-grid select,
.crew-call-grid textarea {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 10px;
}

.crew-call-details,
.crew-call-summary {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.crew-call-details {
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.58);
}

.crew-call-details summary {
  cursor: pointer;
  padding: 9px 11px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.crew-call-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
  padding: 0 11px 11px;
}

.crew-call-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.crew-call-grid label.wide {
  grid-column: 1 / -1;
}

.crew-call-summary {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.86));
}

.crew-call-summary.empty {
  border-style: dashed;
}

.crew-call-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.crew-call-summary strong {
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.crew-call-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.crew-call-facts span {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.crew-call-summary p,
.crew-call-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.crew-call-summary p {
  margin: 0;
}

.crew-booked-details {
  justify-self: start;
}

.crew-call-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.crew-call-editor-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.crew-call-editor-form label.wide,
.crew-call-editor-form .modal-actions {
  grid-column: 1 / -1;
}

.crew-call-editor-form input,
.crew-call-editor-form select,
.crew-call-editor-form textarea {
  min-height: 42px;
  border-radius: 12px;
}

.crew-pay-row strong {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.crew-pay-row .paid {
  background: #dcfce7;
  color: #166534;
}

.crew-pay-row .unpaid {
  background: #fee2e2;
  color: #991b1b;
}

.crew-calendar-day {
  padding: 14px;
}

.crew-calendar-day strong,
.crew-calendar-day span {
  display: block;
}

.crew-calendar-day span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.crew-calendar-panel {
  margin-top: 18px;
}

.crew-project-panel {
  margin-top: 18px;
}

.crew-assign-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 0.8fr) minmax(130px, 0.65fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px dashed rgba(37, 99, 235, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.crew-assign-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.crew-assign-form select,
.crew-assign-form input {
  min-height: 40px;
  border-radius: 12px;
}

.crew-calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.crew-calendar-toolbar h3 {
  margin: 2px 0 0;
}

.crew-calendar-project {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 5px 7px;
  border: 0;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.crew-calendar-project:hover,
.crew-calendar-project:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 1px;
}

.crew-calendar-project.soon,
.crew-calendar-project.today {
  border-left-color: #f59e0b;
  background: #fff7ed;
}

.crew-calendar-project.past {
  border-left-color: #94a3b8;
  opacity: 0.7;
}

.crew-detail-row {
  align-items: start;
}

.crew-detail-pay-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.crew-detail-pay-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) auto minmax(190px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.78);
}

.crew-detail-pay-row .paid,
.crew-detail-pay-row .unpaid {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.crew-detail-pay-row .paid {
  background: #dcfce7;
  color: #166534;
}

.crew-detail-pay-row .unpaid {
  background: #fee2e2;
  color: #991b1b;
}

.staff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.staff-hero-header {
  margin-bottom: 10px;
}

.staff-today-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
  margin-bottom: 14px;
}

.staff-work-hub {
  display: grid;
  gap: 16px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(137, 166, 220, 0.38);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0, rgba(37, 99, 235, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 0, rgba(20, 184, 166, 0.13), transparent 26rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.78));
  box-shadow: 0 22px 55px rgba(20, 42, 82, 0.09);
}

.staff-work-hub-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.28fr);
  gap: 14px;
  align-items: stretch;
}

.staff-work-hub-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1;
}

.staff-work-hub-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 850;
}

.staff-work-clock-card {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(137, 166, 220, 0.36);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88));
}

.staff-work-clock-card.clocked-in {
  border-color: rgba(34, 197, 94, 0.42);
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.staff-work-clock-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-work-clock-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.staff-time-dashboard {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(137, 166, 220, 0.36);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  box-shadow: 0 18px 42px rgba(20, 42, 82, 0.08);
}

.staff-time-dashboard.compact {
  margin-top: 18px;
}

.staff-time-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.staff-time-dashboard-head h2 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.staff-time-dashboard-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.staff-time-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.staff-time-filters label {
  display: grid;
  gap: 5px;
  min-width: 150px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-time-filters select {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(137, 166, 220, 0.44);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
}

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

.staff-time-kpis article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(137, 166, 220, 0.28);
  border-radius: 12px;
  background: #ffffff;
}

.staff-time-kpis span,
.staff-time-kpis em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.staff-time-kpis strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}

.staff-time-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.staff-time-chart,
.staff-time-table-card,
.staff-time-updates-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(137, 166, 220, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

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

.staff-time-chart-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.staff-time-chart-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-time-bars {
  display: grid;
  gap: 9px;
}

.staff-time-bar-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.45fr) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
}

.staff-time-bar-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.staff-time-bar-label strong,
.staff-time-bar-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-time-bar-label strong {
  color: var(--ink);
  font-size: 13px;
}

.staff-time-bar-label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.staff-time-bar-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.staff-time-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #0f766e);
}

.staff-time-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 12px;
}

.staff-time-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.staff-time-table-head,
.staff-time-table > div:not(.staff-time-table-head):not(.empty-state) {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(110px, 0.7fr) minmax(170px, 1fr) minmax(180px, 1.15fr) minmax(70px, 0.45fr);
  gap: 8px;
  min-width: 780px;
  align-items: start;
}

.staff-time-table-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(137, 166, 220, 0.24);
}

.staff-time-table-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-time-table > div:not(.staff-time-table-head):not(.empty-state) {
  padding: 8px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
}

.staff-time-table span {
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.staff-time-table b,
.staff-time-table small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-time-table b {
  color: var(--ink);
}

.staff-time-table small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.staff-time-updates {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.staff-time-updates article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-left: 4px solid #0f766e;
  border-radius: 10px;
  background: #ffffff;
}

.staff-time-updates span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.staff-time-updates strong {
  color: var(--ink);
  font-size: 13px;
}

.staff-time-updates p {
  margin: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.staff-work-hub-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.25fr) minmax(260px, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

.staff-assigned-projects-panel,
.staff-work-console,
.staff-attention-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
}

.staff-section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.staff-section-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.staff-section-title > span,
.staff-section-title .staff-live-deadline {
  flex: 0 0 auto;
}

.staff-assigned-projects-strip {
  display: grid;
  gap: 10px;
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.staff-assigned-project-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-left: 5px solid rgba(37, 99, 235, 0.42);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.staff-assigned-project-card.active {
  border-color: rgba(37, 99, 235, 0.58);
  border-left-color: var(--blue);
  background: linear-gradient(145deg, #eff6ff, rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.12);
}

.staff-card-kicker {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-assigned-project-card strong,
.staff-assigned-project-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.staff-assigned-project-card strong {
  font-size: 16px;
  line-height: 1.12;
}

.staff-assigned-project-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.staff-card-progress {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.88);
}

.staff-card-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.staff-card-progress b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-size: 11px;
  font-weight: 950;
}

.staff-card-meta,
.staff-card-people {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.staff-card-meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.staff-work-console {
  display: grid;
  gap: 10px;
}

.staff-work-console.clocked-in {
  border-color: rgba(34, 197, 94, 0.38);
  background: linear-gradient(145deg, rgba(240, 253, 244, 0.86), rgba(255, 255, 255, 0.88));
}

.staff-live-deadline {
  display: grid;
  gap: 2px;
  min-width: 176px;
  padding: 8px 10px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 14px;
  background: #ffffff;
}

.staff-live-deadline small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-live-deadline strong {
  color: var(--ink);
  font-size: 15px;
}

.staff-live-deadline em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.staff-live-deadline.overdue {
  border-color: rgba(239, 68, 68, 0.32);
  background: #fef2f2;
}

.staff-live-deadline.today,
.staff-live-deadline.soon {
  border-color: rgba(245, 158, 11, 0.38);
  background: #fffbeb;
}

.staff-live-deadline.ok {
  border-color: rgba(34, 197, 94, 0.32);
  background: #f0fdf4;
}

.staff-work-console .staff-clock-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.staff-work-console .staff-clock-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.staff-work-console .staff-clock-form .wide {
  grid-column: 1 / -1;
}

.staff-console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.staff-console-actions span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.staff-attention-panel .staff-today-task-list {
  max-height: 350px;
  overflow: auto;
  padding-right: 4px;
}

.staff-today-task-list.compact .staff-today-task {
  padding: 9px 10px;
}

.staff-focus-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(137, 166, 220, 0.38);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.13), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.82));
  box-shadow: 0 18px 45px rgba(20, 42, 82, 0.08);
}

.staff-focus-card.clocked-in {
  border-color: rgba(34, 197, 94, 0.42);
  background:
    radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.18), transparent 44%),
    linear-gradient(145deg, #f0fdf4, rgba(255, 255, 255, 0.96));
}

.staff-focus-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
}

.staff-focus-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.staff-clock-form {
  display: grid;
  grid-template-columns: minmax(160px, 0.85fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.staff-clock-form select,
.staff-clock-form input {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(137, 166, 220, 0.44);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-weight: 850;
}

.staff-clock-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.staff-today-task-list {
  display: grid;
  gap: 8px;
}

.staff-today-task {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(191, 219, 254, 0.92);
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.staff-today-task.working {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.staff-today-task.needs-manager-approval {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.staff-today-task strong,
.staff-today-task span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-today-task span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.staff-daily-layout {
  margin-bottom: 14px;
}

.staff-bottom-tools {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.staff-gantt-panel {
  margin-bottom: 18px;
  overflow: hidden;
  padding: 0;
}

.staff-gantt-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.staff-gantt-header h2 {
  margin-bottom: 3px;
}

.staff-gantt-header p {
  color: var(--muted);
  font-weight: 750;
}

.staff-gantt {
  min-width: 0;
}

.staff-gantt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted);
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.82));
}

.staff-gantt-toolbar .compact {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
}

.staff-gantt-add {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(420px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.staff-gantt-add select {
  min-width: 220px;
  min-height: 36px;
  border-radius: 10px;
  font-size: 12px;
}

.staff-gantt-zoom {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(137, 166, 220, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.staff-gantt-view-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(137, 166, 220, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
}

.staff-gantt-view-toggle button {
  min-height: 28px;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.staff-gantt-view-toggle button.active {
  background: linear-gradient(135deg, var(--blue), #14b8a6);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.staff-gantt-zoom button {
  min-height: 28px;
  padding: 5px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.staff-gantt-zoom button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.staff-gantt-toolbar-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
}

.production-save-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.production-save-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.production-save-controls [data-save-production-now] {
  min-height: 30px;
  padding: 5px 12px;
}

.production-save-indicator.saving,
.production-save-indicator.unsaved {
  border-color: rgba(245, 158, 11, 0.34);
  background: #fffbeb;
  color: #92400e;
}

.production-save-indicator.failed,
.production-save-indicator.offline {
  border-color: rgba(239, 68, 68, 0.34);
  background: #fff1f2;
  color: #991b1b;
}

.production-save-indicator.saved {
  border-color: rgba(34, 197, 94, 0.28);
  background: #f0fdf4;
  color: #166534;
}

.staff-assignment-legend {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 2px;
}

.staff-assignment-legend .muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.staff-assignment-pill {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  max-width: 190px;
  padding: 5px 9px 5px 5px;
  border: 1px solid color-mix(in srgb, var(--staff-accent, #64748b) 38%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--staff-soft, #e2e8f0) 82%, white);
  color: var(--staff-ink, #334155);
  font-size: 11px;
  font-weight: 950;
}

.staff-assignment-pill i,
.staff-workflow-person i {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--staff-accent, #64748b);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0;
}

.staff-assignment-pill b {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-assignment-pill.unassigned {
  border-style: dashed;
  background: #f8fafc;
}

.staff-workflow-timeline-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.5fr) minmax(calc(var(--timeline-days, 7) * var(--timeline-day-width, 132px)), 1.7fr);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.74));
  -webkit-overflow-scrolling: touch;
}

.staff-workflow-left-head,
.staff-workflow-calendar-head {
  z-index: 3;
  min-height: 58px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.96));
}

.staff-workflow-left-head {
  position: sticky;
  left: 0;
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 12px 18px;
  box-shadow: 8px 0 20px rgba(15, 23, 42, 0.04);
}

.staff-workflow-left-head strong,
.staff-workflow-left-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-workflow-calendar-head {
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.96));
}

.staff-workflow-week-grid {
  display: grid;
  grid-template-columns: repeat(var(--timeline-days, 7), minmax(var(--timeline-day-width, 132px), 1fr));
}

.staff-workflow-day-head {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 9px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
}

.staff-workflow-day-head.today {
  background: #eff6ff;
  color: var(--blue);
}

.staff-workflow-day-head strong {
  color: var(--ink);
  font-size: 12px;
}

.staff-gantt-sheet-shell {
  --gantt-left-width: 720px;
  display: grid;
  grid-template-columns: var(--gantt-left-width) minmax(calc(var(--timeline-days, 35) * var(--timeline-day-width, 64px)), 1.45fr);
  overflow: auto;
  overscroll-behavior: contain;
  max-height: min(76vh, 760px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
  -webkit-overflow-scrolling: touch;
}

.staff-gantt-sheet-head,
.staff-gantt-sheet-project-row,
.staff-gantt-sheet-phase-row,
.staff-gantt-sheet-task-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--gantt-left-width) minmax(calc(var(--timeline-days, 35) * var(--timeline-day-width, 86px)), 1.45fr);
}

.staff-gantt-sheet-head {
  position: sticky;
  top: 0;
  z-index: 50;
  min-width: max-content;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.staff-gantt-sheet-left-head {
  position: sticky;
  left: 0;
  z-index: 55;
  display: grid;
  grid-template-columns: 38px minmax(210px, 1fr) 118px 112px 122px;
  gap: 6px;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  color: #64748b;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 9px 0 24px rgba(15, 23, 42, 0.04);
}

.staff-gantt-sheet-calendar-head {
  min-width: calc(var(--timeline-days, 35) * var(--timeline-day-width, 86px));
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.staff-gantt-sheet-body {
  display: contents;
}

.staff-gantt-sheet-project {
  display: contents;
}

.staff-gantt-sheet-project-row {
  min-width: max-content;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.7), rgba(255, 255, 255, 0.98));
}

.staff-gantt-project-left {
  position: sticky;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  grid-template-columns: minmax(230px, 1fr) minmax(0, auto);
  align-items: center;
  gap: 8px 12px;
  min-height: 58px;
  padding: 7px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(135deg, #eff6ff, #ffffff 72%);
  color: var(--ink);
  box-shadow: 9px 0 24px rgba(15, 23, 42, 0.04);
}

.staff-gantt-project-summary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.staff-gantt-disclosure {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #dbeafe;
  color: var(--blue);
  font-weight: 1000;
}

.staff-gantt-project-summary strong,
.staff-gantt-project-summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-gantt-project-summary strong {
  font-size: 13px;
  font-weight: 1000;
}

.staff-gantt-project-summary em {
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.staff-gantt-project-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0;
}

.staff-gantt-current-step {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  justify-self: start;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.staff-gantt-stage-pill {
  display: inline-flex;
  max-width: 170px;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-gantt-project-meta label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #64748b;
  font-size: 9px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-gantt-project-meta input {
  width: 122px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 9px;
  font-size: 11px;
}

.staff-gantt-progress {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 76px;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: #e0f2fe;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 1000;
}

.staff-gantt-progress b {
  position: absolute;
  inset: 0 auto 0 0;
  opacity: 0.24;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.staff-gantt-progress i {
  position: relative;
  z-index: 1;
  font-style: normal;
}

.staff-gantt-project-lane,
.staff-gantt-task-lane {
  position: relative;
  min-width: calc(var(--timeline-days, 35) * var(--timeline-day-width, 86px));
  display: grid;
  grid-template-columns: repeat(var(--timeline-days, 35), minmax(var(--timeline-day-width, 64px), 1fr));
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.14) 0 1px, transparent 1px var(--timeline-day-width, 64px)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.32));
}

.staff-gantt-sheet-cell {
  min-height: 40px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.staff-gantt-project-lane .staff-gantt-sheet-cell {
  grid-row: 1;
  min-height: 58px;
}

.staff-gantt-sheet-cell.today {
  background: rgba(219, 234, 254, 0.54);
}

.staff-gantt-sheet-phase-row {
  min-width: max-content;
  min-height: 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(241, 245, 249, 0.98);
}

.staff-gantt-sheet-phase-label {
  position: sticky;
  left: 0;
  z-index: 26;
  display: flex;
  align-items: center;
  padding: 5px 10px 5px 38px;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(241, 245, 249, 0.98);
  color: #475569;
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.staff-gantt-sheet-task-row {
  min-width: max-content;
  min-height: 44px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: #fff;
}

.staff-gantt-sheet-task-row:hover {
  background: #f8fbff;
}

.staff-gantt-task-left {
  position: sticky;
  left: 0;
  z-index: 24;
  display: grid;
  grid-template-columns: 38px minmax(210px, 1fr) 118px 112px 122px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 10px;
  border-right: 1px solid rgba(148, 163, 184, 0.2);
  border-left: 3px solid var(--staff-accent, #94a3b8);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--staff-soft, #f8fafc) 34%, white), #fff 48%),
    #fff;
  box-shadow: 9px 0 22px rgba(15, 23, 42, 0.035);
}

.staff-gantt-task-left > span {
  color: var(--staff-accent, #2563eb);
  font-size: 11px;
  font-weight: 1000;
}

.staff-gantt-task-left button {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.staff-gantt-task-left strong,
.staff-gantt-task-left em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-gantt-task-left strong {
  font-size: 11px;
  font-weight: 1000;
}

.staff-gantt-task-left em {
  color: #64748b;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.staff-gantt-task-left select,
.staff-gantt-task-left input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 3px 7px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 850;
}

.staff-gantt-task-left small {
  display: block;
  margin-top: 2px;
  width: fit-content;
  font-size: 9px;
}

.staff-gantt-sheet-bar {
  z-index: 4;
  grid-row: 1;
  align-self: center;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin: 6px 6px;
  padding: 4px 9px;
  border-radius: 8px;
  border-color: color-mix(in srgb, var(--staff-accent, #2563eb) 44%, #bfdbfe);
  border-left-color: var(--staff-accent, #2563eb);
  background: linear-gradient(135deg, color-mix(in srgb, var(--staff-soft, #dbeafe) 82%, white), #ffffff);
  color: var(--staff-ink, #1e3a8a);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.staff-gantt-sheet-bar i {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--staff-accent, #2563eb);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 1000;
}

.staff-gantt-sheet-bar b,
.staff-gantt-sheet-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-gantt-sheet-bar b {
  font-size: 10px;
}

.staff-gantt-sheet-bar span {
  font-size: 9px;
  font-weight: 1000;
  text-transform: uppercase;
}

.staff-gantt-project-bar {
  z-index: 5;
  grid-row: 1;
  align-self: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 26px;
  margin: 16px 8px 8px;
  padding: 5px 10px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
  cursor: pointer;
}

.staff-gantt-project-bar b,
.staff-gantt-project-bar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-gantt-project-bar b,
.staff-gantt-project-bar i {
  font-size: 10px;
  font-style: normal;
  font-weight: 1000;
  text-transform: uppercase;
}

.staff-gantt-project-bar span {
  opacity: 0.92;
  font-size: 10px;
  font-weight: 900;
}

.staff-gantt-project-bar.review,
.staff-gantt-project-bar.needs-review {
  background: linear-gradient(135deg, #f59e0b, #fb7185);
}

.staff-gantt-project-bar.delivery,
.staff-gantt-project-bar.completed {
  background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.staff-gantt-project-bar.blocked {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.staff-gantt-unscheduled {
  position: sticky;
  left: calc(var(--gantt-left-width, 560px) + 10px);
  z-index: 3;
  align-self: center;
  width: max-content;
  margin: 7px 10px;
  padding: 4px 8px;
  border: 1px dashed rgba(100, 116, 139, 0.35);
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 10px;
  font-weight: 950;
}

.staff-gantt-assignee-cell {
  min-width: 0;
}

@media (max-width: 1200px) {
  .staff-gantt-sheet-shell {
    --gantt-left-width: 520px;
  }

  .staff-gantt-sheet-left-head,
  .staff-gantt-task-left {
    grid-template-columns: 30px minmax(150px, 1fr) 104px 112px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .staff-gantt-sheet-left-head > :nth-child(3),
  .staff-gantt-task-left > :nth-child(3) {
    display: none;
  }
}

@media (max-width: 760px) {
  .staff-gantt-toolbar {
    padding: 10px;
    gap: 7px;
  }

  .staff-gantt-toolbar .compact,
  .staff-gantt-view-toggle button,
  .staff-gantt-zoom button {
    min-height: 30px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .staff-gantt-add {
    min-width: 100%;
  }

  .staff-gantt-add select {
    min-width: 0;
    flex: 1;
  }

  .staff-gantt-sheet-shell {
    --gantt-left-width: 440px;
    max-height: 68vh;
    border-radius: 12px;
  }

  .staff-gantt-sheet-left-head,
  .staff-gantt-task-left {
    grid-template-columns: 30px minmax(150px, 1fr) 86px 104px;
    padding-inline: 7px;
  }

  .staff-gantt-sheet-left-head > :nth-child(3),
  .staff-gantt-task-left > :nth-child(3) {
    display: none;
  }

  .staff-gantt-project-left {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    min-height: 64px;
    padding: 7px;
  }

  .staff-gantt-project-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 5px;
  }

  .staff-gantt-project-meta input {
    width: 112px;
  }

  .staff-gantt-task-left select,
  .staff-gantt-task-left input {
    min-height: 28px;
    padding: 3px 5px;
    font-size: 10px;
  }

  .staff-gantt-task-left strong {
    font-size: 11px;
  }

  .staff-gantt-sheet-bar {
    grid-template-columns: 18px minmax(0, 1fr);
  }

  .staff-gantt-sheet-bar i {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }

  .staff-gantt-sheet-bar span {
    display: none;
  }

  .staff-gantt-unscheduled {
    left: calc(var(--gantt-left-width, 430px) + 8px);
  }
}

.staff-workflow-project-row {
  grid-column: 1 / -1;
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(280px, 0.5fr) minmax(calc(var(--timeline-days, 7) * var(--timeline-day-width, 132px)), 1.7fr);
  align-items: stretch;
  min-height: var(--workflow-row-height, 168px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  overflow: visible;
}

.staff-workflow-project-row:has(.staff-workflow-action-menu[open]),
.staff-workflow-project-row.menu-open {
  z-index: 90;
}

.staff-workflow-project-cell,
.staff-workflow-calendar-lane {
  min-height: var(--workflow-row-height, 88px);
}

.staff-workflow-project-cell {
  position: sticky;
  left: 0;
  z-index: 12;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 8px 0 20px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

.staff-workflow-project-row.selected .staff-workflow-project-cell {
  box-shadow: inset 4px 0 0 var(--accent), 8px 0 20px rgba(15, 23, 42, 0.04);
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0.96));
}

.staff-workflow-project-row.expanded .staff-workflow-project-cell {
  box-shadow: inset 4px 0 0 #2563eb, 8px 0 20px rgba(15, 23, 42, 0.04);
}

.staff-workflow-project-title {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.staff-workflow-current {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.9));
}

.staff-workflow-current span,
.staff-workflow-issue span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.staff-workflow-current strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.production-task-grid-mini {
  display: grid;
  gap: 7px;
  max-height: 86px;
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(137, 166, 220, 0.24);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.76);
}

.production-task-grid-mini.empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.production-task-grid-mini section {
  display: grid;
  gap: 5px;
}

.production-task-grid-mini h4 {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.production-task-mini {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 7px;
  width: 100%;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: 4px solid #94a3b8;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.production-task-mini span {
  grid-row: span 2;
  align-self: center;
  color: var(--blue);
  font-size: 10px;
  font-weight: 950;
}

.production-task-mini strong,
.production-task-mini em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-task-mini strong {
  font-size: 11px;
  font-weight: 950;
}

.production-task-mini em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
}

.production-task-mini.in-progress,
.staff-workflow-bar.in-progress,
.workflow-task-row.in-progress,
.workflow-compact-row.in-progress {
  border-color: rgba(37, 99, 235, 0.34);
  border-left-color: #2563eb;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.production-task-mini.blocked,
.staff-workflow-bar.blocked,
.workflow-task-row.blocked,
.workflow-compact-row.blocked {
  border-color: rgba(239, 68, 68, 0.34);
  border-left-color: #ef4444;
  background: linear-gradient(145deg, #fff1f2, #ffffff);
}

.production-task-mini.needs-review,
.staff-workflow-bar.needs-review,
.workflow-task-row.needs-review,
.workflow-compact-row.needs-review {
  border-color: rgba(245, 158, 11, 0.38);
  border-left-color: #f59e0b;
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.production-task-mini.done,
.staff-workflow-bar.done,
.workflow-task-row.done,
.workflow-compact-row.done {
  border-color: rgba(22, 163, 74, 0.28);
  border-left-color: #16a34a;
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.production-task-mini.to-do,
.staff-workflow-bar.to-do,
.workflow-task-row.to-do,
.workflow-compact-row.to-do {
  border-left-color: #94a3b8;
}

.staff-workflow-meta,
.staff-workflow-actions {
  position: relative;
  z-index: 16;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.staff-deadline-editor {
  display: grid;
  gap: 3px;
  min-width: 136px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-deadline-editor input {
  min-height: 34px;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.staff-language-filter select {
  min-width: 112px;
}

.staff-workflow-actions .compact {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 11px;
}

.staff-workflow-expand {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  color: #1d4ed8;
}

.staff-workflow-action-menu {
  position: relative;
  z-index: 120;
}

.staff-workflow-action-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(37, 99, 235, 0.32);
  border-radius: 9px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
}

.staff-workflow-action-menu[open] summary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}

.staff-workflow-action-menu summary::-webkit-details-marker {
  display: none;
}

.staff-workflow-action-menu[open] div {
  position: absolute;
  z-index: 200;
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 6px;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #eff6ff);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.22);
}

.staff-workflow-action-menu[open] button {
  width: 100%;
  justify-content: flex-start;
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(255, 255, 255, 0.92);
  color: #1e3a8a;
}

.staff-workflow-action-menu[open] button:hover {
  background: #dbeafe;
}

.workflow-add-task-panel {
  margin-top: 10px;
}

.workflow-add-task-panel summary {
  width: fit-content;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.workflow-add-task-panel .workflow-add-row {
  margin-top: 10px;
}

.staff-workflow-issue {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 13px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.staff-workflow-issue span {
  grid-column: 1 / -1;
  color: #b45309;
}

.staff-workflow-issue strong {
  color: #92400e;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.staff-workflow-issue button {
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  background: #fff;
  color: #b45309;
  font-weight: 950;
  cursor: pointer;
}

.staff-workflow-issue-card {
  display: grid;
  gap: 2px;
  align-content: start;
  min-height: 54px;
  padding: 7px 8px;
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-left: 4px solid #ef4444;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff1f2, #ffffff);
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.12);
}

.staff-workflow-issue-card span {
  color: #b91c1c;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.staff-workflow-issue-card strong {
  color: #7f1d1d;
  font-size: 11px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.staff-workflow-issue-card small {
  color: #991b1b;
  font-size: 9px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.staff-workflow-issue-card button {
  justify-self: start;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 999px;
  background: #fff;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 950;
  cursor: pointer;
}

.workflow-task-context-menu textarea {
  width: 100%;
  min-height: 66px;
  resize: vertical;
}

.workflow-assignment-row {
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.workflow-assignment-row .pill {
  width: fit-content;
}

.staff-workflow-calendar-lane {
  min-width: calc(var(--timeline-days, 7) * var(--timeline-day-width, 132px));
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  max-height: var(--workflow-row-height, 168px);
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.15) 0 1px, transparent 1px var(--timeline-day-width, 132px)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.7));
}

.staff-workflow-timeline-shell.month .staff-workflow-day-head,
.staff-workflow-timeline-shell.quarter .staff-workflow-day-head {
  padding: 7px 5px;
}

.staff-workflow-timeline-shell.month .staff-workflow-day-head strong,
.staff-workflow-timeline-shell.quarter .staff-workflow-day-head strong {
  font-size: 10px;
}

.staff-workflow-timeline-shell.month .staff-workflow-day-head span,
.staff-workflow-timeline-shell.quarter .staff-workflow-day-head span {
  font-size: 9px;
}

.staff-workflow-timeline-shell.quarter .staff-workflow-day-cell {
  gap: 3px;
  padding: 4px;
}

.staff-workflow-timeline-shell.quarter .staff-workflow-bar,
.staff-workflow-timeline-shell.quarter .staff-workflow-delivery-card,
.staff-workflow-timeline-shell.quarter .staff-workflow-deadline-card {
  min-height: 18px;
  padding: 2px 5px;
  border-radius: 8px;
}

.staff-workflow-timeline-shell.quarter .staff-workflow-bar b,
.staff-workflow-timeline-shell.quarter .staff-workflow-bar span,
.staff-workflow-timeline-shell.quarter .staff-workflow-delivery-card,
.staff-workflow-timeline-shell.quarter .staff-workflow-deadline-card {
  font-size: 8px;
}

.staff-workflow-day-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  max-height: var(--workflow-row-height, 168px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  scrollbar-width: thin;
}

.staff-workflow-day-cell::-webkit-scrollbar {
  width: 5px;
}

.staff-workflow-day-cell::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.28);
}

.staff-workflow-day-cell.today {
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.95), rgba(239, 246, 255, 0.58));
}

.staff-workflow-day-cell.staff-calendar-drop-active {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: -4px;
  background-color: rgba(219, 234, 254, 0.35);
}

.staff-workflow-task-phase-row,
.staff-workflow-task-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, 0.5fr) minmax(calc(var(--timeline-days, 7) * var(--timeline-day-width, 132px)), 1.7fr);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.staff-workflow-task-phase-row {
  min-height: 34px;
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.98), rgba(248, 250, 252, 0.84));
}

.staff-workflow-task-phase-label {
  position: sticky;
  left: 0;
  z-index: 11;
  display: flex;
  align-items: center;
  padding: 8px 12px 8px 28px;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.98);
  color: #475569;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.staff-workflow-task-phase-calendar,
.staff-workflow-task-calendar {
  min-width: calc(var(--timeline-days, 7) * var(--timeline-day-width, 132px));
  border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.staff-workflow-task-phase-calendar span {
  min-height: 34px;
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}

.staff-workflow-task-row {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.96);
}

.staff-workflow-task-row.empty {
  min-height: 54px;
}

.staff-workflow-task-sidebar {
  position: sticky;
  left: 0;
  z-index: 11;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 9px;
  align-content: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 12px 8px 28px;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 4px solid var(--staff-accent, #64748b);
  background: linear-gradient(135deg, var(--staff-soft, #f8fafc), #ffffff);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.staff-workflow-task-row.empty .staff-workflow-task-sidebar {
  display: flex;
  align-items: center;
  color: var(--muted);
  cursor: default;
}

.staff-workflow-task-sidebar span {
  grid-row: span 2;
  align-self: center;
  min-width: 34px;
  color: var(--staff-accent, #2563eb);
  font-size: 11px;
  font-weight: 950;
}

.staff-workflow-task-sidebar strong,
.staff-workflow-task-sidebar em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-workflow-task-sidebar strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.staff-workflow-task-sidebar em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}

.staff-workflow-task-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 5px;
  border-right: 1px solid rgba(148, 163, 184, 0.11);
  background: rgba(255, 255, 255, 0.62);
}

.staff-workflow-task-cell.today {
  background: rgba(219, 234, 254, 0.5);
}

.staff-workflow-task-cell.staff-calendar-drop-active {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: -4px;
  background: rgba(219, 234, 254, 0.62);
}

.staff-workflow-task-cell .staff-workflow-bar {
  min-height: 42px;
  padding: 5px 7px;
  border-color: color-mix(in srgb, var(--staff-accent, #2563eb) 40%, #bfdbfe);
  border-left-color: var(--staff-accent, #2563eb);
  background: linear-gradient(135deg, var(--staff-soft, #dbeafe), #ffffff);
  color: var(--staff-ink, #1e3a8a);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.staff-workflow-bar {
  display: grid;
  align-content: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 5px 8px;
  border: 1px solid rgba(96, 165, 250, 0.5);
  border-left: 5px solid #2563eb;
  border-radius: 10px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #0f172a;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14);
  cursor: grab;
  text-align: left;
}

.staff-workflow-task-count {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

.staff-workflow-bar:active {
  cursor: grabbing;
}

.staff-workflow-bar b,
.staff-workflow-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-workflow-person {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.staff-workflow-person em {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-workflow-person small {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-size: 8.5px;
  font-weight: 950;
  white-space: nowrap;
}

.staff-workflow-bar b {
  color: inherit;
  font-size: 10.5px;
  font-weight: 950;
}

.staff-workflow-bar span {
  opacity: 0.88;
  font-size: 9.5px;
  font-weight: 850;
}

.staff-workflow-bar.not-started {
  border-color: rgba(96, 165, 250, 0.5);
  border-left-color: #2563eb;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
}

.staff-workflow-bar.in-progress,
.staff-workflow-bar.working {
  border-color: rgba(99, 102, 241, 0.42);
  border-left-color: #4f46e5;
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #312e81;
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.16);
}

.staff-workflow-bar.blocked {
  border-color: rgba(239, 68, 68, 0.42);
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #7f1d1d;
}

.staff-workflow-bar.needs-review,
.staff-workflow-bar.needs-manager-approval {
  border-color: rgba(245, 158, 11, 0.45);
  border-left-color: #d97706;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #78350f;
}

.staff-workflow-bar.done,
.staff-workflow-bar.approved {
  border-color: rgba(22, 163, 74, 0.34);
  border-left-color: #16a34a;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  color: #14532d;
}

.staff-workflow-bar.unassigned {
  border-style: dashed;
}

.staff-workflow-delivery-card,
.staff-workflow-deadline-card {
  width: 100%;
  min-height: 22px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  text-align: left;
}

.staff-workflow-delivery-card {
  display: grid;
  gap: 1px;
  background: linear-gradient(135deg, #111827, #dc2626);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.22);
}

.staff-workflow-delivery-card b,
.staff-workflow-delivery-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-workflow-deadline-card {
  background: linear-gradient(135deg, #dc2626, #f97316);
  cursor: grab;
  box-shadow: 0 9px 20px rgba(220, 38, 38, 0.18);
}

.production-workspace {
  margin: 0 0 18px;
}

.production-workspace-shell {
  display: grid;
  gap: 14px;
}

.production-view-switcher {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(20, 42, 82, 0.06);
}

.production-view-switcher button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.production-view-switcher button.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.production-staff-view,
.production-owner-view {
  display: grid;
  gap: 16px;
}

.production-sticky-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(190px, 0.48fr) minmax(260px, 1fr) minmax(330px, 0.62fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at right, rgba(16, 163, 127, 0.13), transparent 32%);
  box-shadow: 0 20px 52px rgba(18, 25, 39, 0.1);
  backdrop-filter: blur(18px);
}

.production-sticky-header h2,
.production-current-hero h2,
.production-owner-header h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 0.95;
  letter-spacing: 0;
}

.production-sticky-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.production-header-current {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(137, 166, 220, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.production-header-current span,
.production-header-current em,
.production-current-hero p,
.production-owner-header p {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.production-header-current strong {
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-clock-card {
  display: grid;
  gap: 6px;
  justify-items: stretch;
  padding: 12px;
  border: 1px solid #e8eef7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.production-clock-card.active {
  border-color: rgba(16, 163, 127, 0.36);
  background: linear-gradient(135deg, #101827, #273552);
  color: #fff;
  box-shadow: 0 18px 44px rgba(16, 24, 39, 0.2);
}

.production-clock-card span,
.production-clock-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.production-clock-card.active span,
.production-clock-card.active small {
  color: rgba(255, 255, 255, 0.7);
}

.production-clock-card strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.production-clock-card.active strong {
  color: #fff;
}

.production-clock-card button {
  min-height: 42px;
  border: 0;
  border-radius: 16px;
  font-weight: 950;
  cursor: pointer;
}

.production-clock-card button.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.production-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.32fr);
  gap: 16px;
  align-items: start;
}

.production-side-rail {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 132px;
}

.production-rail-card,
.production-current-card,
.production-owner-card,
.production-owner-project {
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 20px 54px rgba(20, 42, 82, 0.08);
}

.production-rail-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.production-rail-card h3 {
  margin: 0;
  font-size: 17px;
}

.production-rail-card div {
  display: grid;
  gap: 8px;
}

.production-rail-card button {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(137, 166, 220, 0.26);
  border-radius: 15px;
  background: rgba(248, 250, 252, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.production-rail-card button.active {
  border-color: rgba(37, 99, 235, 0.45);
  background: #eff6ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.production-rail-card button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.production-current-card {
  display: grid;
  gap: 18px;
  padding: clamp(16px, 2.5vw, 26px);
  background:
    radial-gradient(circle at 82% 10%, rgba(16, 163, 127, 0.14), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.9));
}

.production-current-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.production-current-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.production-current-meta span,
.production-next-deadline,
.production-blocker-strip span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(137, 166, 220, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 950;
}

.production-current-meta b,
.production-next-deadline span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.production-progress-wide {
  position: relative;
  overflow: hidden;
  height: 18px;
  border-radius: 999px;
  background: #e2e8f0;
}

.production-progress-wide span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #14b8a6);
}

.production-progress-wide b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #0f172a;
  font-size: 11px;
  font-weight: 950;
}

.production-next-deadline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: #fff7ed;
  border-color: rgba(249, 115, 22, 0.28);
}

.production-next-deadline span {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  background: transparent;
}

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

.production-blocker-strip span {
  display: inline-flex;
  background: #fef2f2;
  color: #991b1b;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title-row h3 {
  margin: 0;
  font-size: 20px;
}

.section-title-row > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.production-step-timeline {
  display: grid;
  gap: 10px;
}

.production-step-timeline button {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 68px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e8eef7;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.production-step-timeline button.active {
  border-color: rgba(37, 99, 235, 0.52);
  background: linear-gradient(145deg, #eff6ff, #fff);
  box-shadow: inset 5px 0 0 var(--blue), 0 12px 28px rgba(37, 99, 235, 0.11);
}

.production-step-timeline i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--blue);
  color: #fff;
  font-style: normal;
  font-weight: 950;
}

.production-step-timeline em,
.production-version-row p {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.production-step-timeline button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.production-step-timeline button > span strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-step-timeline button > b {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.production-step-timeline button.active > b {
  background: #dcfce7;
  color: #166534;
}

.production-version-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.25fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
}

.production-version-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.production-version-row select,
.production-checkin-card textarea {
  border-radius: 16px;
}

.production-mini-deadlines > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.production-mini-deadlines article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(137, 166, 220, 0.28);
  border-radius: 16px;
  background: #fff;
}

.production-mini-deadlines article.overdue {
  border-color: rgba(239, 68, 68, 0.34);
  background: #fef2f2;
}

.production-mini-deadlines article.soon,
.production-mini-deadlines article.today {
  border-color: rgba(245, 158, 11, 0.34);
  background: #fffbeb;
}

.production-mini-deadlines span,
.production-mini-deadlines b {
  color: var(--muted);
  font-size: 12px;
}

.production-ai-card,
.production-checkin-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 20px;
  background: linear-gradient(145deg, #eff6ff, rgba(255, 255, 255, 0.9));
}

.production-ai-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.production-ai-card h3 {
  margin: 0 0 5px;
}

.production-ai-card p,
.production-ai-card small {
  color: var(--muted);
  font-weight: 850;
}

.production-ai-card > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.production-issue-chips button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 950;
  cursor: pointer;
}

.production-issue-chips button.active {
  background: var(--blue);
  color: #fff;
}

.production-activity-feed > div {
  display: grid;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.production-activity-feed article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(137, 166, 220, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.production-activity-feed i {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.production-activity-feed span,
.owner-activity-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.production-owner-header,
.production-owner-card {
  padding: 16px;
}

.production-owner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.36fr);
  gap: 16px;
  align-items: start;
}

.production-owner-main,
.production-owner-side {
  display: grid;
  gap: 12px;
}

.production-owner-project {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.production-owner-project > div:first-child {
  display: grid;
  gap: 4px;
}

.production-owner-project > div:first-child strong {
  font-size: 19px;
}

.production-owner-project > div:first-child span,
.owner-project-meta span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.owner-project-bar {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.owner-project-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #14b8a6);
}

.owner-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.owner-project-meta b,
.owner-project-meta em {
  padding: 5px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  font-style: normal;
  font-weight: 950;
}

.owner-project-meta em {
  background: #fee2e2;
  color: #b91c1c;
}

.production-owner-card {
  display: grid;
  gap: 10px;
}

.production-owner-card h3 {
  margin: 0;
}

.production-active-worker,
.production-workload-row,
.owner-activity-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(137, 166, 220, 0.24);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.75);
}

.production-workload-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
}

.production-command-center {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.72)),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 34%);
  box-shadow: 0 24px 70px rgba(20, 42, 82, 0.1);
}

.production-command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.production-command-hero h3 {
  margin: 0;
  font-size: 26px;
}

.production-command-hero p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.production-command-stats,
.production-now-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.production-command-stats button,
.production-now-card {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(137, 166, 220, 0.32);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.production-command-stats strong {
  color: var(--blue);
  font-size: 27px;
  line-height: 1;
}

.production-command-stats span,
.production-now-card span,
.production-now-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.production-now-card {
  border-color: color-mix(in srgb, var(--staff-accent, #2563eb) 28%, transparent);
  border-left: 5px solid var(--staff-accent, #2563eb);
  background: linear-gradient(145deg, var(--staff-soft, #eff6ff), rgba(255, 255, 255, 0.92));
}

.production-now-card strong,
.production-task-main strong,
.production-task-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-now-card b,
.production-project-deadline small,
.production-simple-task small {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 950;
}

.production-now-card b.overdue,
.production-project-deadline small.overdue,
.production-simple-task small.overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.production-now-card b.soon,
.production-project-deadline small.soon,
.production-simple-task small.soon,
.production-simple-task small.today {
  background: #fef3c7;
  color: #92400e;
}

.production-project-list {
  display: grid;
  gap: 14px;
}

.production-project-card {
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.production-project-card.selected {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: inset 4px 0 0 var(--blue);
}

.production-project-summary {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 0.6fr) minmax(180px, 0.45fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.production-project-title {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.production-project-title span,
.production-project-deadline label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-project-title strong {
  overflow: hidden;
  font-size: 19px;
  line-height: 1.12;
  text-overflow: ellipsis;
}

.production-project-title em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-project-progress,
.production-project-deadline,
.production-project-actions,
.production-project-people {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.production-progress-ring {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 56%, transparent 58%),
    conic-gradient(var(--blue) var(--progress, 0%), #e2e8f0 0);
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.production-project-deadline label {
  flex-basis: 100%;
}

.production-project-deadline input {
  min-height: 38px;
  max-width: 150px;
  border-radius: 12px;
  font-weight: 900;
}

.production-mini-timeline {
  display: grid;
  grid-template-columns: repeat(var(--timeline-days, 7), minmax(88px, 1fr));
  overflow-x: auto;
  border-top: 1px solid rgba(137, 166, 220, 0.22);
  border-bottom: 1px solid rgba(137, 166, 220, 0.22);
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.62), rgba(255, 255, 255, 0.62));
}

.production-mini-day {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 78px;
  padding: 8px;
  border-right: 1px solid rgba(137, 166, 220, 0.18);
}

.production-mini-day.today {
  background: rgba(37, 99, 235, 0.08);
}

.production-mini-day.final {
  background: rgba(239, 68, 68, 0.08);
}

.production-mini-day > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
}

.production-mini-day > b {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #991b1b;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.production-mini-day > em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.production-mini-task {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 78px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--staff-accent, #2563eb) 25%, transparent);
  border-radius: 999px;
  background: var(--staff-soft, #dbeafe);
  color: var(--staff-ink, #1d4ed8);
  cursor: pointer;
}

.production-mini-task i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--staff-accent, #2563eb);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 950;
}

.production-mini-task strong {
  font-size: 10px;
}

.production-task-drawer {
  padding: 0 14px 14px;
}

.production-task-drawer summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  color: var(--blue);
  font-weight: 950;
  cursor: pointer;
}

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

.production-simple-task-list {
  display: grid;
  gap: 8px;
}

.production-simple-task {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) minmax(150px, 0.55fr) minmax(140px, 0.42fr) minmax(140px, 0.42fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--staff-accent, #2563eb) 22%, rgba(137, 166, 220, 0.22));
  border-left: 5px solid var(--staff-accent, #2563eb);
  border-radius: 15px;
  background: #fff;
}

.production-task-index {
  display: grid;
  place-items: center;
  min-height: 36px;
  border: 0;
  border-radius: 12px;
  background: var(--staff-soft, #dbeafe);
  color: var(--staff-ink, #1d4ed8);
  font-weight: 950;
  cursor: pointer;
}

.production-task-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.production-task-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.production-simple-task select,
.production-simple-task input {
  min-height: 38px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 850;
}

.staff-production-task-board {
  display: grid;
  gap: 14px;
  padding: 16px 18px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top left, rgba(219, 234, 254, 0.7), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
}

.staff-production-task-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.staff-production-task-board-head h3 {
  margin: 2px 0;
  font-size: 20px;
}

.staff-production-task-board-head p,
.staff-production-task-board-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.staff-task-project-block {
  overflow: hidden;
  border: 1px solid rgba(137, 166, 220, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.staff-task-project-block.selected {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.12);
}

.staff-task-project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.94));
}

.staff-task-project-head button:first-child {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
}

.staff-task-project-head > div {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.staff-task-table {
  display: grid;
}

.staff-task-table-header,
.staff-task-table-row {
  display: grid;
  grid-template-columns: minmax(230px, 1.35fr) minmax(150px, 0.8fr) minmax(130px, 0.68fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr);
  gap: 10px;
  align-items: center;
}

.staff-task-table-header {
  padding: 10px 16px;
  background: rgba(248, 250, 252, 0.94);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-task-phase {
  display: grid;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.staff-task-phase h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 16px;
  background: rgba(239, 246, 255, 0.72);
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.staff-task-phase h4 b {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  text-align: center;
}

.staff-task-table-row {
  min-height: 72px;
  padding: 10px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-left: 4px solid var(--staff-accent, #64748b);
  background: linear-gradient(135deg, color-mix(in srgb, var(--staff-soft, #e2e8f0) 54%, white), rgba(255, 255, 255, 0.96));
}

.staff-task-table-row:active {
  cursor: grabbing;
}

.staff-task-name {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.staff-task-name small {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
}

.staff-task-name strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-task-name em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-task-assignee,
.staff-task-status,
.staff-task-due {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.staff-task-assignee select,
.staff-task-status select,
.staff-task-due input {
  width: 100%;
  min-height: 34px;
  border-radius: 10px;
  font-size: 12px;
}

.staff-task-mini-timeline {
  position: relative;
  overflow: hidden;
  height: 28px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
}

.staff-task-mini-timeline span {
  position: absolute;
  inset: 5px auto 5px 5px;
  width: var(--task-bar-width, 18%);
  min-width: 22px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--staff-accent, #2563eb), #14b8a6);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--staff-accent, #2563eb) 20%, transparent);
}

.staff-calendar-task {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--staff-accent, #64748b) 32%, white);
  border-left: 5px solid var(--staff-accent, #64748b);
  border-radius: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--staff-soft, #e2e8f0) 78%, white), rgba(255, 255, 255, 0.96));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--staff-accent, #64748b) 12%, transparent);
}

.staff-calendar-task.selected {
  outline: 2px solid color-mix(in srgb, var(--staff-accent, #64748b) 42%, white);
  outline-offset: 2px;
}

.staff-calendar-task-main {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.staff-calendar-task-main strong,
.staff-calendar-task-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-calendar-task-main strong {
  font-weight: 950;
}

.staff-calendar-task-main span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.staff-calendar-task label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.staff-calendar-task select,
.staff-calendar-task input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.workflow-task-context-menu {
  position: fixed;
  z-index: 100000;
  display: grid;
  gap: 10px;
  width: min(300px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid rgba(137, 166, 220, 0.38);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.workflow-task-context-menu strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.workflow-task-context-menu label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.workflow-task-context-menu select,
.workflow-task-context-menu input {
  min-height: 36px;
  border-radius: 10px;
  font-size: 12px;
}

.staff-gantt-shell {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
}

.staff-gantt-board {
  min-width: 1100px;
  display: grid;
  grid-template-columns: minmax(470px, 0.95fr) minmax(720px, 1.55fr);
  align-items: stretch;
}

.staff-gantt-board.week {
  min-width: 1280px;
  grid-template-columns: minmax(470px, 0.8fr) minmax(860px, 1.7fr);
}

.staff-gantt-drop-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  margin: 14px 18px 18px;
  padding: 24px;
  border: 2px dashed rgba(37, 99, 235, 0.28);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.8), rgba(255, 255, 255, 0.94));
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.staff-gantt-drop-zone strong {
  color: var(--ink);
  font-size: 18px;
}

.staff-gantt-drop-zone.gantt-drop-active,
.staff-gantt-board.gantt-drop-active {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: -3px;
  background-color: rgba(219, 234, 254, 0.42);
}

.staff-gantt-table-head,
.staff-gantt-timeline-head {
  min-height: 58px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.96));
}

.staff-gantt-table-head {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(110px, 0.7fr) minmax(120px, 0.8fr) minmax(110px, 0.65fr);
  gap: 10px;
  align-items: end;
  padding: 14px 16px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.staff-gantt-timeline-head {
  position: relative;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.18) 0 1px, transparent 1px calc(100% / 12)),
    linear-gradient(180deg, #ffffff, rgba(248, 250, 252, 0.96));
}

.staff-gantt-date-marker {
  position: absolute;
  bottom: 11px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.staff-gantt-group-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(239, 246, 255, 0.86);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.staff-gantt-group-header b {
  min-width: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--blue);
  text-align: center;
}

.staff-gantt-group-header.overdue {
  background: #fff1f2;
  color: #b91c1c;
}

.staff-gantt-group-header.due-soon {
  background: #fffbeb;
  color: #b45309;
}

.staff-gantt-group-header.completed {
  background: #ecfdf5;
  color: #047857;
}

.staff-gantt-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) minmax(110px, 0.7fr) minmax(120px, 0.8fr) minmax(110px, 0.65fr);
  gap: 10px;
  min-height: 74px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.88);
}

.staff-gantt-table-row.overdue {
  background: linear-gradient(90deg, rgba(254, 226, 226, 0.76), rgba(255, 255, 255, 0.92));
}

.staff-gantt-table-row.due-soon {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.78), rgba(255, 255, 255, 0.92));
}

.staff-gantt-table-row.completed {
  background: linear-gradient(90deg, rgba(209, 250, 229, 0.7), rgba(255, 255, 255, 0.92));
}

.staff-gantt-table-row.selected {
  box-shadow: inset 4px 0 0 var(--accent);
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.88), rgba(255, 255, 255, 0.95));
}

.staff-gantt-table-row.staff-task-row.not-started {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.92));
}

.staff-gantt-table-row.staff-task-row.working {
  background: linear-gradient(90deg, rgba(219, 234, 254, 0.82), rgba(255, 255, 255, 0.92));
}

.staff-gantt-table-row.staff-task-row.needs-manager-approval {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.86), rgba(255, 255, 255, 0.92));
}

.staff-gantt-task-cell,
.staff-gantt-status-cell,
.staff-gantt-staff-cell,
.staff-gantt-deadline-cell {
  min-width: 0;
  align-self: center;
}

.staff-gantt-task-cell {
  display: grid;
  gap: 4px;
}

.staff-gantt-task-cell button {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.staff-gantt-task-cell small,
.staff-gantt-staff-cell,
.staff-gantt-deadline-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.staff-gantt-deadline-cell {
  display: grid;
  gap: 5px;
}

.deadline-countdown {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 950;
}

.deadline-countdown.overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.deadline-countdown.today,
.deadline-countdown.soon {
  background: #fef3c7;
  color: #b45309;
}

.deadline-countdown.ok {
  background: #dcfce7;
  color: #166534;
}

.staff-gantt-remove {
  justify-self: start;
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 8px;
  border: 0;
  background: rgba(254, 226, 226, 0.72);
  color: #dc2626;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.staff-gantt-workflow {
  justify-self: start;
  width: fit-content;
  padding: 5px 9px !important;
  border: 1px solid rgba(37, 99, 235, 0.22) !important;
  border-radius: 999px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-size: 11px !important;
}

.staff-gantt-workflow.active {
  background: var(--blue) !important;
  color: #fff !important;
}

.staff-gantt-status-cell select,
.staff-gantt-staff-cell select,
.staff-gantt-deadline-cell input {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
  font-size: 12px;
}

.staff-gantt-timeline-row {
  position: relative;
  min-height: 74px;
  overflow: hidden;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.2) 0 1px, transparent 1px calc(100% / 12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.72));
}

.staff-gantt-bar {
  position: absolute;
  top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 30px;
  min-width: 58px;
  padding: 0 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.staff-gantt-bar.overdue {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.staff-gantt-bar.due-soon {
  background: linear-gradient(135deg, #f59e0b, #22c55e);
}

.staff-gantt-bar.completed {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.staff-gantt-bar.not-started {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.staff-gantt-bar.working {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.staff-gantt-bar.needs-manager-approval {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.staff-gantt-bar.done,
.staff-gantt-bar.approved {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.staff-gantt-bar.production {
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.staff-gantt-bar.editing,
.staff-gantt-bar.review {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.staff-gantt-bar.delivery {
  background: linear-gradient(135deg, #0f766e, #06b6d4);
}

.staff-gantt-bar b,
.staff-gantt-bar em {
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.staff-gantt-bar em {
  opacity: 0.88;
}

.staff-gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 2px;
  background: rgba(37, 99, 235, 0.75);
  pointer-events: none;
}

.staff-gantt-today-line.head {
  bottom: auto;
  height: 58px;
}

.staff-gantt-today-line b {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.staff-project-list,
.staff-update-feed,
.staff-salary-list,
.staff-assignment-list {
  display: grid;
  gap: 12px;
}

.staff-workflow-planner {
  display: grid;
  gap: 12px;
  margin: 12px 18px 18px;
  padding: 14px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.72));
}

.staff-workflow-planner-collapsed summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.staff-workflow-planner-collapsed summary::-webkit-details-marker {
  display: none;
}

.staff-workflow-planner-collapsed summary span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.staff-workflow-planner-collapsed summary small {
  color: var(--muted);
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-workflow-planner-collapsed[open] {
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.72));
}

.staff-workflow-task-list {
  max-height: 440px;
  overflow: auto;
}

.staff-current-work-panel {
  display: grid;
  gap: 12px;
  margin: 14px 18px;
  padding: 16px;
  border: 1px solid rgba(137, 166, 220, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 253, 245, 0.66)),
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.08), transparent 14rem);
}

.staff-current-work-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.staff-current-work-head h3 {
  margin: 2px 0 0;
}

.staff-current-work-head > span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.staff-current-work-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.staff-current-work-card {
  display: grid;
  grid-template-columns: minmax(86px, 0.62fr) minmax(130px, 1.2fr);
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--staff-accent, #64748b) 32%, white);
  border-left: 5px solid var(--staff-accent, #64748b);
  border-radius: 14px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--staff-soft, #e2e8f0) 72%, white), rgba(255, 255, 255, 0.94));
}

.staff-current-work-card.working {
  border-left-color: var(--blue);
}

.staff-current-work-card.needs-manager-approval {
  border-left-color: #f59e0b;
}

.staff-current-work-card.done,
.staff-current-work-card.approved {
  border-left-color: #16a34a;
}

.staff-current-work-card strong,
.staff-current-work-card span,
.staff-current-work-card small,
.staff-current-work-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-current-work-card strong {
  min-width: 0;
}

.staff-current-work-card span {
  color: var(--staff-ink, var(--blue));
  font-weight: 950;
}

.staff-current-work-card small {
  color: var(--muted);
  font-weight: 850;
}

.staff-current-work-card em {
  color: #475569;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.staff-workflow-planner-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.staff-workflow-planner-head h3 {
  margin: 0;
}

.workflow-calendar-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.workflow-date-column {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 94px;
  padding: 10px;
  border: 1px dashed rgba(37, 99, 235, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.workflow-date-column.workflow-drop-active {
  border-color: var(--accent);
  background: rgba(219, 234, 254, 0.92);
}

.workflow-date-column strong {
  color: var(--ink);
  font-size: 12px;
}

.workflow-date-column span {
  padding: 6px 8px;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  cursor: grab;
}

.workflow-compact-list {
  display: grid;
  gap: 9px;
  padding-right: 4px;
}

.workflow-compact-row {
  display: grid;
  grid-template-columns: 34px minmax(220px, 1.4fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(137, 166, 220, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  cursor: grab;
}

.workflow-compact-row.workflow-drop-active {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.workflow-compact-row.working {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.workflow-compact-row.needs-manager-approval {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.workflow-compact-row.done,
.workflow-compact-row.approved {
  border-color: rgba(22, 163, 74, 0.28);
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.workflow-compact-row label,
.workflow-add-row {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.workflow-compact-row input,
.workflow-compact-row select,
.workflow-add-row input {
  min-height: 36px;
  border-radius: 10px;
  font-size: 12px;
}

.workflow-working-button {
  min-width: 132px;
  align-self: end;
  white-space: nowrap;
}

.workflow-add-row {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.3fr) auto;
  align-items: end;
}

.workflow-deadline-tools {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 10px 0;
}

.workflow-assignment-tools {
  display: grid;
  grid-template-columns: minmax(220px, 0.4fr) auto;
  gap: 10px;
  align-items: end;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.85), rgba(255, 255, 255, 0.9));
}

.workflow-deadline-tools label,
.workflow-assignment-tools label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.workflow-deadline-tools input,
.workflow-assignment-tools select {
  min-height: 42px;
  border-radius: 12px;
}

.staff-gantt-deadline-spotlight {
  display: grid;
  grid-template-columns: auto minmax(160px, 0.45fr) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 12px 18px;
  padding: 14px 16px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.staff-gantt-deadline-spotlight span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.staff-gantt-deadline-spotlight strong {
  color: var(--accent);
  font-size: clamp(22px, 3vw, 34px);
}

.staff-gantt-deadline-spotlight em {
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
}

.staff-gantt-deadline-spotlight.overdue {
  border-color: rgba(220, 38, 38, 0.24);
  background: linear-gradient(145deg, #fff1f2, #ffffff);
}

.staff-gantt-deadline-spotlight.today,
.staff-gantt-deadline-spotlight.soon {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.staff-gantt-deadline-spotlight.ok {
  border-color: rgba(22, 163, 74, 0.24);
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.staff-next-deadline {
  grid-column: span 2;
  border-color: rgba(37, 99, 235, 0.22);
}

.staff-next-deadline strong {
  font-size: clamp(24px, 4vw, 44px);
  color: var(--accent);
}

.staff-next-deadline.overdue {
  background: linear-gradient(145deg, #fff1f2, #ffffff);
}

.staff-next-deadline.today,
.staff-next-deadline.soon {
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.staff-next-deadline.ok {
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.staff-pay-current,
.staff-pay-history {
  display: grid;
  gap: 12px;
}

.staff-pay-current > h3,
.staff-pay-history > h3,
.staff-pay-history-month > h3 {
  margin: 0;
  color: var(--ink);
}

.staff-pay-history {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.staff-collapsible-panel > summary,
.staff-pay-current summary,
.staff-pay-history summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.staff-collapsible-panel > summary small,
.staff-pay-current summary small,
.staff-pay-history summary small {
  color: var(--muted);
  font-size: 12px;
}

.staff-collapsible-panel[open],
.staff-pay-current[open],
.staff-pay-history[open] {
  gap: 12px;
}

.staff-pay-history-selector {
  display: grid;
  gap: 6px;
  max-width: 260px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.staff-pay-history-grid {
  display: grid;
  gap: 10px;
}

.staff-project-card,
.staff-salary-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(137, 166, 220, 0.42);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.78));
  box-shadow: 0 16px 36px rgba(20, 42, 82, 0.07);
}

.staff-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.staff-workflow-preview {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 13px;
  background: rgba(239, 246, 255, 0.74);
}

.staff-workflow-preview span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-workflow-preview strong {
  color: var(--ink);
  font-size: 13px;
}

.workflow-modal {
  max-width: 980px;
}

.workflow-task-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.workflow-version-tools {
  margin: 12px 0;
}

.workflow-version-tools summary {
  width: fit-content;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.workflow-version-tools div {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(137, 166, 220, 0.24);
  border-radius: 14px;
  background: #f8fafc;
}

.workflow-version-tools button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.workflow-version-tools button span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.workflow-task-row {
  display: grid;
  grid-template-columns: 36px minmax(220px, 1.4fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.workflow-task-row.working {
  border-color: rgba(37, 99, 235, 0.34);
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.workflow-task-row.needs-manager-approval {
  border-color: rgba(245, 158, 11, 0.38);
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.workflow-task-row.done,
.workflow-task-row.approved {
  border-color: rgba(22, 163, 74, 0.28);
  background: linear-gradient(145deg, #ecfdf5, #ffffff);
}

.workflow-task-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 950;
}

.workflow-task-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.workflow-task-row input,
.workflow-task-row select {
  min-height: 38px;
  border-radius: 10px;
  font-size: 13px;
}

.workflow-task-title input {
  font-weight: 900;
}

.staff-project-card.overdue {
  border-color: rgba(239, 68, 68, 0.34);
  background: linear-gradient(145deg, #fff1f2, #ffffff);
}

.staff-project-card.due-soon {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.staff-project-card.completed {
  border-color: rgba(22, 163, 74, 0.3);
  background: linear-gradient(145deg, #ecfdf3, #ffffff);
}

.staff-assignment-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
}

.staff-assignment-row label,
.staff-salary-card label,
.staff-pay-history-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.staff-feed-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.staff-feed-title h2 {
  margin: 0;
}

.staff-feed-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 750;
}

.staff-update-form {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(137, 166, 220, 0.3);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(96, 165, 250, 0.16), transparent 12rem),
    #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.staff-composer-body,
.staff-composer-message {
  display: grid;
  gap: 10px;
}

.staff-composer-message span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.staff-composer-message textarea {
  min-height: 84px;
  resize: vertical;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.95);
  font-size: 15px;
  line-height: 1.45;
}

.staff-update-type-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.staff-update-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-update-type-chips button {
  padding: 8px 11px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 999px;
  background: #f8fbff;
  color: #40516f;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.staff-update-type-chips button.active {
  border-color: rgba(37, 99, 235, 0.48);
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.staff-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-save-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.staff-save-status.error {
  color: #b91c1c;
}

.staff-feed-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.78)),
    #fff;
}

.staff-update-feed {
  max-height: clamp(360px, 48vh, 620px);
  margin-top: 14px;
  padding: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(137, 166, 220, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(239, 246, 255, 0.82)),
    #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, 0.45) rgba(226, 232, 240, 0.7);
}

.staff-update-feed::-webkit-scrollbar {
  width: 10px;
}

.staff-update-feed::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.72);
  border-radius: 999px;
}

.staff-update-feed::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.62), rgba(20, 184, 166, 0.56));
  border: 2px solid rgba(248, 251, 255, 0.95);
  border-radius: 999px;
}

.staff-feed-day {
  display: grid;
  gap: 12px;
}

.staff-feed-day h3 {
  position: sticky;
  top: -12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px -2px 0;
  padding: 10px 4px 8px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(248, 251, 255, 0.9));
  backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-feed-day h3 em {
  color: #64748b;
  font-style: normal;
  text-transform: none;
}

.staff-feed-avatar,
.staff-comment-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--staff-soft, #dbeafe);
  color: var(--staff-ink, #1e3a8a);
  font-size: 13px;
  font-weight: 1000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.staff-update-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(137, 166, 220, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.staff-feed-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.staff-feed-card-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.staff-feed-card-head small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.staff-feed-type {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 1000;
}

.staff-feed-message {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.48;
  white-space: pre-wrap;
}

.staff-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.staff-chat-form textarea {
  min-height: 74px;
  resize: vertical;
}

.staff-chat-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  margin-top: 14px;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(137, 166, 220, 0.28);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 12rem),
    #f8fbff;
}

.staff-chat-bubble {
  align-self: flex-start;
  max-width: min(92%, 520px);
  padding: 10px 12px;
  border-radius: 16px 16px 16px 5px;
  background: #ffffff;
  border: 1px solid rgba(137, 166, 220, 0.24);
  box-shadow: 0 8px 20px rgba(20, 42, 82, 0.06);
}

.staff-chat-bubble.mine {
  align-self: flex-end;
  border-color: rgba(37, 99, 235, 0.22);
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #fff;
}

.staff-chat-bubble div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.staff-chat-bubble strong {
  font-size: 12px;
}

.staff-chat-bubble small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.staff-chat-bubble.mine small {
  color: rgba(255, 255, 255, 0.78);
}

.staff-chat-bubble.mine .staff-social-actions button,
.staff-chat-bubble.mine .staff-comment-form button {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.staff-chat-bubble.mine .staff-social-actions span {
  color: rgba(255, 255, 255, 0.8);
}

.staff-chat-bubble.mine .staff-comments p,
.staff-chat-bubble.mine .staff-comment-form input {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.staff-chat-bubble p {
  margin: 5px 0 0;
  font-weight: 750;
  line-height: 1.35;
  white-space: pre-wrap;
}

.staff-mention {
  display: inline-flex;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 950;
}

.staff-social-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.staff-social-actions button {
  padding: 7px 11px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
}

.staff-social-actions span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.staff-social-actions button.liked {
  border-color: rgba(37, 99, 235, 0.32);
  background: #eff6ff;
  color: var(--blue);
}

.staff-comments {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.staff-comment {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.staff-comment-avatar {
  width: 30px;
  height: 30px;
  font-size: 10px;
}

.staff-comments p,
.staff-comment-form input {
  margin: 0;
  padding: 8px 11px;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.72);
  color: var(--ink);
  font-size: 12px;
  white-space: normal;
}

.staff-comments p strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
}

.staff-comment-form {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.staff-comment-form input {
  width: 100%;
  border: 1px solid rgba(191, 219, 254, 0.86);
  outline: none;
}

.staff-comment-form input:focus {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.staff-comment-form button {
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 1000;
  cursor: pointer;
}

.staff-update-card.leave-request,
.staff-update-card.question,
.staff-update-card.project-blocker {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(145deg, #fffbeb, #ffffff);
}

.staff-update-card.manager-note {
  border-color: rgba(37, 99, 235, 0.28);
  border-left: 4px solid var(--blue);
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.staff-update-card.not-working-today {
  border-color: rgba(148, 163, 184, 0.34);
  background: linear-gradient(145deg, #f8fafc, #ffffff);
}

.staff-salary-card {
  grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(120px, 0.75fr)) auto;
  align-items: end;
}

.staff-pay-history-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) repeat(3, minmax(120px, 0.8fr)) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.staff-pay-history-row small,
.staff-salary-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 850;
}

.staff-pay-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-pay-pill {
  display: grid;
  gap: 2px;
  min-width: 98px;
  padding: 8px 10px;
  border-radius: 13px;
  font-weight: 950;
}

.link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.link-button:hover,
.link-button:focus-visible {
  color: var(--brand);
  text-decoration: underline;
}

.staff-pay-pill small {
  margin: 0;
  color: inherit;
  font-size: 10px;
  opacity: 0.82;
  text-transform: uppercase;
}

.staff-pay-pill strong {
  font-size: 15px;
}

.staff-pay-pill.base {
  background: #dbeafe;
  color: #1d4ed8;
}

.staff-pay-pill.bonus {
  background: #dcfce7;
  color: #15803d;
}

.staff-pay-pill.expense {
  background: #fef3c7;
  color: #b45309;
}

.staff-salary-total {
  color: var(--accent);
  font-size: 22px;
}

.staff-chip {
  background: #ecfdf3;
  color: #166534;
  border-color: rgba(22, 163, 74, 0.24);
}

.crew-calendar-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.crew-calendar-weekdays,
.crew-calendar-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.crew-calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.crew-calendar-cell {
  min-height: 96px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.crew-calendar-cell.today {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.crew-calendar-cell.crew-unavailable {
  border-color: rgba(220, 38, 38, 0.58);
  background:
    linear-gradient(145deg, rgba(255, 241, 242, 0.96), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(-45deg, rgba(248, 113, 113, 0.08) 0 8px, transparent 8px 16px);
  box-shadow: inset 0 0 0 2px rgba(248, 113, 113, 0.14);
}

.crew-calendar-cell strong {
  display: block;
  min-height: 18px;
  color: var(--ink);
}

.crew-calendar-cell strong em {
  color: var(--blue);
  font-style: normal;
}

.crew-calendar-cell span {
  display: block;
  margin-top: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.crew-calendar-month.quarter .crew-calendar-cell {
  min-height: 82px;
}

.crew-calendar-month.year .crew-calendar-cell {
  min-height: 68px;
  padding: 7px;
}

.crew-calendar-month.year .crew-calendar-cell span {
  font-size: 9px;
  padding: 4px 5px;
}

.crew-calendar-cell .crew-unavailable-pill {
  border: 1px solid rgba(220, 38, 38, 0.24);
  background: #fee2e2;
  color: #991b1b;
  font-weight: 950;
}

.contact-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.contact-list.list-view {
  grid-template-columns: 1fr;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 5px solid #2563eb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
}

.contact-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.contact-main:hover h3 {
  color: var(--accent);
}

.contact-card.contact-client {
  border-left-color: #16a34a;
  background:
    linear-gradient(135deg, rgba(240, 253, 244, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 10rem);
}

.contact-card.contact-prospect {
  border-left-color: #2563eb;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 10rem);
}

.contact-card.contact-lost {
  border-left-color: #b42318;
  background:
    linear-gradient(135deg, rgba(255, 241, 242, 0.96), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at top right, rgba(180, 35, 24, 0.14), transparent 10rem);
}

.contact-status-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-client .contact-status-badge {
  background: #dcfce7;
  color: #166534;
}

.contact-lost .contact-status-badge {
  background: #fee2e2;
  color: #991b1b;
}

.contact-list.list-view .contact-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  min-height: 72px;
}

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

.contact-layout-toggle {
  display: flex;
  gap: 8px;
}

.contact-card h3 {
  margin: 4px 0;
  font-size: 20px;
}

.contact-history-section {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
}

.contact-history-section + .contact-history-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.project-card {
  display: grid;
  gap: 14px;
  --payment-soft: rgba(37, 99, 235, 0.14);
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    radial-gradient(circle at top right, var(--payment-soft), transparent 15rem);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  min-width: 0;
}

.project-card[data-project-open] {
  cursor: pointer;
}

.project-card[data-project-open]:hover,
.project-card[data-project-open]:focus-visible {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 22px 56px rgba(37, 99, 235, 0.16);
  outline: none;
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.project-card-top > div:first-child {
  min-width: 0;
}

.project-card-badges {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  max-width: 122px;
}

.project-card h3 {
  margin-top: 4px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.project-card .payment-pill {
  justify-content: center;
  max-width: 122px;
  white-space: normal;
  text-align: center;
  line-height: 1.1;
}

.linked-lead-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #eff6ff, #ffffff),
    radial-gradient(circle at right top, rgba(37, 99, 235, 0.14), transparent 8rem);
}

.linked-lead-panel strong,
.linked-lead-panel small {
  display: block;
}

.linked-lead-panel small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.project-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.project-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  gap: 8px;
}

.project-facts span {
  min-height: 58px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-facts strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

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

.project-date-filters,
.project-stage-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.project-date-filters {
  padding-bottom: 2px;
}

.project-date-filters button,
.project-stage-filters button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.project-date-filters button.active,
.project-stage-filters button.active {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-color: rgba(15, 23, 42, 0.9);
  color: #fff;
}

.project-date-filters strong,
.project-stage-filters strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 12px;
}

.project-date-filters button.active strong,
.project-stage-filters button.active strong {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.calendar-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.86));
  box-shadow: var(--shadow-soft);
}

.calendar-toolbar h3 {
  text-align: center;
  font-size: 20px;
}

.calendar-nav,
.calendar-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-modes {
  justify-content: flex-end;
}

.calendar-mode {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.calendar-mode.active {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  border-color: rgba(15, 23, 42, 0.9);
  color: #fff;
}

.calendar-canvas {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.86));
  box-shadow: var(--shadow-soft);
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.calendar-cell {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 130px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, #fff, #f8fbff);
}

.calendar-week-grid .calendar-cell {
  min-height: 280px;
}

.calendar-cell.muted {
  opacity: 0.48;
  background: #f8fafc;
}

.calendar-cell.today {
  border-color: #111827;
  box-shadow: inset 0 0 0 2px rgba(17, 24, 39, 0.08);
}

.calendar-cell.drag-over,
.calendar-hour.drag-over {
  background: #eff6ff;
  border-color: var(--accent);
}

.calendar-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.calendar-cell-top strong {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eef2f7;
  color: #111827;
}

.calendar-cell.today .calendar-cell-top strong {
  background: #111827;
  color: #fff;
}

.calendar-cell-events {
  display: grid;
  align-content: start;
  gap: 6px;
}

.calendar-cell-events small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-chip {
  display: block;
  overflow: hidden;
  padding: 6px 8px;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: #f1f5f9;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-board {
  display: grid;
  gap: 8px;
}

.calendar-hour {
  display: grid;
  grid-template-columns: 92px 1fr;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.calendar-hour > span {
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.calendar-hour > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.calendar-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.calendar-year-month {
  display: grid;
  gap: 8px;
  min-height: 110px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.calendar-year-month strong {
  font-size: 18px;
}

.calendar-year-month span {
  color: var(--muted);
  font-weight: 900;
}

.calendar-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--accent);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.calendar-card h3 {
  margin-top: 4px;
  font-size: 18px;
}

.calendar-date {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  background: #eef6ff;
  text-align: center;
}

.calendar-date strong {
  font-size: 18px;
}

.calendar-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.event-project {
  border-color: #2563eb;
}

.event-crm {
  border-color: #2563eb;
}

.event-team {
  border-color: #9333ea;
}

.event-meeting {
  border-color: #b7791f;
}

.event-deadline {
  border-color: #b42318;
}

i.event-project,
.calendar-card.event-project {
  border-left-color: #2563eb;
}

i.event-crm,
.calendar-card.event-crm {
  border-left-color: #2563eb;
}

i.event-team,
.calendar-card.event-team {
  border-left-color: #9333ea;
}

i.event-meeting,
.calendar-card.event-meeting {
  border-left-color: #b7791f;
}

i.event-deadline,
.calendar-card.event-deadline {
  border-left-color: #b42318;
}

i.event-project {
  background: #2563eb;
}

i.event-crm {
  background: #2563eb;
}

i.event-team {
  background: #9333ea;
}

i.event-meeting {
  background: #b7791f;
}

i.event-deadline {
  background: #b42318;
}

.client-share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.client-share-box p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.client-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.client-status-card {
  width: min(880px, 100%);
  padding: clamp(24px, 5vw, 48px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at top right, rgba(183, 121, 31, 0.2), transparent 20rem);
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.16);
}

.client-status-card h1 {
  margin-top: 10px;
}

.client-message {
  max-width: 680px;
  color: #475467;
  font-size: 18px;
  line-height: 1.55;
}

.client-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  margin: 32px 0;
}

.client-step {
  display: grid;
  gap: 8px;
  justify-items: center;
  color: #98a2b3;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.client-step span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #e7edf5;
  color: #667085;
}

.client-step.done span {
  background: var(--accent);
  color: #fff;
}

.client-step.current span {
  outline: 5px solid rgba(37, 99, 235, 0.14);
}

.client-step.workflow label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-step.workflow-percent span {
  width: 50px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
}

.client-step.done {
  color: var(--ink);
}

.client-workflow {
  display: grid;
  gap: 12px;
  margin: 26px 0;
  padding: 18px;
  border: 1px solid rgba(137, 166, 220, 0.34);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.client-workflow-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-workflow-header strong {
  color: var(--blue);
  font-size: 24px;
}

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

.client-workflow-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.86);
}

.client-workflow-item > span {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 999px;
  background: #94a3b8;
}

.client-workflow-item.done > span,
.client-workflow-item.approved > span {
  background: #16a34a;
}

.client-workflow-item.working > span {
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.client-workflow-item.needs-manager-approval > span {
  background: #f59e0b;
}

.client-workflow-item strong,
.client-workflow-item small {
  display: block;
}

.client-workflow-item small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 850;
}

.client-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.client-details div {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.client-details span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.client-details strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.client-footer {
  margin: 28px 0 0;
  color: var(--muted);
  font-weight: 900;
}

.client-downloads {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding: 18px;
  background: #fff8e6;
  border: 1px solid #f2cf7d;
  border-radius: 16px;
}

.download-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7a4d00;
}

.download-warning span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

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

.download-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.download-actions a.disabled {
  opacity: 0.48;
  pointer-events: none;
}

.public-call-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 30%),
    linear-gradient(145deg, #eef5ff 0%, #ffffff 48%, #eef9f6 100%);
  color: var(--ink);
}

.public-call-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.public-call-card {
  display: grid;
  gap: 20px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(137, 166, 220, 0.36);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 90px rgba(20, 42, 82, 0.16);
  backdrop-filter: blur(18px);
}

.public-call-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: 18px;
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(137, 166, 220, 0.28);
}

.public-call-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-call-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.96;
  letter-spacing: 0;
}

.public-call-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 850;
}

.public-call-time {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 20px;
  background: linear-gradient(145deg, #eff6ff, #ffffff);
}

.public-call-time span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.public-call-time strong {
  color: var(--blue);
  font-size: 32px;
  line-height: 1;
}

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

.public-call-section,
.public-location-row,
.public-call-notes {
  padding: 18px;
  border: 1px solid rgba(137, 166, 220, 0.3);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
}

.public-call-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.public-call-section span,
.public-location-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.public-call-section-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.09);
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
}

.public-call-section strong,
.public-location-row strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
  text-decoration: none;
}

.public-location-list {
  display: grid;
  gap: 10px;
}

.public-location-row {
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.public-location-row strong,
.public-location-row em {
  color: var(--blue);
}

.public-location-row em {
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
}

.public-call-notes {
  display: grid;
  gap: 8px;
  color: var(--slate);
  font-weight: 760;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: normal;
  white-space: normal;
}

.public-call-notes p {
  margin: 0;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  line-height: 1.55;
}

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

.public-call-actions button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 14px;
  background: #fff;
  color: var(--blue);
  font-weight: 950;
  cursor: pointer;
}

.public-call-actions button:first-child {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

@media (max-width: 760px) {
  .production-view-switcher {
    width: 100%;
  }

  .production-view-switcher button {
    flex: 1;
  }

  .production-sticky-header,
  .production-work-grid,
  .production-current-hero,
  .production-owner-grid,
  .production-ai-card,
  .production-version-row {
    grid-template-columns: 1fr;
  }

  .production-sticky-header {
    top: 0;
    padding: 10px;
    border-radius: 18px;
  }

  .production-sticky-header h2,
  .production-current-hero h2,
  .production-owner-header h2 {
    font-size: 30px;
  }

  .production-clock-card {
    order: -1;
  }

  .production-clock-card strong {
    font-size: 30px;
  }

  .production-side-rail {
    position: static;
    grid-template-columns: 1fr;
  }

  .production-rail-card div {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .production-rail-card button {
    min-width: 220px;
  }

  .production-current-card {
    padding: 14px;
    border-radius: 18px;
  }

  .production-current-meta,
  .production-workload-row {
    grid-template-columns: 1fr;
  }

  .production-step-timeline {
    grid-template-columns: 1fr;
  }

  .production-step-timeline button {
    min-height: 66px;
  }

  .production-ai-card > div:last-child {
    display: grid;
  }

  .production-ai-card .primary-button,
  .production-ai-card .ghost-button {
    width: 100%;
  }

  .production-command-center {
    padding: 12px;
    border-radius: 18px;
  }

  .production-command-hero,
  .production-project-summary,
  .production-simple-task {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .production-now-strip {
    grid-template-columns: 1fr;
  }

  .production-project-title strong {
    font-size: 17px;
  }

  .production-mini-timeline {
    grid-template-columns: repeat(var(--timeline-days, 7), minmax(76px, 1fr));
  }

  .production-mini-day {
    min-height: 64px;
    padding: 6px;
  }

  .production-task-owner .staff-assignment-pill {
    width: fit-content;
  }

  .public-call-shell {
    width: min(100% - 18px, 1120px);
    padding: 10px 0;
  }

  .public-call-card,
  .public-call-hero,
  .public-call-grid {
    grid-template-columns: 1fr;
  }

  .public-call-card {
    border-radius: 20px;
  }
}

@media print {
  .public-call-page {
    background: #fff;
  }

  .public-call-shell {
    width: 100%;
    padding: 0;
  }

  .public-call-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    page-break-inside: auto;
    break-inside: auto;
  }

  .public-call-notes,
  .public-call-notes p,
  .public-location-row,
  .public-location-row strong {
    overflow: visible;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  .public-call-actions {
    display: none;
  }
}

.modal {
  width: min(920px, calc(100vw - 28px));
  border: 0;
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
}

.modal.compact {
  width: min(520px, calc(100vw - 28px));
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}

.modal form {
  padding: 22px;
}

.modal-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.icon-button {
  width: 40px;
  min-height: 40px;
  padding: 0;
}

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

.full {
  grid-column: 1 / -1;
}

.task-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, #f8fbff, #fff);
}

.lead-stage-field {
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(135deg, #eff6ff, #ffffff),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.13), transparent 12rem);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.1);
}

.lead-stage-field select {
  min-height: 52px;
  border-color: rgba(37, 99, 235, 0.45);
  color: #0f172a;
  font-size: 18px;
  font-weight: 950;
}

.lead-collapsible {
  display: block;
}

.lead-collapsible summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
}

.lead-collapsible summary::-webkit-details-marker {
  display: none;
}

.lead-collapsible summary > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background: #eff6ff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
}

.lead-collapsible[open] summary > span {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.collapsible-content {
  margin-top: 14px;
}

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

.activity-composer {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-top: 14px;
}

.activity-timeline {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-left: 18px;
}

.activity-timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.55), rgba(216, 224, 235, 0.7));
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
}

.activity-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  margin-top: 5px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.activity-item > div:last-child {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fff, #f8fbff);
}

.activity-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #344054;
  font-size: 13px;
}

.activity-top span,
.activity-item small {
  color: var(--muted);
  font-weight: 800;
}

.activity-item p {
  margin: 8px 0;
  color: #344054;
  line-height: 1.45;
}

.task-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.task-row {
  display: grid;
  grid-template-columns: 1.3fr 220px auto 40px;
  gap: 8px;
  align-items: center;
}

.modal-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.spacer {
  flex: 1;
}

.hidden {
  display: none !important;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 140px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(239, 246, 255, 0.54));
}

.win-celebration {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.win-celebration.show {
  opacity: 1;
  visibility: visible;
}

.win-celebration::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.28), transparent 22rem),
    rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(2px);
  animation: winFade 1.9s ease forwards;
}

.win-toast {
  position: relative;
  min-width: min(420px, calc(100vw - 42px));
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at top right, rgba(183, 121, 31, 0.22), transparent 18rem);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  text-align: center;
  overflow: hidden;
  transform: translateY(20px) scale(0.92);
  animation: winPop 1.9s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.win-toast::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -60%;
  width: 70%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: rotate(20deg);
  animation: shineSweep 1.25s ease 0.18s forwards;
}

.win-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.win-title {
  margin-top: 8px;
  font-size: clamp(48px, 10vw, 82px);
  line-height: 0.95;
  font-weight: 950;
  color: #111827;
}

.win-name {
  margin-top: 12px;
  color: #475467;
  font-weight: 850;
}

.confetti-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 18px;
  border-radius: 3px;
  opacity: 0;
  animation: confettiFall 1.9s ease-out forwards;
}

@keyframes winPop {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.88);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1.04);
  }
  32% {
    transform: translateY(0) scale(1);
  }
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

@keyframes winFade {
  0%,
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes shineSweep {
  to {
    left: 120%;
  }
}

@keyframes confettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  10% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin));
  }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    order: 1;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .sidebar .brand {
    display: none;
  }

  .nav-tabs {
    display: none;
  }

  .mobile-view-select {
    display: block;
    min-height: 42px;
    border-radius: 999px;
    border-color: rgba(37, 99, 235, 0.24);
    background:
      linear-gradient(135deg, #ffffff, #eff6ff);
    color: #0f172a;
    font-weight: 900;
  }

  .main {
    order: 2;
    padding: 14px;
    padding-bottom: 26px;
  }

  .metric-strip,
  .dashboard-grid,
  .dashboard-controls,
  .home-grid,
  .home-summary-grid,
  .permission-grid,
  .quick-task-form,
  .form-grid,
  .settings-grid,
  .activity-composer {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  .metric-strip .metric,
  .home-summary-grid > .metric:not(.home-income-panel) {
    min-height: 52px;
    padding: 8px 7px 8px 9px;
    border-radius: 12px;
  }

  .metric-strip .metric span,
  .home-summary-grid > .metric:not(.home-income-panel) span {
    font-size: 16px;
    line-height: 1.05;
  }

  .metric-strip .metric label,
  .home-summary-grid > .metric:not(.home-income-panel) label {
    margin-top: 2px;
    font-size: 10px;
    line-height: 1.1;
  }

  .home-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pipeline-controls {
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin: 12px 0 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .pipeline-controls > label:first-child {
    grid-column: 1 / -1;
  }

  .quick-range-buttons {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 2px;
  }

  .quick-range-buttons button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .topbar-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  #newLead {
    position: static;
    width: auto;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
  }

  .task-summary-card {
    align-items: stretch;
    flex-direction: column;
  }

  .task-card-actions {
    justify-content: flex-end;
  }

  .brand-detail-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .ai-pending-action,
  .ai-form {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-message {
    width: 100%;
  }

  .lead-attachment-row {
    grid-template-columns: 1fr;
  }

  .topbar,
  .archive-header,
  .task-header,
  .calendar-toolbar,
  .settings-tools {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topbar {
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 18px;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.82));
    box-shadow: var(--shadow-soft);
  }

  .topbar h1 {
    font-size: 34px;
    line-height: 0.98;
  }

  #leadDialog .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 18px -18px -18px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.1);
  }

  #leadDialog .modal-actions .spacer {
    display: none;
  }

  #leadDialog .modal-actions .primary-button {
    order: -1;
    min-width: min(100%, 240px);
  }

  .calendar-toolbar h3 {
    text-align: left;
  }

  .calendar-modes {
    justify-content: flex-start;
  }

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

  .calendar-weekday {
    display: none;
  }

  .calendar-cell {
    min-height: 150px;
  }

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

  .calendar-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .staff-pay-panel-tools,
  .staff-pay-total-strip {
    grid-template-columns: 1fr;
  }

  .leaderboard-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .leaderboard-row .pill {
    grid-column: 2;
    justify-self: start;
  }

  #homeRevenueMetric,
  #homeReceivedMetric,
  #homePendingMetric,
  #homeInvoicePendingMetric {
    grid-row: auto;
    grid-column: auto;
  }

  .home-income-panel {
    grid-row: auto;
    grid-column: auto;
  }

  .mini-income-list {
    grid-template-columns: 1fr;
  }

  .calendar-actions {
    justify-content: flex-start;
  }

  .crew-summary-grid,
  .crew-layout,
  .staff-layout,
  .staff-today-panel,
  .staff-work-hub-head,
  .staff-work-hub-grid,
  .staff-time-dashboard-head,
  .staff-time-chart-grid,
  .staff-time-detail-grid,
  .crew-project-card,
  .crew-rate-panel,
  .crew-availability-form {
    grid-template-columns: 1fr;
    display: grid;
    align-items: stretch;
  }

  .staff-work-hub {
    padding: 12px;
    border-radius: 18px;
  }

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

  .staff-time-filters {
    justify-content: stretch;
  }

  .staff-time-filters label {
    min-width: 0;
  }

  .staff-time-bar-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .staff-work-clock-card {
    position: sticky;
    top: 10px;
    z-index: 8;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .staff-work-clock-card span {
    grid-column: 1 / -1;
  }

  .staff-assigned-projects-strip,
  .staff-attention-panel .staff-today-task-list {
    max-height: 300px;
  }

  .staff-work-console .staff-clock-form {
    grid-template-columns: 1fr;
  }

  .staff-section-title {
    display: grid;
  }

  .staff-live-deadline {
    width: 100%;
  }

  .crew-availability-head,
  .crew-availability-item {
    align-items: stretch;
    flex-direction: column;
  }

  .staff-pay-summary-card {
    grid-column: 1;
  }

  .staff-gantt-deadline-spotlight {
    grid-template-columns: 1fr;
    margin: 10px 12px;
    align-items: start;
  }

  .staff-workflow-planner {
    margin: 10px 12px 14px;
    padding: 12px;
  }

  .staff-clock-form {
    grid-template-columns: 1fr;
  }

  .staff-workflow-planner-head {
    display: grid;
  }

  .staff-workflow-timeline-shell {
    grid-template-columns: minmax(210px, 0.64fr) minmax(calc(var(--timeline-days, 7) * var(--timeline-day-width, 118px)), 1.56fr);
  }

  .staff-gantt-sheet-shell {
    --gantt-left-width: 398px;
  }

  .staff-gantt-sheet-left-head,
  .staff-gantt-task-left {
    grid-template-columns: 28px minmax(134px, 1fr) 76px 98px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .staff-gantt-sheet-left-head > :nth-child(3),
  .staff-gantt-task-left > :nth-child(3) {
    display: none;
  }

  .staff-gantt-project-summary {
    min-height: 64px;
    padding: 9px 11px;
  }

  .staff-gantt-project-meta {
    min-height: 64px;
    overflow-x: auto;
  }

  .staff-workflow-project-row {
    grid-template-columns: minmax(210px, 0.64fr) minmax(calc(var(--timeline-days, 7) * var(--timeline-day-width, 118px)), 1.56fr);
    min-height: var(--workflow-row-height, 168px);
  }

  .staff-workflow-task-phase-row,
  .staff-workflow-task-row {
    grid-template-columns: minmax(210px, 0.64fr) minmax(calc(var(--timeline-days, 7) * var(--timeline-day-width, 118px)), 1.56fr);
  }

  .staff-workflow-calendar-head,
  .staff-workflow-calendar-lane,
  .staff-workflow-task-calendar,
  .staff-workflow-task-phase-calendar {
    min-width: calc(var(--timeline-days, 7) * var(--timeline-day-width, 118px));
  }

  .staff-workflow-calendar-lane,
  .staff-workflow-day-cell {
    max-height: var(--workflow-row-height, 168px);
  }

  .staff-workflow-week-grid {
    grid-template-columns: repeat(var(--timeline-days, 7), minmax(var(--timeline-day-width, 118px), 1fr));
  }

  .staff-workflow-project-cell {
    padding: 10px;
  }

  .staff-workflow-task-sidebar {
    padding: 8px 10px 8px 18px;
  }

  .staff-workflow-project-title {
    font-size: 14px;
  }

  .staff-workflow-current {
    padding: 5px 7px;
  }

  .staff-workflow-bar {
    min-width: 0;
    padding: 5px 7px;
  }

  .staff-workflow-bar b,
  .staff-workflow-bar span {
    font-size: 10px;
  }

  .workflow-calendar-strip,
  .workflow-add-row,
  .workflow-deadline-tools,
  .staff-chat-form {
    grid-template-columns: 1fr;
  }

  .crew-rate-chips {
    justify-content: flex-start;
  }

  .crew-pay-row {
    grid-template-columns: 1fr auto;
    overflow: hidden;
  }

  .crew-pay-input,
  .crew-pay-row button,
  .crew-pay-amount,
  .crew-pay-total,
  .crew-pay-breakdown,
  .crew-call-details,
  .crew-call-summary,
  .crew-call-sheet {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .crew-call-sheet,
  .crew-call-grid {
    grid-template-columns: 1fr;
  }

  .crew-call-editor-form {
    grid-template-columns: 1fr;
  }

  .staff-assignment-row,
  .staff-salary-card,
  .staff-pay-history-row,
  .workflow-task-row,
  .workflow-compact-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .staff-gantt-board {
    min-width: 980px;
    grid-template-columns: minmax(410px, 0.95fr) minmax(620px, 1.55fr);
  }

  .staff-gantt-board.week {
    min-width: 1120px;
    grid-template-columns: minmax(410px, 0.82fr) minmax(720px, 1.68fr);
  }

  .crew-calendar-weekdays,
  .crew-calendar-month {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crew-assign-form,
  .crew-detail-pay-row {
    grid-template-columns: 1fr;
  }

  .kanban {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    gap: 14px;
    overflow: visible;
  }

  .board-view-toolbar {
    justify-content: space-between;
    margin-top: 6px;
  }

  .board-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-stage-picker {
    display: none;
  }

  .stage-column {
    display: block;
    height: auto;
    min-height: auto;
  }

  .stage-header {
    position: sticky;
    top: 64px;
    z-index: 2;
    border-radius: 14px 14px 0 0;
    padding: 16px;
    background:
      linear-gradient(135deg, #0f172a, #1e3a8a);
    color: #fff;
  }

  .stage-count {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .stage-list {
    min-height: 120px;
    max-height: none;
    overflow: visible;
    gap: 10px;
    background: rgba(255, 255, 255, 0.78);
  }

  .lead-card {
    padding: 12px;
  }

  .task-row {
    grid-template-columns: 1fr;
  }

  .project-facts,
  .client-details,
  .client-progress {
    grid-template-columns: 1fr;
  }

  .client-step {
    grid-template-columns: 42px 1fr;
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.14), transparent 20rem),
      linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  }

  .sidebar {
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  }

  .mobile-view-select {
    min-height: 44px;
    padding: 9px 14px;
    font-size: 15px;
  }

  .main {
    padding: 10px;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .topbar {
    padding: 12px;
    gap: 10px;
    border-radius: 16px;
  }

  .topbar h1 {
    font-size: 29px;
    line-height: 1;
  }

  .eyebrow {
    font-size: 10px;
  }

  .topbar-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .global-search {
    min-height: 42px;
    padding: 9px 11px;
  }

  #newLead {
    min-height: 42px;
    padding: 0 13px;
    white-space: nowrap;
  }

  .crew-pay-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }

  .crew-name {
    flex: 1 1 120px;
    line-height: 1.2;
  }

  .crew-pay-row > strong {
    flex: 0 0 auto;
  }

  .crew-pay-amount {
    flex: 1 1 90px;
  }

  .crew-pay-breakdown {
    flex: 1 1 100%;
  }

  .crew-call-details,
  .crew-call-summary,
  .crew-call-sheet {
    flex: 1 1 100%;
  }

  .crew-pay-breakdown span {
    max-width: 100%;
  }

  .staff-gantt-header,
  .staff-gantt-toolbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .staff-gantt-toolbar {
    align-items: stretch;
  }

  .staff-gantt-view-toggle,
  .staff-gantt-zoom {
    width: 100%;
    overflow-x: auto;
  }

  .staff-gantt-add {
    width: 100%;
    flex-wrap: wrap;
  }

  .staff-gantt-add select {
    flex: 1 1 210px;
  }

  .staff-gantt-board {
    min-width: 880px;
    grid-template-columns: minmax(360px, 0.95fr) minmax(540px, 1.55fr);
  }

  .staff-gantt-board.week {
    min-width: 980px;
    grid-template-columns: minmax(360px, 0.82fr) minmax(640px, 1.68fr);
  }

  .staff-gantt-table-head,
  .staff-gantt-table-row {
    grid-template-columns: minmax(150px, 1.25fr) minmax(92px, 0.75fr) minmax(95px, 0.7fr) minmax(92px, 0.65fr);
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .staff-gantt-bar {
    min-width: 82px;
  }

  .staff-production-task-board {
    padding: 12px;
  }

  .staff-production-task-board-head,
  .staff-task-project-head {
    align-items: stretch;
    flex-direction: column;
  }

  .staff-task-table-header {
    display: none;
  }

  .staff-task-table-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
    min-height: 0;
    padding: 12px;
  }

  .staff-task-name strong {
    white-space: normal;
  }

  .staff-task-mini-timeline {
    height: 22px;
  }

  .pipeline-controls,
  .dashboard-controls {
    grid-template-columns: 1fr;
    padding: 11px;
    gap: 9px;
  }

  .board-filter-bar {
    grid-template-columns: 1fr;
    padding: 11px;
    gap: 9px;
  }

  .pipeline-controls label,
  .dashboard-controls label {
    font-size: 12px;
  }

  .checkbox-line {
    min-height: 34px;
  }

  .quick-range-buttons {
    margin: 0 -2px;
    padding: 0 2px 4px;
    scrollbar-width: auto;
  }

  .quick-range-buttons button {
    min-height: 32px;
    padding: 7px 10px;
  }

  .metric-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
  }

  .metric-strip .metric {
    min-height: 62px;
    padding: 10px 10px 10px 12px;
  }

  .metric-strip .metric span {
    font-size: 20px;
  }

  .metric-strip .metric label {
    font-size: 10px;
  }

  .home-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .home-summary-grid > .metric:not(.home-income-panel),
  .home-summary-grid > .metric-button {
    min-height: 64px;
    padding: 10px 10px 10px 12px;
  }

  .home-summary-grid > .metric:not(.home-income-panel) span,
  .home-summary-grid > .metric-button span {
    font-size: 20px;
  }

  .home-income-panel {
    grid-column: 1 / -1;
  }

  .report-panel,
  .archive-header {
    padding: 14px;
    border-radius: 16px;
  }

  .archive-header,
  .task-header,
  .settings-tools {
    gap: 10px;
  }

  .archive-header h2,
  .report-panel h2 {
    font-size: 20px;
  }

  .archive-header p,
  .task-header p,
  .settings-tools p {
    font-size: 12px;
    line-height: 1.4;
  }

  .kanban {
    gap: 12px;
  }

  .stage-column {
    border-radius: 16px;
  }

  .stage-header {
    top: 60px;
    padding: 12px 13px;
    border-radius: 16px 16px 0 0;
  }

  .stage-header strong {
    font-size: 13px;
  }

  .stage-header small {
    font-size: 10px;
  }

  .stage-count {
    min-width: 26px;
    height: 26px;
  }

  .stage-list {
    padding: 10px;
    gap: 9px;
  }

  .lead-card {
    gap: 8px;
    padding: 11px;
    border-radius: 13px;
  }

  .lead-card h3,
  .project-card h3,
  .calendar-card h3,
  .contact-card h3 {
    font-size: 17px;
    line-height: 1.12;
  }

  .pill {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 11px;
  }

  .card-actions,
  .project-actions,
  .calendar-actions,
  .contact-actions,
  .settings-tool-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .card-actions button,
  .project-actions button,
  .calendar-actions button,
  .contact-actions button,
  .settings-tool-actions button,
  .settings-tool-actions a {
    width: 100%;
    min-height: 42px;
  }

  .task-summary-card {
    padding: 11px;
  }

  .task-card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .task-card-actions button {
    width: 100%;
    min-width: 0;
  }

  .quick-task-form {
    padding: 12px;
    gap: 9px;
  }

  .project-list,
  .project-list.compact,
  .contact-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-card,
  .contact-card,
  .calendar-card {
    padding: 13px;
    border-radius: 16px;
  }

  .project-card-top,
  .client-share-box,
  .download-warning,
  .source-item,
  .archive-card,
  .conversion-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .project-facts span {
    min-height: 52px;
    padding: 9px;
  }

  .contact-list.list-view .contact-card {
    grid-template-columns: 1fr;
  }

  .calendar-legend {
    gap: 6px;
    font-size: 11px;
  }

  .calendar-legend span {
    padding: 7px 8px;
  }

  .calendar-toolbar {
    padding: 12px;
  }

  .calendar-nav,
  .calendar-modes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .calendar-modes {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .calendar-mode,
  .calendar-nav button {
    min-height: 36px;
    padding: 7px 6px;
    font-size: 12px;
  }

  .calendar-canvas {
    padding: 10px;
    border-radius: 16px;
  }

  .calendar-month-grid,
  .calendar-year-grid {
    grid-template-columns: 1fr;
  }

  .calendar-cell {
    min-height: 118px;
  }

  .lead-stage-field {
    padding: 11px;
  }

  .lead-stage-field select {
    min-height: 50px;
    font-size: 17px;
  }

  .lead-collapsible summary {
    align-items: flex-start;
  }

  .calendar-hour {
    grid-template-columns: 68px 1fr;
  }

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

  .dashboard-grid {
    gap: 12px;
  }

  .bar-row-top,
  .lead-intake-top,
  .income-breakdown-top,
  .income-breakdown-stats {
    font-size: 12px;
  }

  .leaderboard-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    padding: 11px;
  }

  .leaderboard-rank {
    width: 28px;
    height: 28px;
  }

  .ai-messages {
    min-height: 360px;
    max-height: 58vh;
    padding: 12px;
  }

  .ai-message {
    padding: 12px;
    border-radius: 14px;
  }

  .ai-form textarea {
    min-height: 110px;
  }

  .settings-grid {
    gap: 10px;
  }

  .settings-grid label,
  .settings-tools {
    padding: 13px;
  }

  .settings-filter-actions {
    grid-template-columns: 1fr;
  }

  .modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .modal form {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 14px;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: -14px -14px 0;
    padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
  }

  .form-grid {
    gap: 11px;
    margin: 14px 0;
  }

  label {
    font-size: 12px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .check-grid {
    padding: 8px;
    gap: 7px;
  }

  .check-pill {
    min-height: 38px;
  }

  .activity-composer {
    gap: 8px;
  }

  .staff-update-form {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px;
  }

  .staff-update-feed {
    max-height: min(430px, 58vh);
    padding: 10px;
    border-radius: 16px;
  }

  .staff-feed-avatar {
    width: 38px;
    height: 38px;
    font-size: 12px;
  }

  .staff-feed-card-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .staff-feed-type {
    grid-column: 2;
    width: fit-content;
  }

  .staff-composer-actions,
  .staff-comment-form {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .staff-composer-actions {
    display: grid;
  }

  .staff-composer-actions .primary-button,
  .staff-comment-form button {
    grid-column: 1 / -1;
    width: 100%;
  }

  #leadDialog .modal-actions {
    margin: auto -14px -14px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  #leadDialog .modal-actions .primary-button {
    min-width: 52%;
  }

  .attachment-viewer {
    inset: 10px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 20px);
  }

  .attachment-viewer-body {
    max-height: calc(100dvh - 150px);
    min-height: calc(100dvh - 150px);
    padding: 10px;
  }

  .attachment-viewer-body img {
    border-radius: 8px;
  }

  .attachment-reference-panel {
    inset: auto 8px 8px 8px;
    width: auto;
    max-width: none;
    max-height: 62dvh;
    border-radius: 16px;
  }

  .attachment-reference-header {
    padding: 10px;
  }

  .attachment-reference-body {
    min-height: 42dvh;
    max-height: calc(62dvh - 82px);
    padding: 8px;
  }

  .velocity-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 22px;
    border-radius: 20px;
  }

  .login-card h1 {
    font-size: 34px;
  }
}

/* Final production studio overrides: keep this after legacy production CSS. */
.production-studio-shell {
  display: grid;
  gap: 18px;
  padding: 6px;
  background:
    radial-gradient(circle at 0 0, rgba(99, 102, 241, 0.12), transparent 34%),
    radial-gradient(circle at 100% 6%, rgba(20, 184, 166, 0.13), transparent 30%);
}

.production-studio-topbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(220px, 0.42fr);
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.production-studio-brand,
.production-studio-user {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.production-studio-brand i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, #4f6cf7, #17b69b);
  color: #fff;
  font-style: normal;
  font-weight: 950;
}

.production-studio-brand strong,
.production-studio-user strong {
  color: #111827;
  font-size: 16px;
  line-height: 1.1;
}

.production-studio-brand span,
.production-studio-user span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.production-studio-user {
  justify-content: end;
  padding: 11px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
}

.production-studio-topbar .production-view-switcher {
  margin: 0 auto;
  padding: 6px;
  border: 0;
  background: #e9eff7;
  box-shadow: none;
}

.production-studio-topbar .production-view-switcher button.active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1), inset 0 0 0 2px #2563eb;
}

.production-focus-strip,
.production-owner-focus-strip {
  position: static;
  display: grid;
  grid-template-columns: minmax(260px, 1.55fr) repeat(4, minmax(150px, 0.72fr));
  gap: 12px;
  align-items: stretch;
  padding: 12px;
  border: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.08);
}

.production-focus-card,
.production-metric-card,
.production-clock-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #dfe8f4;
  border-radius: 20px;
  background: #fff;
}

.production-focus-card {
  display: grid;
  gap: 5px;
  background: linear-gradient(135deg, #14213d, #425073);
  color: #fff;
}

.production-focus-card strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-focus-card span,
.production-focus-card em {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.production-metric-card {
  display: grid;
  gap: 5px;
}

.production-metric-card span,
.production-kicker {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.production-metric-card strong {
  overflow: hidden;
  color: #111827;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-metric-card em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.production-clock-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  justify-items: stretch;
}

.production-clock-card strong {
  color: #111827;
  font-size: 28px;
}

.production-clock-card button {
  min-width: 112px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #23c58f, #14b8a6);
  color: #fff;
  font-weight: 950;
}

.production-clock-card.active button.danger {
  background: #fee2e2;
  color: #991b1b;
}

.production-staff-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 18px;
  align-items: start;
}

.production-current-card {
  display: grid;
  gap: 14px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.production-current-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 22px;
  padding: 24px;
  border-radius: 26px;
  background:
    radial-gradient(circle at right, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(135deg, #17233e, #4b5b80);
  color: #fff;
}

.production-current-hero h2 {
  max-width: 760px;
  color: #fff;
  font-size: clamp(44px, 5.4vw, 68px);
  line-height: 0.96;
}

.production-current-hero p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.45;
}

.production-current-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.production-current-pills span {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.production-current-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-self: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
}

.production-current-meta label,
.production-current-meta span {
  display: grid;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.production-current-meta label {
  grid-column: 1 / -1;
}

.production-current-meta b {
  color: rgba(255, 255, 255, 0.62);
}

.production-current-meta select,
.production-version-row select,
.production-owner-timeline-head select {
  min-height: 44px;
  border-radius: 13px;
  background: #fff;
  color: #0f172a;
  font-weight: 850;
}

.production-ai-card {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 0;
  border-color: rgba(124, 58, 237, 0.18);
  background: linear-gradient(135deg, #f4f0ff, rgba(255, 255, 255, 0.94));
}

.production-workflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 16px;
}

.production-workflow-layout > aside {
  display: grid;
  gap: 12px;
  align-content: start;
}

.production-workflow-steps,
.production-version-row,
.production-mini-deadlines,
.production-checkin-card,
.production-activity-feed,
.production-owner-timeline-card,
.production-owner-card {
  border: 1px solid #dfe8f4;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 52px rgba(15, 23, 42, 0.06);
}

.production-workflow-steps,
.production-version-row,
.production-mini-deadlines,
.production-checkin-card,
.production-activity-feed {
  padding: 16px;
}

.production-step-timeline {
  display: grid;
  gap: 10px;
}

.production-step-timeline button {
  min-height: 58px;
  border-radius: 18px;
  box-shadow: none;
}

.production-step-timeline i {
  background: #dcfce7;
  color: #047857;
}

.production-step-timeline button.active i {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
}

.production-side-rail {
  position: sticky;
  top: 16px;
}

.production-rail-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
}

.production-rail-title,
.production-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.production-rail-title span,
.production-card-head span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 950;
}

.production-rail-card button {
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
}

.production-rail-card button em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.production-owner-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.production-owner-timeline-card {
  overflow: hidden;
}

.production-owner-timeline-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
  gap: 20px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5edf7;
}

.production-owner-timeline-head > div:last-child {
  display: grid;
  gap: 10px;
}

.production-simple-timeline {
  overflow-x: auto;
  padding: 14px 14px 18px;
}

.production-simple-timeline-head,
.production-simple-timeline-row {
  display: grid;
  grid-template-columns: 260px repeat(20, minmax(54px, 1fr));
  min-width: 1320px;
}

.production-simple-timeline-head {
  align-items: center;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
}

.production-simple-timeline-head b {
  padding: 8px 4px;
  text-align: center;
}

.production-simple-timeline-head b.today {
  border-radius: 999px;
  background: #6366f1;
  color: #fff;
}

.production-simple-timeline-row {
  min-height: 78px;
  align-items: stretch;
  margin-top: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.production-simple-project {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border-right: 1px solid #e2e8f0;
}

.production-simple-project span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.production-simple-track {
  position: relative;
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: repeat(var(--timeline-days), minmax(54px, 1fr));
}

.production-simple-track > span {
  border-right: 1px solid #e2e8f0;
}

.production-simple-track > span.today {
  background: rgba(99, 102, 241, 0.08);
}

.production-simple-bar {
  position: absolute;
  top: 23px;
  left: calc((var(--bar-start) - 1) * (100% / var(--timeline-days)));
  width: calc((var(--bar-end) - var(--bar-start)) * (100% / var(--timeline-days)));
  min-width: 120px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(var(--bar-hue), 84%, 68%), hsl(calc(var(--bar-hue) + 52), 82%, 51%));
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.production-mini-marker,
.production-final-marker {
  position: absolute;
  top: 18px;
  left: calc((var(--mark-day) - 0.5) * (100% / var(--timeline-days)));
  width: 4px;
  height: 42px;
  border-radius: 999px;
  background: #c27a11;
  transform: translateX(-50%);
}

.production-final-marker {
  background: #ef476f;
}

.production-owner-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  gap: 18px;
}

.production-worker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.production-workload-row {
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
}

.production-worker-person {
  display: grid;
  gap: 3px;
}

.production-worker-person em,
.production-workload-row small {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.production-workload-row > b {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.production-workload-row > b.active {
  background: #dcfce7;
  color: #047857;
}

.production-workload-row small {
  grid-column: 1 / -1;
}

.production-issue-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: #fff1f2;
}

.production-issue-card strong {
  color: #9f1239;
}

.production-time-table-card {
  padding: 20px;
}

.production-time-table {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
}

.production-time-head,
.production-time-table > div:not(.production-time-head) {
  display: grid;
  grid-template-columns: 130px 220px 150px 80px 140px 140px 80px minmax(220px, 1fr);
  min-width: 1160px;
}

.production-time-head span,
.production-time-table > div:not(.production-time-head) span {
  padding: 11px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.production-time-head span {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .production-studio-topbar,
  .production-focus-strip,
  .production-owner-focus-strip,
  .production-owner-metrics,
  .production-staff-cockpit,
  .production-workflow-layout,
  .production-current-hero,
  .production-owner-timeline-head,
  .production-owner-bottom-grid {
    grid-template-columns: 1fr;
  }

  .production-studio-topbar .production-view-switcher {
    margin: 0;
    width: 100%;
  }

  .production-studio-topbar .production-view-switcher button {
    flex: 1;
  }

  .production-studio-user {
    justify-content: start;
  }

  .production-current-hero h2 {
    font-size: 42px;
  }

  .production-current-meta {
    grid-template-columns: 1fr;
  }

  .production-worker-grid {
    grid-template-columns: 1fr;
  }
}
/* Final production workspace overrides must stay last because this stylesheet
   contains older repeated production sections. */
body[data-active-view="staff"] #productionWorkspace .production-studio-topbar {
  display: grid !important;
}

#productionWorkspace .production-phone-timer .production-clock-card strong,
#productionWorkspace.production-workspace .production-phone-timer .production-clock-card strong,
body[data-active-view="staff"] #productionWorkspace .production-phone-timer .production-clock-card strong {
  font-size: clamp(52px, 10vw, 82px) !important;
  line-height: 0.95;
  letter-spacing: 0;
}
