:root {
  --bg: #eceff3;
  --surface: rgba(250, 251, 253, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(246, 248, 250, 0.86);
  --line: rgba(15, 23, 42, 0.055);
  --line-strong: rgba(15, 23, 42, 0.085);
  --text: #1f2937;
  --text-strong: #111827;
  --muted: #7b8594;
  --accent: #cf7a2a;
  --accent-strong: #b7681f;
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.055);
  --shadow-md: 0 10px 24px rgba(15, 23, 42, 0.045);
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.03);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.65), transparent 22%),
    linear-gradient(180deg, #e9edf2 0%, #f3f5f8 42%, #eceff3 100%);
}
button, input, select, textarea { font: inherit; }
button { border: 0; }
h1, h2, h3, h4, p, table { margin: 0; }

.shell {
  width: min(1920px, calc(100vw - 20px));
  margin: 12px auto;
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 16px;
}

.glass {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(252, 253, 254, 0.9), rgba(246, 248, 250, 0.84));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}

.sidebar, .topbar, .panel, .auth-card, .auth-visual, .project-tabs { border-radius: var(--radius-xl); }

.sidebar {
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 24px);
}

.brand, .section-row, .topbar, .panel-head, .project-card-head, .task-column-head, .brand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand { padding: 4px 8px 8px; }
.brand-copy h1 {
  font-size: 0.96rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-strong);
  font-weight: 600;
}
.brand-copy p, .muted, .section-label {
  color: var(--muted);
  font-size: 0.82rem;
}
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
  font-weight: 700;
}

.traffic { display: flex; gap: 8px; }
.traffic span { width: 11px; height: 11px; border-radius: 999px; display: inline-block; }
.traffic span:nth-child(1) { background: #ff5f57; }
.traffic span:nth-child(2) { background: #febc2e; }
.traffic span:nth-child(3) { background: #28c840; }

.nav-group, .form-stack, .right-stack, .aside-grid, .project-preview-grid, .overview-grid, .timeline, .editable-panel {
  display: grid;
  gap: 12px;
}

.nav-item, .project-tab, .filter-chip, .button, .search, .input, .textarea, .select, .phase-select, .table-input, .progress-slider {
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.nav-item {
  width: 100%;
  border-radius: 15px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
}
.nav-item:hover, .project-tab:hover, .filter-chip:hover, .task-card:hover, .project-card:hover, .mini-card:hover, .project-preview-card:hover, .attachment-item:hover {
  box-shadow: var(--shadow-sm);
}
.nav-item.active, .project-tab.active, .filter-chip.active {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(15, 23, 42, 0.06);
}

.nav-copy { display: grid; gap: 3px; }
.nav-copy strong, .card-title {
  color: var(--text-strong);
  font-size: 0.91rem;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.meta-chip, .small-badge, .status-pill, .filter-chip, .files-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}
.meta-chip, .small-badge, .files-chip {
  padding: 7px 10px;
  background: rgba(99, 110, 123, 0.08);
  color: #5f6b79;
}

.compact { padding: 16px; }
.subtle-card, .project-card, .mini-card, .project-preview-card, .empty-card, .auth-visual {
  background: rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.topbar { padding: 20px 24px; }
.page-title { display: grid; gap: 10px; }
.page-title h2, .panel h3, .auth-card h2, .auth-visual h2 {
  color: var(--text-strong);
  letter-spacing: -0.05em;
  font-weight: 600;
}
.page-title h2 { font-size: clamp(1.72rem, 2vw, 2.35rem); line-height: 1.02; }

.topbar-meta, .toolbar, .toolbar-actions, .project-meta, .filter-row, .legend-row, .tracker-toolbar, .progress-stack, .progress-editor {
  display: flex;
  gap: 10px;
}
.topbar-meta, .project-meta, .filter-row, .legend-row { flex-wrap: wrap; }

.search, .input, .textarea, .select, .table-input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  padding: 11px 13px;
  color: var(--text);
  outline: none;
}
.search:focus, .input:focus, .textarea:focus, .select:focus, .phase-select:focus, .table-input:focus, .progress-slider:focus {
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.04);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }

.button {
  border-radius: 13px;
  padding: 11px 15px;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 7px 16px rgba(183, 104, 31, 0.16);
}
.button.secondary, .filter-chip, .project-tab {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.045);
}
.button.full { width: 100%; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sidebar-tools {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.hero {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.88fr);
  gap: 16px;
}
.hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(247,249,251,0.76));
  border-radius: 22px;
  padding: 22px;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(15,23,42,0.05);
}
.hero-card.highlight {
  background: linear-gradient(160deg, rgba(39, 48, 61, 0.94), rgba(57, 70, 87, 0.9));
  color: #f8fafc;
}
.hero-card.highlight .section-label, .hero-card.highlight .muted { color: rgba(248,250,252,0.72); }
.hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}
.hero-card:not(.highlight) .metric {
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(15,23,42,0.045);
}
.metric strong { display: block; font-size: 1.7rem; margin-top: 8px; letter-spacing: -0.05em; }

