@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-Book.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
}
@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-BookItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 400;
}
@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
}
@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-MediumItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 500;
}
@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
}
@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-BoldItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 700;
}
@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-Black.otf") format("opentype");
  font-style: normal;
  font-weight: 900;
}
@font-face {
  font-family: "Gotham";
  src: url("/static/fonts/Gotham-BlackItalic.otf") format("opentype");
  font-style: italic;
  font-weight: 900;
}

:root {
  /* Canonical TGG design tokens */
  --color-black: #262626;
  --color-white: #FFFFFF;
  --color-gold: #9a8a78;
  --color-gold-hover: #8b7b69;
  --color-bg: var(--color-black);
  --color-surface: var(--color-white);
  --color-surface-muted: #f7f3ec;
  --color-surface-soft: #efe8dc;
  --color-text: var(--color-black);
  --color-text-inverse: var(--color-white);
  --color-text-muted: #5f5b54;
  --color-border: #d8d0c3;
  --color-border-soft: #e8e1d6;
  --color-focus: var(--color-gold);

  --status-success-bg: #e9efe8;
  --status-success-text: #315c3a;
  --status-success-border: #b9ccb5;
  --status-warning-bg: #fff3d7;
  --status-warning-text: #734100;
  --status-warning-border: #f0cf87;
  --status-danger-bg: #f6e4e0;
  --status-danger-text: #9f2e2e;
  --status-danger-border: #e2bdb6;
  --status-neutral-bg: #ede7de;
  --status-neutral-text: #5b5248;
  --status-neutral-border: #d2c7ba;

  --font-body: "Gotham", sans-serif;
  --font-display: "Gotham", sans-serif;
  --display-font: var(--font-display);
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-card-title: 1.2rem;
  --text-section-title: clamp(1.05rem, 1.35vw, 1.55rem);
  --text-page-title: clamp(1.75rem, 2.85vw, 3rem);
  --line-tight: 1.2;
  --line-normal: 1.5;
  --line-relaxed: 1.65;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --border-default: 1px solid var(--color-border);
  --shadow-nav: 0 4px 14px rgba(0, 0, 0, 0.16);
  --shadow-overlay: 0 18px 48px rgba(0, 0, 0, 0.12);
  --shadow-dropdown: 0 18px 48px rgba(23, 23, 23, 0.08);

  --breakpoint-sm: 560px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;

  /* Existing aliases retained for compatibility during component cleanup. */
  --bc-ink: var(--color-text);
  --bc-charcoal: var(--color-black);
  --bc-gold: var(--color-gold);
  --bc-muted-ink: var(--color-text-muted);
  --bc-stone: #8d867a;
  --bc-line: var(--color-border);
  --bc-line-soft: var(--color-border-soft);
  --bc-paper: var(--color-surface-muted);
  --bc-paper-2: var(--color-surface-soft);
  --bc-sand: #d1c2ad;
  --bc-clay: #b49f84;
  --bc-platform-blue: var(--color-bg);
  --bc-white: var(--color-white);
  --bc-danger: var(--status-danger-text);
  --bc-warning: #9a5a18;
  --bc-success: #496f55;

  --construction-blue: var(--color-gold);
  --construction-gray: #808080;
  --construction-white: var(--color-white);
  --development-sand: var(--color-gold-hover);
  --development-charcoal: var(--color-black);
  --charcoal: var(--color-black);
  --sand: var(--color-gold);
  --cream: var(--color-bg);
  --stone: var(--bc-stone);
  --ink: var(--color-text);
  --accent: var(--bc-gold);
  --surface-0: var(--color-bg);
  --surface-1: var(--color-surface);
  --surface-2: var(--color-surface-soft);
  --line: var(--color-border);
  --text: var(--color-text);
  --text-muted: var(--color-text-muted);

  --text-nav: 0.9rem;
  --text-label: 0.8125rem;
  --text-small: var(--text-sm);
  --text-body: var(--text-md);
  --text-body-lg: var(--text-lg);
  --text-card: var(--text-card-title);
  --text-h3: clamp(1.35rem, 1.75vw, 2.1rem);
  --text-h2: clamp(2rem, 3.6vw, 4rem);
  --text-display: clamp(2.6rem, 5.8vw, 5.75rem);
  --app-page-gutter: clamp(1rem, 2vw, 2rem);
  --app-page-max-width: 1600px;
  --app-section-gap: clamp(1rem, 2vw, 1.75rem);
  --app-topbar-height: 72px;
  --radius-none: var(--radius-lg);
  --radius-subtle: var(--radius-lg);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Gotham", sans-serif;
  color: var(--text);
  background: #262626;
}
.auth {
  background: url("/static/img/login-bg.jpeg") center bottom / cover no-repeat fixed;
  color: #FFFFFF;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.card {
  background: linear-gradient(180deg, rgba(38, 38, 38, 0.98) 0%, rgba(29, 29, 29, 0.98) 100%);
  border-radius: 20px;
  padding: 1.6rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(128, 128, 128, 0.22);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25); border-color: rgba(128, 128, 128, 0.35); }
