:root {
  --nav: #152238;
  --nav-2: #20324f;
  --surface: #f6f8fb;
  --panel: #ffffff;
  --line: #d9e1ec;
  --text: #172033;
  --muted: #637083;
  --accent: #26736f;
  --accent-2: #2f6fb2;
  --danger: #b33b45;
  --warning: #a7671d;
  --success: #397a44;
  --shadow: 0 12px 30px rgba(21, 34, 56, .10);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--surface);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 22px 18px;
  background: var(--nav);
  color: #eef5ff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f5c45d;
  color: #142035;
  font-weight: 800;
}
.brand-mark img {
  max-width: 28px;
  max-height: 28px;
  object-fit: contain;
}
.brand-name { font-size: 1.18rem; font-weight: 800; }
.compact-heading { margin-top: 4px; }
.compact-heading h3 { margin: 0; font-size: 1rem; }
.branding-manager {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 12px;
}
.brand-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.brand-field-grid label:first-child { grid-column: 1 / -1; }
.audit-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 150px auto auto;
  gap: 8px;
  margin-bottom: 12px;
}
.audit-filter-form input,
.audit-filter-form select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}
.rail-nav { display: grid; gap: 8px; }
.rail-nav a, .mobile-nav a {
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  padding: 10px 12px;
}
.rail-nav a.active, .rail-nav a:hover { background: var(--nav-2); }
[data-app-sections][hidden] { display: none !important; }
.user-switcher { margin-top: auto; display: grid; gap: 8px; }
.user-switcher label { color: #b6c3d7; font-size: .82rem; }
.user-switcher select {
  width: 100%;
  border: 1px solid #51647f;
  background: #0f1b2d;
  color: #fff;
  border-radius: 8px;
  padding: 10px;
}
.mode-pill {
  border: 1px solid #51647f;
  border-radius: 999px;
  color: #cbd7e8;
  padding: 7px 10px;
  font-size: .78rem;
  width: max-content;
}

.shell {
  margin-left: 248px;
  min-height: 100vh;
  padding: 24px;
}
.status-notice {
  margin: 0 0 16px;
  border: 1px solid #d8b36a;
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  background: #fff7e6;
  color: #52350f;
  padding: 12px 14px;
  font-size: .94rem;
  line-height: 1.45;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .75rem;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.7rem, 3vw, 2.45rem); letter-spacing: 0; }
.topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.primary-button, .secondary-button, .danger-button, .icon-button {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 800;
}
.primary-button { background: var(--accent); color: #fff; }
.secondary-button { background: #e8edf4; color: var(--text); }
.danger-button { background: var(--danger); color: #fff; }
.icon-button { width: 42px; padding: 0; background: #fff; border: 1px solid var(--line); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.metric { padding: 15px; display: grid; gap: 5px; }
.metric span, .metric small { color: var(--muted); }
.metric strong { font-size: 1.8rem; }

.board-tools {
  display: grid;
  grid-template-columns: minmax(280px, auto) minmax(240px, 1fr);
  align-items: center;
  gap: 14px;
  margin: 16px 0;
}
.segmented {
  display: flex;
  background: #e7edf5;
  padding: 4px;
  border-radius: 8px;
  overflow-x: auto;
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 8px 12px;
  white-space: nowrap;
}
.segmented button.active { background: #fff; box-shadow: 0 2px 10px rgba(21, 34, 56, .10); }
.filter-box {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  min-height: 42px;
}
.filter-box input { border: 0; outline: 0; min-width: 240px; }
.advanced-search-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.advanced-search-tools select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}
.saved-search-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.saved-search-tools select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}
.search-results {
  display: grid;
  gap: 8px;
  margin: -4px 0 16px;
}
.search-results[hidden] { display: none; }
.search-heading,
.search-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}
.search-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.search-row {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  color: var(--text);
}
.search-row span,
.search-row small {
  color: var(--muted);
}
.search-row small {
  overflow-wrap: anywhere;
}

.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.kanban[hidden] { display: none; }
.table-view,
.my-tasks-view,
.my-checklist-view,
.calendar-view,
.timeline-view,
.map-view,
.inbox-view {
  overflow-x: auto;
  padding-bottom: 12px;
}
.table-view[hidden],
.my-tasks-view[hidden],
.my-checklist-view[hidden],
.calendar-view[hidden],
.timeline-view[hidden],
.map-view[hidden],
.inbox-view[hidden] { display: none; }
.table-shell {
  min-width: 920px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.table-controls > span {
  color: var(--muted);
  font-size: .82rem;
  margin-right: auto;
}
.table-controls label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: .82rem;
}
.table-controls select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
}
.table-column-picker {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.table-column-picker label {
  display: inline-flex;
}
.table-row {
  display: grid;
  grid-template-columns: repeat(var(--table-column-count, 8), minmax(120px, 1fr));
  gap: 10px;
  align-items: center;
  min-width: max(720px, calc(var(--table-column-count, 8) * 120px));
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  background: #fff;
  color: var(--text);
}
.table-header {
  border-top: 0;
  background: #edf3f8;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}
.table-header button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
  text-transform: inherit;
}
.table-header button:hover {
  color: var(--text);
}
.table-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  color: var(--text);
  padding: 9px 12px;
  font-size: .85rem;
}
.table-group-row span {
  color: var(--muted);
}
.table-card-row:hover {
  background: #f8fafc;
}
.table-title-button {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}
.table-row select,
.table-row input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 8px;
}
.table-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.table-row small {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  margin-top: 2px;
}
.table-empty {
  padding: 18px;
  color: var(--muted);
}
.my-tasks-view {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.my-tasks-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.my-tasks-header h2 {
  margin: 0;
  font-size: 1rem;
}
.my-tasks-header span {
  color: var(--muted);
  font-size: .82rem;
}
.task-list {
  display: grid;
}
.task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(120px, auto) 70px;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.task-row:hover {
  background: #f8fafc;
}
.checklist-worklist {
  display: grid;
  border-top: 1px solid var(--line);
}
.checklist-work-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(130px, auto) minmax(130px, auto) minmax(110px, auto) minmax(130px, .8fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.checklist-work-row:hover {
  background: #f8fafc;
}
.checklist-work-row.is-complete strong {
  color: var(--muted);
  text-decoration: line-through;
}
.checklist-work-row.sla-overdue strong,
.checklist-work-row.sla-due_today strong {
  color: #b91c1c;
}
.checklist-work-row.sla-due_soon strong {
  color: #9a3412;
}
.task-main {
  display: grid;
  gap: 4px;
}
.task-main small {
  color: var(--muted);
}
.checklist-agenda,
.checklist-sla,
.my-task-notifications {
  border-top: 1px solid var(--line);
  display: grid;
}
.checklist-agenda h3,
.checklist-sla h3,
.my-task-notifications h3 {
  font-size: .92rem;
  margin: 0;
  padding: 12px 14px;
}
.agenda-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 11px 14px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.agenda-row:hover {
  background: #f8fafc;
}
.agenda-row.sla-overdue strong,
.agenda-row.sla-due_today strong {
  color: #b91c1c;
}
.agenda-row.sla-due_soon strong {
  color: #b45309;
}
.agenda-row.sla-complete {
  opacity: .72;
}
.agenda-row span {
  min-width: 0;
}
.agenda-row small {
  display: block;
  color: var(--muted);
  font-size: .74rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.calendar-view {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.calendar-header h2 {
  margin: 0;
  font-size: 1rem;
}
.calendar-header span {
  color: var(--muted);
  font-size: .82rem;
}
.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.calendar-controls .is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 14px;
}
.calendar-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}
.calendar-day h3 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #edf3f8;
  font-size: .9rem;
}
.calendar-day > div {
  display: grid;
  gap: 8px;
  padding: 10px;
}
.calendar-card {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.calendar-card:hover {
  background: #f8fafc;
}
.calendar-card-open {
  display: grid;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.calendar-card span,
.calendar-card-open span {
  color: var(--muted);
  font-size: .78rem;
}
.calendar-reschedule {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.calendar-reschedule button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  cursor: pointer;
  font-size: .72rem;
  min-height: 26px;
  padding: 3px 7px;
}
.timeline-view {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.timeline-header h2 {
  margin: 0;
  font-size: 1rem;
}
.timeline-header span {
  color: var(--muted);
  font-size: .82rem;
}
.timeline-zoom {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.timeline-zoom button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: .76rem;
  font-weight: 900;
  min-height: 32px;
  padding: 0 9px;
}
.timeline-zoom button.active {
  border-color: var(--accent);
  color: var(--accent);
}
.timeline-lanes {
  display: grid;
  gap: 10px;
  min-width: 840px;
  padding: 14px;
}
.timeline-compact .timeline-card {
  min-width: 140px;
  padding: 6px;
}
.timeline-wide .timeline-card {
  min-width: 240px;
  padding: 12px;
}
.timeline-wide .timeline-lane > div {
  gap: 12px;
  min-height: 58px;
}
.timeline-lane {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.timeline-lane h3 {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
}
.timeline-lane > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  border-left: 3px solid var(--line);
  padding-left: 10px;
}
.timeline-card {
  display: grid;
  gap: 3px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.timeline-card:hover {
  background: #f8fafc;
}
.timeline-card span,
.timeline-card small {
  color: var(--muted);
  font-size: .76rem;
}
.timeline-dependencies {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 14px;
}
.timeline-dependencies h3 {
  font-size: .92rem;
  margin: 0;
}
.timeline-dependencies button {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 9px;
  text-align: left;
}
.timeline-dependencies span {
  color: var(--muted);
  font-size: .78rem;
}
.map-view {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.map-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.map-header h2 {
  margin: 0;
  font-size: 1rem;
}
.map-header span {
  color: var(--muted);
  font-size: .82rem;
}
.map-filter {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: .82rem;
}
.map-filter input {
  min-height: 36px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.map-layout {
  display: grid;
  grid-template-columns: minmax(260px, .9fr) minmax(320px, 1.1fr);
  gap: 14px;
  padding: 14px;
}
.map-canvas {
  position: relative;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, .06) 1px, transparent 1px),
    linear-gradient(rgba(15, 23, 42, .06) 1px, transparent 1px),
    #edf3f8;
  background-size: 48px 48px;
}
.map-canvas span {
  position: absolute;
  display: grid;
  place-items: center;
  left: var(--x);
  top: var(--y);
  min-width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  padding: 0 5px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .22);
}
.map-location-list {
  display: grid;
  gap: 8px;
  align-content: start;
}
.map-location-row {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.map-location-row:hover {
  background: #f8fafc;
}
.map-location-row span,
.map-location-row small {
  color: var(--muted);
}
.inbox-view {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.inbox-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.inbox-header h2 {
  margin: 0;
  font-size: 1rem;
}
.inbox-header span {
  color: var(--muted);
  font-size: .82rem;
}
.inbox-header > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inbox-list {
  display: grid;
}
.inbox-submissions {
  border-top: 1px solid var(--line);
  display: grid;
}
.inbox-submissions h3 {
  font-size: .92rem;
  margin: 0;
  padding: 12px 14px;
}
.inbox-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(120px, auto) 70px;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}
.inbox-row:hover {
  background: #f8fafc;
}
.column {
  min-height: 560px;
  background: #edf3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.column-done { background: #edf7ef; }
.column-blocked { background: #f9eeee; }
.column-intake { background: #eef5fb; }
.column-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}
.column-header h2 { font-size: 1rem; margin-bottom: 0; }
.column-header strong {
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 4px 8px;
  font-size: .8rem;
}
.list-actions {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.list-actions button,
.archive-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  font-size: .76rem;
}
.list-body[hidden] { display: none; }
.list-type {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  font-weight: 800;
}
.dropzone { display: grid; gap: 10px; min-height: 480px; align-content: start; }

.add-card {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #b8c6d8;
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
  color: var(--muted);
  font-weight: 800;
}
.add-card:hover, .add-card:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: 2px solid rgba(38, 115, 111, .18);
}
.add-card-top { margin-bottom: 10px; }
.add-card-bottom { margin-top: 10px; }
.add-card span:first-child {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #e6f1ef;
  color: #1b625f;
  line-height: 1;
}

.work-card {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 9px;
  border: 1px solid #dbe3ee;
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(21, 34, 56, .08);
}
.work-card.is-mirror {
  border-style: dashed;
  background: #fbfcff;
}
.work-card:hover, .work-card:focus-visible { outline: 2px solid var(--accent-2); }
.classification {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 7px;
  background: #e9eef6;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
}
.summary { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.labels { display: flex; flex-wrap: wrap; gap: 5px; }
.labels em {
  font-style: normal;
  font-size: .72rem;
  border-radius: 999px;
  padding: 4px 7px;
  background: color-mix(in srgb, var(--label-color, #64748b) 16%, #fff);
  color: var(--label-color, #334155);
  font-weight: 800;
}
.label-remove {
  min-width: 24px;
  min-height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.label-add-form,
.label-create-form,
.label-bulk-form,
.label-manager,
.label-row {
  display: grid;
  gap: 8px;
}
.label-analytics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.label-analytics-row {
  display: inline-grid;
  gap: 2px;
  border: 1px solid color-mix(in srgb, var(--label-color, #64748b) 36%, #fff);
  border-radius: 8px;
  background: color-mix(in srgb, var(--label-color, #64748b) 10%, #fff);
  padding: 7px 9px;
}
.label-analytics-row small {
  color: var(--muted);
  font-size: .72rem;
}
.label-governance {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}
.label-governance small {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.35;
}
.label-add-form,
.label-create-form,
.label-bulk-form,
.label-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  margin-top: 10px;
}
.label-add-form {
  grid-template-columns: minmax(0, 1fr) auto;
}
.label-bulk-form {
  grid-template-columns: minmax(0, 1fr) auto;
}
.label-create-form input[type="color"],
.label-row input[type="color"] {
  width: 44px;
  min-height: 38px;
  padding: 2px;
}
.label-add-form select,
.label-bulk-form select,
.label-create-form input[type="text"],
.label-row input[type="text"] {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.meta-row, .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: .78rem;
}
.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}
.progress i { display: block; height: 100%; background: var(--accent); }
.avatars, .large-avatars { display: flex; align-items: center; }
.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--avatar, #26736f);
  color: #fff;
  border: 2px solid #fff;
  font-size: .72rem;
  font-weight: 900;
  margin-left: -6px;
}
.avatar:first-child { margin-left: 0; }
.large-avatars .avatar { width: 34px; height: 34px; font-size: .9rem; }

.lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.panel { padding: 16px; min-width: 0; }
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-heading h2 { font-size: 1.05rem; margin-bottom: 0; }
.panel-heading span { color: var(--muted); font-size: .82rem; }
.security-row, .audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.audit-row { grid-template-columns: minmax(0, 1fr); }
.security-row span, .audit-row span, .audit-row time { color: var(--muted); font-size: .84rem; }

.security-admin-panel {
  grid-column: span 2;
}
.admin-filter {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.admin-filter span,
.admin-filter small {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.admin-filter input {
  width: 100%;
}
.admin-form {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.admin-form h3 {
  margin: 0;
  font-size: .92rem;
}
.admin-form label {
  display: grid;
  gap: 4px;
}
.admin-form label span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.admin-form select,
.admin-form input,
.admin-form textarea {
  width: 100%;
}
.admin-list {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
}
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.admin-row span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.review-completion-form {
  display: grid;
  grid-template-columns: 150px minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.card-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 22px 70px rgba(21, 34, 56, .30);
}
.card-dialog::backdrop { background: rgba(12, 20, 34, .48); }
.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
}
#card-detail { padding: 24px; }
.detail-heading { padding-right: 42px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.detail-heading span { color: var(--muted); font-weight: 800; font-size: .8rem; text-transform: uppercase; }
.mirror-note { color: var(--accent-2); font-weight: 800; margin-bottom: 8px; }
.detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.detail-tabs section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px; margin: 0; }
dt { color: var(--muted); }
textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}
.card-edit-form,
.stacked-field {
  display: grid;
  gap: 10px;
}
.card-edit-form label,
.stacked-field {
  color: var(--muted);
  font-weight: 800;
}
.card-edit-form input,
.card-edit-form select,
.stacked-field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
}
.card-edit-form textarea { margin-bottom: 0; }
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.danger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.watcher-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}
.checklist-items,
.checklist-row,
.checklist-add-form,
.custom-field-list,
.custom-field-manager,
.custom-field-create-form {
  display: grid;
  gap: 8px;
}
.custom-field-row,
.custom-field-create-form,
.custom-field-manage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}
.custom-field-create-form,
.custom-field-manage-row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto) minmax(120px, auto) auto auto;
  margin-top: 10px;
}
.custom-field-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}
.custom-field-row input,
.custom-field-row select,
.custom-field-create-form input,
.custom-field-create-form select,
.custom-field-manage-row input,
.custom-field-manage-row select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.custom-field-diagnostics {
  grid-column: 1 / -1;
  color: var(--danger);
  font-weight: 800;
}
.custom-field-governance {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}
.custom-field-governance small {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.35;
}
.custom-field-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}
.custom-field-history {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.custom-field-history p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}
.custom-field-history small {
  display: block;
  margin-top: 2px;
}
.option-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-left: 4px solid var(--label-color);
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
  font-size: .78rem;
  font-weight: 900;
}
.option-pill button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.custom-field-option-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 48px auto;
  gap: 8px;
  align-items: center;
}
.custom-field-option-form input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
}
.checklist-row,
.checklist-add-form {
  grid-template-columns: auto minmax(0, 1fr) minmax(110px, 140px) minmax(110px, 140px) minmax(100px, 130px) minmax(130px, 180px) minmax(130px, 180px) minmax(130px, 180px) auto auto auto;
  align-items: center;
}
.checklist-add-form {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 140px) minmax(110px, 140px) minmax(100px, 130px) minmax(130px, 180px) minmax(130px, 180px) minmax(130px, 180px) auto;
  margin-top: 10px;
}
.checklist-row {
  padding-left: calc(var(--check-depth, 0) * 18px);
}
.checklist-comment-thread {
  display: grid;
  gap: 6px;
  margin: 4px 0 10px;
  padding-left: calc(32px + (var(--check-depth, 0) * 18px));
  color: var(--muted);
  font-size: .82rem;
}
.checklist-comment-thread p {
  margin: 0;
}
.checklist-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.checklist-comment-form input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.checklist-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.checklist-row input[type="text"],
.checklist-add-form input,
.checklist-row input[type="date"],
.checklist-row input[type="number"],
.checklist-row select,
.checklist-add-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.comment-list {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}
.comment {
  display: grid;
  gap: 8px;
}
.comment-mentions,
.comment-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.comment-mentions span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}
.reaction-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 28px;
  padding: 4px 9px;
}
.reaction-button.active {
  border-color: var(--accent);
  color: var(--accent);
}
.activity-list {
  display: grid;
  gap: 8px;
}
.activity-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.activity-filter {
  max-width: 180px;
}
.activity-search {
  flex: 1 1 160px;
}
.activity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.activity-row strong,
.activity-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.activity-row span {
  color: var(--muted);
  font-size: 13px;
}
.activity-row time {
  color: var(--muted);
  font-size: 12px;
  grid-row: span 2;
}
.attachment-list,
.attachment-add-form {
  display: grid;
  gap: 10px;
}
.attachment {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}
.attachment a {
  color: var(--accent);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.attachment span {
  color: var(--muted);
  font-size: .78rem;
}
.attachment-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.attachment-versions span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 3px 8px;
}
.attachment-preview {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.attachment input,
.attachment select,
.attachment-add-form input,
.attachment-add-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.attachment-hold {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}
.attachment-hold input {
  min-height: 0;
  width: 16px;
  height: 16px;
  padding: 0;
}
.attachment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-add-form {
  margin-top: 10px;
}
.comment {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-left: min(48px, calc(var(--comment-depth, 0) * 24px));
  padding: 10px;
  background: #f8fafc;
}
.comment-reply {
  border-left: 4px solid var(--accent);
}
.comment time {
  display: block;
  color: var(--muted);
  font-size: .78rem;
  margin-top: 2px;
}
.comment p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.comment-body {
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.comment-body a {
  color: var(--accent);
  font-weight: 800;
}
.comment-body code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}
.comment textarea {
  margin: 10px 0 0;
}
.comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.comment-actions select,
#comment-format {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}
.workspace-manager {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}
.workspace-create,
.workspace-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, .8fr) minmax(112px, auto);
  gap: 10px;
  align-items: end;
}
.workspace-row {
  grid-template-columns: minmax(130px, .85fr) minmax(150px, 1fr) minmax(120px, .7fr) repeat(3, auto);
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.workspace-row div {
  display: grid;
  gap: 3px;
}
.workspace-row span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.workspace-row input,
.workspace-row select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.create-card-form {
  display: grid;
  gap: 14px;
  padding: 24px;
}
.create-card-form .detail-heading { margin-bottom: 0; }
.create-card-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}
.create-card-form input,
.create-card-form textarea {
  color: var(--text);
  background: #fff;
}
.create-card-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.create-card-form .primary-button { justify-self: end; min-width: 112px; }
.archive-browser {
  padding: 24px;
}
.archive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.archive-row span,
.empty-state {
  color: var(--muted);
}
.archive-browser h3 {
  margin: 16px 0 6px;
}
.template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.template-row div:first-child {
  display: grid;
  gap: 4px;
}
.template-row span,
.template-row small {
  color: var(--muted);
}
.report-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.report-widgets span {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 12px;
  padding: 4px 8px;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.template-create-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.template-create-form input,
.template-create-form select,
.automation-actions select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}
.automation-actions select {
  max-width: 220px;
}