.project-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px; }
.project-tabs-list { display: flex; gap: 10px; overflow-x: auto; min-width: 0; }
.project-tabs-actions { flex: 0 0 auto; }
.project-tab, .filter-chip { padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.project-layout { display: grid; gap: 16px; }
.tracker-layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.panel { padding: 22px; min-width: 0; }
.tracker-toolbar {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.tracker-search { max-width: 280px; }
.compact-filters { justify-content: flex-end; }
.tracker-aside { position: relative; }
.tracker-layout.is-collapsed { grid-template-columns: minmax(0, 1fr) 92px; }
.tracker-aside.is-collapsed { padding: 16px 12px; }
.details-head { align-items: flex-start; }
.collapse-button { white-space: nowrap; }
.collapsed-summary { display: grid; gap: 10px; align-content: start; padding-top: 8px; }

.tracker-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 286px);
  border: 1px solid rgba(15,23,42,0.05);
  border-radius: 20px;
  background: rgba(255,255,255,0.62);
  scrollbar-color: rgba(107, 114, 128, 0.22) transparent;
  scrollbar-width: thin;
}
.tracker-table-wrap::-webkit-scrollbar { width: 12px; height: 12px; }
.tracker-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(107, 114, 128, 0.2);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
.tracker-table-wrap::-webkit-scrollbar-track { background: transparent; }

.tracker-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.87rem;
}
.tracker-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(246, 248, 250, 0.96);
  color: var(--text-strong);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 15px 14px;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  white-space: nowrap;
  text-align: left;
  font-weight: 700;
}
.tracker-table tbody td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(15,23,42,0.045);
  background: rgba(255,255,255,0.72);
  vertical-align: middle;
  white-space: nowrap;
}
.frozen-col {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 360px;
  max-width: 360px;
  background: rgba(248, 250, 252, 0.98);
}
.tracker-table thead .frozen-col { z-index: 5; }
.tracker-table tbody .frozen-col {
  white-space: normal;
}
.trade-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.trade-cell-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trade-cell strong {
  color: var(--text-strong);
  letter-spacing: -0.02em;
  font-weight: 600;
}
.tracker-row-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 26px;
  min-height: 24px;
  padding: 3px 7px;
  font-size: 0.9rem;
  color: #7f8896;
  opacity: 0.98;
}
.tracker-row:hover .tracker-row-drag,
.tracker-row.is-selected .tracker-row-drag {
  background: rgba(15, 23, 42, 0.05);
}
.tracker-row-drag:active {
  cursor: grabbing;
}
body.is-reordering-workstream,
body.is-reordering-workstream * {
  cursor: grabbing !important;
}
.tracker-reorder-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(18, 24, 33, 0.9);
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  transform: translate(-9999px, -9999px);
}
.tracker-row { cursor: pointer; }
.tracker-row:hover td { background: rgba(248, 250, 252, 0.9); }
.tracker-row:hover .frozen-col { background: rgba(246, 248, 250, 0.98); }
.tracker-row.is-selected td { background: rgba(248, 249, 251, 0.96); }
.tracker-row.is-selected .frozen-col {
  background: rgba(245, 247, 249, 0.98);
  box-shadow: inset 2px 0 0 rgba(17, 24, 39, 0.18);
}
.tracker-row.is-drop-target td {
  background: rgba(241, 245, 249, 0.98);
  box-shadow: inset 0 3px 0 rgba(103, 122, 148, 0.34);
}
.tracker-row.is-drop-target .frozen-col {
  background: rgba(236, 242, 247, 0.99);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.32);
}
.tracker-row.is-drag-source td {
  background: rgba(244, 247, 251, 0.86);
  opacity: 0.72;
}
.tracker-row.is-drag-source .frozen-col {
  background: rgba(240, 244, 248, 0.96);
  box-shadow: inset 2px 0 0 rgba(17, 24, 39, 0.16);
}
.tracker-row.is-drag-source .tracker-row-drag {
  background: rgba(15, 23, 42, 0.08);
  color: #4b5563;
}

