:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --line: #d8e0ea;
  --line-strong: #b9c6d4;
  --text: #111827;
  --muted: #64748b;
  --primary: #1769aa;
  --primary-dark: #0f4d7f;
  --danger: #b42318;
  --success: #15803d;
  --warning: #b7791f;
  --shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.05);
}

/* Modern operations dashboard redesign */
:root {
  --ops-bg: #f5f7fa;
  --ops-rail: #101827;
  --ops-rail-soft: #172033;
  --ops-rail-text: #cbd5e1;
  --ops-panel: #ffffff;
  --ops-panel-soft: #f8fafc;
  --ops-border: #d9e2ec;
  --ops-border-soft: #e8edf3;
  --ops-text: #111827;
  --ops-muted: #667085;
  --ops-blue: #2563eb;
  --ops-blue-soft: #eff6ff;
  --ops-purple: #7c3aed;
  --ops-red: #dc2626;
  --ops-green: #15803d;
  --ops-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

body {
  font-family: "Heebo", "IBM Plex Sans Hebrew", "Segoe UI", Arial, sans-serif;
  background: var(--ops-bg);
}

.ops-app {
  min-height: 100vh;
  padding: 12px 92px 12px 12px;
  color: var(--ops-text);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.05), transparent 210px),
    var(--ops-bg);
}

.ops-nav-rail {
  position: fixed;
  inset-block: 0;
  right: 0;
  left: auto;
  z-index: 30;
  width: 80px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: 14px 9px;
  background: var(--ops-rail);
  color: var(--ops-rail-text);
  box-shadow: -10px 0 28px rgba(15, 23, 42, 0.18);
}

.ops-nav-brand {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.14);
  color: #fff;
}

.ops-nav-brand img {
  width: 42px;
  height: 42px;
  padding: 7px;
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}

.ops-nav-brand strong {
  font-size: 12px;
  letter-spacing: 0;
}

.ops-nav-brand small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.ops-nav-rail nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.ops-nav-item {
  min-height: 58px;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 7px 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ops-rail-text);
  font-size: 11px;
  font-weight: 800;
}

.ops-nav-item:hover,
.ops-nav-item.active {
  color: #fff;
  background: var(--ops-rail-soft);
  border-color: rgba(148, 163, 184, 0.18);
}

.ops-nav-item.active {
  background: #2563eb;
  border-color: rgba(191, 219, 254, 0.34);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.ops-nav-icon {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: currentColor;
}

.ops-nav-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-nav-label {
  display: block;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.ops-nav-footer {
  align-self: end;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(203, 213, 225, 0.14);
}

.ops-nav-help {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  background: transparent;
}

.ops-nav-help svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-nav-user {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #dbeafe, #ffffff);
  border: 2px solid rgba(255, 255, 255, 0.18);
  font-weight: 950;
}

.ops-page {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ops-context-bar {
  position: sticky;
  top: 10px;
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.3fr) minmax(340px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ops-shadow);
  backdrop-filter: blur(12px);
}

.ops-context-main,
.ops-context-controls,
.ops-context-search {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ops-context-main {
  flex-wrap: wrap;
}

.ops-title {
  min-width: 132px;
  display: grid;
  gap: 1px;
}

.ops-title span {
  color: var(--ops-green);
  font-size: 11px;
  font-weight: 900;
}

.ops-title strong {
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.ops-title small {
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 800;
}

.ops-sheet-tabs,
.ops-view-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 10px;
  background: var(--ops-panel-soft);
}

.ops-tab,
.ops-view-switch button,
.ops-filter-chip,
.ops-action-button,
.ops-command-button,
.ops-icon-action,
.ops-quiet-button {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ops-text);
  font-weight: 850;
}

.ops-tab {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--ops-muted);
}

.ops-tab.active,
.ops-view-switch button.active {
  color: var(--ops-blue);
  background: #fff;
  border-color: #dbeafe;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.07);
}

.ops-week-focus {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.ops-week-focus-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ops-week-focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ops-week-focus-head span,
.ops-month-context {
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 800;
}

.ops-week-focus-head strong {
  display: block;
  margin-top: 2px;
  color: var(--ops-text);
  font-size: 17px;
}

.ops-week-scroll {
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 1px 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ops-week-scroll::-webkit-scrollbar {
  display: none;
}

.ops-week-chip {
  min-width: 124px;
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 8px 11px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 8px;
  color: var(--ops-muted);
  background: #f8fafc;
  font-weight: 900;
  white-space: nowrap;
}

.ops-week-chip span {
  color: var(--ops-text);
  font-size: 13px;
}

.ops-week-chip small {
  color: #94a3b8;
  font-size: 11px;
}

.ops-week-chip.future {
  background: #fff;
}

.ops-week-chip.active {
  color: #fff;
  border-color: #1d4ed8;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.ops-week-chip.active span {
  color: #fff;
}

.ops-week-chip.active small {
  color: #dbeafe;
}

.ops-month-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 999px;
  background: #f8fafc;
}

.ops-month-button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  color: var(--ops-muted);
  background: transparent;
  font-weight: 900;
}

.ops-month-button:not(:disabled):hover {
  color: var(--ops-blue);
  background: #e0ecff;
}

.ops-month-button:disabled {
  opacity: 0.35;
}

.ops-icon-action {
  width: 30px;
  height: 30px;
  background: #fff;
  border-color: var(--ops-border-soft);
  color: var(--ops-blue);
}

.ops-icon-action:disabled {
  color: #94a3b8;
  background: transparent;
}

.ops-chip-row {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.ops-filter-chip {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: #fff;
  border-color: var(--ops-border-soft);
  color: #334155;
  font-size: 12px;
}

.ops-filter-chip.active {
  color: var(--ops-blue);
  border-color: #bfdbfe;
  background: var(--ops-blue-soft);
}

.ops-view-switch button {
  min-height: 32px;
  padding: 5px 9px;
  color: var(--ops-muted);
  font-size: 12px;
}

.ops-context-search {
  justify-content: flex-end;
}

.ops-search {
  min-width: 160px;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--ops-border);
  border-radius: 11px;
  background: #fff;
}

.ops-search span {
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 900;
}

.ops-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ops-text);
  background: transparent;
  text-align: right;
}

.ops-command-button {
  min-width: 48px;
  min-height: 36px;
  color: var(--ops-purple);
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.ops-action-button,
.ops-quiet-button {
  min-height: 36px;
  padding: 7px 11px;
  background: #fff;
  border-color: var(--ops-border);
  color: #334155;
}

.ops-action-button.danger {
  color: #9f1239;
  border-color: #fecdd3;
  background: #fff1f2;
}

.ops-user-strip {
  position: fixed;
  right: 92px;
  left: auto;
  inset-block-end: 12px;
  z-index: 25;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--ops-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ops-shadow);
}

.ops-user-strip .user-pill {
  max-width: 110px;
  min-height: 32px;
  padding: 6px 10px;
  background: var(--ops-blue-soft);
  color: var(--ops-blue);
}