.auth-card {
  width: 33.333vw;
  min-width: 360px;
  background: rgba(38, 38, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}
.auth-card label {
  color: #FFFFFF;
  font-weight: 500;
}
.auth-card form label {
  font-weight: 500 !important;
}
.auth-label {
  font-weight: 500 !important;
}
.auth-card input {
  background: #FFFFFF;
  border-color: rgba(38, 38, 38, 0.35);
  color: #262626;
}
.auth-card input::placeholder {
  color: rgba(38, 38, 38, 0.65);
}
.auth-card textarea {
  background: #FFFFFF;
  border-color: rgba(38, 38, 38, 0.35);
  color: #262626;
}
.auth-card textarea::placeholder {
  color: rgba(38, 38, 38, 0.65);
}
.auth-card button {
  width: 100%;
  margin-top: 1rem;
  background: #9a8a78;
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(82, 67, 48, 0.3);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.auth-card button:hover {
  background: #8b7b69;
  color: #FFFFFF;
  box-shadow: inset 0 7px 14px rgba(82, 67, 48, 0.3);
  transform: translateY(1px);
}
.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.9rem;
  justify-content: center;
}
.auth-brand h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f7f4ee;
}
.auth-company-name {
  margin: 0;
  color: #FFFFFF;
  letter-spacing: 0.12em;
  font-size: 1rem;
  font-weight: 500;
}
.forgot-password-link {
  display: inline-block;
  margin-top: 0.45rem;
  margin-bottom: 0.6rem;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.78rem;
  width: fit-content;
}
.forgot-password-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}
.badge {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
  color: var(--sand);
  margin-bottom: 0.5rem;
}
label { display: block; margin-top: 0.9rem; font-weight: 600; }
input, select {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #5b5b5b;
  border-radius: 10px;
  margin-top: 0.3rem;
  background: #262626;
  color: #FFFFFF;
  font-family: "Gotham", sans-serif;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #5b5b5b;
  border-radius: 10px;
  margin-top: 0.3rem;
  background: #262626;
  color: #FFFFFF;
  font-family: "Gotham", sans-serif;
  resize: vertical;
  min-height: 96px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--development-sand);
  box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.26);
}
button {
  background: var(--construction-blue);
  color: #FFFFFF;
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  margin-top: 0.9rem;
  cursor: pointer;
  font-weight: 600;
}
button:hover { background: var(--development-sand); color: #262626; }
button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}
button.ghost:hover { background: rgba(255, 255, 255, 0.08); color: #FFFFFF; }
.topbar.light button.ghost {
  color: var(--charcoal);
  border-color: rgba(38, 38, 38, 0.2);
}
.topbar.light button.ghost:hover {
  background: #ece5db;
  color: var(--charcoal);
}
button.danger { background: #532c2c; }
.error { margin-top: 0.7rem; background: #ffdede; color: #7a1f1f; padding: 0.6rem; border-radius: 10px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--charcoal);
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 20px rgba(18, 16, 13, 0.12);
}
.brand { display: flex; gap: 0.72rem; align-items: center; text-decoration: none; color: inherit; }
.brand:hover, .brand:focus, .brand:active { text-decoration: none; color: inherit; }
.brand-copy { display: grid; gap: 0.16rem; align-content: center; }
.logo {
  background: var(--sand);
  color: var(--charcoal);
  font-weight: 700;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-family: "Gotham", sans-serif;
}
.logo.logo-image {
  width: 42px;
  height: 42px;
  object-fit: contain;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.login-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
  margin: 0;
}
.auth-card .error {
  background: rgba(122, 31, 31, 0.45);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.auth-card .inline-banner.success,
.auth-card .inline-banner.error {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}
.auth-card .inline-banner.success {
  background: rgba(22, 101, 52, 0.45);
}
.auth-card .inline-banner.error {
  background: rgba(153, 27, 27, 0.45);
}
@media (max-width: 1024px) {
  .auth-card {
    width: min(50vw, 640px);
    min-width: 320px;
  }
}
@media (max-width: 768px) {
  .auth-card {
    width: min(92vw, 640px);
    min-width: 0;
  }
}
.topbar h2 { margin: 0; font-family: "Gotham", sans-serif; font-weight: 700; }
.topbar p { margin: 0.2rem 0 0; color: var(--sand); }
.brand-title {
  margin: 0;
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.brand-meta {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 80px); }
.sidebar {
  background: #262626;
  color: #FFFFFF;
  padding: 1.5rem 1rem;
}
.nav { display: grid; gap: 0.8rem; }
.nav a {
  color: #f5efe6;
  text-decoration: none;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-weight: 600;
}
.nav a:hover { background: rgba(128, 128, 128, 0.25); }
.content { padding: 2rem; }
.content > .section-card + .section-card {
  margin-top: 1.5rem;
}
.project-bottom-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}
.project-timeline-section {
  margin-top: 1.5rem;
}
.project-timeline-header {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.project-timeline-header h3 {
  margin: 0;
}
.project-timeline-picker {
  justify-self: center;
}
.project-task-view-link {
  justify-self: end;
}
.collapsible-section-summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  list-style: none;
}
.collapsible-section-summary::-webkit-details-marker {
  display: none;
}
.collapsible-section-summary::after {
  color: var(--muted);
  content: "Expand";
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
details[open] > .collapsible-section-summary {
  margin-bottom: 1rem;
}
details[open] > .collapsible-section-summary::after {
  content: "Collapse";
}
.collapsible-section-summary h3,
.collapsible-section-summary h4,
.collapsible-section-summary p {
  margin: 0;
}
.project-bottom-grid > .section-card {
  margin-top: 0;
}
.project-bottom-grid > .section-card:only-child {
  grid-column: 1 / -1;
}
.inline-banner {
  margin-bottom: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.9rem;
}
.inline-banner.success {
  background: #e8f7ec;
  color: #166534;
  border-color: #9dd8ac;
}
.inline-banner.error {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}
.hero {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
  margin-bottom: 2rem;
}
.hero-panel {
  background: linear-gradient(135deg, #f8f3ea 0%, #f2eadf 45%, #efe6da 100%);
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid #e6dbcc;
}
.compact-hero {
  justify-content: space-between;
  align-items: center;
}
.hero-copy { max-width: 720px; display: grid; gap: 0.9rem; }
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b6b58;
  font-size: 0.74rem;
  font-weight: 700;
}
.hero h1,
h1,
h2,
h3,
h4,
h5,
h6 {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.hero h1 {
  font-family: "Gotham", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin: 0 0 0.6rem;
}
.hero p { margin: 0; color: #4b433a; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  min-width: 320px;
}
.stat { background: #FFFFFF; padding: 1rem; border-radius: 16px; border: 1px solid rgba(38, 38, 38, 0.08); }
.stat span { display: block; font-size: 0.8rem; color: #6c6257; }
.stat strong { font-size: 1.4rem; }
.stats.compact {
  margin-top: 1rem;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card.wide { grid-column: 1 / -1; }
.dashboard-grid {
  --dashboard-grid-gap: 1.4rem;
  --dashboard-top-card-height: 16rem;
  --dashboard-briefings-card-height: calc((var(--dashboard-top-card-height) * 2) + var(--dashboard-grid-gap));
  align-items: start;
  gap: var(--dashboard-grid-gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-grid:not(.dashboard-taskboard-only) {
  grid-template-rows: var(--dashboard-top-card-height) auto;
}
.dashboard-grid.dashboard-has-briefings:not(.dashboard-taskboard-only) {
  grid-template-rows: var(--dashboard-top-card-height) var(--dashboard-top-card-height) auto;
}
.dashboard-taskboard-only {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}
.dashboard-taskboard-only .dashboard-todos {
  grid-column: 2;
}
.dashboard-grid .card.wide {
  grid-column: 1 / -1;
}
.dashboard-grid .dashboard-overview {
  align-self: stretch;
  height: var(--dashboard-top-card-height);
  max-height: var(--dashboard-top-card-height);
  min-height: 0;
  overflow: hidden;
  grid-column: 1;
  grid-row: 1;
}
.dashboard-grid .dashboard-tasks {
  grid-column: 1;
}
.dashboard-grid .dashboard-todos {
  grid-column: 2;
}
.dashboard-grid .dashboard-today-snapshot {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  height: var(--dashboard-top-card-height);
  max-height: var(--dashboard-top-card-height);
  min-height: 0;
  overflow: hidden;
  grid-column: 2;
  grid-row: 1;
}
.dashboard-grid.dashboard-has-briefings .dashboard-today-snapshot {
  grid-column: 1;
  grid-row: 2;
}
.dashboard-grid .dashboard-shaib-brief {
  grid-column: 2;
}
.dashboard-grid.dashboard-has-briefings:not(.dashboard-taskboard-only) .dashboard-shaib-brief {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  grid-row: 1 / span 2;
  height: var(--dashboard-briefings-card-height);
  max-height: var(--dashboard-briefings-card-height);
  min-height: 0;
  overflow: hidden;
}
.dashboard-grid .dashboard-decisions {
  grid-column: 1 / -1;
}
.dashboard-grid:not(.dashboard-taskboard-only) .dashboard-tasks,
.dashboard-grid:not(.dashboard-taskboard-only) .dashboard-todos {
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 33.6rem;
  max-height: 33.6rem;
  min-height: 0;
  overflow: hidden;
}
.dashboard-todos {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.dashboard-grid .dashboard-actions {
  grid-column: 2;
}
.dashboard-lower-grid {
  display: grid;
  gap: var(--space-5);
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.dashboard-summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  margin-top: 1rem;
}
.dashboard-summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-none);
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 1rem;
}
.dashboard-summary-card span,
.dashboard-insight-list span,
.dashboard-activity-list span {
  color: var(--text-muted);
}
.dashboard-summary-card > span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dashboard-summary-card strong {
  font-size: 1.8rem;
  line-height: 1;
}
.dashboard-summary-card p {
  margin: 0;
}
.dashboard-it-actions {
  grid-column: 1 / -1;
}
.dashboard-it-actions h3 {
  margin: 0;
}
.it-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}
.it-action-button {
  align-items: center;
  display: inline-flex;
  flex: 0 0 10.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  height: 2.75rem;
  justify-content: center;
  margin-top: 0;
  padding: 0 0.8rem;
  text-align: center;
  white-space: nowrap;
}
.it-request-board-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--space-5);
}
.it-request-board {
  border: 1px solid var(--bc-line);
  border-radius: var(--radius-none);
  padding: var(--space-4);
}
.it-request-table-wrap {
  overflow-x: auto;
}
.it-request-table td:first-child {
  min-width: 260px;
}
.it-request-table td:first-child span {
  color: var(--bc-muted-ink);
  display: block;
  line-height: 1.4;
  margin-top: 0.2rem;
  max-width: 52rem;
}
.it-request-table tr[data-it-request-row] {
  cursor: pointer;
}
.it-request-table tr[data-it-request-row]:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: -2px;
}
.it-request-detail-list {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 var(--space-4);
}
.it-request-detail-list div {
  border: 1px solid var(--bc-line);
  border-radius: var(--radius-none);
  padding: var(--space-3);
}
.it-request-detail-list dt {
  color: var(--bc-muted-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}
.it-request-detail-list dd {
  color: var(--bc-ink);
  margin: var(--space-1) 0 0;
}
.it-request-description-block {
  border-bottom: 1px solid var(--bc-line);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
}
.it-request-description-block p {
  color: var(--bc-ink);
  white-space: pre-wrap;
}
.it-priority-urgent,
.it-priority-high {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
}
.it-priority-normal {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}
.it-priority-low {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}
.dashboard-insight-list,
.dashboard-activity-list,
.dashboard-todo-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
#dashboard-task-list,
.dashboard-todo-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.35rem;
}
#dashboard-task-list {
  align-content: start;
  grid-auto-rows: max-content;
}
#dashboard-task-list > li {
  align-self: start;
}
.dashboard-insight-list li {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding-bottom: 0.65rem;
}
.dashboard-insight-list li:last-child,
.dashboard-activity-list li:last-child,
.dashboard-todo-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.dashboard-insight-list strong {
  font-size: 1.35rem;
}
.dashboard-activity-list li {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding-bottom: 0.65rem;
}
.dashboard-todo-header,
.today-snapshot-header,
.shaib-brief-header {
  align-items: center;
  margin-bottom: 0.85rem;
}
.dashboard-todo-header h3,
.today-snapshot-header h3,
.shaib-brief-header h3 {
  margin: 0;
}
.dashboard-todo-add-button {
  align-items: center;
  align-self: center;
  background: var(--bc-white);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-sm);
  color: var(--bc-ink);
  display: inline-flex;
  flex: 0 0 1.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  height: 1.35rem;
  justify-content: center;
  line-height: 1;
  min-height: 1.35rem;
  min-width: 1.35rem;
  padding: 0;
  width: 1.35rem;
}
.dashboard-todo-add-button:hover,
.dashboard-todo-add-button:focus-visible {
  border-color: var(--color-gold);
  color: var(--color-gold);
}
.dashboard-todo-list li {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
}
.dashboard-todo-list .row.space {
  align-items: flex-start;
  gap: 0.75rem;
}
.dashboard-todo-list strong {
  line-height: 1.3;
}
.dashboard-todo-form textarea {
  resize: vertical;
}
.shaib-brief-list {
  flex: 1 1 auto;
  gap: 0.85rem;
  min-height: 0;
  overflow-y: auto;
}
.shaib-brief-item {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.shaib-brief-item:hover,
.shaib-brief-item:focus {
  background: rgba(212, 175, 55, 0.08);
  outline: none;
}
.shaib-brief-actions {
  flex-wrap: wrap;
}
.shaib-brief-actions form {
  margin: 0;
}
.shaib-brief-actions .button-link {
  font-size: 0.78rem;
  margin: 0;
  padding: 0.2rem 0.45rem;
}
.shaib-brief-type {
  white-space: nowrap;
}
.shaib-brief-type-decision,
.shaib-brief-type-blocker {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
}
.shaib-brief-type-ask,
.shaib-brief-type-follow_up {
  background: var(--status-info-bg);
  color: var(--status-info-text);
}
.shaib-brief-type-reminder {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
}
.shaib-brief-type-fyi {
  background: var(--status-success-bg);
  color: var(--status-success-text);
}
.today-snapshot-list {
  display: grid;
  flex: 1 1 auto;
  gap: 0.75rem;
  min-height: 0;
  list-style: none;
  margin: 0;
  overflow-y: auto;
  padding: 0;
}
.today-snapshot-list li {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  padding-bottom: 0.75rem;
}
.today-snapshot-list li.today-meeting-item {
  cursor: pointer;
}
.today-snapshot-list li.today-meeting-item:hover {
  background: var(--color-border-soft);
}
.today-snapshot-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.today-snapshot-time {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 700;
}
.today-snapshot-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}
.today-meeting-summary {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  min-width: 0;
}
.today-meeting-summary > span {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}
.today-meeting-drawer-content {
  border-left: 2px solid var(--color-gold);
  display: grid;
  gap: 0.65rem;
  padding-left: 0.75rem;
}
.today-meeting-drawer-content p {
  margin: 0;
}
.today-meeting-attendees {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}
.today-meeting-attendees li {
  border-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  grid-template-columns: none;
  padding-bottom: 0;
}
.today-meeting-join {
  justify-self: start;
}
.dashboard-task-link {
  cursor: pointer;
}
.dashboard-task-link:hover {
  background: var(--color-border-soft);
}
.milestone-flag {
  min-height: 1.25rem;
  min-width: 1.25rem;
  margin-left: var(--space-2);
  padding: 0;
  line-height: 1;
  vertical-align: middle;
}
.dashboard-activity-list div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.dashboard-activity-list strong {
  line-height: 1.3;
}
.section-card { border: 1px solid rgba(57, 46, 35, 0.11); }
h3 { margin-top: 0; font-family: "Gotham", sans-serif; font-weight: 700; }
h4 { margin: 0 0 0.6rem; font-family: "Gotham", sans-serif; font-weight: 700; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.list li { display: grid; gap: 0.2rem; padding-bottom: 0.6rem; border-bottom: 1px solid #ece5dc; }
.list li:last-child { border-bottom: none; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.4rem; border-bottom: 1px solid #e6dfd5; }
th { color: #6c6257; font-weight: 600; }
table.clickable tbody tr { transition: background-color 0.15s ease; }
table.clickable tbody tr:hover { background: #f8f5ef; }
table.clickable tbody tr:focus { outline: 2px solid #cfd8ff; outline-offset: -2px; }
.compact-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.compact-table th, .compact-table td { padding: 0.45rem 0.35rem; border-bottom: 1px solid #ece5dc; vertical-align: top; }
.compact-table th { color: #6b6156; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.01em; }
.task { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #ece5dc; }
.task.clickable { cursor: pointer; }
.task:last-child { border-bottom: none; }
.task p { margin: 0.4rem 0; }
.inline { display: grid; gap: 0.4rem; min-width: 160px; }
.stack { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.panel { background: #fdfbf7; padding: 1rem; border-radius: 14px; border: 1px dashed #dccdbb; }
.muted { color: #7a7066; }
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; }
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .dashboard-taskboard-only .dashboard-tasks,
  .dashboard-taskboard-only .dashboard-todos {
    grid-column: 1;
  }
  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid .dashboard-tasks,
  .dashboard-grid .dashboard-todos,
  .dashboard-grid .dashboard-overview,
  .dashboard-grid .dashboard-today-snapshot,
  .dashboard-grid .dashboard-shaib-brief,
  .dashboard-grid .dashboard-actions {
    grid-column: 1;
    grid-row: auto;
  }
  .dashboard-grid.dashboard-has-briefings:not(.dashboard-taskboard-only) .dashboard-shaib-brief {
    grid-row: auto;
  }
  .dashboard-grid .dashboard-overview,
  .dashboard-grid .dashboard-today-snapshot,
  .dashboard-grid:not(.dashboard-taskboard-only) .dashboard-shaib-brief {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .project-bottom-grid {
    grid-template-columns: 1fr;
  }
}
.filters {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: end;
}
.filters label {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  color: #6b6156;
}
.filters input,
.filters select {
  padding: 0.35rem 0.58rem;
  min-height: 32px;
  margin-top: 0;
  border-radius: 8px;
}
.filters button {
  margin-top: 0;
  min-height: 32px;
  padding: 0.5rem 0.85rem;
}
.project-task-filters {
  margin-top: 0.45rem;
}
.kanban {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.kanban-wrap {
  padding-top: 1rem;
}
.taskboard-shellless {
  padding-top: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding-left: 0;
  padding-right: 0;
}
body:not(.auth) .content > .taskboard-shellless {
  margin-left: 0;
  margin-right: 0;
}
.taskboard-shellless .filters {
  background: var(--bc-white);
  border: 1px solid #e1d6c8;
  border-radius: 14px;
  padding: 0.9rem 1rem;
}
.taskboard-shellless .divider {
  background: #ded3c6;
}
.kanban-filters {
  margin-bottom: 0;
}
.kanban-column {
  background: #fdfbf7;
  border: 1px solid #e6dfd5;
  border-radius: 16px;
  padding: 0.75rem;
}
.kanban-card {
  background: #FFFFFF;
  border: 1px solid #e6dfd5;
  border-radius: 12px;
  padding: 0.62rem;
  margin-bottom: 0.55rem;
  display: grid;
  gap: 0.32rem;
  cursor: pointer;
}
.kanban-card .progress { font-weight: 600; color: #6c6257; }
.task-progress {
  overflow: hidden;
}
.task-progress .expected {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: rgba(23, 62, 102, 0.14);
  z-index: 1;
  pointer-events: none;
}
.task-progress .expected-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(23, 62, 102, 0.42);
  z-index: 2;
  pointer-events: none;
}
.task-progress.is-behind .expected {
  background: rgba(220, 38, 38, 0.14);
}
.task-progress.is-behind .expected-marker {
  background: rgba(220, 38, 38, 0.45);
}
.task-progress.is-at-risk .expected {
  background: rgba(217, 119, 6, 0.16);
}
.task-progress.is-at-risk .expected-marker {
  background: rgba(217, 119, 6, 0.52);
}
.task-progress .bar {
  position: relative;
  z-index: 3;
}
.task-progress span {
  z-index: 4;
}
.taskboard-compact .kanban {
  gap: 0.8rem;
}
.taskboard-compact .kanban-column {
  border-radius: 12px;
  padding: 0.55rem 0.58rem;
}
.taskboard-compact .kanban-column h4 {
  margin: 0;
  font-size: 0.92rem;
}
.taskboard-compact .kanban-column > .row.space {
  margin-bottom: 0.4rem;
}
.taskboard-compact .kanban-column > .muted {
  margin: 0.1rem 0 0.35rem;
  font-size: 0.75rem;
}
.taskboard-compact .kanban-card {
  border-radius: 10px;
  padding: 0.46rem 0.5rem;
  margin-bottom: 0.42rem;
  gap: 0.2rem;
}
.kanban-plain-columns .kanban-column {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.kanban-plain-columns .kanban-column > .row.space {
  margin-bottom: 0.45rem;
  justify-content: center;
  text-align: center;
  gap: 0.65rem;
}
.kanban-plain-columns .kanban-column > .row.space h4 {
  text-align: center;
  color: #3d3328;
}
.kanban-plain-columns .kanban-column > .muted {
  margin: 0.1rem 0 0.45rem;
  text-align: center;
}
.taskboard-shellless .kanban-card {
  background: #fdfbf8;
  border: 1px solid #e3d9cd;
}
.taskboard-shellless .kanban-card:hover {
  background: #fffdfa;
  border-color: #d4c5b5;
}
.taskboard-shellless .chip,
.taskboard-shellless .range,
.taskboard-shellless .muted,
.taskboard-shellless .kanban-card strong,
.taskboard-shellless .kanban-column h4,
.taskboard-shellless .kanban .progress span {
  color: #FFFFFF;
}
.taskboard-shellless .chip {
  color: #FFFFFF;
}
.taskboard-shellless .status-pill.status-not_started {
  background: #efe6da;
  color: #5a4d3f;
}
.taskboard-compact .kanban-card strong {
  font-size: 0.9rem;
  line-height: 1.2;
}
.taskboard-compact .kanban .chip {
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
}
.taskboard-compact .kanban .range {
  font-size: 0.76rem;
}
.taskboard-compact .kanban .progress {
  margin: 0.15rem 0 0.42rem;
  height: 8px;
}
.taskboard-compact .kanban .progress span {
  top: -15px;
  font-size: 0.7rem;
}
.taskboard-compact .status-pill {
  padding: 0.12rem 0.42rem;
  font-size: 0.68rem;
  letter-spacing: 0.015em;
}
.taskboard-compact .kanban .avatar {
  width: 24px;
  height: 24px;
  font-size: 0.66rem;
}
.mini-form { display: grid; gap: 0.4rem; }
.team-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.team-form-card {
  display: grid;
  gap: 0.75rem;
  border: 1px solid #ddd4c8;
  border-radius: 12px;
  padding: 0.9rem;
  background: #faf7f1;
}
.employee-edit-panel {
  border: 1px solid #ddd4c8;
  border-radius: 12px;
  background: #faf7f1;
  overflow: hidden;
}
.employee-edit-panel summary {
  cursor: pointer;
  padding: 0.85rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}
.employee-edit-panel .team-form-card {
  border: 0;
  border-top: 1px solid #ddd4c8;
  border-radius: 0;
}
.team-form-head h4 {
  margin: 0;
}
.team-form-row label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
}
.team-form-row.team-form-row-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}
.team-form-hint {
  margin: 0.3rem 0 0;
  font-size: 0.76rem;
}
.team-form-actions {
  display: flex;
  justify-content: flex-end;
}
.team-form-actions button {
  margin-top: 0;
}
.team-wizard-panel {
  width: min(620px, 95vw);
}
.team-wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.75rem 0 0.9rem;
}
.team-wizard-step-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #dad0c3;
  background: #f7f3ec;
  font-size: 0.78rem;
  font-weight: 600;
}
.team-wizard-step-pill span {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ddd1c3;
  font-size: 0.72rem;
}
.team-wizard-step-pill.active {
  border-color: #808080;
  background: #e7eef6;
  color: #808080;
}
.team-wizard-step-pill.active span {
  background: #808080;
  color: #FFFFFF;
}
.team-wizard-form {
  display: grid;
  gap: 0.8rem;
}
.team-wizard-step-body {
  display: grid;
  gap: 0.8rem;
}
.team-member-checklist {
  display: grid;
  gap: 0.45rem;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #d9cfbf;
  border-radius: 10px;
  padding: 0.55rem;
  background: #FFFFFF;
}
.team-member-check-item {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0.25rem;
  border-radius: 8px;
}
.team-member-check-item:hover {
  background: #f5efe5;
}
.team-member-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}
.team-role-list {
  display: grid;
  gap: 0.55rem;
}
.team-role-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 0.7rem;
  align-items: center;
  border: 1px solid #ddd4c8;
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  background: #FFFFFF;
}
.team-role-name {
  font-size: 0.9rem;
  font-weight: 600;
}
.team-role-link {
  margin: 0;
  padding: 0;
  border: none !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit;
  font-weight: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none !important;
}
.team-role-link,
body:not(.auth) button.team-role-link {
  background: transparent !important;
  border: none !important;
  color: inherit !important;
  box-shadow: none !important;
}
.team-role-link:hover,
.team-role-link:focus-visible {
  color: inherit !important;
  text-decoration: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.employee-directory-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-4);
}
.employee-directory-filter label {
  display: grid;
  gap: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}
.employee-directory-filter select {
  min-height: 2rem;
  min-width: 11rem;
  margin-top: 0;
  padding: 0.3rem 0.55rem;
  border-color: var(--color-border);
  background: transparent;
}
.team-member-remove-form {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}
.member-remove-btn {
  margin: 0;
  padding: 0;
  width: 20px;
  height: 20px;
  line-height: 18px;
  border-radius: 999px;
  border: 1px solid #d5cabd !important;
  background: transparent !important;
  color: #8b7f71;
  font-size: 14px;
  font-weight: 700;
}
.member-remove-btn:hover,
.member-remove-btn:focus-visible {
  border-color: #b7a592 !important;
  color: #7a2f2f;
  background: #f8f2ea !important;
}
.team-member-actions-cell {
  width: 54px;
  text-align: right;
}
.team-add-member-card h4 {
  margin: 0 0 0.2rem;
}
.team-add-member-card {
  margin-top: 1rem;
}
.team-form-actions-split {
  justify-content: space-between;
  width: 100%;
}
.team-role-modal-panel {
  width: min(420px, 92vw);
}
.team-wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}
.team-wizard-actions button {
  margin-top: 0;
}

.button-link {
  display: inline-block;
  background: var(--charcoal);
  color: #FFFFFF;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.button-link:hover { background: var(--accent); color: var(--charcoal); }
.button-link.subtle {
  background: #f6f1e8;
  color: var(--charcoal);
  border: 1px solid #ddceba;
}
.button-link.subtle:hover { background: #e8dccb; color: #2b251f; }
.divider { height: 1px; background: #e6dfd5; margin: 1rem 0; }
.code-block {
  background: #262626;
  color: #f0f0f0;
  padding: 1rem;
  border-radius: 12px;
  overflow: auto;
  font-size: 0.85rem;
}
.topbar.light { background: #f7f5f2; color: var(--charcoal); border-bottom: 1px solid #e6dfd5; }
.topbar.light {
  background: #262626;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.topnav { display: flex; gap: 1.15rem; align-items: center; }
.topnav a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--charcoal);
  padding: 0.35rem 0;
  border-radius: 0;
  font-family: "Gotham", sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.topnav a:hover { background: #e9e4dc; }
.topbar > form {
  margin: 0;
  display: flex;
  align-items: center;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topbar-actions form {
  margin: 0;
  display: flex;
  align-items: center;
}
.topbar-actions button,
.topbar-actions button.ghost {
  margin-top: 0;
}
.topbar-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.1rem 0.2rem;
}
.topbar-gear:hover,
.topbar-gear:focus-visible,
.topbar-gear.active {
  color: #808080;
  text-decoration: none;
}
.investor-pie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}
.investor-pie-card {
  border: 1px solid rgba(57, 46, 35, 0.11);
  border-radius: 12px;
  padding: 0.8rem;
  background: #FFFFFF;
}
.investor-pie-card h4 {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
}
.investor-pie {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: grid;
  place-items: center;
  color: #6b7280;
  font-size: 0.8rem;
}
.investor-pie-legend {
  display: grid;
  gap: 0.35rem;
}
.investor-tables-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.investor-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.8rem;
  color: #9a8a78;
  font-weight: 500;
}
.investor-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.investor-pie-tooltip {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  background: #111827;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  min-width: 150px;
}
@media (max-width: 900px) {
  .team-admin-grid {
    grid-template-columns: 1fr;
  }
  .team-form-row.team-form-row-split {
    grid-template-columns: 1fr;
  }
  .investor-tables-grid {
    grid-template-columns: 1fr;
  }
}
.auth-form-title {
  margin: 0 0 0.75rem;
  color: #FFFFFF;
  text-align: center;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.settings-card h3 {
  margin: 0 0 0.8rem;
}
.settings-row {
  margin-bottom: 0.3rem;
}
.row { display: flex; align-items: center; }
.row.space { justify-content: space-between; }
.row.gap { gap: 0.8rem; }
.link { color: var(--charcoal); text-decoration: underline; }
.create-project-header {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}
.create-project-header h3 {
  margin: 0;
  justify-self: start;
}
.stepper { display: flex; gap: 0.55rem; align-items: center; justify-content: center; flex-wrap: nowrap; }
.step { display: flex; flex-direction: column; gap: 0.15rem; align-items: center; justify-content: center; min-width: 96px; padding: 0.28rem 0.55rem; border-radius: 12px; background: #f0ece6; font-weight: 600; text-align: center; }
.stepper a.step { text-decoration: none; color: inherit; cursor: pointer; }
.step span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #d7cbbd; color: #3a2f25; font-size: 0.78rem; }
.step label { margin: 0; font-size: 0.74rem; line-height: 1.05; font-weight: 600; }
.step.active { background: #dfe6f9; }
.tabs { display: flex; gap: 0.6rem; }
.tab { text-decoration: none; padding: 0.4rem 0.8rem; border-radius: 10px; background: #f0ece6; color: var(--charcoal); font-weight: 600; }
.tab.active { background: #cfd8ff; }

.project-command-center {
  display: grid;
  gap: 1rem;
}

.command-center-stats {
  margin-top: 0;
}

.command-center-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.command-center-panel {
  background: #FFFFFF;
  border: 1px solid var(--line);
  padding: 0.9rem;
}

.command-center-panel h4 {
  font-size: 0.9rem;
  letter-spacing: 0;
  margin: 0 0 0.65rem;
}

.compact-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.compact-list li {
  border-top: 1px solid rgba(57, 46, 35, 0.08);
  display: grid;
  gap: 0.15rem;
  padding-top: 0.55rem;
}

.compact-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.compact-list strong {
  color: var(--charcoal);
  font-size: 0.9rem;
  line-height: 1.25;
}

.compact-list span,
.compact-list li {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.tree { display: grid; gap: 0.8rem; }
.tree-item { border: 1px solid #e6dfd5; border-radius: 12px; padding: 0.6rem; background: #FFFFFF; }
.tree-item span { font-size: 0.8rem; color: #6c6257; margin-left: 0.4rem; }
.timeline-tree {
  gap: 0.25rem;
}
.timeline-node {
  margin-left: 0;
  padding-left: 0;
  --node-pad: 0rem;
}
.timeline-node-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.4rem;
  min-height: 30px;
  padding: 0.18rem 0.25rem 0.18rem calc(0.25rem + var(--node-pad));
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}
.timeline-node-row:hover {
  background: #fbf8f3;
  border-color: #eee7db;
}
.timeline-check-label {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  cursor: pointer;
}
.timeline-check-label strong {
  font-size: 0.88rem;
  font-weight: 500;
  color: #2e2a25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-check-label span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a7f71;
  background: transparent;
  border: none;
  padding: 0;
}
.timeline-check-label input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #4f46e5;
  border-radius: 4px;
}
.timeline-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin: 0 !important;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 4px;
  padding: 0;
  background: #f7f2e8;
  color: #554a3e;
  border: 1px solid #ece2d4;
  line-height: 1;
  font-size: 0.76rem;
}
.timeline-toggle:hover {
  background: #f1e8d8;
}
.timeline-toggle-spacer {
  display: inline-block;
  align-self: center;
  width: 1.1rem;
  height: 1.1rem;
}
.timeline-children {
  margin-top: 0.1rem;
  margin-left: 1.5rem;
  display: grid;
  gap: 0.2rem;
  padding-left: 0.7rem;
  border-left: 1px solid #f0eadf;
}
.timeline-node.level-phase > .timeline-node-row {
  background: transparent;
}
.timeline-node.level-subphase > .timeline-node-row {
  background: transparent;
}
.timeline-node.level-task > .timeline-node-row,
.timeline-node.level-subtask > .timeline-node-row {
  background: transparent;
}
.timeline-node.level-phase { --node-pad: 0rem; }
.timeline-node.level-subphase { --node-pad: 0.55rem; }
.timeline-node.level-task { --node-pad: 1.1rem; }
.timeline-node.level-subtask { --node-pad: 1.7rem; }
.timeline-toolbar {
  margin: 0.2rem 0 0.6rem;
}
.timeline-toolbar-right {
  justify-content: flex-end;
}
.timeline-toolbar h4 {
  margin: 0;
}
.timeline-drawer-backdrop {
  position: fixed;
  inset: var(--app-topbar-height) 0 0 0;
  background: rgba(22, 20, 16, 0.35);
  opacity: 0;
  transition: opacity 140ms ease;
  z-index: 80;
}
.timeline-drawer-backdrop.open {
  opacity: 1;
}
.timeline-drawer {
  position: fixed;
  top: var(--app-topbar-height);
  right: 0;
  width: min(430px, 92vw);
  height: calc(100vh - var(--app-topbar-height));
  background: #fffdfa;
  border-left: 1px solid #e8dfd3;
  box-shadow: -12px 0 28px rgba(26, 20, 13, 0.16);
  transform: translateX(104%);
  transition: transform 160ms ease;
  z-index: 81;
  display: flex;
  flex-direction: column;
}
.timeline-drawer.open {
  transform: translateX(0);
}
.timeline-drawer-head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #ece3d6;
}
.timeline-drawer-head h4 {
  margin: 0;
}
.timeline-drawer-body {
  padding: 0.9rem 1rem 1.2rem;
  display: grid;
  gap: 0.65rem;
  overflow: auto;
}
.timeline-drawer-body label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #6e6255;
}
.timeline-drawer-body input,
.timeline-drawer-body select {
  min-height: 36px;
}
.kanban .range { font-size: 0.85rem; color: #6c6257; }
.table-progress {
  position: relative;
  background: #ece8df;
  border-radius: 999px;
  height: 10px;
  min-width: 120px;
  overflow: hidden;
}
.table-progress .bar {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.kanban .progress { position: relative; background: #f1efe9; border-radius: 999px; height: 10px; margin: 0.3rem 0 0.6rem; }
.kanban .progress .bar { display: block; height: 100%; border-radius: 999px; }
.kanban .progress span { position: absolute; right: 0; top: -18px; font-size: 0.8rem; color: #6c6257; }
.kanban .chip {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #3a3229;
  border: none;
}
.kanban .avatar { width: 28px; height: 28px; border-radius: 50%; background: #262626; color: #FFFFFF; display: grid; place-items: center; font-size: 0.74rem; margin-left: auto; }
.kanban .avatar[title] { cursor: help; }
.kanban .avatar[data-tooltip] {
  position: relative;
}
.kanban .avatar[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  white-space: nowrap;
  background: #1f2937;
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  z-index: 12;
}
.gantt { display: grid; gap: 0.6rem; }
.gantt-header, .gantt-row { display: grid; grid-template-columns: 200px 80px 1fr; gap: 1rem; align-items: center; }
.gantt-track { background: #f3f1eb; border-radius: 6px; height: 18px; position: relative; }
.gantt-bar { position: absolute; height: 18px; border-radius: 6px; }
.gantt-bar.phase { background: #f0c36a; }
.gantt-bar.subphase { background: #d4d8e1; }
.gantt-bar.task { background: #9fb5d9; }
.gantt-track::after {
  content: '';
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2px;
  background: #e0703c;
  left: var(--today-left, 50%);
}
table tr:hover { background: #f6f2ec; }
.gantt-iframe { width: 100%; height: 70vh; border: 1px solid #e6dfd5; border-radius: 12px; }
.gantt-container { height: 70vh; }
.b-gantt, .b-gantt * {
  font-family: "Gotham", sans-serif !important;
}
.gantt-container {
  border: 1px solid #dfd5c8;
  border-radius: 12px;
  overflow: hidden;
  background: #FFFFFF;
  --b-event-label-color: #4b4035;
  --b-selected-event-label-color: #4b4035;
  --b-dependency-color: #c5c1b8;
  --b-dependency-stroke-width: 1px;
  --b-dependency-hover-stroke-width: 1.5px;
  --b-dependency-selected-color: #b8b3a8;
}
.gantt-container svg.b-sch-dependencies-canvas .b-sch-dependency:not(.b-click-area) {
  stroke: #c5c1b8 !important;
  stroke-width: 1px !important;
  opacity: 0.75;
}
.gantt-container .b-sch-dependency-arrow {
  fill: #c5c1b8 !important;
}
.gantt-container :is(.b-sch-event-wrap, .b-gantt-task-wrap) .b-sch-label-after {
  align-self: center !important;
  display: flex;
  align-items: center;
  line-height: 1.1;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.gantt-legend {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #6a5f53;
  margin: 0.5rem 0 0.9rem;
}
.gantt-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
  vertical-align: -1px;
}
.gantt-legend .dot.complete { background: #16a34a; }
.gantt-legend .dot.complete-late { background: #6f8f74; }
.gantt-legend .dot.ontrack { background: #eab308; }
.gantt-legend .dot.warning { background: #f97316; }
.gantt-legend .dot.behind { background: #dc2626; }
.gantt-legend .dot.future { background: #808080; }
.drawer {
  position: fixed;
  inset: var(--app-topbar-height) 0 0 0;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 40;
}

/* Bryntum built-in today marker only (avoid touching other label/layout classes) */
.b-sch-current-time-line {
  border-left: 2px solid #ef4444 !important;
}

.drawer.open { opacity: 1; pointer-events: all; }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 92vw);
  height: 100%;
  background: #FFFFFF;
  padding: 1.5rem;
  overflow: auto;
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  border-top: 4px solid var(--task-drawer-accent, #d8cfc2);
}
.task-drawer-panel {
  width: min(520px, 92vw);
}
.task-drawer-panel > .row.space {
  align-items: center;
}
.task-drawer-panel > .row.space h3 {
  margin: 0;
}
.drawer-content { margin-top: 1rem; }
.drawer-content .progress {
  position: relative;
  background: #f1efe9;
  border-radius: 999px;
  height: 10px;
  margin: 0.3rem 0 0.6rem;
}
.drawer-content .progress .bar {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.drawer-content .progress span {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 0.8rem;
  color: #6c6257;
}
.task-hard-deadline-note {
  grid-column: 1 / -1;
  justify-self: start;
  align-self: start;
  width: 100%;
  margin: 0.15rem 0 0;
  color: #8c2f26;
  text-align: left;
}
.task-hard-deadline-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  align-self: start;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0;
  text-align: left;
}
.task-hard-deadline-toggle span {
  font-size: 0.78rem;
}
.task-hard-deadline-meta-block {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(140, 47, 38, 0.14);
  border-radius: 12px;
  background: #faf4f1;
}
.task-hard-deadline-meta {
  margin: 0;
  color: #5f4038;
  font-size: 0.8rem;
  line-height: 1.4;
}
.task-request-detail-field,
.task-hard-deadline-admin-form label {
  grid-column: 1 / -1;
}
.task-drawer-edit-card {
  display: grid;
  gap: 0.85rem;
  border: 1px solid var(--bc-line);
  background: var(--bc-white);
  padding: 1rem;
}
.task-drawer-edit-header {
  align-items: center;
}
.task-drawer-edit-header h4 {
  margin: 0;
}
.task-hard-deadline-admin {
  gap: 0.75rem;
}
.task-hard-deadline-admin-copy {
  margin: 0.3rem 0 0;
  line-height: 1.4;
}
.task-hard-deadline-admin-actions {
  align-items: center;
}
.history-description-cell {
  max-width: 340px;
}
.portfolio-summary-stats {
  margin-top: 1rem;
}
.portfolio-filters {
  margin-top: 1rem;
  align-items: end;
}
.portfolio-filter-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.portfolio-attention-cell {
  display: grid;
  gap: 0.35rem;
}
.project-attention-list {
  display: grid;
  gap: 0.75rem;
}
.project-attention-item {
  border: 1px solid #e6dfd5;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fcfaf7;
}
.project-attention-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.history-see-more {
  margin-top: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-decoration: underline;
  font-size: 0.78rem;
}
.task-history-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
}
.task-history-modal-card {
  width: min(560px, 92vw);
  max-height: 70vh;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #e2d8cc;
  background: #FFFFFF;
  padding: 1rem;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.15);
}
.task-history-modal-body {
  margin-top: 0.75rem;
  white-space: pre-wrap;
  color: #3b332a;
}
.drawer-progress-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(
    --progress-gradient,
    linear-gradient(
      to right,
      var(--fill-color, #d64541) 0%,
      var(--fill-color, #d64541) var(--fill-pct, 0%),
      #ece8df var(--fill-pct, 0%),
      #ece8df 100%
    )
  );
  outline: none;
  margin: 0;
}
.drawer-progress-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(
    --progress-gradient,
    linear-gradient(
      to right,
      var(--fill-color, #d64541) 0%,
      var(--fill-color, #d64541) var(--fill-pct, 0%),
      #ece8df var(--fill-pct, 0%),
      #ece8df 100%
    )
  );
}
.drawer-progress-range::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(
    --progress-gradient,
    linear-gradient(
      to right,
      var(--fill-color, #d64541) 0%,
      var(--fill-color, #d64541) var(--fill-pct, 0%),
      #ece8df var(--fill-pct, 0%),
      #ece8df 100%
    )
  );
}
.drawer-progress-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.drawer-progress-range::-moz-range-thumb {
  width: 0;
  height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.clickable tbody tr { cursor: pointer; }
.clickable tbody tr:hover { background: #f6f2ec; }
.clickable tbody tr:focus-visible {
  outline: 2px solid #6b5b4d;
  outline-offset: -2px;
  background: #f6f2ec;
}
.hidden { display: none; }
.grid-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.grid-two p { margin: 0.2rem 0 0; }
.project-detail-line {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  color: #534a40;
}
.section-gap-lg {
  margin-top: 1.1rem;
}
.project-task-grid {
  grid-template-columns: 1fr;
}
.project-task-grid .kanban-column {
  background: #FFFFFF;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}
.dashboard-decision-options {
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quick-action {
  display: grid;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--charcoal);
  padding: 0.9rem;
  background: #faf6ef;
  border: 1px solid #e5d8c8;
  border-radius: 12px;
}
button.quick-action {
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}
.quick-action:hover {
  background: #f1e8dc;
  border-color: #d2c0ab;
}
.quick-action span {
  color: #665a4d;
  font-size: 0.9rem;
}
.dashboard-decision-options .decision-option {
  align-content: center;
  min-height: 7rem;
  justify-items: start;
}
.decision-option strong {
  font-size: 1.6rem;
  line-height: 1;
}
.decision-option small {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.decision-option-details summary {
  display: grid;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
}
.decision-option-details summary::-webkit-details-marker {
  display: none;
}
.decision-option-details[open] {
  grid-column: 1 / -1;
}

.dashboard-decision-request-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-decision-request-list li {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
}

.dashboard-decisions-drawer-content {
  display: grid;
  gap: var(--space-4);
}

.urgency-filters {
  margin: 0.4rem 0 0.8rem;
  flex-wrap: wrap;
}
.chip-filter {
  margin-top: 0;
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  border: 1px solid #d7c7b4;
  background: #f8f1e7;
  color: #3a3229;
  font-size: 0.8rem;
  font-weight: 700;
}
.chip-filter.active {
  background: #262626;
  border-color: #262626;
  color: #FFFFFF;
}
.chip-filter:hover {
  background: #eadfce;
  color: #2f2922;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}
.status-not_started { background: rgba(128, 128, 128, 0.2); color: #d7d7d7; border-color: #808080; }
.status-in_progress { background: rgba(128, 128, 128, 0.2); color: #eadfce; border-color: #808080; }
.status-behind { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.status-complete { background: rgba(23, 62, 102, 0.2); color: #9bbad8; border-color: #808080; }
.status-complete-late { background: rgba(128, 128, 128, 0.22); color: #dadada; border-color: #9e9e9e; }
.status-blocked { background: #ffe3e0; color: #991b1b; border-color: #f3a8a0; }

/* Urgency chips for dashboard overview, aligned with Kanban health signals */
.urgency-0 { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.urgency-1 { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
.urgency-2 { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.urgency-other { background: rgba(128, 128, 128, 0.2); color: #dadada; border-color: #808080; }

.urgent-item {
  border-left: 4px solid transparent;
  padding-left: 0.75rem;
  cursor: pointer;
}
.urgent-item:focus-visible {
  outline: 2px solid #6b5b4d;
  outline-offset: 2px;
  border-radius: 8px;
}
.urgency-row-0 { border-left-color: #dc2626; }
.urgency-row-1 { border-left-color: #f97316; }
.urgency-row-2 { border-left-color: #eab308; }
.urgency-row-other { border-left-color: #808080; }
.urgent-item .kanban-chip {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #3a3229;
  border: none;
}
.urgent-item .range {
  font-size: 0.85rem;
  color: #6c6257;
}
.urgent-item .progress {
  position: relative;
  background: #ece8df;
  border-radius: 999px;
  height: 8px;
  margin-top: 0.2rem;
}
.urgent-item .progress .bar {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.urgent-item .progress span {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 0.8rem;
  color: #6c6257;
  font-weight: 700;
}
.task-assignee-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #262626;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: help;
  position: relative;
}
.task-assignee-avatar[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  white-space: nowrap;
  background: #1f2937;
  color: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.45rem;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  z-index: 20;
}

/* TGG site-aligned theme */
body:not(.auth) {
  color: #262626;
  background: #262626 !important;
}
body:not(.auth) .content {
  padding-top: 2.1rem;
}
body:not(.auth) .topbar.light {
  background: #262626 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #FFFFFF !important;
  box-shadow: 0 10px 24px rgba(17, 14, 10, 0.16) !important;
}
body:not(.auth) .topbar.light .brand,
body:not(.auth) .topbar.light .brand h2,
body:not(.auth) .topbar.light .topnav a {
  color: #FFFFFF !important;
}
body:not(.auth) .topbar.light p {
  color: rgba(255, 255, 255, 0.88) !important;
}
body:not(.auth) .topbar.light .brand-title {
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
}
body:not(.auth) .topbar.light .brand-meta {
  color: #808080 !important;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
body:not(.auth) .topbar.light .topnav a {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 0;
  text-decoration: none;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 2px;
  padding: 0.35rem 0;
}
body:not(.auth) .topbar.light .topnav a:hover,
body:not(.auth) .topbar.light .topnav a:focus-visible {
  background: transparent !important;
  color: #808080 !important;
  text-decoration-line: underline;
  text-decoration-color: #808080;
}
body:not(.auth) .topbar.light .topnav a.active {
  text-decoration-line: underline;
  text-decoration-color: #FFFFFF;
  color: #FFFFFF !important;
}
body:not(.auth) .topbar.light button.ghost {
  background: transparent !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}
body:not(.auth) .topbar.light button.ghost:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #808080 !important;
  border-color: #808080 !important;
}

body:not(.auth) .card,
body:not(.auth) .section-card,
body:not(.auth) .hero-panel,
body:not(.auth) .stat,
body:not(.auth) .kanban-card,
body:not(.auth) .tree-item,
body:not(.auth) .investor-pie-card,
body:not(.auth) .quick-action,
body:not(.auth) .timeline-drawer,
body:not(.auth) .drawer-panel,
body:not(.auth) .task-history-modal-card,
body:not(.auth) .panel {
  background: #FFFFFF !important;
  border: 1px solid #d8cfc2 !important;
  color: #262626 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
body:not(.auth) .kanban-column {
  background: #FFFFFF !important;
  border: 1px solid #d8cfc2 !important;
  color: #262626 !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
body:not(.auth) .kanban-plain-columns .kanban-column {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body:not(.auth) .kanban-plain-columns .kanban-card {
  box-shadow: none !important;
}
body:not(.auth) h1,
body:not(.auth) h2,
body:not(.auth) h3,
body:not(.auth) h4 {
  color: #9a8a78 !important;
}
body:not(.auth) .card h3,
body:not(.auth) .section-card h3,
body:not(.auth) .card h4,
body:not(.auth) .section-card h4,
body:not(.auth) .investor-pie-card h4 {
  color: #9a8a78 !important;
}
body:not(.auth) .muted,
body:not(.auth) .hero p,
body:not(.auth) .stat span,
body:not(.auth) .filters label,
body:not(.auth) .quick-action span,
body:not(.auth) .project-detail-line,
body:not(.auth) .timeline-drawer-body label,
body:not(.auth) .timeline-check-label span,
body:not(.auth) .gantt-legend {
  color: #776b5e !important;
}

body:not(.auth) input,
body:not(.auth) select,
body:not(.auth) textarea {
  background: #FFFFFF !important;
  color: #262626 !important;
  border: 1px solid #cfc5b8 !important;
}
body:not(.auth) input::placeholder,
body:not(.auth) textarea::placeholder {
  color: #8d8275 !important;
}
body:not(.auth) input:focus,
body:not(.auth) select:focus,
body:not(.auth) textarea:focus {
  border-color: #808080 !important;
  box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.2) !important;
}

body:not(.auth) button,
body:not(.auth) .button-link {
  background: #808080 !important;
  color: #FFFFFF !important;
  border: 1px solid #808080 !important;
}
body:not(.auth) button:hover,
body:not(.auth) .button-link:hover {
  background: #909090 !important;
  border-color: #909090 !important;
  color: #FFFFFF !important;
}
body:not(.auth) .button-link.subtle,
body:not(.auth) .chip-filter {
  background: #FFFFFF !important;
  color: #2a2a2a !important;
  border: 1px solid #c9beaf !important;
}
body:not(.auth) .chip-filter.active {
  background: #808080 !important;
  border-color: #808080 !important;
  color: #FFFFFF !important;
}

body:not(.auth) table,
body:not(.auth) .compact-table {
  color: #2a2a2a !important;
}
body:not(.auth) th,
body:not(.auth) td,
body:not(.auth) .compact-table th,
body:not(.auth) .compact-table td {
  border-bottom-color: #3d3d3d !important;
}
body:not(.auth) th,
body:not(.auth) .compact-table th {
  color: #9a8a78 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.74rem;
}
body:not(.auth) .eyebrow,
body:not(.auth) .badge,
body:not(.auth) .brand-meta,
body:not(.auth) .stat span,
body:not(.auth) .filters label,
body:not(.auth) .gantt-legend,
body:not(.auth) .project-detail-line,
body:not(.auth) .timeline-drawer-body label {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
body:not(.auth) table.clickable tbody tr:hover,
body:not(.auth) table tr:hover,
body:not(.auth) .clickable tbody tr:hover {
  background: #ece5da !important;
}
body:not(.auth) .list li {
  border-bottom-color: #ddd4c8 !important;
}
body:not(.auth) .divider {
  background: #ddd4c8 !important;
}
body:not(.auth) .inline-banner.success {
  background: #222222 !important;
  color: #808080 !important;
  border-color: #808080 !important;
}
body:not(.auth) .inline-banner.error {
  background: #3a1f1f !important;
  color: #ffd5d5 !important;
  border-color: #9f2d2d !important;
}

body:not(.auth) .progress,
body:not(.auth) .gantt-track,
body:not(.auth) .table-progress,
body:not(.auth) .drawer-content .progress,
body:not(.auth) .kanban .progress,
body:not(.auth) .urgent-item .progress {
  background: #e3dbcf !important;
}
body:not(.auth) .gantt-container {
  background: #f9f6f1 !important;
  border-color: #d5cabd !important;
  --b-event-label-color: #262626;
  --b-selected-event-label-color: #262626;
  --b-dependency-color: #808080;
  --b-dependency-selected-color: #909090;
  --b-dependency-terminal-size: 2px;
  --b-dependency-terminal-offset: 0px;
  --b-gantt-parent-task-max-height: none;
}
body:not(.auth) .gantt-container .b-grid-headers,
body:not(.auth) .gantt-container .b-grid-header-container {
  background: #f3f0ea !important;
  color: #9a8a78 !important;
}
body:not(.auth) .gantt-container .b-grid-row,
body:not(.auth) .gantt-container .b-grid-cell,
body:not(.auth) .gantt-container .b-treecell {
  background: #FFFFFF !important;
  color: #2f2d29 !important;
}
body:not(.auth) .gantt-container .b-grid-row:hover .b-grid-cell,
body:not(.auth) .gantt-container .b-grid-cell:hover {
  background: #f7f3ed !important;
}
body:not(.auth) .gantt-container .b-grid-row.b-selected .b-grid-cell,
body:not(.auth) .gantt-container .b-grid-row.b-selected:hover .b-grid-cell,
body:not(.auth) .gantt-container .b-grid-cell.b-selected {
  background: #f1ece4 !important;
  color: #262626 !important;
}
body:not(.auth) .gantt-container .b-gantt-task-parent:not(.b-milestone-wrap):not(.b-unscheduled) .b-gantt-task {
  max-height: none !important;
  height: calc(100% - 6px) !important;
  margin-top: 3px;
  margin-bottom: 3px;
  /* Subtle parent cue: tiny bottom teeth, much lighter than default Bryntum shape */
  clip-path: polygon(-8px 0, calc(100% + 8px) 0, calc(100% + 8px) 100%, calc(100% - 3px) 100%, calc(100% - 2px) calc(100% - 2px), 2px calc(100% - 2px), 3px 100%, -8px 100%) !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.22);
}
body:not(.auth) .gantt-container .b-sch-terminal,
body:not(.auth) .gantt-container .b-gantt-task-parent .b-sch-terminal {
  width: 2px !important;
  height: 2px !important;
  min-width: 2px !important;
  min-height: 2px !important;
  border-width: 0 !important;
}
body:not(.auth) .gantt-container .b-sch-terminal::after {
  width: 4px !important;
  height: 4px !important;
  transform: translate(-2px, -2px) !important;
}
body:not(.auth) .gantt-bar.phase { background: #808080 !important; }
body:not(.auth) .gantt-bar.subphase { background: #808080 !important; }
body:not(.auth) .gantt-bar.task { background: #808080 !important; }
body:not(.auth) .b-sch-current-time-line {
  border-left: 2px solid #808080 !important;
}

/* Enforce health class colors on Bryntum task bars */
body:not(.auth) .gantt-container .tg-complete .b-gantt-task,
body:not(.auth) .gantt-container .b-gantt-task-wrap.tg-complete .b-gantt-task { background: #16a34a !important; }
body:not(.auth) .gantt-container .tg-complete-late .b-gantt-task,
body:not(.auth) .gantt-container .b-gantt-task-wrap.tg-complete-late .b-gantt-task { background: #6f8f74 !important; }
body:not(.auth) .gantt-container .tg-behind .b-gantt-task,
body:not(.auth) .gantt-container .b-gantt-task-wrap.tg-behind .b-gantt-task { background: #dc2626 !important; }
body:not(.auth) .gantt-container .tg-warning .b-gantt-task,
body:not(.auth) .gantt-container .b-gantt-task-wrap.tg-warning .b-gantt-task { background: #f97316 !important; }
body:not(.auth) .gantt-container .tg-ontrack .b-gantt-task,
body:not(.auth) .gantt-container .b-gantt-task-wrap.tg-ontrack .b-gantt-task { background: #eab308 !important; }
body:not(.auth) .gantt-container .tg-not-yet .b-gantt-task,
body:not(.auth) .gantt-container .b-gantt-task-wrap.tg-not-yet .b-gantt-task { background: #808080 !important; }

body:not(.auth) .status-not_started { background: #ebe6df !important; color: #6c635a !important; border-color: #ccc1b3 !important; }
body:not(.auth) .status-in_progress { background: #4a4138 !important; color: #f4e8d9 !important; border-color: #808080 !important; }
body:not(.auth) .status-behind { background: #f7dada !important; color: #9f2e2e !important; border-color: #e4b0b0 !important; }
body:not(.auth) .status-complete { background: #4a4138 !important; color: #f4e8d9 !important; border-color: #808080 !important; }
body:not(.auth) .status-complete-late { background: #e5e5e5 !important; color: #4c4c4c !important; border-color: #c7c7c7 !important; }
body:not(.auth) .urgency-other { background: #ece7de !important; color: #6c6257 !important; border-color: #d2c7ba !important; }
body:not(.auth) .urgency-row-other { border-left-color: #808080 !important; }

body:not(.auth) .task-assignee-avatar {
  background: #808080 !important;
  color: #FFFFFF !important;
}
body:not(.auth) .task-assignee-avatar[data-tooltip]:hover::after,
body:not(.auth) .kanban .avatar[data-tooltip]:hover::after {
  background: #808080 !important;
  color: #FFFFFF !important;
}

html {
  background: #262626;
}

body {
  font-family: var(--font-body);
  color: var(--bc-ink);
  background: #262626 !important;
  line-height: 1.65;
}

body:not(.auth) {
  color: var(--bc-ink);
  background: #262626 !important;
}

body:not(.auth) .content {
  width: min(calc(100% - (var(--app-page-gutter) * 2)), var(--app-page-max-width));
  max-width: var(--app-page-max-width);
  margin-inline: auto;
  padding: clamp(1.75rem, 3vw, 3.25rem) 0;
}

.auth {
  background:
    linear-gradient(rgba(23, 23, 23, 0.38), rgba(23, 23, 23, 0.38)),
    url("/static/img/login-bg.jpeg") center bottom / cover no-repeat fixed !important;
}

.auth-shell {
  padding: clamp(1.5rem, 5vw, 4rem);
}

.card,
.auth-card,
body:not(.auth) .card,
body:not(.auth) .section-card,
body:not(.auth) .hero-panel,
body:not(.auth) .stat,
body:not(.auth) .kanban-card,
body:not(.auth) .kanban-column,
body:not(.auth) .tree-item,
body:not(.auth) .investor-pie-card,
body:not(.auth) .quick-action,
body:not(.auth) .timeline-drawer,
body:not(.auth) .drawer-panel,
body:not(.auth) .task-history-modal-card,
body:not(.auth) .panel,
.team-form-card,
.team-role-row,
.team-member-checklist,
.project-attention-item {
  background: var(--bc-white) !important;
  border: 1px solid var(--bc-line) !important;
  border-radius: var(--radius-none) !important;
  box-shadow: none !important;
  color: var(--bc-ink) !important;
}

.card,
.auth-card,
body:not(.auth) .card,
body:not(.auth) .section-card {
  padding: clamp(1rem, 1.7vw, 1.75rem);
}

.card:hover,
body:not(.auth) .card:hover,
body:not(.auth) .kanban-card:hover,
body:not(.auth) .quick-action:hover {
  border-color: var(--bc-stone) !important;
  box-shadow: none !important;
}

.auth-card {
  width: min(460px, 100%);
  min-width: 0;
  background: rgba(247, 243, 236, 0.94) !important;
  color: var(--bc-ink) !important;
}

.auth-card label,
.auth-card form label,
.auth-label,
.auth-company-name,
.auth-form-title {
  color: var(--bc-ink) !important;
}

.auth-company-name,
.auth-form-title,
.badge,
.eyebrow,
label,
th,
.compact-table th,
.brand-title,
.brand-meta,
.topnav a,
button,
.button-link,
.tab,
.step label,
.status-pill,
.chip-filter,
.filters label,
.gantt-legend,
.project-detail-line {
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  letter-spacing: 0.11em !important;
  line-height: 1.25;
  text-transform: uppercase !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero h1,
.investor-timeline-title {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  letter-spacing: 0.055em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  color: var(--bc-ink) !important;
}

.hero h1,
h1,
.investor-timeline-title {
  font-size: var(--text-page-title) !important;
}

h2 {
  font-size: clamp(1.35rem, 2.1vw, 2.35rem) !important;
}

h3 {
  font-size: var(--text-section-title) !important;
}

h4 {
  font-size: clamp(0.9rem, 1vw, 1.15rem) !important;
}

p,
li,
td,
dd,
.hero p,
.quick-action span {
  font-size: var(--text-body);
  line-height: 1.65;
}

.muted,
body:not(.auth) .muted,
body:not(.auth) .hero p,
body:not(.auth) .stat span,
body:not(.auth) .filters label,
body:not(.auth) .quick-action span,
body:not(.auth) .project-detail-line,
body:not(.auth) .timeline-drawer-body label,
body:not(.auth) .timeline-check-label span,
body:not(.auth) .gantt-legend {
  color: var(--bc-muted-ink) !important;
}

.topbar,
.topbar.light,
body:not(.auth) .topbar.light {
  min-height: var(--app-topbar-height);
  padding: clamp(0.85rem, 1.6vw, 1.25rem) clamp(1rem, 3vw, 3rem);
  background: var(--bc-paper) !important;
  color: var(--bc-ink) !important;
  border-bottom: 1px solid var(--bc-line-soft) !important;
  box-shadow: none !important;
}

.brand,
body:not(.auth) .topbar.light .brand,
body:not(.auth) .topbar.light .brand h2,
body:not(.auth) .topbar.light .topnav a,
.topbar-gear {
  color: var(--bc-ink) !important;
}

.brand {
  gap: 1rem;
}

.brand-title {
  font-size: var(--text-nav) !important;
}

.brand-meta,
body:not(.auth) .topbar.light .brand-meta,
body:not(.auth) .topbar.light p {
  color: var(--bc-muted-ink) !important;
}

.topnav {
  gap: clamp(0.75rem, 1.45vw, 1.65rem);
}

.topnav a,
.link,
.forgot-password-link {
  color: var(--bc-ink) !important;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  border-radius: 0 !important;
  background: transparent !important;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a.active,
.link:hover,
.forgot-password-link:hover {
  color: var(--bc-ink) !important;
  background: transparent !important;
  border-bottom-color: currentColor;
}

button,
.button-link,
body:not(.auth) button,
body:not(.auth) .button-link,
.auth-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.62rem 1rem;
  border: 1px solid var(--bc-charcoal) !important;
  border-radius: var(--radius-none) !important;
  background: var(--bc-charcoal) !important;
  color: var(--bc-white) !important;
  box-shadow: none !important;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

button:hover,
button:focus-visible,
.button-link:hover,
.button-link:focus-visible,
body:not(.auth) button:hover,
body:not(.auth) .button-link:hover,
.auth-card button:hover {
  background: transparent !important;
  color: var(--bc-charcoal) !important;
  border-color: var(--bc-charcoal) !important;
  transform: none !important;
}

button.ghost,
.button-link.subtle,
body:not(.auth) .topbar.light button.ghost,
body:not(.auth) .button-link.subtle,
body:not(.auth) .chip-filter,
.chip-filter {
  background: transparent !important;
  color: var(--bc-charcoal) !important;
  border: 1px solid var(--bc-line) !important;
}

button.ghost:hover,
.button-link.subtle:hover,
body:not(.auth) .topbar.light button.ghost:hover,
body:not(.auth) .button-link.subtle:hover,
body:not(.auth) .chip-filter:hover,
.chip-filter:hover {
  background: var(--bc-charcoal) !important;
  color: var(--bc-white) !important;
  border-color: var(--bc-charcoal) !important;
}

button.danger,
body:not(.auth) button.danger {
  background: var(--bc-danger) !important;
  border-color: var(--bc-danger) !important;
  color: var(--bc-white) !important;
}

input,
select,
textarea,
.auth-card input,
.auth-card textarea,
body:not(.auth) input,
body:not(.auth) select,
body:not(.auth) textarea {
  background: transparent !important;
  color: var(--bc-ink) !important;
  border: 1px solid var(--bc-line) !important;
  border-radius: var(--radius-none) !important;
  font-family: var(--font-body) !important;
  min-height: 42px;
}

input:focus,
select:focus,
textarea:focus,
body:not(.auth) input:focus,
body:not(.auth) select:focus,
body:not(.auth) textarea:focus {
  outline: 2px solid var(--bc-charcoal) !important;
  outline-offset: 2px;
  border-color: var(--bc-charcoal) !important;
  box-shadow: none !important;
}

input::placeholder,
textarea::placeholder,
.auth-card input::placeholder,
.auth-card textarea::placeholder {
  color: var(--bc-stone) !important;
}

.hero {
  gap: clamp(1.25rem, 3vw, 3rem);
  margin-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.grid,
.dashboard-grid,
.project-bottom-grid {
  gap: clamp(1rem, 1.8vw, 1.75rem);
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.dashboard-grid.dashboard-taskboard-only {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
}

.content > .section-card + .section-card,
.content > .section-card + .section-gap-lg,
.content > .section-gap-lg + .section-card,
.content > .section-gap-lg + .section-gap-lg {
  margin-top: var(--app-section-gap);
}

.divider,
body:not(.auth) .divider {
  height: 1px;
  margin: clamp(1rem, 2vw, 1.75rem) 0;
  background: var(--bc-line) !important;
}

table,
.compact-table {
  border-collapse: collapse;
  color: var(--bc-ink) !important;
  font-size: 0.95rem;
}

th,
td,
.compact-table th,
.compact-table td,
body:not(.auth) th,
body:not(.auth) td,
body:not(.auth) .compact-table th,
body:not(.auth) .compact-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--bc-line-soft) !important;
}

th,
.compact-table th,
body:not(.auth) th,
body:not(.auth) .compact-table th {
  background: transparent !important;
  color: var(--bc-muted-ink) !important;
  font-size: var(--text-nav) !important;
}

table.clickable tbody tr:hover,
table tr:hover,
.clickable tbody tr:hover,
body:not(.auth) table.clickable tbody tr:hover,
body:not(.auth) table tr:hover,
body:not(.auth) .clickable tbody tr:hover {
  background: var(--bc-paper-2) !important;
}

.stat {
  padding: 1rem;
}

.stat strong {
  color: var(--bc-ink) !important;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  font-weight: 400;
  line-height: 1;
}

.panel,
.team-form-card,
.project-attention-item {
  padding: 1rem;
}

.drawer,
.task-history-modal,
.timeline-drawer-backdrop {
  background: rgba(23, 23, 23, 0.32) !important;
}

.drawer-panel,
.timeline-drawer,
.task-history-modal-card {
  border-left: 1px solid var(--bc-line) !important;
  border-top: 0 !important;
}

.status-pill,
.kanban .chip,
.urgent-item .kanban-chip,
.step,
.tab,
.team-wizard-step-pill {
  border-radius: var(--radius-none) !important;
}

.chip-filter.active,
body:not(.auth) .chip-filter.active,
.tab.active,
.step.active,
.team-wizard-step-pill.active {
  background: var(--bc-charcoal) !important;
  border-color: var(--bc-charcoal) !important;
  color: var(--bc-white) !important;
}

.status-not_started,
body:not(.auth) .status-not_started,
.urgency-other,
body:not(.auth) .urgency-other {
  background: var(--bc-paper-2) !important;
  color: var(--bc-muted-ink) !important;
  border-color: var(--bc-line) !important;
}

.status-in_progress,
.status-complete,
body:not(.auth) .status-in_progress,
body:not(.auth) .status-complete {
  background: var(--bc-charcoal) !important;
  color: var(--bc-white) !important;
  border-color: var(--bc-charcoal) !important;
}

.status-behind,
.status-blocked,
body:not(.auth) .status-behind {
  background: #f6e4e0 !important;
  color: var(--bc-danger) !important;
  border-color: #e2bdb6 !important;
}

.status-at_risk,
body:not(.auth) .status-at_risk {
  background: #fff3dc !important;
  color: #a35a00 !important;
  border-color: #efc16b !important;
}

.status-complete-late,
body:not(.auth) .status-complete-late {
  background: #ede7de !important;
  color: #5b5248 !important;
  border-color: var(--bc-line) !important;
}

.inline-banner {
  border-radius: var(--radius-none) !important;
  box-shadow: none !important;
}

.inline-banner.success,
body:not(.auth) .inline-banner.success {
  background: #e9efe8 !important;
  color: #315c3a !important;
  border-color: #b9ccb5 !important;
}

.inline-banner.error,
.error,
body:not(.auth) .inline-banner.error,
.auth-card .error {
  background: #f6e4e0 !important;
  color: var(--bc-danger) !important;
  border-color: #e2bdb6 !important;
}

.progress,
.gantt-track,
.table-progress,
.drawer-content .progress,
.kanban .progress,
.urgent-item .progress,
body:not(.auth) .progress,
body:not(.auth) .gantt-track,
body:not(.auth) .table-progress,
body:not(.auth) .drawer-content .progress,
body:not(.auth) .kanban .progress,
body:not(.auth) .urgent-item .progress {
  background: var(--bc-line-soft) !important;
  border-radius: var(--radius-subtle) !important;
}

.progress .bar,
.table-progress .bar,
.kanban .progress .bar,
.urgent-item .progress .bar,
.drawer-content .progress .bar,
.gantt-bar {
  border-radius: var(--radius-subtle) !important;
}

.gantt-container,
body:not(.auth) .gantt-container,
.gantt-iframe {
  border-radius: var(--radius-none) !important;
  border-color: var(--bc-line) !important;
  background: var(--bc-white) !important;
}

.b-gantt,
.b-gantt * {
  font-family: var(--font-body) !important;
}

body:not(.auth) .gantt-container .b-grid-headers,
body:not(.auth) .gantt-container .b-grid-header-container {
  background: var(--bc-paper) !important;
  color: var(--bc-muted-ink) !important;
}

.topbar-gear:hover,
.topbar-gear:focus-visible,
.topbar-gear.active {
  color: var(--bc-muted-ink) !important;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--bc-charcoal) !important;
  outline-offset: 3px;
}

/* Shared UI component classes. Keep these token-driven so templates can move away from one-off inline styles. */
.btn,
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: 0.72rem 1rem;
  border: var(--border-default);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: var(--line-tight);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary,
button.btn-primary,
a.btn-primary {
  background: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-white);
}

.btn-secondary,
button.btn-secondary,
a.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn-ghost,
button.btn-ghost,
a.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--color-border-soft);
  border-color: var(--color-border-soft);
  color: var(--color-text);
}

.btn-danger,
button.btn-danger,
a.btn-danger {
  background: var(--status-danger-bg);
  border-color: var(--status-danger-border);
  color: var(--status-danger-text);
}

.btn-danger:hover,
.btn-danger:focus-visible {
  background: var(--status-danger-text);
  border-color: var(--status-danger-text);
  color: var(--color-white);
}

.btn-icon,
button.btn-icon,
a.btn-icon {
  width: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0;
}

.btn-compact,
button.btn-compact,
a.btn-compact {
  min-height: 2.25rem;
  padding: 0.45rem 0.7rem;
}

.btn:active,
button.btn:active,
a.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
button.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.form-section {
  display: grid;
  gap: var(--space-4);
}

.form-field {
  display: grid;
  gap: var(--space-2);
}

.form-row,
.toolbar-row,
.filter-row,
.form-actions,
.drawer-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.form-actions,
.drawer-actions,
.card-actions {
  margin-top: var(--space-4);
}

.field-label,
.inline-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: var(--line-tight);
  text-transform: uppercase;
}

.inline-option-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.field-helper,
.field-error {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--line-normal);
}

.field-helper {
  color: var(--color-text-muted);
}

.field-error {
  color: var(--status-danger-text);
}

.input-sm {
  max-width: 9rem;
}

.input-xs {
  max-width: 4.5rem;
}

.input-md {
  max-width: 14rem;
}

.card-surface,
.panel-surface,
.modal-surface {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.panel-surface,
.modal-surface,
.dropdown-panel {
  box-shadow: var(--shadow-overlay);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
}

.card-title {
  margin: 0;
  color: var(--color-text);
  font-size: var(--text-card-title);
  line-height: var(--line-tight);
}

.empty-state {
  border: var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-default);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

.table-compact th,
.table-compact td {
  padding: var(--space-2) var(--space-3);
}

.table-clickable tbody tr {
  cursor: pointer;
}

.table-clickable tbody tr:hover {
  background: var(--color-border-soft);
}

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 1.55rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--status-neutral-border);
  border-radius: var(--radius-pill);
  background: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: var(--line-tight);
  text-transform: uppercase;
}

.badge-success {
  background: var(--status-success-bg);
  border-color: var(--status-success-border);
  color: var(--status-success-text);
}

.badge-warning {
  background: var(--status-warning-bg);
  border-color: var(--status-warning-border);
  color: var(--status-warning-text);
}

.badge-danger {
  background: var(--status-danger-bg);
  border-color: var(--status-danger-border);
  color: var(--status-danger-text);
}

.badge-neutral {
  background: var(--status-neutral-bg);
  border-color: var(--status-neutral-border);
  color: var(--status-neutral-text);
}

.badge-info {
  background: var(--status-info-bg);
  border-color: var(--status-info-border);
  color: var(--status-info-text);
}

.dropdown {
  position: relative;
}

.dropdown-trigger {
  cursor: pointer;
  list-style: none;
}

.dropdown-trigger::-webkit-details-marker {
  display: none;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-2));
  z-index: 5;
  min-width: 16.25rem;
  max-width: min(22rem, calc(100vw - var(--page-gutter) * 2));
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.tabs-clean,
.toolbar-row,
.filter-row {
  margin: 0;
}

.stack-compact {
  display: grid;
  gap: var(--space-1);
}

.stack-tight {
  display: grid;
  gap: var(--space-2);
}

.scroll-y-sm {
  max-height: 8.125rem;
  overflow: auto;
}

.block-link {
  display: inline-block;
}

.flush {
  margin: 0 !important;
}

.mt-2 {
  margin-top: var(--space-2) !important;
}

.mt-3 {
  margin-top: var(--space-3) !important;
}

.mt-4 {
  margin-top: var(--space-4) !important;
}

.mb-3 {
  margin-bottom: var(--space-3) !important;
}

.align-center {
  align-items: center !important;
}

.align-start {
  align-items: flex-start !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.text-right {
  text-align: right !important;
}

.ml-auto {
  margin-left: auto !important;
}

.grid-span-all {
  grid-column: 1 / -1;
}

.inline-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.hidden.inline-grid-2 {
  display: none;
}

.drawer-panel-md {
  max-width: 32.5rem;
}

.perm-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18.75rem, 1fr));
  gap: var(--space-3);
}

.perm-compact-card {
  border: var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  background: var(--color-surface);
}

.perm-compact-head {
  margin-bottom: var(--space-2);
}

.perm-compact-head strong {
  display: block;
  margin-bottom: var(--space-1);
}

.perm-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.375rem, 1fr));
  gap: var(--space-2) var(--space-3);
}

.perm-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: var(--text-sm);
}

.perm-check-emphasis {
  font-size: var(--text-md);
}

.inline-warning {
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--status-danger-border);
  border-radius: var(--radius-md);
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  font-weight: 700;
}

.team-role-link,
body:not(.auth) button.team-role-link,
.history-see-more,
button.history-see-more,
.outline-open-item,
body:not(.auth) button.outline-open-item {
  display: inline !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--bc-ink) !important;
  box-shadow: none !important;
  font: inherit !important;
  letter-spacing: inherit !important;
  text-transform: none !important;
}

.team-role-link:hover,
.team-role-link:focus-visible,
.history-see-more:hover,
.history-see-more:focus-visible,
.outline-open-item:hover,
.outline-open-item:focus-visible {
  background: transparent !important;
  color: var(--bc-ink) !important;
  text-decoration: underline;
}

.member-remove-btn,
.subtle-x-btn,
.timeline-toggle,
.dep-remove,
body:not(.auth) .member-remove-btn,
body:not(.auth) .subtle-x-btn,
body:not(.auth) .timeline-toggle,
body:not(.auth) .dep-remove {
  width: auto !important;
  min-width: 1.5rem;
  min-height: 1.5rem !important;
  padding: 0.1rem 0.35rem !important;
  border-radius: var(--radius-none) !important;
  font-size: 0.8rem !important;
  line-height: 1 !important;
}

.impact-toggle,
body:not(.auth) .impact-toggle {
  min-height: 0 !important;
  padding: 0.3rem 0.45rem !important;
}

.topbar-gear {
  font-size: 1rem;
}

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

@media (max-width: 900px) {
  :root {
    --app-page-gutter: 1.15rem;
  }

  body:not(.auth) .content {
    width: min(calc(100% - (var(--app-page-gutter) * 2)), 100%);
    padding-block: clamp(1.5rem, 6vw, 2.75rem);
  }

  .topbar,
  .topbar.light,
  body:not(.auth) .topbar.light {
    align-items: flex-start;
    gap: 1.25rem;
    min-height: 0;
  }

  .topnav {
    gap: 0.9rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .dashboard-taskboard-only .dashboard-tasks,
  .dashboard-taskboard-only .dashboard-todos,
  .dashboard-grid .dashboard-overview,
  .dashboard-grid .dashboard-today-snapshot,
  .dashboard-grid .dashboard-shaib-brief {
    grid-column: 1;
    grid-row: auto;
  }
  .dashboard-grid.dashboard-has-briefings:not(.dashboard-taskboard-only) .dashboard-shaib-brief {
    grid-row: auto;
  }
  .dashboard-grid .dashboard-overview,
  .dashboard-grid .dashboard-today-snapshot,
  .dashboard-grid:not(.dashboard-taskboard-only) .dashboard-shaib-brief {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }

  h1,
  .hero h1,
  .investor-timeline-title {
    font-size: clamp(1.55rem, 6.8vw, 2.35rem) !important;
  }
}

@media (max-width: 560px) {
  :root {
    --app-page-gutter: 1rem;
  }

  body:not(.auth) .content {
    width: min(calc(100% - (var(--app-page-gutter) * 2)), 100%);
  }

  .card,
  .auth-card,
  body:not(.auth) .card,
  body:not(.auth) .section-card {
    padding: 1rem;
  }

  .row.space {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .row.gap {
    flex-wrap: wrap;
  }

  th,
  td,
  .compact-table th,
  .compact-table td {
    padding: 0.7rem 0.45rem;
  }
}

/* Final navbar treatment: charcoal bar, single accent active underline. */
.topbar,
.topbar.light,
body:not(.auth) .topbar.light {
  background: #262626 !important;
  color: var(--bc-white) !important;
  border-bottom: 0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
}

.brand,
body:not(.auth) .topbar.light .brand,
body:not(.auth) .topbar.light .brand h2,
body:not(.auth) .topbar.light .brand-title,
body:not(.auth) .topbar.light .topbar-gear {
  color: var(--bc-white) !important;
}

body:not(.auth) .topbar.light .brand-meta,
body:not(.auth) .topbar.light p {
  color: rgba(255, 255, 255, 0.72) !important;
}

.topnav a,
body:not(.auth) .topbar.light .topnav a {
  color: var(--bc-white) !important;
  border-bottom: 0 !important;
  font-size: var(--text-nav) !important;
  text-decoration: none !important;
  text-decoration-line: none !important;
}

.topnav a:hover,
.topnav a:focus-visible,
body:not(.auth) .topbar.light .topnav a:hover,
body:not(.auth) .topbar.light .topnav a:focus-visible {
  color: #9a8a78 !important;
  border-bottom-color: transparent !important;
  text-decoration: none !important;
  text-decoration-line: none !important;
}

.topnav a.active,
body:not(.auth) .topbar.light .topnav a.active {
  color: #9a8a78 !important;
  border-bottom-color: transparent !important;
  text-decoration: none !important;
  text-decoration-line: none !important;
}

/* Sitewide gold accent treatment. */
body:not(.auth) .link,
body:not(.auth) .eyebrow,
body:not(.auth) .content a,
body:not(.auth) .content h3,
body:not(.auth) .content h4 {
  color: #9a8a78 !important;
}

.team-header-action {
  display: flex;
  align-items: center;
  align-self: center;
}

.team-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 2.75rem;
}

.team-section-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 2.75rem;
}

.team-section-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 2.75rem;
}

.team-section-header h3,
.team-section-header p {
  margin: 0 !important;
}

.team-section-header h3 {
  line-height: 1.1;
}

.team-section-header p {
  line-height: 1.35;
}

.team-section-header .button-link,
.team-section-header button {
  align-self: center;
  margin: 0 !important;
}

body:not(.auth) .content .team-header-action .button-link,
body:not(.auth) .content .team-header-action-link {
  color: var(--bc-white) !important;
}

body:not(.auth) .content .team-header-action .button-link:hover,
body:not(.auth) .content .team-header-action .button-link:focus-visible,
body:not(.auth) .content .team-header-action-link:hover,
body:not(.auth) .content .team-header-action-link:focus-visible {
  color: var(--bc-charcoal) !important;
}

/* Dashboard legibility fixes on the dark app background. */
body:not(.auth) .dashboard-grid,
body:not(.auth) .dashboard-grid .card,
body:not(.auth) .dashboard-grid .section-card,
body:not(.auth) .dashboard-grid .kanban-column,
body:not(.auth) .dashboard-grid .kanban-card,
body:not(.auth) .dashboard-grid .quick-action,
body:not(.auth) .dashboard-grid .stat {
  color: var(--bc-ink) !important;
}

body:not(.auth) .dashboard-grid .kanban-plain-columns .kanban-column {
  background: var(--bc-white) !important;
  border: 1px solid var(--bc-line) !important;
  padding: clamp(1rem, 2vw, 1.5rem) !important;
}

body:not(.auth) .dashboard-grid .kanban-card,
body:not(.auth) .dashboard-grid .urgent-item,
body:not(.auth) .dashboard-grid .dashboard-todo-list li,
body:not(.auth) .dashboard-grid .quick-action {
  background: var(--bc-white) !important;
  color: var(--bc-ink) !important;
  border-color: var(--bc-line) !important;
}

body:not(.auth) .dashboard-grid .kanban-card strong,
body:not(.auth) .dashboard-grid .urgent-item strong,
body:not(.auth) .dashboard-grid .dashboard-todo-list strong,
body:not(.auth) .dashboard-grid .kanban-column h4,
body:not(.auth) .dashboard-grid td,
body:not(.auth) .dashboard-grid td strong,
body:not(.auth) .dashboard-grid .request-summary {
  color: var(--bc-ink) !important;
}

body:not(.auth) .dashboard-grid .muted,
body:not(.auth) .dashboard-grid .range,
body:not(.auth) .dashboard-grid .kanban .range,
body:not(.auth) .dashboard-grid .kanban .progress span,
body:not(.auth) .dashboard-grid .urgent-item .range,
body:not(.auth) .dashboard-grid .dashboard-todo-list .range,
body:not(.auth) .dashboard-grid .quick-action span,
body:not(.auth) .dashboard-grid .stat span {
  color: var(--bc-muted-ink) !important;
}

body:not(.auth) .dashboard-grid .kanban .chip,
body:not(.auth) .dashboard-grid .urgent-item .kanban-chip {
  color: var(--bc-ink) !important;
  border: 1px solid rgba(23, 23, 23, 0.18) !important;
}

body:not(.auth) .dashboard-grid .status-pill.status-not_started,
body:not(.auth) .dashboard-grid .status-pill.status-complete-late {
  color: var(--bc-muted-ink) !important;
}

body:not(.auth) .dashboard-grid .status-pill.status-in_progress,
body:not(.auth) .dashboard-grid .status-pill.status-complete,
body:not(.auth) .dashboard-grid .chip-filter.active {
  color: var(--bc-white) !important;
}

/* Task Board page contrast fixes on the dark app shell. */
body:not(.auth) .task-workboard > .row.space {
  align-items: center;
}

body:not(.auth) .task-workboard > .row.space > h3 {
  color: var(--color-gold) !important;
  margin: 0;
}

body:not(.auth) .task-workboard > .row.space > .row.gap {
  align-items: center;
}

body:not(.auth) .taskboard-shellless .tabs .tab {
  color: var(--bc-white) !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  background: transparent !important;
}

body:not(.auth) .taskboard-shellless .tabs .tab.active,
body:not(.auth) .taskboard-shellless .tabs .tab:hover,
body:not(.auth) .taskboard-shellless .tabs .tab:focus-visible {
  color: #9a8a78 !important;
  border-color: var(--bc-white) !important;
  background: var(--bc-white) !important;
}

.project-view-tabs {
  align-items: center;
  display: flex;
}

body:not(.auth) .project-view-tabs .project-view-tab,
body:not(.auth) .taskboard-shellless .project-view-tabs .project-view-tab {
  background: var(--bc-white) !important;
  border: 1px solid var(--color-gold) !important;
  box-sizing: border-box;
  color: var(--bc-ink) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  height: 2.5rem;
  line-height: 1;
  margin: 0;
  min-width: 7rem;
  padding: 0 0.9rem;
  text-align: center;
  text-decoration: none;
}

body:not(.auth) .project-view-tabs .project-view-tab.active,
body:not(.auth) .project-view-tabs .project-view-tab:hover,
body:not(.auth) .project-view-tabs .project-view-tab:focus-visible,
body:not(.auth) .taskboard-shellless .project-view-tabs .project-view-tab.active,
body:not(.auth) .taskboard-shellless .project-view-tabs .project-view-tab:hover,
body:not(.auth) .taskboard-shellless .project-view-tabs .project-view-tab:focus-visible {
  background: var(--bc-white) !important;
  border-color: var(--color-gold) !important;
  color: var(--color-gold) !important;
}

body:not(.auth) .taskboard-shellless .kanban-plain-columns .kanban-column {
  background: var(--bc-white) !important;
  border: 1px solid var(--bc-line) !important;
  padding: 0.75rem !important;
}

body:not(.auth) .taskboard-shellless .filters {
  background: var(--bc-white) !important;
  border-color: var(--bc-line) !important;
}

body:not(.auth) .taskboard-shellless .kanban-column h4,
body:not(.auth) .taskboard-shellless .kanban-card strong {
  color: var(--bc-ink) !important;
}

body:not(.auth) .taskboard-shellless .chip,
body:not(.auth) .taskboard-shellless .range,
body:not(.auth) .taskboard-shellless .muted,
body:not(.auth) .taskboard-shellless .kanban .progress span {
  color: var(--bc-muted-ink) !important;
}

body:not(.auth) .taskboard-shellless .chip {
  border: 1px solid rgba(23, 23, 23, 0.18) !important;
}

body:not(.auth) .taskboard-shellless .progress,
body:not(.auth) .taskboard-shellless .task-progress {
  background: var(--bc-line-soft) !important;
}

body:not(.auth) .taskboard-shellless .status-pill.status-not_started {
  background: var(--bc-paper-2) !important;
  color: var(--bc-muted-ink) !important;
  border-color: var(--bc-line) !important;
}

body:not(.auth) .taskboard-shellless .status-pill.status-at-risk {
  background: #fff2d7 !important;
  color: #7c3f00 !important;
  border-color: #e7b45f !important;
}

body:not(.auth) .taskboard-shellless .work-item-todo-list .kanban-card,
body:not(.auth) .taskboard-shellless .work-item-todo-list .kanban-card strong {
  color: var(--bc-ink) !important;
}

body:not(.auth) .taskboard-shellless .work-item-todo-list .kanban-card {
  background: var(--bc-white) !important;
}

body:not(.auth) .taskboard-shellless .work-item-todo-list .work-item-card-notes,
body:not(.auth) .taskboard-shellless .work-item-todo-list .chip,
body:not(.auth) .taskboard-shellless .work-item-todo-list .range,
body:not(.auth) .taskboard-shellless .work-item-todo-list .progress span {
  color: var(--bc-muted-ink) !important;
}

.task-workboard {
  display: grid;
  gap: var(--space-4);
}

.content > .task-workboard + .drawer + .project-command-center {
  margin-top: var(--app-section-gap);
}

.work-item-quick-add,
.work-item-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(6, minmax(120px, 1fr)) auto;
  gap: var(--space-2);
  align-items: end;
}

.work-item-quick-add input,
.work-item-quick-add select,
.work-item-filters input,
.work-item-filters select {
  min-width: 0;
}

.work-item-schedule-toggle {
  display: inline-flex;
  gap: var(--space-1);
  align-items: center;
  min-height: 42px;
}

.work-item-schedule-fields {
  grid-column: 1 / -1;
}

.work-item-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.work-item-summary span {
  border: var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
}

.work-item-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: var(--space-3);
  align-items: start;
}

.work-item-create-success {
  margin: 0 0 var(--space-2);
}

.work-item-column {
  display: grid;
  gap: var(--space-2);
  border: var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: #fbfaf8;
  min-height: 180px;
}

.work-item-column h4 {
  margin: 0;
  font-size: var(--text-sm);
}

.work-item-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  border: var(--border-default);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  background: var(--color-surface);
  cursor: pointer;
}

.work-item-card-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.work-item-condition-word {
  color: var(--work-item-condition-color, var(--color-text-muted));
  font-size: var(--text-xs);
  font-weight: 700;
}

.work-item-card .range.is-late {
  color: #b42318;
  font-weight: 700;
}

.work-item-condition-upcoming {
  background: #f8f8f6;
  opacity: 0.92;
}

.work-item-condition-complete,
.work-item-condition-complete-late {
  background: #fafaf8;
  opacity: 0.78;
}

.work-item-condition-blocked {
  background: #fbf8ff;
}

.work-item-condition-at-risk {
  background: #fffaf0;
}

.work-item-condition-late {
  background: #fff7f5;
}

.work-item-card:hover,
.work-item-card:focus-visible {
  border-color: var(--color-gold);
  outline: none;
}

.work-item-card-main {
  min-width: 0;
}

.work-item-card-main strong {
  display: block;
  overflow-wrap: anywhere;
}

.work-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.work-item-card-footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: auto;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.55rem;
  font-size: var(--text-xs);
  border: 1px solid var(--color-border);
  background: var(--status-neutral-bg);
}

.priority-none {
  color: var(--color-text-muted);
}

.priority-low {
  background: #edf4ea;
}

.priority-medium {
  background: #fff3d7;
}

.priority-high {
  background: #f6e4d8;
}

.priority-urgent {
  background: var(--status-danger-bg);
  border-color: #d7aaa0;
}

.work-item-table {
  overflow-x: auto;
}

.work-item-grid-table {
  min-width: 980px;
}

.work-item-drawer-grid {
  display: grid;
  gap: var(--space-4);
}

#work-item-drawer .task-drawer-panel {
  border: 0 !important;
  background: var(--bc-white);
  box-shadow: -24px 0 48px rgba(18, 16, 14, 0.16);
  padding: 0;
  width: min(540px, 94vw);
}

#work-item-drawer .task-drawer-panel > .row.space {
  background: var(--bc-white);
  border-bottom: 0;
  gap: 1rem;
  padding: 1.3rem 1.45rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

#work-item-drawer .task-drawer-panel > .row.space h3 {
  color: var(--bc-ink);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.2;
  max-width: 28rem;
}

#work-item-drawer .drawer-content {
  margin-top: 0;
  padding: 0.6rem 1.45rem 1.6rem;
}

#work-item-drawer .work-item-drawer-grid {
  gap: 1.25rem;
}

#work-item-drawer .work-item-drawer-grid > section,
#work-item-drawer .work-item-drawer-grid > details {
  border-top: 0;
  padding-top: 0;
}

#work-item-drawer .work-item-drawer-grid > section:first-child {
  border-top: 0;
  padding-top: 0;
}

#work-item-drawer .work-item-drawer-grid h4 {
  color: var(--bc-muted-ink);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 0.55rem;
  text-transform: uppercase;
}

#work-item-drawer .work-item-drawer-grid p {
  color: var(--bc-muted-ink);
  line-height: 1.45;
  margin: 0 0 0.85rem;
}

#work-item-drawer .drawer-progress-control {
  display: grid;
  gap: 0.55rem;
  grid-column: 1 / -1;
  margin-bottom: 0.15rem;
}

#work-item-drawer .drawer-progress-control > .muted {
  color: var(--bc-ink);
  font-size: var(--text-xs);
  font-weight: 700;
}

#work-item-drawer .drawer-content .progress {
  height: 0.72rem;
  margin: 0.15rem 0 0.1rem;
  width: 100%;
}

#work-item-drawer .drawer-content .progress span {
  right: 0;
  top: -1.35rem;
}

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

#work-item-drawer .detail-list {
  background: var(--bc-paper);
  border: 1px solid var(--bc-line-soft);
  border-radius: 8px;
  gap: 0;
  grid-template-columns: 1fr;
  padding: 0.45rem 0.85rem;
}

#work-item-drawer .detail-list span {
  align-items: baseline;
  border-bottom: 0;
  color: var(--bc-muted-ink);
  display: grid;
  gap: 0.55rem;
  grid-template-columns: minmax(7rem, 0.36fr) minmax(0, 1fr);
  padding: 0.26rem 0;
}

#work-item-drawer .detail-list span:last-child {
  border-bottom: 0;
}

#work-item-drawer .detail-list strong {
  color: var(--bc-ink);
  font-size: var(--text-xs);
  font-weight: 700;
}

.compact-form {
  gap: var(--space-2);
}

#work-item-drawer .compact-form {
  gap: 0.75rem;
}

#work-item-drawer .work-item-create-form {
  grid-template-columns: 1fr;
}

#work-item-drawer .compact-form label {
  color: var(--bc-ink);
}

#work-item-drawer .work-item-create-form label {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(7rem, 0.34fr) minmax(0, 1fr);
  margin-top: 0;
}

#work-item-drawer .work-item-create-form label:has(textarea) {
  align-items: start;
}

#work-item-drawer .compact-form input,
#work-item-drawer .compact-form select,
#work-item-drawer .compact-form textarea {
  background: var(--bc-paper);
  border-color: var(--bc-line-soft);
  border-radius: 8px;
}

#work-item-drawer .compact-form button[type="submit"] {
  justify-self: start;
  margin-top: 0.15rem;
}

#work-item-drawer .work-item-drawer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-top: 0.15rem;
}

#work-item-drawer .work-item-drawer-actions button {
  margin-top: 0 !important;
  min-width: 8.5rem;
}

#work-item-drawer .work-item-link-fields {
  border: var(--border-default);
  border-radius: 8px;
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0.75rem;
}

#work-item-drawer .work-item-link-fields legend {
  color: var(--bc-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 0.35rem;
  text-transform: uppercase;
}

#work-item-drawer .work-item-link-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

#work-item-drawer .work-item-link-list li {
  gap: 0.75rem;
}

#work-item-drawer .work-item-link-list a {
  color: var(--bc-ink);
  overflow-wrap: anywhere;
}

#work-item-drawer .work-item-link-list button {
  flex: 0 0 auto;
}

.work-item-bonus-panel {
  border-top: var(--border-default);
  padding-top: var(--space-4);
  overflow-x: auto;
}

.work-items-surface {
  display: grid;
  gap: var(--space-3);
}

.work-items-surface.work-items-todo-view {
  gap: var(--space-1);
}

.work-items-surface .tabs .tab {
  border: var(--border-default);
  background: var(--color-surface);
  cursor: pointer;
}

.work-items-surface .tabs .tab.active {
  background: var(--color-ink);
  color: var(--color-surface);
  border-color: var(--color-ink);
}

body:not(.auth) .dashboard-taskboard-only .work-items-surface .tabs .tab {
  background: var(--bc-white) !important;
  border: 1px solid var(--color-gold) !important;
  color: var(--bc-ink) !important;
}

body:not(.auth) .dashboard-taskboard-only .work-items-surface .tabs .tab.active,
body:not(.auth) .dashboard-taskboard-only .work-items-surface .tabs .tab:hover,
body:not(.auth) .dashboard-taskboard-only .work-items-surface .tabs .tab:focus-visible {
  background: var(--bc-white) !important;
  border-color: var(--color-gold) !important;
  color: var(--color-gold) !important;
}

body:not(.auth) .dashboard-grid .dashboard-todo-header {
  align-items: center !important;
  flex-direction: row !important;
  gap: 0.75rem !important;
}

body:not(.auth) .dashboard-grid .dashboard-todo-header h3 {
  line-height: 1.35 !important;
}

body:not(.auth) .dashboard-grid .dashboard-todo-add-button {
  align-items: center !important;
  align-self: center !important;
  background: var(--bc-white) !important;
  border: 1px solid var(--color-gold) !important;
  color: var(--bc-ink) !important;
  display: inline-flex !important;
  flex: 0 0 1.35rem !important;
  font-size: 0.8rem !important;
  height: 1.35rem !important;
  justify-content: center !important;
  line-height: 1 !important;
  min-height: 1.35rem !important;
  min-width: 1.35rem !important;
  padding: 0 !important;
  width: 1.35rem !important;
}

body:not(.auth) .dashboard-grid .dashboard-todo-add-button:hover,
body:not(.auth) .dashboard-grid .dashboard-todo-add-button:focus-visible {
  background: var(--bc-white) !important;
  border-color: var(--color-gold) !important;
  color: var(--color-gold) !important;
}

.work-items-surface .work-item-quick-add {
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, 1fr) minmax(170px, 1fr) minmax(150px, 1fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto;
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.work-items-surface .work-item-filters {
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
}

.work-items-surface .work-item-filters.hidden {
  display: none;
}

.work-item-more-filters {
  position: relative;
}

.work-item-more-filters > summary {
  align-items: center;
  border: var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  min-width: 38px;
  padding: 0.45rem;
  white-space: nowrap;
}

.work-item-more-filter-menu {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--space-2);
  margin-top: 0.35rem;
  min-width: 220px;
  padding: var(--space-3);
  position: absolute;
  left: 0;
  z-index: 8;
}

.work-item-more-filter-menu input,
.work-item-more-filter-menu select {
  width: 100%;
}

.work-item-module-filter {
  position: relative;
}

.work-item-module-filter > summary {
  align-items: center;
  background: var(--bc-white);
  border: 1px solid var(--bc-line-soft);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  height: 1.75rem;
  justify-content: center;
  list-style: none;
  padding: 0;
  width: 1.75rem;
}

.work-item-module-filter > summary::-webkit-details-marker {
  display: none;
}

.work-item-module-filter-menu {
  background: var(--color-surface);
  border: var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: var(--space-2);
  margin-top: 0.35rem;
  min-width: 210px;
  padding: var(--space-3);
  position: absolute;
  right: 0;
  z-index: 9;
}

.work-item-module-filter-menu select {
  width: 100%;
}

.work-item-active-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.work-items-surface .work-item-filters [data-work-item-add-task] {
  align-self: center;
  background: transparent !important;
  border-color: transparent !important;
  color: var(--bc-ink) !important;
  justify-self: end;
  min-height: 38px !important;
  padding: 0 0.75rem !important;
  white-space: nowrap;
}

.work-items-surface .work-item-filters [data-work-item-add-task]:hover,
.work-items-surface .work-item-filters [data-work-item-add-task]:focus-visible {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--color-gold) !important;
}

.work-item-filter-chip {
  align-items: center;
  background: var(--bc-white);
  border: 1px solid var(--bc-line-soft);
  border-radius: var(--radius-sm);
  color: var(--bc-ink);
  display: inline-flex;
  font-size: var(--text-xs);
  gap: 0.35rem;
  min-height: 30px;
  padding: 0.25rem 0.35rem 0.25rem 0.6rem;
  position: relative;
}

.work-item-filter-chip-clear {
  align-items: center;
  border-radius: 999px;
  color: var(--bc-muted-ink);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  height: 1rem;
  justify-content: center;
  line-height: 1;
  width: 1rem;
}

.work-item-requests-button {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.work-item-request-banner {
  align-items: center;
  display: flex;
  gap: var(--space-2);
  justify-content: space-between;
}

.work-item-standalone-actions {
  display: flex;
  justify-content: flex-end;
  margin: var(--space-2) 0;
}

.work-items-todo-view .work-item-standalone-actions {
  margin: -0.4rem 0 var(--space-1);
}

.work-item-standalone-actions [data-work-item-add-todo] {
  display: none !important;
}

.work-items-todo-view .work-item-standalone-actions [data-work-item-add-todo]:not(.hidden) {
  display: inline-flex !important;
}

.work-item-standalone-actions [data-work-item-new] {
  min-height: 38px;
  padding-inline: 0.85rem;
  white-space: nowrap;
}

.work-items-todo-view .work-item-standalone-actions [data-work-item-new] {
  align-items: center;
  background: #262626 !important;
  border: 1px solid var(--color-gold) !important;
  border-radius: 999px !important;
  color: var(--bc-white) !important;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 1.85rem !important;
  padding: 0 0.75rem !important;
  width: auto;
}

.work-items-todo-view .work-item-standalone-actions [data-work-item-new]:hover,
.work-items-todo-view .work-item-standalone-actions [data-work-item-new]:focus-visible {
  background: #262626 !important;
  border-color: var(--color-gold) !important;
  color: var(--color-gold) !important;
}

.work-items-surface .work-item-board {
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.work-items-surface .work-item-board.work-item-todo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: var(--space-2);
  max-width: none;
}

.work-items-surface .work-item-board.work-item-todo-list.work-item-todo-has-briefings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-items-surface .work-item-board.work-item-all-list {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
}

.work-items-surface .work-item-todo-list .work-item-completed-section {
  grid-column: 1 / -1;
}

.work-items-surface .work-item-todo-list .work-item-completed-section summary {
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.work-items-surface .work-item-todo-list .work-item-completed-section summary::-webkit-details-marker {
  display: none;
}

.work-items-surface .work-item-todo-list .work-item-completed-section summary::before {
  color: var(--color-gold);
  content: "+";
  font-weight: 700;
  margin-right: 0.35rem;
}

.work-items-surface .work-item-todo-list .work-item-completed-section[open] summary::before {
  content: "-";
}

.work-items-surface .work-item-todo-list .work-item-completed-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.work-items-surface .work-item-column {
  align-content: start;
  background: transparent;
  gap: var(--space-2);
  grid-auto-rows: max-content;
  height: min(83vh, 884px);
  min-height: 0;
  max-height: min(83vh, 884px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.work-items-surface .work-item-completed-section {
  max-height: min(57vh, 676px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.work-items-surface .work-item-all-list .work-item-completed-section {
  height: min(83vh, 884px);
  max-height: min(83vh, 884px);
}

.work-items-surface .work-item-card-footer {
  align-items: center;
}

.work-items-surface .work-item-card-footer .avatar {
  margin-left: auto;
}

.work-items-surface .kanban-card {
  align-self: start;
  box-sizing: border-box;
  overflow: hidden;
}

.work-item-card-notes {
  margin: -0.1rem 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-items-surface .work-item-todo-list .kanban-card {
  gap: 0.45rem;
  padding: 0.6rem 0.7rem;
}

.work-items-surface .work-item-request-modules {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: var(--space-2);
}

.work-items-surface .work-item-request-module {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 0.75rem;
}

.work-items-surface .work-item-request-module h5 {
  font-size: var(--text-sm);
  margin: 0;
}

.work-items-surface .work-item-request-add-button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: var(--text-base);
  height: 1.7rem;
  justify-content: center;
  line-height: 1;
  min-height: 0;
  padding: 0;
  width: 1.7rem;
}

.work-items-surface .work-item-request-module-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.65rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
  scrollbar-gutter: stable;
}

.work-items-surface .work-item-todo-list .kanban-card strong {
  font-size: var(--text-sm);
  line-height: 1.25;
}

.work-items-surface .work-item-todo-list .chip,
.work-items-surface .work-item-todo-list .range {
  font-size: var(--text-xs);
  line-height: 1.25;
}

.work-items-surface .work-item-todo-list .progress {
  min-height: 0.55rem;
}

.work-items-surface .work-item-todo-list .work-item-progress-draggable {
  cursor: ew-resize;
  touch-action: none;
}

.drawer-content .drawer-progress-draggable {
  cursor: ew-resize;
  min-height: 0.7rem;
  touch-action: none;
}

@media (max-width: 1180px) {
  .work-item-quick-add,
  .work-item-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-items-surface .work-item-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-item-board {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .work-item-quick-add,
  .work-item-filters,
  .work-item-board,
  .work-items-surface .work-item-board.work-item-todo-list,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .work-item-standalone-actions {
    justify-content: stretch;
  }

  .work-item-standalone-actions [data-work-item-new] {
    width: 100%;
  }

  .work-items-surface .work-item-column {
    height: auto;
    max-height: none;
  }

  .work-item-more-filter-menu {
    position: static;
  }

  .work-item-request-banner {
    align-items: stretch;
    flex-direction: column;
  }
}
.investor-sot-filters {
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(150px, 1fr));
  align-items: end;
  margin-bottom: 1rem;
}

.investor-sot-table td {
  vertical-align: top;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.compact-badges {
  max-width: 320px;
}

.investor-profile-hero .inline-banner {
  margin-top: 1rem;
}

.investor-profile-tabs {
  overflow: visible;
}

.profile-tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
}

.profile-tab-nav .tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  padding: .45rem .65rem;
  font-size: .86rem;
}

.profile-tab-nav .tab.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.profile-tab-panel {
  min-width: 0;
}

.investor-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(140px, .45fr) minmax(0, 1fr);
  gap: .45rem .8rem;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: .86rem;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
}

.highlight-row {
  background: rgba(245, 158, 11, .08);
}

@media (max-width: 900px) {
  .investor-sot-filters,
  .investor-profile-grid {
    grid-template-columns: 1fr;
  }

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