.phase-select {
  width: 122px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.table-input {
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255,255,255,0.72);
}
.table-input.date { min-width: 142px; }
.table-text {
  max-width: 260px;
  white-space: normal;
  line-height: 1.45;
  color: var(--muted);
}
.files-chip { white-space: nowrap; }

.status-pill {
  padding: 6px 10px;
  border: 1px solid rgba(15,23,42,0.04);
}
.status-pill.not-started, .phase-select.not-started { background: rgba(236, 240, 244, 0.9); color: #6b7280; }
.status-pill.scheduled, .phase-select.scheduled { background: rgba(244, 239, 231, 0.92); color: #8a6844; }
.status-pill.in-progress, .phase-select.in-progress { background: rgba(232, 238, 245, 0.92); color: #51647b; }
.status-pill.blocked, .phase-select.blocked { background: rgba(245, 233, 233, 0.92); color: #8e5b5b; }
.status-pill.completed, .phase-select.completed { background: rgba(232, 240, 235, 0.92); color: #5b7362; }
.status-pill.n-a, .phase-select.n-a { background: rgba(239, 241, 244, 0.92); color: #7a818a; }

.progress-stack { align-items: center; gap: 10px; }
.progress-label {
  min-width: 40px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-strong);
}
.progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(228, 234, 239, 0.95);
  overflow: hidden;
  min-width: 120px;
}
.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(107, 114, 128, 0.7), rgba(151, 157, 165, 0.78));
}
.progress-bar.compact { min-width: 92px; height: 7px; }
.progress-editor { display: grid; gap: 10px; }
.progress-slider { width: 100%; accent-color: #7b8594; }
.inline-form { margin-top: 12px; }
.small-area { min-height: 84px; }

.task-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.task-column {
  background: rgba(255,255,255,0.56);
  border: 1px solid rgba(15,23,42,0.05);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.task-dropzone { display: grid; gap: 10px; min-height: 180px; }
.task-dropzone.drag-over { outline: 2px dashed rgba(123, 133, 148, 0.26); outline-offset: 2px; border-radius: 16px; }
.task-card {
  background: rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 15px;
  border: 1px solid rgba(15,23,42,0.05);
  display: grid;
  gap: 10px;
  cursor: grab;
}
.task-card:active { cursor: grabbing; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.comment-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15,23,42,0.05);
}
.comment-line:last-child { border-bottom: 0; padding-bottom: 0; }
.comment-line p { grid-column: 1 / -1; }
.attachment-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(247, 248, 250, 0.9);
  border: 1px solid rgba(15,23,42,0.05);
  font-size: 0.84rem;
}
.empty-card {
  display: grid;
  gap: 8px;
  place-content: center;
  min-height: 132px;
  text-align: center;
}
.empty-card.large { min-height: 240px; }
.empty-state-inline {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(15,23,42,0.1);
  background: rgba(247,248,250,0.76);
}

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(1220px, 100%); display: grid; grid-template-columns: minmax(0, 1.14fr) 390px; gap: 14px; padding: 14px; }
.auth-visual {
  background: linear-gradient(155deg, rgba(28, 36, 49, 0.96), rgba(46, 58, 74, 0.92));
  color: #f4f7fa;
  display: grid;
  gap: 20px;
  padding: 26px;
}
.auth-visual .section-label, .auth-visual .muted { color: rgba(244,247,250,0.72); }
.auth-form { display: grid; align-content: center; gap: 14px; padding: 20px; }
.login-title { display: grid; gap: 10px; }
.login-title h2 { font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.02; }
.kicker {
  width: fit-content;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255,255,255,0.88);
  font-size: 0.78rem;
  font-weight: 600;
}
.small { font-size: 0.82rem; }
.desktop-only { display: initial; }