.mobile-nav { display: none; }

@media (max-width: 900px) {
  .rail { display: none; }
  .shell { margin-left: 0; padding: 16px 14px 78px; }
  .topbar { align-items: flex-start; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board-tools { align-items: stretch; grid-template-columns: 1fr; }
  .filter-box input { min-width: 0; width: 100%; }
  .advanced-search-tools select { flex: 1 1 150px; }
  .saved-search-tools { flex-wrap: wrap; }
  .saved-search-tools select { flex: 1 1 180px; }
  .kanban { grid-auto-columns: minmax(290px, 86vw); }
  .task-row,
  .checklist-work-row,
  .inbox-row { grid-template-columns: 1fr; }
  .timeline-lanes { min-width: 0; }
  .timeline-lane { grid-template-columns: 1fr; }
  .map-layout { grid-template-columns: 1fr; }
  .inbox-header { display: grid; }
  .lower-grid { grid-template-columns: 1fr; }
  .security-admin-panel { grid-column: auto; }
  .admin-row,
  .review-completion-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .detail-tabs { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .workspace-create,
  .workspace-row,
  .audit-filter-form,
  .checklist-row,
  .checklist-add-form,
  .checklist-comment-form,
  .custom-field-row,
  .custom-field-create-form,
  .custom-field-manage-row,
  .custom-field-option-form,
  .agenda-row,
  .template-row,
  .template-create-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .automation-actions select {
    max-width: none;
    width: 100%;
  }
  .mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--nav);
    color: #fff;
    padding: 8px;
    z-index: 5;
  }
  .mobile-nav a { text-align: center; padding: 10px 4px; font-size: .82rem; }
  .mobile-nav a.active { background: var(--nav-2); }
}

@media (max-width: 520px) {
  .topbar { display: grid; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .metrics { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .segmented button { flex: 1 0 auto; }
  .column { min-height: 500px; }
  .panel-heading { display: grid; }
  .list-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-row { grid-template-columns: 1fr; }
}