.ops-workspace {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.ops-app.inspector-open .ops-workspace {
  direction: ltr;
  grid-template-columns: minmax(400px, 460px) minmax(0, 1fr);
  align-items: start;
}

.ops-grid-stage {
  min-width: 0;
  direction: rtl;
}

.ops-app.inspector-open .ops-grid-stage {
  grid-column: 2;
  grid-row: 1;
}

.ops-app.inspector-open .compact-editor {
  grid-column: 1;
  grid-row: 1;
  direction: rtl;
}

.ops-grid-stage .simple-board,
.ops-grid-stage .simple-block,
.ops-grid-stage .excel-frame {
  border-radius: 14px;
  border-color: var(--ops-border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.ops-grid-stage .simple-head,
.ops-grid-stage .excel-titlebar {
  min-height: 56px;
  padding: 12px 14px;
}

.ops-grid-stage .schedule-nav {
  display: none;
}

.ops-grid-stage .schedule-status {
  padding: 9px 12px;
  background: #fff;
}

.ops-grid-stage .group-overview {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  background: #fff;
}

.ops-grid-stage .group-card {
  min-height: 74px;
  border-radius: 12px;
  box-shadow: none;
}

.ops-grid-stage .day-strip {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  background: var(--ops-panel-soft);
}

.simple-table-wrap,
.excel-scroll {
  max-height: calc(100vh - 250px);
  border-top: 1px solid var(--ops-border-soft);
}

.simple-table {
  direction: rtl;
  margin-inline-end: 0;
}

.simple-table th,
.simple-table td {
  border-right: 0;
  border-left: 1px solid var(--ops-border-soft);
  border-bottom: 1px solid var(--ops-border-soft);
}

.simple-table th {
  top: 0;
  background: #f1f5f9;
  color: #334155;
}

.simple-table tbody tr:nth-child(even) td:not(.pin-col) .simple-cell-button {
  background-color: #fbfdff;
}

.pin-group {
  right: 0;
  left: auto;
}

.pin-role {
  right: 118px;
  left: auto;
}

.simple-table th.pin-group,
.simple-table th.pin-role,
.simple-group,
.simple-role {
  background: #f8fafc !important;
  box-shadow: -1px 0 0 var(--ops-border-soft);
}

.simple-cell-button {
  min-height: 58px;
  transition: background-color 0.12s ease, outline-color 0.12s ease;
}

.simple-cell-button:hover {
  background: var(--ops-blue-soft);
  outline: 2px solid rgba(37, 99, 235, 0.55);
}

.simple-table td.is-selected .simple-cell-button,
.excel-table td.is-selected .excel-cell-button {
  background: var(--ops-blue-soft);
  outline: 2px solid var(--ops-blue);
  outline-offset: -2px;
}

.simple-table td.cell-no-activity .simple-cell-button {
  box-shadow: inset 3px 0 0 rgba(220, 38, 38, 0.48);
}

.simple-table td.cell-partial .simple-cell-button,
.simple-table td.cell-multi .simple-cell-button {
  box-shadow: inset 3px 0 0 rgba(124, 58, 237, 0.36);
}

.density-compact .simple-table th:not(.pin-col),
.density-compact .simple-table td:not(.pin-col) {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}

.density-compact .simple-cell-button {
  min-height: 48px;
  padding: 6px;
  font-size: 12px;
}

.density-ultra .simple-table th:not(.pin-col),
.density-ultra .simple-table td:not(.pin-col) {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.density-ultra .simple-cell-button {
  min-height: 36px;
  padding: 4px;
  font-size: 11px;
}

.compact-editor {
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 100px);
  overflow: auto;
  border-radius: 14px;
  box-shadow: var(--ops-shadow);
}

.editor-panel {
  border-color: var(--ops-border);
}

.editor-head h2 {
  font-size: 18px;
}

.ai-command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: 76px 18px 18px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
}

.ai-command-panel.ai-agent {
  position: static;
  width: min(780px, calc(100vw - 140px));
  max-height: calc(100vh - 110px);
  display: grid;
  overflow: hidden;
  border: 1px solid var(--ops-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.ai-command-panel .ai-agent-head,
.ai-command-panel .ai-agent-upload,
.ai-command-panel .ai-agent-form,
.ai-command-panel .ai-agent-messages {
  padding-inline: 16px;
}

.ai-command-input {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 14px;
  border-top: 1px solid var(--ops-border-soft);
}

.ai-command-input textarea {
  min-height: 58px;
  border-radius: 12px;
  border-color: var(--ops-border);
}

.ai-command-examples {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
}

.ai-command-examples button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  color: var(--ops-purple);
  background: #f5f3ff;
  font-weight: 850;
}

.ai-command-panel .ai-agent-upload {
  max-height: 260px;
  overflow: auto;
}

.ai-command-panel .ai-agent-messages {
  max-height: 280px;
  overflow: auto;
  background: var(--ops-panel-soft);
}

@media (max-width: 1180px) {
  .ops-context-bar {
    grid-template-columns: 1fr;
  }

  .ops-context-controls,
  .ops-context-search {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .ops-app.inspector-open .ops-workspace {
    grid-template-columns: 1fr;
    direction: rtl;
  }

  .ops-app.inspector-open .ops-grid-stage,
  .ops-app.inspector-open .compact-editor {
    grid-column: auto;
  }
}

@media (max-width: 780px) {
  .ops-app {
    padding: 82px 10px 10px;
  }

  .ops-nav-rail {
    inset-block: 0 auto;
    right: 0;
    left: 0;
    width: auto;
    height: 70px;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr;
    overflow-x: auto;
  }

  .ops-nav-rail nav {
    display: flex;
  }

  .ops-nav-item {
    min-width: 74px;
    min-height: 46px;
  }

  .ops-user-strip {
    right: 12px;
    left: auto;
  }

  .ai-command-panel.ai-agent {
    width: calc(100vw - 24px);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body.legend-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.app-shell,
.login-page {
  direction: rtl;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 22px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel h1,
.topbar h1,
.board-summary h2,
.section-head h2,
.panel h2,
.editor-panel h2,
.empty-state h2 {
  margin: 0;
  letter-spacing: 0;
}

.login-panel h1 {
  font-size: 28px;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.small {
  font-size: 13px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--text);
  direction: rtl;
  text-align: right;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(23, 105, 170, 0.16);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 38px;
  border-radius: 7px;
  border: 1px solid transparent;
  padding: 8px 13px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button {
  color: #1f2937;
  background: #fff;
  border-color: var(--line);
}

.danger-button {
  color: var(--danger);
  background: #fff;
  border-color: #f0b6b0;
}

.icon-button {
  width: 36px;
  padding: 0;
  background: var(--surface-soft);
  border-color: var(--line);
}

.inline-error,
.system-error {
  color: var(--danger);
  background: #fff1f0;
  border: 1px solid #ffc9c2;
  border-radius: 7px;
  padding: 10px 12px;
}

.app-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.topbar h1 {
  font-size: 26px;
}

.compact-topbar {
  margin-bottom: 12px;
}

.topbar-actions,
.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-actions {
  direction: rtl;
}

.user-pill {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 999px;
  background: #eaf2f8;
  color: var(--primary-dark);
  font-weight: 800;
}

.sheet-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 10px;
}

.sheet-tab {
  min-width: 116px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.sheet-tab.active {
  color: var(--primary-dark);
  border-color: var(--primary);
  background: #edf6ff;
}

.work-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.search-field {
  display: grid;
  gap: 6px;
}

.search-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  direction: rtl;
  text-align: right;
}

.segmented-control {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented-control button {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented-control button.active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.compact-layout {
  display: grid;
  gap: 14px;
  align-items: start;
}

.compact-layout.no-editor {
  grid-template-columns: minmax(0, 1fr);
}

.compact-layout.has-editor {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.compact-layout .workbook-main {
  min-width: 0;
}

.simple-board,
.simple-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  scroll-margin-top: 12px;
}

.schedule-workbench {
  background: #f8fafc;
}

.simple-board {
  overflow: hidden;
}

.simple-head,
.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.block-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.mini-button:hover {
  border-color: var(--primary);
  background: #edf6ff;
}

.simple-head h2 {
  margin: 0;
  font-size: 24px;
}

.simple-head span,
.block-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.simple-blocks {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.schedule-nav {
  position: sticky;
  top: 0;
  z-index: 11;
  display: grid;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(8px);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-row-main {
  align-items: stretch;
}

.nav-row-tight {
  flex-wrap: wrap;
}

.nav-scroll {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  direction: rtl;
}

.nav-label {
  min-width: 44px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-chip,
.nav-arrow {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.nav-chip {
  min-height: 46px;
  min-width: 126px;
  display: grid;
  place-items: center;
  padding: 7px 11px;
  white-space: nowrap;
}

.nav-chip span {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-chip small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.small-chip {
  min-width: auto;
  min-height: 34px;
  padding: 6px 12px;
}

.group-chip {
  display: inline-flex;
  gap: 6px;
}

.chip-symbol {
  font-weight: 900;
}

.nav-chip.active {
  color: var(--primary-dark);
  border-color: var(--primary);
  background: #edf6ff;
}

.nav-arrow {
  width: 42px;
  min-width: 42px;
  font-size: 24px;
}

.nav-arrow:disabled {
  cursor: default;
  opacity: 0.45;
}

.nav-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.schedule-status strong,
.schedule-status span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  white-space: nowrap;
}

.schedule-status b {
  color: var(--text);
}

.schedule-status .status-warn {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.schedule-status .status-note {
  color: #7c2d12;
  background: #fff7ed;
  border-color: #fed7aa;
}

.group-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.group-card {
  min-height: 88px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: right;
}

.group-card:hover,
.group-card.active {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(23, 105, 170, 0.18);
}

.group-card-symbol {
  grid-row: span 3;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #fff;
  border: 1px solid currentColor;
  font-weight: 900;
}

.group-card strong,
.group-card small,
.group-card em {
  min-width: 0;
}

.group-card strong {
  font-size: 14px;
}

.group-card small {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.group-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.title-symbol {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  margin-inline-end: 6px;
  border-radius: 6px;
  border: 1px solid currentColor;
  vertical-align: middle;
  font-size: 12px;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
  overflow-x: auto;
}

.day-card {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.day-card strong {
  font-size: 18px;
  color: var(--primary-dark);
}

.day-card span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.day-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.schedule-status strong {
  color: var(--primary-dark);
  background: #edf6ff;
  border-color: #b8d8f4;
}

.compact-empty {
  min-height: 150px;
  box-shadow: none;
}

.simple-table-wrap {
  width: 100%;
  max-height: calc(100vh - 315px);
  min-height: 320px;
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
}

.simple-table {
  width: max-content;
  min-width: 100%;
  margin-inline-end: 12px;
  border-collapse: separate;
  border-spacing: 0;
}

.simple-table.generic {
  min-width: 680px;
}

.simple-table th,
.simple-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0;
  vertical-align: top;
}

.simple-table th {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 9px;
  background: #eef4fa;
  text-align: center;
  font-size: 13px;
  white-space: nowrap;
}

.simple-table th small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.simple-group,
.simple-role {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  padding: 10px !important;
  background: #fbfcfe;
  font-weight: 800;
}

.simple-role {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

.simple-table th:not(.pin-col),
.simple-table td:not(.pin-col) {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}

.pin-col {
  position: sticky;
  z-index: 4;
}

.simple-table th.pin-col {
  z-index: 7;
}

.pin-group {
  left: 0;
}

.pin-role {
  left: 118px;
}

.simple-table th.pin-group,
.simple-table th.pin-role {
  background: #e6eef6;
}

.tag-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
}

.tag-symbol {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  border: 1px solid currentColor;
  font-size: 12px;
  line-height: 1;
}

.role-symbol {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, 0.72);
}

.role-icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.role-icon-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 0 currentColor);
}

.role-icon-fallback {
  width: 54%;
  height: 54%;
  display: block;
  border-radius: 50%;
  background: currentColor;
}

.role-icon-svg g {
  fill: none;
  stroke: #0f172a;
  stroke-width: 4.2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.role-icon-svg .icon-fill {
  fill: color-mix(in srgb, currentColor 72%, white);
}

.group-north {
  color: #0f5f8f;
  background: #e8f5ff !important;
}

.group-south {
  color: #8a4b00;
  background: #fff3df !important;
}

.group-krisha {
  color: #3157a4;
  background: #eef2ff !important;
}

.group-contract {
  color: #0b766c;
  background: #e6fffb !important;
}

.group-default {
  color: #475569;
  background: #f8fafc !important;
}

.role-command {
  color: #9f1239;
  background: #fff1f2 !important;
}

.role-control {
  color: #6d28d9;
  background: #f5f3ff !important;
}

.role-flight {
  color: #0369a1;
  background: #e0f2fe !important;
}

.role-operator {
  color: #0f766e;
  background: #ecfeff !important;
}

.role-technical {
  color: #475569;
  background: #f1f5f9 !important;
}

.role-navigation {
  color: #1d4ed8;
  background: #eff6ff !important;
}

.role-launch {
  color: #b45309;
  background: #fffbeb !important;
}

.role-antennas {
  color: #047857;
  background: #ecfdf5 !important;
}

.role-logistics {
  color: #9a3412;
  background: #fff7ed !important;
}

.role-payload {
  color: #4338ca;
  background: #eef2ff !important;
}

.role-team {
  color: #334155;
  background: #f8fafc !important;
}

.role-intel {
  color: #166534;
  background: #f0fdf4 !important;
}

.role-production {
  color: #7c2d12;
  background: #fff7ed !important;
}

.role-hr {
  color: #be123c;
  background: #fff1f2 !important;
}

.role-comms {
  color: #0f766e;
  background: #ecfdf5 !important;
}

.role-staff {
  color: #334155;
  background: #f1f5f9 !important;
}

.role-default {
  color: #475569;
  background: #fbfcfe !important;
}

.legend-trigger {
  border-color: #b8d8f4;
  color: var(--primary-dark);
}

.legend-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.legend-panel {
  width: min(760px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.legend-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.legend-head h2 {
  margin: 0;
  font-size: 22px;
}

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

.legend-item {
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legend-symbol {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
}

.context-role {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.context-role .role-icon-svg,
.context-role .role-icon-img {
  width: 24px;
  height: 24px;
}

.legend-item strong,
.legend-item small {
  display: block;
}

.legend-item strong {
  font-size: 14px;
}

.legend-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.simple-cell-button {
  width: 100%;
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 9px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: center;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
}

.cell-main {
  display: block;
}

.cell-person-list {
  display: grid;
  gap: 5px;
}

.cell-person-list.is-excel {
  min-width: 128px;
}

.cell-person-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 18px;
  gap: 6px;
  align-items: center;
  padding: 5px 5px 5px 7px;
  border: 1px solid currentColor;
  border-radius: 8px;
  text-align: start;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05);
}

.cell-person-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
}

.cell-person-icon .role-icon-svg,
.cell-person-icon .role-icon-img {
  width: 22px;
  height: 22px;
}

.cell-person-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.cell-person-text strong,
.cell-person-text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-person-text strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 950;
}

.cell-person-text small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.cell-person-remove {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #64748b;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(100, 116, 139, 0.35);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.cell-person-remove:hover,
.cell-person-remove:focus-visible {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff1f2;
  outline: none;
}

.cell-status,
.cell-placeholder {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.cell-placeholder {
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}

.cell-status {
  color: #475569;
  background: #f1f5f9;
}

.simple-cell-button:hover {
  background: #edf6ff;
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.simple-table td.is-selected .simple-cell-button,
.excel-table td.is-selected .excel-cell-button {
  background: #dff0ff;
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}

.simple-table td.is-empty .simple-cell-button {
  background: #fafafa;
}

.simple-table td.cell-dash .simple-cell-button {
  color: #64748b;
  background: #f8fafc;
}

.simple-table td.cell-headquarters .simple-cell-button {
  background: #eef2ff;
}

.simple-table td.cell-no-activity .simple-cell-button {
  color: #7f1d1d;
  background: #fff1f2;
}

.simple-table td.cell-partial .simple-cell-button {
  background: #fff7ed;
}

.simple-table td.cell-multi .simple-cell-button {
  background: #ecfeff;
}

.simple-table td.cell-long .simple-cell-button {
  background: #fefce8;
}

.simple-table td.cell-assigned .simple-cell-button {
  background: #ffffff;
}

.compact-editor {
  position: sticky;
  top: 14px;
}

.editor-context {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfe;
}

.editor-context div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.editor-context span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.editor-context strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.editor-insight {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.editor-insight span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid currentColor;
  font-weight: 900;
}

.editor-insight strong {
  font-size: 14px;
}

.editor-insight small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.editor-insight.cell-headquarters {
  color: #3157a4;
  background: #eef2ff;
}

.editor-insight.cell-no-activity {
  color: #9f1239;
  background: #fff1f2;
}

.editor-insight.cell-partial {
  color: #9a3412;
  background: #fff7ed;
}

.editor-insight.cell-multi {
  color: #0f766e;
  background: #ecfeff;
}

.editor-insight.cell-empty,
.editor-insight.cell-dash {
  color: #64748b;
  background: #f8fafc;
}

.editor-move-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.cell-assignments-panel {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
}

.cell-assignments-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.cell-assignments-head strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.cell-assignments-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.cell-assignments-save-hint {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 10px;
  font-weight: 900;
}

.cell-assignment-edit-list {
  display: grid;
  gap: 8px;
}

.cell-assignment-edit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  align-items: end;
  padding: 8px;
  border: 1px solid #cbdff5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.cell-assignment-edit-card .assignment-name-field {
  grid-column: 1 / -1;
}

.mini-field {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mini-field span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
}

.mini-field input,
.mini-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 7px 8px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.mini-field input:focus,
.mini-field select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: #60a5fa;
}

.mini-field input[type="time"] {
  direction: ltr;
  text-align: center;
}

.assignment-name-field input {
  font-size: 13px;
  font-weight: 900;
}

.assignment-row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.icon-mini-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 15px;
  font-weight: 900;
}

.icon-mini-button.danger {
  color: #be123c;
  border-color: #ffe4e6;
  background: #fff1f2;
}

.assignment-empty-state {
  padding: 10px;
  border: 1px dashed #bfd5ee;
  border-radius: 8px;
  color: #475569;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
}

.cell-add-person-panel {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
}

.cell-add-person-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.cell-add-person-title strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
}

.cell-add-person-title small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.cell-add-person-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
}

.cell-add-person-row .assignment-name-field,
.cell-add-person-row button {
  grid-column: 1 / -1;
}

.add-assignment-button {
  height: 34px;
  align-self: end;
}

@media (max-width: 1180px) {
  .cell-assignment-edit-card,
  .cell-add-person-row {
    grid-template-columns: minmax(0, 1fr) 1fr 1fr;
  }

  .cell-assignment-edit-card .assignment-name-field,
  .cell-add-person-row .assignment-name-field {
    grid-column: 1 / -1;
  }

  .assignment-row-actions,
  .cell-add-person-row button {
    grid-column: 1 / -1;
  }
}

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

.template-chip {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.template-chip:hover {
  border-color: var(--primary);
  background: #edf6ff;
}

.suggestion-panel {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d7e3f0;
  border-radius: 8px;
  background: #f8fbff;
}

.suggestion-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.suggestion-head strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.suggestion-head small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: left;
}

.suggestion-grid {
  display: grid;
  gap: 7px;
}

.suggestion-card {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid currentColor;
  border-radius: 8px;
  cursor: pointer;
  text-align: start;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.suggestion-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.suggestion-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.suggestion-icon .role-icon-svg,
.suggestion-icon .role-icon-img {
  width: 29px;
  height: 29px;
}

.suggestion-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.suggestion-main strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.suggestion-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.advanced-fields {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--surface-soft);
}

.advanced-fields summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.advanced-fields[open] {
  display: grid;
  gap: 10px;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.workbook-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 330px;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.workbook-main {
  min-width: 0;
}

.excel-frame {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.excel-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.excel-titlebar h2 {
  margin: 0;
  font-size: 24px;
}

.excel-titlebar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.excel-scroll {
  width: 100%;
  max-height: calc(100vh - 165px);
  overflow: auto;
  background: #d9e2f3;
}

.excel-table {
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.excel-table td {
  height: 38px;
  min-width: 58px;
  padding: 0;
  border: 1px solid #a6a6a6;
  color: #111827;
  font-size: 13px;
  line-height: 1.25;
  vertical-align: middle;
}

.excel-cell-button {
  width: 100%;
  min-height: 38px;
  height: 100%;
  display: block;
  padding: 4px 6px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  white-space: inherit;
  overflow-wrap: anywhere;
}

.excel-cell-button:hover {
  outline: 2px solid #1769aa;
  outline-offset: -2px;
}

.sidebar,
.workspace,
.editor-panel {
  display: grid;
  gap: 14px;
}

.panel,
.board-summary,
.section-block,
.editor-panel,
.empty-state,
.wide-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.panel,
.editor-panel,
.empty-state,
.wide-panel {
  padding: 16px;
}

.board-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 10px;
  align-items: center;
}

.summary-grid span,
.metric-row {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 7px;
  padding: 9px 11px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
}

.board-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 11px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: left;
}

.board-item.active {
  border-color: var(--primary);
  background: #edf6ff;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.schedule-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-table th,
.schedule-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
  vertical-align: top;
}

.schedule-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4fa;
  text-align: left;
  font-size: 13px;
}

.schedule-table th small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 600;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 120px;
  background: #fff;
}

th.sticky-col {
  background: #e6eef6;
}

.sticky-col.second {
  left: 120px;
  min-width: 150px;
}

.group-cell,
.role-cell {
  font-weight: 800;
}

.cell-button {
  width: 100%;
  min-height: 74px;
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.cell-button span {
  overflow-wrap: anywhere;
}

.cell-button small {
  color: var(--muted);
}

.cell-button:hover {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(23, 105, 170, 0.15);
}

.status-empty {
  color: var(--muted);
  background: #fbfcfe;
}

.status-planned {
  background: #fff8e8;
  border-color: #f3d591;
}

.status-active {
  background: #eef6ff;
  border-color: #9cc5ee;
}

.status-done {
  background: #ecfdf3;
  border-color: #a7e0b8;
}

.status-cancelled {
  background: #fff1f0;
  border-color: #f0b6b0;
}

.editor-panel {
  position: sticky;
  top: 14px;
}

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

.editor-form,
.api-list {
  display: grid;
  gap: 12px;
}

.api-list code {
  display: block;
  padding: 9px 10px;
  border-radius: 7px;
  background: #101827;
  color: #eef6ff;
  overflow-x: auto;
}

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

.empty-state {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
}

.empty-table {
  color: var(--muted);
  text-align: center;
  padding: 30px;
}

.loading-line {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
}

.notice-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: grid;
  gap: 8px;
}

.notice {
  max-width: 360px;
  padding: 11px 13px;
  border-radius: 7px;
  background: #ecfdf3;
  color: var(--success);
  border: 1px solid #a7e0b8;
  box-shadow: var(--shadow);
}

.notice.error {
  background: #fff1f0;
  color: var(--danger);
  border-color: #f0b6b0;
}

.ai-panel {
  margin: 12px 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.ai-panel summary {
  display: grid;
  grid-template-columns: auto minmax(180px, auto) 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.ai-panel summary::-webkit-details-marker {
  display: none;
}

.ai-panel summary::before {
  content: "+";
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  background: var(--surface-soft);
}

.ai-panel[open] summary::before {
  content: "-";
}

.ai-panel summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ai-upload-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.ai-chat-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 0 16px 16px;
}

.ai-upload-form .field,
.ai-chat-form .field {
  margin: 0;
}

.ai-answer {
  display: grid;
  gap: 6px;
  margin: 0 16px 16px;
  padding: 11px 12px;
  border: 1px solid #b8d7ef;
  border-radius: 7px;
  background: #eef7ff;
  color: #153e68;
}

.ai-answer p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.ai-preview {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.ai-preview-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ai-preview-head div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ai-preview-head small {
  color: var(--muted);
}

.ai-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.ai-metrics span {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.ai-row-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.ai-row {
  display: grid;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
}

.ai-row p {
  margin: 0;
  color: #334155;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.ai-row small {
  color: var(--muted);
}

.ai-row.valid {
  border-right-color: var(--success);
}

.ai-workbook-preview {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ai-workbook-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ai-workbook-tabs span {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-workbook-tabs span.active {
  border-color: #86c99b;
  background: #edf8f1;
  color: var(--primary-dark);
}

.ai-workbook-scroll {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-workbook-preview table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text);
  font-size: 12px;
}

.ai-workbook-preview th,
.ai-workbook-preview td {
  min-width: 92px;
  max-width: 180px;
  padding: 7px 8px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-workbook-preview th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #edf3f8;
  color: #1f2937;
  font-weight: 900;
}

.ai-workbook-preview tbody th {
  right: 0;
  z-index: 2;
  min-width: 42px;
  text-align: center;
}

.ai-workbook-preview small {
  color: var(--muted);
}

.ai-action-preview {
  display: grid;
  gap: 10px;
}

.ai-action-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.ai-action-title span {
  padding: 4px 7px;
  border: 1px solid #bfe3ca;
  border-radius: 999px;
  background: #edf8f1;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

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

.ai-action-grid div,
.ai-before-after div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.ai-action-grid span,
.ai-before-after span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-action-grid strong,
.ai-before-after p {
  color: var(--text);
  overflow-wrap: anywhere;
}

.ai-before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.ai-before-after p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.4;
}

.ai-action-list {
  display: grid;
  max-height: 210px;
  overflow: auto;
  gap: 6px;
  padding: 2px;
}

.ai-action-list div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.ai-action-list strong {
  color: var(--primary-dark);
  font-weight: 900;
}

.ai-action-list span,
.ai-action-list small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ai-action-list small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.35;
}

.ai-action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ai-row.uncertain {
  border-right-color: var(--warning);
}

.ai-row.invalid,
.ai-row.duplicate,
.ai-row.conflict {
  border-right-color: var(--danger);
}

.feedback-panel {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
}

.feedback-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.feedback-summary span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.feedback-summary strong {
  color: var(--primary-dark);
  font-size: 19px;
}

.feedback-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.feedback-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  color: var(--primary-dark);
}

.feedback-section-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.special-request-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.special-request-column {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.special-request-column.status-pending {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.special-request-column.status-approved {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.special-request-column.status-rejected {
  background: #fff7ed;
  border-color: #fed7aa;
}

.special-request-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary-dark);
}

.special-request-column-head span {
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.special-request-list {
  grid-template-columns: 1fr;
}

.special-request-card {
  background: rgba(255, 255, 255, 0.88);
}

.special-request-card.status-approved {
  border-color: #bbf7d0;
}

.special-request-card.status-rejected {
  border-color: #fed7aa;
}

.special-request-comment {
  padding: 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.special-request-admin-comment {
  color: var(--primary-dark);
  font-weight: 800;
}

.special-request-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}

.special-request-actions .primary-button,
.special-request-actions .danger-button {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 7px;
}

.feedback-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
  max-height: none;
  overflow: auto;
  padding: 1px;
}

.feedback-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.feedback-meta strong {
  color: var(--primary-dark);
}

.feedback-status {
  padding: 2px 7px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eef2ff;
  font-size: 11px;
  font-weight: 900;
}

.feedback-status.status-new {
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.feedback-status.status-resolved,
.feedback-status.status-reviewed {
  border-color: #bbf7d0;
  color: #047857;
  background: #ecfdf5;
}

.feedback-status.status-ignored {
  border-color: #e2e8f0;
  color: #64748b;
  background: #f8fafc;
}

.feedback-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.feedback-item small,
.feedback-empty {
  color: var(--muted);
}

.ai-agent {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 40;
  direction: rtl;
}

.ai-agent-toggle {
  width: 54px;
  height: 54px;
  border: 1px solid #9cc5ee;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  box-shadow: var(--shadow);
  font-weight: 900;
}

.ai-agent-panel {
  position: absolute;
  left: 0;
  bottom: 66px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(620px, calc(100vh - 96px));
  display: none;
  grid-template-rows: auto auto minmax(160px, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ai-agent-upload {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.ai-agent-upload .ai-upload-form {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0;
  border-top: 0;
}

.ai-agent-upload .ai-preview {
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ai-agent-upload .ai-preview-head {
  align-items: start;
}

.ai-agent-upload .ai-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-loader {
  display: grid;
  grid-template-columns: repeat(3, 8px) minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  padding: 10px;
  border: 1px solid #b8d7ef;
  border-radius: 8px;
  background: #eef7ff;
  color: #153e68;
  font-size: 12px;
  font-weight: 800;
}

.ai-loader span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  animation: aiPulse 900ms ease-in-out infinite;
}

.ai-loader span:nth-child(2) {
  animation-delay: 140ms;
}

.ai-loader span:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes aiPulse {
  0%, 80%, 100% {
    opacity: .35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.ai-agent.is-open .ai-agent-panel {
  display: grid;
}

.ai-agent-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.ai-agent-head div {
  display: grid;
  gap: 3px;
}

.ai-agent-head small {
  color: var(--muted);
  font-size: 12px;
}

.ai-agent-messages {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  overflow: auto;
}

.ai-agent-message {
  max-width: 88%;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eef6ff;
  color: #153e68;
}

.ai-agent-message.user {
  justify-self: end;
  color: #fff;
  background: var(--primary);
}

.ai-agent-message.error {
  background: #fff1f0;
  color: var(--danger);
}

.ai-agent-message p,
.ai-action-card p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

.ai-action-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #b8d7ef;
  border-radius: 8px;
  background: #fbfcfe;
}

.ai-action-card div {
  display: flex;
  gap: 8px;
}

.ai-agent-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.ai-agent-form textarea {
  width: 100%;
  resize: none;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 9px;
}

@media (max-width: 1180px) {
  .layout,
  .workbook-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .compact-layout {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    grid-column: 1 / -1;
    position: static;
  }

  .group-overview {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 780px) {
  .app-shell {
    padding: 10px;
  }

  .topbar,
  .board-summary,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout,
  .workbook-layout {
    grid-template-columns: 1fr;
  }

  .work-toolbar {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1 1 0;
  }

  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button,
  .topbar-actions .user-pill {
    flex: 1 1 auto;
  }

  .ai-panel summary,
  .ai-upload-form,
  .ai-chat-form,
  .ai-metrics {
    grid-template-columns: 1fr;
  }

  .ai-panel summary {
    grid-template-columns: auto 1fr;
  }

  .ai-panel summary small {
    grid-column: 1 / -1;
  }

  .ai-preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .simple-table-wrap {
    max-height: calc(100vh - 430px);
  }

  .schedule-nav {
    position: static;
  }

  .group-overview {
    grid-template-columns: 1fr;
  }

  .legend-grid {
    grid-template-columns: 1fr;
  }

  .day-strip {
    grid-template-columns: repeat(7, minmax(96px, 1fr));
  }

  .simple-table th:not(.pin-col),
  .simple-table td:not(.pin-col) {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
  }

  .simple-group {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
  }

  .simple-role {
    width: 124px;
    min-width: 124px;
    max-width: 124px;
  }

  .pin-role {
    left: 92px;
  }
}

/* Premium glass visual system, adapted from the Shifts Helper landing page. */
:root {
  color-scheme: dark;
  --bg: #07110d;
  --bg-2: #0d1d16;
  --surface: rgba(10, 23, 17, 0.78);
  --surface-soft: rgba(245, 251, 245, 0.07);
  --surface-strong: rgba(245, 251, 245, 0.12);
  --line: rgba(210, 236, 215, 0.2);
  --line-strong: rgba(159, 213, 143, 0.52);
  --text: #f5fbf5;
  --muted: rgba(229, 238, 231, 0.72);
  --primary: #a2d891;
  --primary-dark: #61d98b;
  --danger: #ff8d8d;
  --success: #61d98b;
  --warning: #d6bd78;
  --gold: #d6bd78;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.28);
}

html,
body {
  background:
    radial-gradient(circle at 70% -10%, rgba(97, 217, 139, 0.2), transparent 32rem),
    radial-gradient(circle at 8% 12%, rgba(214, 189, 120, 0.13), transparent 28rem),
    linear-gradient(180deg, #07110d 0%, #0b1812 44%, #06100c 100%);
  color: var(--text);
}

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

body::before {
  z-index: -3;
  background:
    radial-gradient(circle at 28% 18%, rgba(162, 216, 145, 0.1), transparent 22rem),
    linear-gradient(rgba(7, 17, 13, 0.32), rgba(7, 17, 13, 0.86));
}

body::after {
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 86px 86px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
}

.app-shell {
  width: min(1480px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.login-page {
  background: transparent;
}

.login-panel,
.topbar,
.work-toolbar,
.simple-board,
.simple-block,
.panel,
.board-summary,
.section-block,
.editor-panel,
.empty-state,
.wide-panel,
.excel-frame,
.ai-panel,
.ai-agent-panel,
.legend-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    var(--surface);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-soft);
}

.login-panel {
  border-radius: 34px;
  padding: 32px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  border-radius: 26px;
  padding: 18px 22px;
  backdrop-filter: blur(26px);
}

.topbar h1 {
  color: var(--text);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.02;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 10px;
  padding: 7px 12px;
  border: 1px solid rgba(162, 216, 145, 0.34);
  border-radius: 999px;
  background: rgba(162, 216, 145, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.muted,
.simple-head span,
.block-title span,
.excel-titlebar span,
.ai-agent-head small,
.ai-preview-head small,
.editor-context span,
.suggestion-head small,
.legend-item small,
.nav-hint,
.field span,
.search-field span,
.day-card small,
.group-card em,
.cell-person-text small,
.ai-row small {
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.search-field input,
.ai-agent-form textarea {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.field input::placeholder,
.search-field input::placeholder,
.ai-agent-form textarea::placeholder {
  color: rgba(229, 238, 231, 0.42);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-field input:focus,
.ai-agent-form textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(162, 216, 145, 0.18);
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.mini-button,
.template-chip,
.nav-chip,
.nav-arrow,
.sheet-tab,
.segmented-control button {
  border-radius: 999px;
  font-weight: 900;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.primary-button {
  border-color: rgba(162, 216, 145, 0.54);
  background: linear-gradient(135deg, var(--primary), #7acb81);
  color: #07110d;
  box-shadow: 0 18px 42px rgba(113, 210, 126, 0.24);
}

.primary-button:hover {
  background: linear-gradient(135deg, #b4e6a5, var(--primary-dark));
  transform: translateY(-1px);
}

.ghost-button,
.mini-button,
.template-chip,
.nav-chip,
.nav-arrow,
.sheet-tab,
.icon-button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.ghost-button:hover,
.mini-button:hover,
.template-chip:hover,
.nav-chip:hover,
.nav-arrow:hover,
.sheet-tab:hover,
.icon-button:hover {
  border-color: rgba(162, 216, 145, 0.42);
  background: rgba(162, 216, 145, 0.12);
  color: var(--text);
}

.danger-button {
  color: #ffd9d9;
  border-color: rgba(255, 141, 141, 0.34);
  background: rgba(118, 30, 30, 0.24);
}

.danger-button:hover {
  border-color: rgba(255, 141, 141, 0.62);
  background: rgba(118, 30, 30, 0.38);
}

.user-pill,
.summary-grid span,
.metric-row,
.schedule-status strong,
.schedule-status span,
.micro-proof span {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 251, 245, 0.86);
}

.sheet-tabs {
  margin: 14px 0 12px;
  padding: 4px 0 8px;
}

.sheet-tab {
  min-height: 44px;
  color: var(--muted);
}

.sheet-tab.active,
.segmented-control button.active,
.nav-chip.active {
  border-color: rgba(162, 216, 145, 0.62);
  background: rgba(162, 216, 145, 0.16);
  color: var(--primary);
  box-shadow: 0 0 24px rgba(162, 216, 145, 0.22);
}

.work-toolbar,
.simple-board,
.simple-block,
.excel-frame {
  border-radius: 26px;
}

.work-toolbar {
  padding: 14px;
  margin-bottom: 14px;
}

.segmented-control {
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.simple-head,
.block-title,
.excel-titlebar,
.section-head,
.legend-head,
.ai-agent-head {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.simple-head h2,
.excel-titlebar h2,
.legend-head h2,
.panel h2,
.editor-panel h2,
.empty-state h2 {
  color: var(--text);
}

.schedule-workbench,
.schedule-nav,
.schedule-status,
.group-overview,
.day-strip,
.ai-preview,
.ai-agent-upload,
.ai-action-card,
.suggestion-panel,
.advanced-fields,
.editor-context,
.loading-line {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.simple-table-wrap,
.excel-scroll,
.table-wrap {
  scrollbar-color: rgba(162, 216, 145, 0.5) rgba(255, 255, 255, 0.08);
}

.simple-table,
.excel-table,
.schedule-table {
  color: #0f172a;
}

.simple-table th,
.schedule-table th {
  background: rgba(17, 34, 26, 0.96);
  color: var(--text);
}

.simple-table th small,
.schedule-table th small {
  color: var(--muted);
}

.simple-table td,
.schedule-table td {
  border-color: rgba(11, 24, 18, 0.34);
}

.simple-group,
.simple-role,
.sticky-col,
.simple-table th.pin-group,
.simple-table th.pin-role,
th.sticky-col {
  background: rgba(17, 34, 26, 0.96) !important;
  color: var(--text);
}

.simple-cell-button,
.cell-button,
.day-card,
.group-card,
.editor-insight,
.suggestion-card,
.legend-item,
.board-item,
.ai-row,
.ai-metrics span,
.calc-note,
.compare,
.security-card {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.simple-cell-button:hover,
.cell-button:hover,
.board-item:hover,
.suggestion-card:hover,
.group-card:hover,
.group-card.active {
  border-color: rgba(162, 216, 145, 0.58);
  background: rgba(162, 216, 145, 0.12);
  box-shadow: inset 0 0 0 1px rgba(162, 216, 145, 0.16);
}

.simple-table td.is-selected .simple-cell-button,
.excel-table td.is-selected .excel-cell-button {
  background: rgba(162, 216, 145, 0.24);
  outline-color: var(--primary);
}

.simple-table td.is-empty .simple-cell-button,
.simple-table td.cell-dash .simple-cell-button,
.status-empty {
  background: rgba(255, 255, 255, 0.045);
  color: rgba(245, 251, 245, 0.56);
}

.simple-table td.cell-headquarters .simple-cell-button {
  background: rgba(118, 139, 255, 0.16);
}

.simple-table td.cell-no-activity .simple-cell-button,
.status-cancelled {
  background: rgba(255, 141, 141, 0.14);
}

.simple-table td.cell-partial,
.status-planned {
  background: rgba(214, 189, 120, 0.14);
}

.simple-table td.cell-multi .simple-cell-button,
.status-active {
  background: rgba(97, 217, 139, 0.12);
}

.simple-table td.cell-long .simple-cell-button {
  background: rgba(214, 189, 120, 0.18);
}

.simple-table td.cell-assigned .simple-cell-button,
.status-done {
  background: rgba(255, 255, 255, 0.08);
}

.cell-person-card,
.cell-person-icon,
.cell-person-remove,
.role-symbol,
.group-card-symbol,
.tag-symbol,
.legend-symbol,
.suggestion-icon,
.editor-insight span {
  background: rgba(255, 255, 255, 0.16);
}

.cell-person-text strong,
.suggestion-main strong,
.editor-context strong,
.group-card strong,
.group-card small,
.day-card span,
.day-card strong,
.ai-row p,
.ai-action-card p {
  color: var(--text);
}

.cell-placeholder,
.cell-status {
  color: rgba(245, 251, 245, 0.72);
  background: rgba(255, 255, 255, 0.07);
}

.group-north,
.role-flight,
.role-navigation {
  color: #9bd8ff;
  background: rgba(64, 156, 213, 0.16) !important;
}

.group-south,
.role-launch,
.role-logistics,
.role-production {
  color: #f5cf84;
  background: rgba(214, 189, 120, 0.16) !important;
}

.group-krisha,
.role-control,
.role-payload {
  color: #c7c5ff;
  background: rgba(129, 122, 255, 0.16) !important;
}

.group-contract,
.role-operator,
.role-antennas,
.role-comms,
.role-intel {
  color: #8ce9be;
  background: rgba(97, 217, 139, 0.14) !important;
}

.group-default,
.role-technical,
.role-team,
.role-staff,
.role-default {
  color: rgba(245, 251, 245, 0.82);
  background: rgba(255, 255, 255, 0.08) !important;
}

.role-command,
.role-hr {
  color: #ffb5b5;
  background: rgba(255, 141, 141, 0.14) !important;
}

.role-icon-svg g {
  stroke: currentColor;
}

.role-icon-svg .icon-fill {
  fill: rgba(255, 255, 255, 0.28);
}

.excel-scroll {
  background: rgba(255, 255, 255, 0.06);
}

.excel-table td {
  border-color: rgba(210, 236, 215, 0.2);
}

.excel-cell-button:hover {
  outline-color: var(--primary);
}

.editor-panel {
  border-radius: 26px;
}

.editor-context,
.editor-insight,
.suggestion-panel,
.advanced-fields {
  border-radius: 18px;
}

.notice {
  border-color: rgba(162, 216, 145, 0.38);
  border-radius: 20px;
  background: rgba(12, 28, 21, 0.88);
  color: var(--primary);
  backdrop-filter: blur(18px);
}

.notice.error,
.inline-error,
.system-error {
  border-color: rgba(255, 141, 141, 0.32);
  border-radius: 18px;
  background: rgba(80, 22, 22, 0.42);
  color: #ffd9d9;
}

.loading-line {
  color: var(--muted);
  border-radius: 18px;
}

.ai-panel summary::before {
  border-color: rgba(162, 216, 145, 0.34);
  background: rgba(162, 216, 145, 0.1);
  color: var(--primary);
}

.ai-answer,
.ai-loader {
  border-color: rgba(162, 216, 145, 0.34);
  border-radius: 18px;
  background: rgba(162, 216, 145, 0.1);
  color: var(--text);
}

.ai-loader span {
  background: var(--primary);
}

.ai-agent-toggle {
  border-color: rgba(162, 216, 145, 0.54);
  background: linear-gradient(135deg, var(--primary), #7acb81);
  color: #07110d;
  box-shadow: 0 18px 42px rgba(113, 210, 126, 0.24);
}

.ai-agent-panel {
  border-radius: 28px;
}

.ai-agent-message {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.ai-agent-message.user {
  color: #07110d;
  background: linear-gradient(135deg, var(--primary), #7acb81);
}

.ai-agent-message.error {
  background: rgba(80, 22, 22, 0.42);
  color: #ffd9d9;
}

.ai-row.valid {
  border-right-color: var(--success);
}

.ai-row.uncertain {
  border-right-color: var(--warning);
}

.ai-row.invalid,
.ai-row.duplicate,
.ai-row.conflict {
  border-right-color: var(--danger);
}

.legend-backdrop {
  background: rgba(4, 11, 8, 0.62);
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 18px, 1480px);
    padding-top: 10px;
  }

  .topbar,
  .work-toolbar,
  .simple-board,
  .editor-panel,
  .ai-agent-panel {
    border-radius: 22px;
  }

  .topbar {
    top: 8px;
  }
}

/* Admin usability pass: keep the brand mood, but make the backend a dense work console. */
:root {
  --admin-bg: #07110d;
  --admin-panel: rgba(13, 29, 22, 0.9);
  --admin-panel-strong: rgba(17, 38, 28, 0.96);
  --admin-panel-soft: rgba(245, 251, 245, 0.055);
  --admin-cell: rgba(245, 251, 245, 0.09);
  --admin-cell-hover: rgba(162, 216, 145, 0.16);
  --admin-line: rgba(210, 236, 215, 0.18);
  --admin-line-strong: rgba(162, 216, 145, 0.42);
  --admin-sticky-top: 76px;
}

body {
  font-size: 14px;
}

body::before {
  opacity: 0.86;
}

body::after {
  background-size: 64px 64px;
  opacity: 0.72;
}

.app-shell {
  width: min(100% - 20px, 1760px);
  padding: 10px 0 22px;
}

.topbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: center;
  top: 8px;
  z-index: 36;
  padding: 10px 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
    rgba(8, 19, 14, 0.92);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.topbar > div:first-child {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}

.topbar .eyebrow {
  grid-row: span 2;
  margin: 0;
  min-height: 32px;
  align-items: center;
  padding: 6px 11px;
  font-size: 12px;
}

.topbar h1 {
  margin: 0;
  min-width: 0;
  font-size: clamp(21px, 2vw, 30px);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.topbar-actions .user-pill {
  order: 5;
  max-width: 132px;
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.danger-button {
  background: rgba(104, 27, 27, 0.32);
}

.sheet-tabs {
  position: sticky;
  top: 78px;
  z-index: 32;
  min-height: 50px;
  margin: 8px 0 8px;
  padding: 6px;
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  background: rgba(8, 19, 14, 0.88);
  backdrop-filter: blur(22px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.sheet-tab {
  min-width: auto;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 14px;
  font-size: 13px;
}

.work-toolbar {
  position: sticky;
  top: 136px;
  z-index: 31;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: rgba(8, 19, 14, 0.9);
  backdrop-filter: blur(22px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
}

.search-field {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.search-field span {
  min-width: 52px;
  font-size: 12px;
  text-transform: none;
}

.search-field input {
  min-height: 38px;
  border-radius: 14px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.075);
}

.segmented-control {
  min-height: 38px;
  padding: 3px;
}

.segmented-control button {
  min-height: 30px;
  padding: 5px 13px;
  font-size: 12px;
}

.compact-layout {
  gap: 10px;
}

.compact-layout.has-editor {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.simple-board,
.simple-block,
.editor-panel,
.excel-frame,
.wide-panel,
.panel,
.empty-state {
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.028)),
    var(--admin-panel);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
}

.simple-head,
.block-title,
.excel-titlebar,
.section-head {
  min-height: 52px;
  padding: 10px 14px;
}

.simple-head > div {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.simple-head .eyebrow {
  margin: 0;
  min-height: 30px;
  padding: 5px 10px;
}

.simple-head h2,
.excel-titlebar h2 {
  font-size: 24px;
}

.schedule-nav {
  position: static;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  padding: 8px 10px;
  background: rgba(10, 23, 17, 0.94);
  backdrop-filter: blur(18px);
}

.nav-row {
  flex: 0 1 auto;
  gap: 7px;
}

.nav-row-main {
  align-items: center;
}

.nav-row-tight {
  flex-wrap: nowrap;
}

.nav-scroll {
  flex: 0 1 auto;
}

.nav-chip,
.nav-arrow {
  min-height: 36px;
  border-radius: 14px;
}

.nav-chip {
  min-width: 96px;
  padding: 5px 10px;
}

.week-switcher .nav-chip {
  min-width: 114px;
}

.nav-arrow {
  width: 36px;
  min-width: 36px;
  font-size: 20px;
}

.small-chip {
  min-height: 31px;
  padding: 5px 10px;
}

.schedule-status {
  padding: 8px 10px;
  gap: 7px;
  overflow-x: auto;
}

.schedule-status strong,
.schedule-status span {
  min-height: 26px;
  padding: 3px 9px;
  font-size: 12px;
}

.group-overview {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px;
}

.group-card {
  min-height: 72px;
  border-radius: 12px;
  padding: 9px;
}

.day-strip {
  gap: 6px;
  padding: 8px 10px;
}

.day-card {
  min-height: 58px;
  border-radius: 10px;
}

.simple-blocks {
  gap: 10px;
  padding: 10px;
}

.simple-table-wrap {
  max-height: calc(100vh - 330px);
  min-height: 380px;
  background: rgba(4, 11, 8, 0.32);
}

.simple-table {
  border-spacing: 0;
}

.simple-table th {
  top: 0;
  height: 44px;
  padding: 7px 9px;
  background: #102018;
  color: rgba(245, 251, 245, 0.96);
  font-size: 12px;
}

.simple-table th:not(.pin-col),
.simple-table td:not(.pin-col) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}

.simple-group {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}

.simple-role {
  width: 146px;
  min-width: 146px;
  max-width: 146px;
}

.pin-role {
  left: 104px;
}

.simple-group,
.simple-role,
.simple-table th.pin-group,
.simple-table th.pin-role {
  background: #102018 !important;
}

.simple-cell-button {
  min-height: 58px;
  padding: 7px;
  background: var(--admin-cell);
}

.cell-person-list {
  gap: 4px;
}

.cell-person-card {
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 5px;
  padding: 4px 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.13) !important;
}

.role-symbol,
.group-card-symbol,
.tag-symbol,
.title-symbol,
.legend-symbol,
.suggestion-icon,
.editor-insight span,
.cell-person-icon,
.context-role .role-icon-svg,
.context-role .role-icon-img {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #102018 !important;
  border-color: rgba(245, 251, 245, 0.72) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.18);
}

.role-icon-svg g {
  stroke: #102018 !important;
}

.role-icon-svg .icon-fill {
  fill: rgba(16, 32, 24, 0.18) !important;
}

.role-icon-img {
  filter: none;
}

.cell-person-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.cell-person-icon .role-icon-svg,
.cell-person-icon .role-icon-img {
  width: 20px;
  height: 20px;
}

.cell-person-text strong {
  font-size: 10.5px;
}

.cell-person-text small {
  font-size: 8.5px;
}

.cell-placeholder,
.cell-status {
  padding: 2px 6px;
  font-size: 9px;
  background: rgba(255, 255, 255, 0.9);
  color: #102018;
  border-color: rgba(255, 255, 255, 0.78);
}

.block-title strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
}

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

.mini-button {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 12px;
  font-size: 11px;
}

.compact-editor {
  top: 88px;
  max-height: calc(100vh - 100px);
  overflow: auto;
}

.editor-panel {
  padding: 12px;
}

.editor-head h2 {
  font-size: 20px;
}

.editor-form {
  gap: 10px;
}

.editor-context,
.editor-insight,
.suggestion-panel,
.advanced-fields {
  border-radius: 13px;
  padding: 9px;
}

.template-chip,
.suggestion-card {
  border-radius: 12px;
}

.ai-agent {
  left: 14px;
  bottom: 14px;
}

.ai-agent-toggle {
  width: 52px;
  height: 52px;
  box-shadow: 0 12px 32px rgba(113, 210, 126, 0.28);
}

.ai-agent-panel {
  width: min(420px, calc(100vw - 24px));
  max-height: min(680px, calc(100vh - 88px));
  border-radius: 20px;
}

.ai-agent-head,
.ai-agent-upload,
.ai-agent-form,
.ai-agent-messages {
  padding: 10px;
}

.notice-root {
  right: 14px;
  bottom: 14px;
}

.notice {
  max-width: 420px;
}

@media (min-width: 1320px) {
  .compact-layout.has-editor {
    grid-template-columns: minmax(0, 1fr) 380px;
  }

  .simple-table-wrap {
    max-height: calc(100vh - 300px);
  }
}

@media (max-width: 1180px) {
  .sheet-tabs {
    top: 76px;
  }

  .work-toolbar {
    top: 132px;
  }

  .compact-layout.has-editor {
    grid-template-columns: 1fr;
  }

  .compact-editor {
    position: static;
    max-height: none;
  }
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 12px, 1760px);
    padding-top: 6px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 10px;
    border-radius: 16px;
  }

  .topbar > div:first-child {
    grid-template-columns: 1fr;
  }

  .topbar .eyebrow {
    grid-row: auto;
    width: fit-content;
  }

  .topbar h1 {
    white-space: normal;
    font-size: 24px;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions .user-pill {
    order: -1;
    grid-column: 1 / -1;
    max-width: none;
    justify-content: center;
  }

  .sheet-tabs,
  .work-toolbar,
  .schedule-nav {
    position: static;
    border-radius: 16px;
  }

  .work-toolbar,
  .search-field {
    grid-template-columns: 1fr;
  }

  .group-overview {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-nav,
  .nav-row,
  .nav-scroll {
    justify-content: flex-start;
  }

  .nav-row {
    width: 100%;
  }

  .nav-scroll {
    overflow-x: auto;
  }

  .simple-table-wrap {
    max-height: calc(100vh - 360px);
    min-height: 320px;
  }

  .simple-table th:not(.pin-col),
  .simple-table td:not(.pin-col) {
    width: 106px;
    min-width: 106px;
    max-width: 106px;
  }

  .simple-group {
    width: 86px;
    min-width: 86px;
    max-width: 86px;
  }

  .simple-role {
    width: 118px;
    min-width: 118px;
    max-width: 118px;
  }

  .pin-role {
    left: 86px;
  }
}

/* White admin theme: calm, readable, work-first. */
:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-2: #eaf0f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-strong: #eef3f8;
  --line: #dce4ee;
  --line-strong: #b9c8d8;
  --text: #142033;
  --muted: #657386;
  --primary: #2f8f5b;
  --primary-dark: #1f6f45;
  --danger: #c2413b;
  --success: #27864f;
  --warning: #b7791f;
  --gold: #c39a3b;
  --shadow: 0 18px 46px rgba(25, 39, 66, 0.12);
  --shadow-soft: 0 8px 22px rgba(25, 39, 66, 0.08);
  --admin-bg: #f4f7fb;
  --admin-panel: #ffffff;
  --admin-panel-strong: #f8fbff;
  --admin-panel-soft: #f1f5f9;
  --admin-cell: #ffffff;
  --admin-cell-hover: #eef8f1;
  --admin-line: #dce4ee;
  --admin-line-strong: #9fcfaf;
}

html,
body {
  background:
    radial-gradient(circle at 84% -8%, rgba(47, 143, 91, 0.14), transparent 30rem),
    radial-gradient(circle at 10% 4%, rgba(59, 130, 246, 0.10), transparent 28rem),
    linear-gradient(180deg, #f9fbfe 0%, #f4f7fb 42%, #eef3f8 100%);
  color: var(--text);
}

body::before,
body::after {
  opacity: 0;
}

.login-panel,
.topbar,
.work-toolbar,
.simple-board,
.simple-block,
.panel,
.board-summary,
.section-block,
.editor-panel,
.empty-state,
.wide-panel,
.excel-frame,
.ai-panel,
.ai-agent-panel,
.legend-panel {
  border: 1px solid var(--line);
  background: #ffffff;
  backdrop-filter: none;
  box-shadow: var(--shadow-soft);
}

.topbar {
  background: #ffffff;
  border-color: #dce4ee;
  box-shadow: 0 10px 28px rgba(25, 39, 66, 0.10);
}

.topbar h1,
.simple-head h2,
.excel-titlebar h2,
.legend-head h2,
.panel h2,
.editor-panel h2,
.empty-state h2,
.block-title strong,
.cell-person-text strong,
.suggestion-main strong,
.editor-context strong,
.group-card strong,
.group-card small,
.day-card span,
.day-card strong,
.ai-row p,
.ai-action-card p {
  color: var(--text);
}

.eyebrow {
  border-color: #bfe3ca;
  background: #edf8f1;
  color: var(--primary-dark);
}

.muted,
.simple-head span,
.block-title span,
.excel-titlebar span,
.ai-agent-head small,
.ai-preview-head small,
.editor-context span,
.suggestion-head small,
.legend-item small,
.nav-hint,
.field span,
.search-field span,
.day-card small,
.group-card em,
.cell-person-text small,
.ai-row small,
.block-tools span {
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.search-field input,
.ai-agent-form textarea {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
}

.field input::placeholder,
.search-field input::placeholder,
.ai-agent-form textarea::placeholder {
  color: #9aa8b8;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-field input:focus,
.ai-agent-form textarea:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(47, 143, 91, 0.16);
}

.primary-button {
  color: #ffffff;
  border-color: var(--primary);
  background: linear-gradient(135deg, #2f8f5b, #42b977);
  box-shadow: 0 10px 22px rgba(47, 143, 91, 0.22);
}

.primary-button:hover {
  background: linear-gradient(135deg, #26784b, #36a867);
}

.ghost-button,
.mini-button,
.template-chip,
.nav-chip,
.nav-arrow,
.sheet-tab,
.icon-button {
  border-color: var(--line);
  background: #ffffff;
  color: #253449;
}

.ghost-button:hover,
.mini-button:hover,
.template-chip:hover,
.nav-chip:hover,
.nav-arrow:hover,
.sheet-tab:hover,
.icon-button:hover {
  border-color: #a6d5b5;
  background: #f1faf4;
  color: var(--primary-dark);
}

.topbar.compact-topbar {
  min-height: 86px;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid #dbe6f1;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(47, 143, 91, 0.08), rgba(255, 255, 255, 0) 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 34px rgba(25, 39, 66, 0.11);
}

.topbar.compact-topbar::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  border-radius: 22px 0 0 22px;
  background: linear-gradient(180deg, #2f8f5b, #65c98a);
}

.topbar.compact-topbar .brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 7px;
  border: 1px solid #dce4ee;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(25, 39, 66, 0.08);
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
}

.brand-copy .eyebrow {
  width: fit-content;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.topbar.compact-topbar h1 {
  margin: 0;
  color: #101b2d;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.02;
  text-align: left;
}

.brand-copy small {
  max-width: 520px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar.compact-topbar .topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar.compact-topbar .topbar-actions button,
.topbar.compact-topbar .user-pill {
  min-height: 42px;
  border-radius: 999px;
}

@media (max-width: 820px) {
  .topbar.compact-topbar {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .topbar.compact-topbar .brand-lockup {
    align-items: flex-start;
  }

  .admin-logo {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .topbar.compact-topbar h1 {
    font-size: 28px;
  }
}

.danger-button {
  color: #a32621;
  border-color: #efc2bf;
  background: #fff5f4;
}

.danger-button:hover {
  border-color: #df8f8a;
  background: #ffe9e7;
}

.user-pill,
.summary-grid span,
.metric-row,
.schedule-status strong,
.schedule-status span {
  border-color: var(--line);
  background: #f7f9fc;
  color: #34445a;
}

.sheet-tabs,
.work-toolbar {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
  backdrop-filter: blur(14px);
}

.sheet-tab.active,
.segmented-control button.active,
.nav-chip.active {
  border-color: #8ccc9f;
  background: #eaf8ef;
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 91, 0.08);
}

.segmented-control {
  border-color: var(--line);
  background: #eef3f8;
}

.simple-head,
.block-title,
.excel-titlebar,
.section-head,
.legend-head,
.ai-agent-head {
  border-bottom-color: var(--line);
  background: #f8fbff;
}

.schedule-workbench,
.schedule-nav,
.schedule-status,
.group-overview,
.day-strip,
.ai-preview,
.ai-agent-upload,
.ai-action-card,
.suggestion-panel,
.advanced-fields,
.editor-context,
.loading-line {
  border-color: var(--line);
  background: #f8fbff;
}

.schedule-nav {
  background: #ffffff;
}

.simple-table-wrap,
.excel-scroll,
.table-wrap {
  background: #ffffff;
  scrollbar-color: #9fcfaf #eef3f8;
}

.simple-table,
.excel-table,
.schedule-table {
  color: var(--text);
}

.simple-table th,
.schedule-table th,
.simple-group,
.simple-role,
.sticky-col,
.simple-table th.pin-group,
.simple-table th.pin-role,
th.sticky-col {
  background: #edf3f8 !important;
  color: #182437;
}

.simple-table th small,
.schedule-table th small {
  color: #6b7788;
}

.simple-table td,
.schedule-table td,
.excel-table td {
  border-color: #d7e1eb;
}

.simple-cell-button,
.cell-button,
.day-card,
.group-card,
.editor-insight,
.suggestion-card,
.legend-item,
.board-item,
.ai-row,
.ai-metrics span {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

.simple-cell-button:hover,
.cell-button:hover,
.board-item:hover,
.suggestion-card:hover,
.group-card:hover,
.group-card.active {
  border-color: #9fcfaf;
  background: #f1faf4;
  box-shadow: inset 0 0 0 1px rgba(47, 143, 91, 0.10);
}

.simple-table td.is-selected .simple-cell-button,
.excel-table td.is-selected .excel-cell-button {
  background: #e2f5e8;
  outline-color: var(--primary);
}

.simple-table td.is-empty .simple-cell-button,
.simple-table td.cell-dash .simple-cell-button,
.status-empty {
  background: #f7f9fc;
  color: #7b8797;
}

.simple-table td.cell-headquarters .simple-cell-button {
  background: #eef2ff;
}

.simple-table td.cell-no-activity .simple-cell-button,
.status-cancelled {
  background: #fff1f2;
}

.simple-table td.cell-partial .simple-cell-button,
.status-planned {
  background: #fff8e6;
}

.simple-table td.cell-multi .simple-cell-button,
.status-active {
  background: #ecfeff;
}

.simple-table td.cell-long .simple-cell-button {
  background: #fefce8;
}

.simple-table td.cell-assigned .simple-cell-button,
.status-done {
  background: #ffffff;
}

.cell-person-card {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 1px 4px rgba(25, 39, 66, 0.06);
}

.role-symbol,
.group-card-symbol,
.tag-symbol,
.title-symbol,
.legend-symbol,
.suggestion-icon,
.editor-insight span,
.cell-person-icon,
.context-role .role-icon-svg,
.context-role .role-icon-img {
  background: #ffffff !important;
  color: #142033 !important;
  border-color: #d6e0ea !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 1px 5px rgba(25, 39, 66, 0.12);
}

.role-icon-svg g {
  stroke: #142033 !important;
}

.role-icon-svg .icon-fill {
  fill: rgba(20, 32, 51, 0.12) !important;
}

.cell-placeholder,
.cell-status {
  background: #ffffff;
  color: #34445a;
  border-color: #d6e0ea;
}

.group-north,
.role-flight,
.role-navigation {
  color: #075985;
  background: #e0f2fe !important;
}

.group-south,
.role-launch,
.role-logistics,
.role-production {
  color: #8a4b00;
  background: #fff3df !important;
}

.group-krisha,
.role-control,
.role-payload {
  color: #4338ca;
  background: #eef2ff !important;
}

.group-contract,
.role-operator,
.role-antennas,
.role-comms,
.role-intel {
  color: #047857;
  background: #ecfdf5 !important;
}

.group-default,
.role-technical,
.role-team,
.role-staff,
.role-default {
  color: #475569;
  background: #f8fafc !important;
}

.role-command,
.role-hr {
  color: #be123c;
  background: #fff1f2 !important;
}

.excel-scroll {
  background: #f1f5f9;
}

.notice {
  border-color: #bfe3ca;
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: var(--shadow);
}

.notice.error,
.inline-error,
.system-error {
  border-color: #efc2bf;
  background: #fff5f4;
  color: #a32621;
}

.ai-answer,
.ai-loader {
  border-color: #bfe3ca;
  background: #edf8f1;
  color: var(--text);
}

.ai-loader span {
  background: var(--primary);
}

.ai-agent-toggle {
  border-color: var(--primary);
  background: linear-gradient(135deg, #2f8f5b, #42b977);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(47, 143, 91, 0.24);
}

.ai-agent-message {
  border-color: var(--line);
  background: #f7f9fc;
  color: var(--text);
}

.ai-agent-message.user {
  color: #ffffff;
  background: linear-gradient(135deg, #2f8f5b, #42b977);
}

.ai-agent-message.error {
  background: #fff5f4;
  color: #a32621;
}

.ai-row.valid {
  border-right-color: var(--success);
}

.ai-row.uncertain {
  border-right-color: var(--warning);
}

.ai-row.invalid,
.ai-row.duplicate,
.ai-row.conflict {
  border-right-color: var(--danger);
}

.legend-backdrop {
  background: rgba(20, 32, 51, 0.36);
}

/* Final cascade lock for the operations redesign. */
body {
  font-family: "Heebo", "IBM Plex Sans Hebrew", "Segoe UI", Arial, sans-serif;
  background: var(--ops-bg);
}

.ops-app {
  min-height: 100vh;
  padding: 12px 92px 12px 12px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.05), transparent 210px),
    var(--ops-bg);
}

.ops-nav-rail {
  position: fixed;
  inset-block: 0;
  right: 0;
  left: auto;
  z-index: 30;
  width: 80px;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 14px 9px;
  background: var(--ops-rail);
  color: var(--ops-rail-text);
}

.ops-context-bar {
  position: sticky;
  top: 10px;
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.3fr) minmax(340px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--ops-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--ops-shadow);
  backdrop-filter: blur(12px);
}

.ops-user-strip {
  right: 92px;
  left: auto;
}

.ops-workspace {
  display: grid;
  gap: 10px;
}

.ops-app.inspector-open .ops-workspace {
  direction: ltr;
  grid-template-columns: minmax(400px, 460px) minmax(0, 1fr);
  align-items: start;
}

.ops-app.inspector-open .ops-grid-stage {
  grid-column: 2;
  grid-row: 1;
}

.ops-app.inspector-open .compact-editor {
  grid-column: 1;
  grid-row: 1;
  direction: rtl;
}

.ops-grid-stage .schedule-nav,
.sheet-tabs,
.work-toolbar,
.topbar.compact-topbar {
  display: none;
}

.pin-group {
  right: 0;
  left: auto;
}

.pin-role {
  right: 118px;
  left: auto;
}

.simple-table th,
.simple-table td {
  border-right: 0;
  border-left: 1px solid var(--ops-border-soft);
  border-bottom: 1px solid var(--ops-border-soft);
}

.simple-table-wrap,
.excel-scroll {
  max-height: calc(100vh - 250px);
}

.ai-command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  padding: 76px 18px 18px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
}

.ai-command-panel.ai-agent {
  position: static;
  width: min(780px, calc(100vw - 140px));
  max-height: calc(100vh - 110px);
  display: grid;
  overflow: hidden;
  border: 1px solid var(--ops-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.ai-agent-toggle {
  display: none;
}

@media (max-width: 1180px) {
  .ops-context-bar {
    grid-template-columns: 1fr;
  }

  .ops-app.inspector-open .ops-workspace {
    grid-template-columns: 1fr;
    direction: rtl;
  }

  .ops-app.inspector-open .ops-grid-stage,
  .ops-app.inspector-open .compact-editor {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 780px) {
  .ops-app {
    padding: 82px 10px 10px;
  }

  .ops-nav-rail {
    inset-block: 0 auto;
    right: 0;
    left: 0;
    width: auto;
    height: 70px;
    grid-template-columns: auto 1fr;
    grid-template-rows: 1fr;
    overflow-x: auto;
  }

  .ops-user-strip {
    right: 12px;
    left: auto;
  }
}

/* Top bar and placeholder screens polish. */
.ops-context-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 10px 24px rgba(15, 23, 42, 0.05);
}

.ops-context-top,
.ops-week-band,
.ops-context-tools {
  min-width: 0;
  gap: 10px;
  padding: 10px 12px;
}

.ops-context-top,
.ops-context-tools {
  display: flex;
  align-items: center;
}

.ops-context-top {
  justify-content: space-between;
  border-bottom: 1px solid var(--ops-border-soft);
}

.ops-context-tools {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid var(--ops-border-soft);
  background: #fbfcfe;
}

.ops-week-band {
  display: block;
  border-bottom: 1px solid var(--ops-border-soft);
  background: #f8fafc;
}

.ops-quick-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ops-title {
  min-width: 160px;
  margin-inline-end: auto;
}

.ops-title strong {
  font-size: 18px;
}

.ops-sheet-tabs {
  order: -1;
  background: #f8fafc;
  border-radius: 8px;
}

.ops-tab {
  min-width: 78px;
  border-radius: 6px;
}

.ops-tab.active {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.ops-primary-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid #1d4ed8;
  border-radius: 7px;
  color: #fff;
  background: #2563eb;
  font-weight: 900;
}

.ops-workbook-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ops-export-range {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid #dbeafe;
  border-radius: 7px;
  color: #475569;
  background: #f8fbff;
  font-size: 11px;
  font-weight: 900;
}

.ops-export-range span {
  white-space: nowrap;
}

.ops-export-range select {
  width: 48px;
  height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  background: #fff;
  font-weight: 900;
  text-align: center;
}

.ops-export-action {
  position: relative;
  overflow: hidden;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #bbf7d0;
  border-radius: 7px;
  color: #166534;
  background: #f0fdf4;
  font-weight: 900;
}

.ops-export-action:disabled {
  cursor: wait;
  opacity: 0.9;
}

.ops-export-action span {
  font-size: 14px;
  line-height: 1;
}

.ops-export-action i {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #22c55e 35%, #16a34a 65%, transparent 100%);
  animation: export-progress 1.05s ease-in-out infinite;
}

@keyframes export-progress {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.ops-primary-action span {
  font-size: 16px;
  line-height: 1;
}

.ops-week-focus,
.ops-view-switch,
.ops-search,
.ops-command-button,
.ops-publish-action,
.ops-action-button,
.ops-filter-chip {
  border-radius: 7px;
}

.ops-publish-action {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  color: #64748b;
  background: #fff;
  font-weight: 900;
  white-space: nowrap;
}

.ops-publish-action.pending {
  border-color: #2563eb;
  color: #fff;
  background: #1d4ed8;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.ops-publish-action:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.ops-publish-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.ops-publish-action.pending .ops-publish-dot {
  background: #bfdbfe;
  box-shadow: 0 0 0 4px rgba(191, 219, 254, 0.22);
}

.ops-chip-row {
  flex: 1 1 220px;
}

.ops-search {
  flex: 0 1 245px;
}

.ops-view-switch {
  background: transparent;
  border-color: transparent;
}

.ops-view-switch button {
  min-width: 72px;
  background: #fff;
  border: 1px solid var(--ops-border-soft);
}

.ops-view-switch button.active {
  background: #dbeafe;
}

.ops-context-bar-placeholder .ops-context-top {
  border-bottom: 0;
}

.ops-placeholder-view {
  min-height: calc(100vh - 170px);
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.ops-placeholder-hero {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 10px;
  background: #f8fafc;
}

.ops-placeholder-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #2563eb;
  background: #dbeafe;
}

.ops-placeholder-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ops-placeholder-hero h2 {
  margin: 0;
  font-size: 26px;
}

.ops-placeholder-hero p {
  margin: 4px 0 0;
  color: var(--ops-muted);
}

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

.ops-placeholder-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: #ffffff;
}

.ops-placeholder-card strong {
  display: block;
  font-size: 16px;
}

.ops-placeholder-card p {
  margin: 8px 0 0;
  color: var(--ops-muted);
  line-height: 1.55;
}

.ops-placeholder-card span {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 900;
}

.ops-placeholder-card span.is-live {
  color: #166534;
  background: #dcfce7;
}

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

.reference-board {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.reference-head small {
  display: block;
  margin-top: 4px;
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 800;
}

.reference-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.reference-item {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.reference-item.people {
  background: #f8fbff;
}

.reference-item.roles {
  background: #fbfaf7;
}

.reference-item-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.reference-item-main strong,
.reference-item-main span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reference-item-main strong {
  color: var(--ops-text);
  font-size: 14px;
}

.reference-item-main span {
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 800;
}

.reference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reference-tags span {
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 999px;
  color: #475569;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.mate-board {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--ops-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.mate-head {
  align-items: start;
}

.mate-week-banner {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.mate-week-banner div {
  display: grid;
  gap: 3px;
}

.mate-week-banner strong {
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 950;
}

.mate-week-banner span,
.mate-week-banner p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.mate-date-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.mate-date-strip span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.mate-date-strip span.is-today {
  border-color: #2563eb;
  background: #dbeafe;
}

.mate-date-strip strong {
  color: var(--ops-text);
  font-size: 13px;
  font-weight: 950;
}

.mate-date-strip small {
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 800;
}

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

.mate-role-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 8px;
  background: #fbfdff;
}

.mate-role-title {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  position: sticky;
  right: 0;
}

.mate-role-title .title-symbol {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #eef6ff;
}

.mate-role-title .role-icon-img,
.mate-role-title .role-icon-svg {
  width: 25px;
  height: 25px;
}

.mate-role-title div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mate-role-title strong {
  min-width: 0;
  color: var(--ops-text);
  font-size: 14px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.mate-role-title small {
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 800;
}

.mate-assignment-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
}

.mate-assignment-control {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--ops-border-soft);
  border-radius: 8px;
  background: #fff;
}

.mate-assignment-control.is-filled {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.mate-assignment-control.is-today {
  box-shadow: inset 3px 0 0 #2563eb;
}

.mate-assignment-date {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ops-muted);
  font-size: 11px;
  font-weight: 900;
}

.mate-assignment-status {
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 10px;
  font-weight: 950;
}

.mate-assignment-control.is-filled .mate-assignment-status {
  color: #1d4ed8;
  background: #dbeafe;
}

.mate-current-people {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.mate-current-people em {
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  color: #1e3a8a;
  background: #dbeafe;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.mate-assignment-control input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--ops-border);
  border-radius: 7px;
  background: #fff;
  color: var(--ops-text);
  font-size: 12px;
  font-weight: 850;
}

.mate-save-hint {
  color: var(--ops-muted);
  font-size: 10px;
  font-weight: 800;
}

.mate-assignment-control input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: var(--ops-primary);
}

@media (max-width: 980px) {
  .mate-week-banner {
    grid-template-columns: 1fr;
  }

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

  .mate-role-title {
    position: static;
  }
}

@media (max-width: 980px) {
  .ops-placeholder-grid {
    grid-template-columns: 1fr;
  }

  .ops-search {
    flex-basis: 100%;
  }
}