@media (max-width: 1500px) { .tracker-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 1220px) { .shell, .hero, .tracker-layout, .auth-card, .task-board { grid-template-columns: 1fr; } .sidebar { min-height: auto; } }
@media (max-width: 940px) {
  .shell { width: min(100vw - 14px, 100%); margin: 8px auto; }
  .sidebar, .topbar, .panel, .hero, .project-tabs, .auth-card, .auth-visual, .auth-form { padding: 14px; }
  .topbar, .panel-head, .toolbar, .toolbar-actions, .project-card-head, .brand-line, .tracker-toolbar { flex-direction: column; align-items: flex-start; }
  .hero-grid, .overview-grid, .project-preview-grid, .form-grid { grid-template-columns: 1fr; }
  .desktop-only { display: none; }
  .frozen-col { min-width: 180px; max-width: 180px; }
  .tracker-search { max-width: none; width: 100%; }
}
.tracker-toolbar {
  gap: 10px;
  margin-bottom: 14px;
}
.legend-row {
  gap: 8px;
}
.compact-filters {
  gap: 8px;
}
.filter-chip,
.project-tab {
  padding: 7px 11px;
  font-size: 0.73rem;
}
.tracker-table thead th {
  padding: 13px 14px;
}
.tracker-table tbody td {
  padding: 15px 14px;
}
.table-text.blockers-text {
  max-width: 320px;
  color: var(--text);
  line-height: 1.5;
}
.blockers-text:empty::before {
  content: "No active blockers";
  color: var(--muted);
}
.tracker-aside {
  background: linear-gradient(180deg, rgba(251, 252, 253, 0.94), rgba(245, 247, 250, 0.9));
}
.details-head {
  margin-bottom: 6px;
}
.editable-panel {
  gap: 14px;
}
.editable-panel .section-label {
  margin-bottom: 2px;
}
.blocker-area {
  min-height: 108px;
}
.inspector-card {
  padding: 16px;
}
.comment-line {
  padding: 12px 0;
}
.attachment-item {
  background: rgba(250, 251, 253, 0.95);
}
.tracker-toolbar {
  display: grid;
  gap: 10px;
  align-items: start;
}
.toolbar-primary {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 14px;
  align-items: center;
}
.toolbar-secondary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.legend-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.legend-row {
  gap: 7px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.legend-row::-webkit-scrollbar {
  display: none;
}
.legend-row .status-pill {
  white-space: nowrap;
  font-size: 0.72rem;
  padding: 5px 9px;
  opacity: 0.88;
}
.compact-filters {
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}
.compact-filters .filter-chip {
  white-space: nowrap;
  flex: 0 0 auto;
}
.filter-chip,
.project-tab {
  line-height: 1;
}
.tracker-search {
  max-width: none;
  width: 100%;
}
@media (max-width: 940px) {
  .toolbar-primary {
    grid-template-columns: 1fr;
  }
  .compact-filters {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .compact-filters::-webkit-scrollbar {
    display: none;
  }
  .toolbar-secondary {
    align-items: flex-start;
    flex-direction: column;
  }
}
.dashboard-grid,
.dashboard-columns,
.summary-grid,
.attention-grid,
.project-list-grid,
.timeline-list,
.schedule-list,
.settings-list,
.settings-form-grid,
.settings-chip-row,
.detail-grid-two,
.section-stack {
  display: grid;
  gap: 14px;
}

.dashboard-grid {
  gap: 16px;
}
.dashboard-hero {
  padding: 24px;
}
.soft-hero {
  background: linear-gradient(180deg, rgba(250, 251, 253, 0.95), rgba(245, 247, 250, 0.92));
}
.dashboard-headline,
.attention-head,
.portfolio-meta,
.schedule-meta,
.settings-title-row,
.settings-row,
.settings-row-actions,
.toggle-row,
.move-actions,
.hero-actions,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dashboard-headline,
.settings-row {
  justify-content: space-between;
}
.dashboard-headline {
  align-items: flex-start;
}
.dashboard-columns {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.92fr);
  align-items: start;
}
.dashboard-main-col,
.dashboard-side-col {
  display: grid;
  gap: 16px;
}
.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.summary-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.045);
  background: rgba(255, 255, 255, 0.72);
}
.summary-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text-strong);
}
.attention-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.attention-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(255, 255, 255, 0.66);
  display: grid;
  gap: 10px;
}
.attention-head {
  justify-content: space-between;
}
.attention-item,
.project-portfolio-row,
.schedule-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(15, 23, 42, 0.045);
  background: rgba(248, 250, 252, 0.86);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.attention-item {
  flex-direction: column;
  align-items: flex-start;
}
.attention-item span,
.attention-item em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
.project-list-grid,
.timeline-list,
.schedule-list {
  gap: 10px;
}
.project-portfolio-row strong,
.timeline-item strong,
.schedule-item strong {
  color: var(--text-strong);
}
.risk-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.73rem;
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.045);
  background: rgba(240, 243, 246, 0.92);
  color: #5f6b79;
}
.risk-pill.high { background: rgba(245, 233, 233, 0.88); color: #8e5b5b; }
.risk-pill.medium { background: rgba(244, 239, 231, 0.9); color: #8a6844; }
.risk-pill.low { background: rgba(232, 240, 235, 0.9); color: #5b7362; }
.timeline-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.045);
}
.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  background: rgba(107, 114, 128, 0.45);
}
.timeline-dot.comment { background: rgba(142, 91, 91, 0.42); }
.timeline-dot.update { background: rgba(81, 100, 123, 0.4); }
.schedule-item,
.project-portfolio-row {
  align-items: center;
}
.mini-stat {
  min-width: 112px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.045);
  background: rgba(255, 255, 255, 0.58);
}
.mini-stat strong {
  display: block;
  margin-top: 6px;
  color: var(--text-strong);
  font-size: 1.2rem;
}
.detail-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-shell {
  gap: 16px;
}
.settings-list {
  gap: 12px;
}
.settings-row {
  gap: 14px;
}
.settings-row-main {
  flex: 1;
  display: grid;
  gap: 12px;
}
.settings-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.settings-row-actions {
  flex-direction: column;
  align-items: flex-end;
  min-width: 180px;
}
.settings-chip-row {
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
}
.settings-add-strip {
  display: grid;
  gap: 12px;
}
.toggle-row {
  font-size: 0.84rem;
  color: var(--text-strong);
}
.toggle-row input {
  accent-color: #7b8594;
}
.settings-row.is-inactive {
  opacity: 0.7;
}
.inspector-panel {
  gap: 16px;
}
.workspace-card strong {
  color: var(--text-strong);
}
.topbar-neutral {
  background: linear-gradient(180deg, rgba(252, 253, 254, 0.92), rgba(247, 249, 251, 0.88));
}

@media (max-width: 1220px) {
  .dashboard-columns,
  .summary-grid,
  .attention-grid,
  .settings-form-grid,
  .detail-grid-two {
    grid-template-columns: 1fr;
  }
  .settings-row {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-row-actions {
    align-items: flex-start;
    min-width: 0;
  }
}

@media (max-width: 940px) {
  .project-portfolio-row,
  .schedule-item,
  .timeline-item {
    grid-template-columns: 1fr;
  }
  .project-portfolio-row,
  .schedule-item,
  .settings-row,
  .dashboard-headline,
  .portfolio-meta,
  .topbar-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
.status-pill.on-track { background: rgba(232, 240, 235, 0.92); color: #5b7362; }
.status-pill.at-risk { background: rgba(244, 239, 231, 0.92); color: #8a6844; }
.status-pill.in-progress { background: rgba(232, 238, 245, 0.92); color: #51647b; }
.attention-item:hover,
.project-portfolio-row:hover,
.schedule-item:hover {
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.92);
}
.auth-card h2,
.auth-visual h2 {
  font-weight: 560;
}
.auth-visual {
  background: linear-gradient(155deg, rgba(41, 50, 63, 0.9), rgba(61, 72, 88, 0.84));
  gap: 16px;
  padding: 24px;
}
.auth-visual .section-label,
.auth-visual .muted {
  color: rgba(244, 247, 250, 0.7);
}
.auth-form {
  gap: 13px;
  padding: 22px 24px;
}
.login-title {
  gap: 8px;
}
.login-title h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}
.kicker {
  padding: 6px 10px;
  font-size: 0.7rem;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
}
.auth-note {
  max-width: 420px;
  line-height: 1.6;
}
.button {
  background: linear-gradient(180deg, #cb7a32, #bc6f29);
  box-shadow: 0 5px 14px rgba(183, 104, 31, 0.12);
}
.button:hover {
  background: linear-gradient(180deg, #c47631, #b66a25);
}
.button.secondary,
.filter-chip,
.project-tab {
  background: rgba(255, 255, 255, 0.62);
}
.workspace-settings-shell {
  overflow: hidden;
}
.compact-table-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.settings-filter-row {
  justify-content: flex-end;
}
.workspace-table-wrap {
  padding: 0;
  overflow: hidden;
  background: rgba(252, 253, 254, 0.88);
}
.workspace-table-header,
.workspace-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(180px, 1fr) 130px 84px 72px 126px;
  align-items: center;
  gap: 12px;
}
.workspace-table-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(246, 248, 250, 0.9);
}
.workspace-table-body {
  display: grid;
}
.workspace-table-row {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.045);
  background: rgba(255, 255, 255, 0.72);
}
.workspace-table-row:last-child {
  border-bottom: 0;
}
.workspace-table-row.is-inactive {
  opacity: 0.68;
}
.workspace-table-row.is-drop-target {
  background: rgba(247, 249, 251, 0.98);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.06), inset 0 -1px 0 rgba(15, 23, 42, 0.06);
}
.workspace-cell {
  min-width: 0;
}
.compact-input {
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
}
.workspace-name-cell .compact-input {
  font-weight: 550;
}
.workspace-duration-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.duration-input {
  width: 72px;
  text-align: center;
}
.duration-suffix {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.workspace-switch-cell {
  display: flex;
  justify-content: center;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-ui {
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
  transition: background 140ms ease, border-color 140ms ease;
}
.switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12);
  transition: transform 140ms ease;
}
.switch input:checked + .switch-ui {
  background: rgba(99, 110, 123, 0.42);
  border-color: rgba(99, 110, 123, 0.32);
}
.switch input:checked + .switch-ui::after {
  transform: translateX(14px);
}
.workspace-handle-cell {
  display: flex;
  justify-content: center;
}
.workspace-reorder-buttons {
  gap: 8px;
}
.workspace-reorder-buttons .table-action {
  padding: 4px 0;
}
.drag-handle {
  padding: 6px 8px;
  border-radius: 10px;
  background: transparent;
  color: #8d96a3;
  cursor: grab;
  font-size: 0.92rem;
  letter-spacing: -0.14em;
}
.drag-handle:hover {
  background: rgba(15, 23, 42, 0.04);
}
.workspace-actions-cell {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.table-action {
  padding: 0;
  background: transparent;
  color: #667281;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}
.table-action:hover {
  color: var(--text-strong);
}
.table-action.destructive {
  color: #8e5b5b;
}
.table-action.destructive:hover {
  color: #724646;
}
.workspace-empty-state {
  border-radius: 0;
  min-height: 180px;
  background: transparent;
  box-shadow: none;
}
@media (max-width: 1220px) {
  .compact-table-toolbar {
    grid-template-columns: 1fr;
  }
  .settings-filter-row {
    justify-content: flex-start;
  }
  .workspace-table-wrap {
    overflow-x: auto;
  }
  .workspace-table-header,
  .workspace-table-row {
    min-width: 860px;
  }
}
.project-settings-shell {
  overflow: hidden;
}
.project-table-header,
.project-table-row {
  grid-template-columns: minmax(220px, 1.4fr) 84px minmax(180px, 1fr) 130px 92px 72px 96px;
}
.project-table-wrap {
  padding: 0;
}
.project-table-row .small-badge {
  min-width: 74px;
}
@media (max-width: 1220px) {
  .project-table-header,
  .project-table-row {
    min-width: 940px;
  }
}
.topbar-button-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(236, 239, 243, 0.54);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.modal-shell {
  width: min(1320px, calc(100vw - 48px));
  max-height: calc(100vh - 52px);
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
}
.new-project-modal {
  display: grid;
  gap: 18px;
}
.modal-head {
  align-items: flex-start;
}
.new-project-form,
.new-project-grid,
.new-project-config-block {
  display: grid;
  gap: 14px;
}
.new-project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.new-project-config-block {
  padding: 16px;
}
.draft-table-wrap {
  padding: 0;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
@media (max-width: 1220px) {
  .new-project-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 940px) {
  .modal-backdrop {
    padding: 12px;
  }
  .modal-shell {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    padding: 16px;
  }
  .modal-footer,
  .topbar-button-row {
    flex-direction: column;
    align-items: stretch;
  }
}
body.modal-open {
  overflow: hidden;
}
.project-switcher-panel {
  gap: 12px;
}
.project-switcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.project-switch-card {
  text-align: left;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.045);
  background: rgba(255, 255, 255, 0.64);
  cursor: pointer;
}
.project-switch-card strong {
  color: var(--text-strong);
}
.project-switch-card.is-active {
  background: rgba(247, 249, 251, 0.96);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}
.project-switch-card:hover {
  box-shadow: var(--shadow-sm);
}
.summary-card-button {
  text-align: left;
  cursor: pointer;
}
.summary-card-button:hover {
  box-shadow: var(--shadow-sm);
}
.static-item {
  cursor: default;
}
.form-grid-two {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr auto;
  gap: 10px;
  align-items: end;
}
.document-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
@media (max-width: 1220px) {
  .form-grid-two {
    grid-template-columns: 1fr;
  }
}

.nav-copy strong,
.project-tab,
.tracker-header-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tab {
  max-width: 180px;
}

.tracker-table {
  table-layout: fixed;
}

.tracker-header-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tracker-header-label {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.column-resize-handle {
  position: relative;
  align-self: stretch;
  width: 12px;
  min-width: 12px;
  margin-right: -6px;
  border-radius: 8px;
  background: transparent;
  cursor: col-resize;
}

.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: 5px;
  width: 1px;
  background: rgba(15, 23, 42, 0.08);
  transition: background 140ms ease;
}

.tracker-table thead th:hover .column-resize-handle::after,
.column-resize-handle:hover::after {
  background: rgba(15, 23, 42, 0.18);
}

body.is-resizing-columns,
body.is-resizing-columns * {
  cursor: col-resize !important;
  user-select: none;
}

.settings-page-stack {
  gap: 16px;
}

.label-table-wrap {
  padding: 0;
}

.label-table-header,
.label-table-row {
  grid-template-columns: minmax(200px, 0.85fr) minmax(240px, 1.2fr) minmax(180px, 0.85fr);
}

.label-name-cell strong,
.label-table-row .muted {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1220px) {
  .label-table-header,
  .label-table-row {
    min-width: 760px;
  }
}

.project-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 251, 253, 0.92), rgba(246, 248, 250, 0.88));
  scrollbar-width: none;
}

.project-tabs::-webkit-scrollbar {
  display: none;
}

.project-tab {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  color: #6f7a88;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-tab:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.045);
  box-shadow: none;
  color: var(--text);
}

.project-tab.active {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(15, 23, 42, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 1px 2px rgba(15, 23, 42, 0.035);
  color: var(--text-strong);
}

@media (max-width: 940px) {
  .project-tabs {
    gap: 5px;
    padding: 5px 6px;
  }

  .project-tab {
    padding: 6px 10px;
  }
}

.tracker-column-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  min-width: 14px;
  color: #9aa3af;
  cursor: grab;
  letter-spacing: -0.16em;
  user-select: none;
}

.tracker-column-drag:hover {
  color: #6f7a88;
}

[data-column-drop-target].is-column-drop-target {
  background: rgba(245, 247, 250, 0.98) !important;
  box-shadow: inset 0 -2px 0 rgba(17, 24, 39, 0.16);
}

[data-column-drop-target].is-column-drop-target .tracker-header-label {
  color: var(--text-strong);
}
