:root {
  color-scheme: light;
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #241f1a;
  background: #1c2121;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --asphalt: #151919;
  --asphalt-2: #202625;
  --asphalt-3: #2a302f;
  --paper: #e9e0d3;
  --paper-2: #f5eee3;
  --paper-3: #dfd1bf;
  --line: #bda98f;
  --text: #241f1a;
  --muted: #72665a;
  --orange: #c78353;
  --orange-2: #e1a06f;
  --orange-3: #9d5f38;
  --cream: #fff8ed;
  --serif: "DM Serif Display", Georgia, serif;
  --glass: rgba(232, 223, 210, 0.58);
  --glass-strong: rgba(246, 239, 229, 0.72);
  --glass-line: rgba(231, 214, 191, 0.28);
  --glass-highlight: rgba(255, 248, 237, 0.26);
  --sidebar-width: 248px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(199, 131, 83, 0.08), transparent 18%),
    linear-gradient(180deg, #181c1c 0%, #1e2323 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  transition:
    transform 0.14s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

button:active,
.panel-action:active,
.topbar-action:active,
.topbar-profile:active,
.presence-dot:active,
.quick-action-link:active,
.row-link:active {
  transform: translateY(1px) scale(0.985);
}

button:focus-visible,
.presence-dot:focus-visible,
.quick-action-link:focus-visible,
.row-link:focus-visible {
  outline: 2px solid rgba(199, 131, 83, 0.56);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

.app-shell.sidebar-collapsed {
  --sidebar-width: 72px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-switcher {
  display: none;
}

body[data-density="airy"] .panel {
  padding: 18px;
}

body[data-density="balanced"] .panel {
  padding: 16px;
}

body[data-density="compact"] .panel {
  padding: 14px;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 16px;
  background:
    linear-gradient(180deg, rgba(199, 131, 83, 0.05), transparent 22%),
    linear-gradient(180deg, #181d1d 0%, #232928 100%);
  color: var(--cream);
  border-right: 1px solid #3a4140;
  box-shadow: inset -1px 0 0 rgba(255, 248, 237, 0.04);
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(255, 248, 237, 0.08);
  border-radius: 10px;
  background: rgba(255, 248, 237, 0.04);
  color: var(--cream);
  text-align: left;
}

.nav-item strong {
  font-size: 12px;
  font-weight: 600;
}

.nav-item small {
  color: #c4b6a5;
  font-size: 10px;
}

.nav-item.is-active {
  border-color: rgba(199, 131, 83, 0.34);
  background: rgba(255, 248, 237, 0.1);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 248, 237, 0.08);
}

.sidebar-footer small,
.sidebar-footer span {
  color: #c4b6a5;
  font-size: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 248, 237, 0.08);
}

.brand-switcher {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.brand-switcher span {
  display: block;
  color: var(--cream);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.brand-switcher select {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(199, 131, 83, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.06);
  color: var(--cream);
  font-size: 12px;
  padding: 0 10px;
}

.brand-mark,
.bot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--orange);
  color: #211813;
  font-weight: 800;
}

.priority-chip {
  min-width: 32px;
  padding: 3px 6px;
  border: 1px solid rgba(199, 131, 83, 0.36);
  border-radius: 999px;
  color: var(--orange-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
}

.workspace {
  min-width: 0;
  position: relative;
  --workspace-right-pad: 18px;
  padding: 18px 18px 104px;
  background:
    radial-gradient(circle at 18% 0%, rgba(199, 131, 83, 0.12), transparent 28%),
    linear-gradient(180deg, #222726 0%, #1c2121 100%);
}

.workspace-frame {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 12px;
}

.topbar-side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.topbar-action,
.topbar-profile {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(236, 221, 201, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.08);
  color: var(--cream);
  font-size: 11px;
}

.topbar-profile {
  display: grid;
  justify-items: start;
  gap: 1px;
  padding: 7px 12px;
  min-height: 0;
}

.topbar-profile span {
  font-size: 11px;
  font-weight: 600;
}

.topbar-profile small {
  color: #c4b6a5;
  font-size: 9px;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(199, 131, 83, 0.24);
  color: #f8ecde;
  font-size: 10px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #d8c9b7;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.5px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: var(--cream);
  font-size: 29px;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.1px;
}

h2 {
  font-size: 14px;
  font-weight: 600;
}

.quick-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: auto;
  justify-content: flex-end;
}

.stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 0;
  min-width: 88px;
  padding: 7px 9px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.12), rgba(255, 248, 237, 0.02) 46%),
    var(--glass-strong);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 12px 26px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(16px);
}

.stat,
.panel,
.goal,
.news-item,
.news-empty,
.passport-row,
.audit-list p,
.resource-row,
.task-row,
.status-pill,
select {
  -webkit-backdrop-filter: blur(16px);
}

.stat span {
  color: #564b42;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.stat strong {
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.ai-command {
  position: fixed;
  left: calc(var(--sidebar-width) + 20px);
  right: var(--workspace-right-pad);
  bottom: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin-bottom: 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(226, 196, 166, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.24), rgba(255, 248, 237, 0.08) 48%),
    rgba(238, 227, 214, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 237, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px);
}

.ai-command input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
}

.ai-command button {
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: #242321;
  color: var(--cream);
  font-size: 11px;
  font-weight: 600;
}

.ai-command button:hover {
  background: #3a332d;
}

.project-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.mode-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.2);
  color: #d8c9b7;
  font-size: 11px;
  font-weight: 500;
}

.mode-chip.is-active {
  background: rgba(255, 248, 237, 0.76);
  color: #2a221d;
}

.task-create-trigger {
  width: 32px;
  min-width: 32px;
  padding: 0;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

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

.overview-view[hidden],
#usersView[hidden],
#settingsView[hidden],
#auditView[hidden],
#databaseView[hidden],
#projectView[hidden] {
  display: none;
}

.system-view {
  display: grid;
  gap: 10px;
}

.timeline-feed {
  display: grid;
  gap: 8px;
}

.timeline-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(236, 221, 201, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
}

.timeline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timeline-card-top strong {
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
}

.timeline-card-top small,
.timeline-card p {
  color: #c4b6a5;
  font-size: 11px;
  line-height: 1.4;
}

.timeline-type {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.08);
  color: #ddd1c3;
  font-size: 10px;
}

.timeline-project {
  border-color: rgba(115, 135, 170, 0.24);
}

.timeline-crm {
  border-color: rgba(185, 120, 84, 0.24);
}

.timeline-user {
  border-color: rgba(136, 157, 102, 0.24);
}

.overview-header {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.overview-header h2 {
  color: var(--cream);
  font-size: 18px;
  font-weight: 500;
}

.overview-header p {
  color: #c4b6a5;
  font-size: 12px;
}

.system-command-center { margin-bottom:10px; overflow:hidden; border:1px solid rgba(207,255,105,.2); border-radius:10px; background:radial-gradient(circle at 88% -10%,rgba(207,255,105,.1),transparent 30%),#202523; box-shadow:0 16px 34px rgba(0,0,0,.18); }
.system-command-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:15px 16px 12px; }.system-command-head p { margin:0 0 4px; color:#a9c85d; font-size:8px; font-weight:850; letter-spacing:.13em; }.system-command-head h2 { margin:0; color:#f4eee5; font-size:19px; font-weight:600; letter-spacing:-.025em; }
.system-health-flags { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }.system-health-flags span { display:flex; align-items:center; gap:5px; padding:5px 7px; border:1px solid rgba(255,255,255,.09); border-radius:6px; color:#aaaFA9; background:rgba(255,255,255,.035); font-size:8px; }.system-health-flags i { width:6px; height:6px; border-radius:50%; background:#8c918e; }.system-health-flags .is-online i { background:#b6df54; box-shadow:0 0 0 3px rgba(182,223,84,.08); }.system-health-flags .is-local i { background:#dda34b; }
.system-command-main { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(310px,.85fr); border-top:1px solid rgba(255,255,255,.08); border-bottom:1px solid rgba(255,255,255,.08); }.system-next { min-height:126px; padding:16px; border-right:1px solid rgba(255,255,255,.08); background:linear-gradient(120deg,rgba(207,255,105,.055),transparent 70%); }.system-next>span { color:#d9a34e; font-size:8px; font-weight:900; letter-spacing:.12em; }.system-next h3 { margin:8px 0 4px; color:#f4eee5; font-size:18px; font-weight:600; letter-spacing:-.02em; }.system-next p { max-width:620px; margin:0 0 13px; color:#aaaFA9; font-size:10px; line-height:1.45; }.system-next button { padding:7px 10px; border:1px solid rgba(207,255,105,.26); border-radius:6px; color:#d9f49c; background:rgba(207,255,105,.07); font:inherit; font-size:9px; font-weight:750; cursor:pointer; }.system-next.is-danger { box-shadow:inset 3px 0 #c55c50; }.system-next.is-warn { box-shadow:inset 3px 0 #d6a048; }.system-next.is-clear>span { color:#9bb84e; }
.system-metrics { display:grid; grid-template-columns:repeat(2,1fr); }.system-metrics button { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:13px; border:0; border-right:1px solid rgba(255,255,255,.07); border-bottom:1px solid rgba(255,255,255,.07); color:inherit; background:transparent; text-align:left; cursor:pointer; }.system-metrics button:hover { background:rgba(255,255,255,.04); }.system-metrics span { color:#aaaFA9; font-size:9px; }.system-metrics strong { color:#f4eee5; font-size:21px; font-weight:550; }
.system-pulse-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 14px 7px; }.system-pulse-head span { color:#a9c85d; font-size:8px; font-weight:850; letter-spacing:.1em; }.system-pulse-head small { color:#7f8782; font-size:8px; }
.system-project-pulse { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; padding:0 10px 10px; }.system-project-pulse button { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; min-width:0; padding:9px 10px; border:1px solid rgba(255,255,255,.08); border-radius:7px; color:inherit; background:rgba(255,255,255,.025); text-align:left; cursor:pointer; }.system-project-pulse button:hover { border-color:rgba(207,255,105,.24); background:rgba(255,255,255,.045); }.system-project-pulse button>span { display:flex; align-items:center; gap:6px; min-width:0; }.system-project-pulse i { width:6px; height:6px; flex:none; border-radius:50%; background:#7f9286; }.system-project-pulse strong { overflow:hidden; color:#e6ded4; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }.system-project-pulse b { color:#f3ede5; font-size:13px; }.system-project-pulse small { grid-column:1 / -1; overflow:hidden; color:#858d88; font-size:7px; text-overflow:ellipsis; white-space:nowrap; }.system-project-pulse .is-critical i { background:#c85f53; }.system-project-pulse .is-watch i { background:#d5a147; }.system-project-pulse .is-calm i { background:#95b84a; }

.workspace-sync-pill {
  align-self: flex-end;
  width: max-content;
  max-width: 190px;
  padding: 4px 7px;
  border: 1px solid rgba(236, 221, 201, 0.14);
  border-radius: 4px;
  color: rgba(244, 238, 229, 0.72);
  background: rgba(255, 248, 237, 0.045);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.workspace-sync-pill::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #8c918e;
  vertical-align: 1px;
}

.workspace-sync-pill.is-saved::before { background: #a9c85d; }
.workspace-sync-pill.is-pending::before,
.workspace-sync-pill.is-syncing::before { background: #d9a34e; }
.workspace-sync-pill.is-error::before { background: #c85f53; }

.overview-memory-panel {
  margin-bottom: 10px;
}

.panel-note {
  color: rgba(227, 213, 196, 0.58);
  font-size: 9px;
  font-weight: 650;
}

.overview-memory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr) minmax(0, 0.95fr);
  gap: 8px;
}

.memory-column {
  min-width: 0;
  border: 1px solid rgba(236, 221, 201, 0.16);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.08), rgba(255, 248, 237, 0.035)),
    rgba(30, 34, 33, 0.34);
  overflow: hidden;
}

.memory-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(236, 221, 201, 0.1);
}

.memory-column-head span {
  color: rgba(244, 238, 229, 0.64);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.memory-column-head strong {
  color: var(--cream);
  font-size: 13px;
  font-weight: 620;
}

.memory-column-head button {
  padding: 0;
  border: 0;
  color: rgba(217, 163, 78, 0.9);
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.memory-list {
  display: grid;
}

.memory-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid rgba(236, 221, 201, 0.075);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.memory-row:hover {
  background: rgba(255, 248, 237, 0.055);
}

.memory-row:last-child {
  border-bottom: 0;
}

.memory-row em {
  min-width: 62px;
  padding: 3px 5px;
  border: 1px solid rgba(236, 221, 201, 0.12);
  border-radius: 3px;
  color: rgba(244, 238, 229, 0.76);
  background: rgba(255, 248, 237, 0.05);
  font-size: 8px;
  font-style: normal;
  font-weight: 780;
  text-align: center;
}

.memory-row span {
  min-width: 0;
}

.memory-row strong {
  display: block;
  overflow: hidden;
  color: rgba(244, 238, 229, 0.92);
  font-size: 10px;
  font-weight: 620;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-row small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: rgba(227, 213, 196, 0.58);
  font-size: 8px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-action.is-danger em,
.integrity-row.is-danger .integrity-mark {
  border-color: rgba(200, 95, 83, 0.45);
  background: rgba(200, 95, 83, 0.16);
  color: #ffd0c8;
}

.memory-action.is-warn em,
.integrity-row.is-warn .integrity-mark {
  border-color: rgba(217, 163, 78, 0.42);
  background: rgba(217, 163, 78, 0.14);
  color: #f4d196;
}

.memory-dot,
.integrity-mark {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: #8c918e;
}

.memory-project,
.memory-crm { background: #d9a34e; }
.memory-system,
.integrity-row.is-ok .integrity-mark { background: #a9c85d; }
.memory-user { background: #c78353; }

.memory-empty {
  padding: 11px;
  color: rgba(227, 213, 196, 0.6);
  font-size: 10px;
}

.overview-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.focus-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(236, 221, 201, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
}

.focus-card-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.focus-card-top small {
  color: #c4b6a5;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.focus-card-top strong {
  color: var(--cream);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.focus-card p {
  color: #ddd1c3;
  font-size: 12px;
  line-height: 1.4;
}

.focus-card-list {
  display: grid;
  gap: 6px;
}

.focus-link {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(236, 221, 201, 0.16);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.06);
  color: var(--cream);
  font-size: 11px;
  text-align: left;
}

.focus-empty {
  color: #c4b6a5;
  font-size: 11px;
}

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

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

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

.workbench-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px 11px;
  border: 1px solid rgba(236, 221, 201, 0.2);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
}

.workbench-open {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  text-align: left;
}

.workbench-open strong {
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.workbench-open small {
  color: #c4b6a5;
  font-size: 10px;
  line-height: 1.35;
}

.workbench-actions {
  display: inline-flex;
  gap: 6px;
}

.workbench-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(236, 221, 201, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.08);
  color: var(--cream);
  font-size: 12px;
}

.topbar-action-favorite.is-active {
  border-color: rgba(199, 131, 83, 0.36);
  background: rgba(199, 131, 83, 0.22);
  color: #fff4e7;
}

.inbox-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.inbox-owner-filter {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(236, 221, 201, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.08);
  color: var(--cream);
  font-size: 11px;
}

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

.inbox-column {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(236, 221, 201, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
}

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

.inbox-column-head strong {
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
}

.inbox-column-head small {
  color: #c4b6a5;
  font-size: 10px;
}

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

.inbox-card {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(236, 221, 201, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.06);
  color: var(--cream);
  text-align: left;
}

.inbox-card strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.inbox-card small {
  color: #c4b6a5;
  font-size: 10px;
  line-height: 1.35;
}

.inbox-danger {
  border-color: rgba(173, 108, 108, 0.28);
}

.inbox-warn {
  border-color: rgba(185, 120, 84, 0.28);
}

.inbox-info {
  border-color: rgba(115, 135, 170, 0.28);
}

.automation-rules-grid,
.automation-queue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.automation-rule-card,
.automation-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(236, 221, 201, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
}

.automation-rule-top,
.automation-rule-bottom,
.automation-item-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.automation-rule-card strong,
.automation-item strong {
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
}

.automation-rule-card small,
.automation-item small,
.automation-item p {
  color: #c4b6a5;
  font-size: 11px;
  line-height: 1.4;
}

.automation-item-actions,
.automation-log {
  display: grid;
  gap: 8px;
}

.overview-agenda-panel {
  margin-bottom: 10px;
}

.overview-agenda {
  display: grid;
  gap: 8px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(236, 221, 201, 0.26);
  border-radius: 8px;
  background: rgba(247, 240, 230, 0.1);
  color: var(--cream);
  text-align: left;
}

.agenda-date {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 6px 4px;
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
}

.agenda-date strong {
  color: var(--cream);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.agenda-date small,
.agenda-main small {
  color: #c4b6a5;
  font-size: 10px;
}

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

.agenda-main strong {
  display: block;
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.agenda-main small {
  display: block;
  margin-top: 3px;
}

.agenda-badge,
.task-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(199, 131, 83, 0.2);
  color: #7f441f;
  font-size: 10px;
  font-weight: 600;
}

.event-general {
  background: rgba(199, 131, 83, 0.2);
  color: #7f441f;
}

.event-release {
  background: rgba(185, 120, 84, 0.22);
  color: #8d4a25;
}

.event-show {
  background: rgba(136, 157, 102, 0.22);
  color: #5d7040;
}

.event-deadline {
  background: rgba(173, 108, 108, 0.22);
  color: #864343;
}

.event-follow_up {
  background: rgba(115, 135, 170, 0.22);
  color: #415b84;
}

.event-reminder {
  background: rgba(151, 128, 171, 0.22);
  color: #6b4f84;
}

.overview-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(236, 221, 201, 0.26);
  border-radius: 8px;
  background: rgba(247, 240, 230, 0.1);
  color: var(--cream);
  text-align: left;
}

.overview-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.overview-card-top strong,
.overview-card-top small {
  display: block;
}

.overview-card-top strong {
  font-size: 14px;
  font-weight: 500;
}

.overview-card-top small {
  margin-top: 3px;
  color: #c4b6a5;
  font-size: 11px;
}

.overview-card p {
  color: #ddd1c3;
  font-size: 12px;
  line-height: 1.4;
}

.overview-card-next {
  color: #cdbba8;
  font-size: 10px;
  line-height: 1.35;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.06);
}

.overview-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.overview-card-stats span {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
  color: #c4b6a5;
  font-size: 10px;
}

.overview-card-stats strong {
  color: var(--cream);
  font-size: 15px;
  font-weight: 500;
}

.users-grid,
.roles-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.user-card,
.role-card,
.setting-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(236, 221, 201, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.08);
}

.setting-card-wide {
  grid-column: 1 / -1;
}

.user-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.user-card-top strong,
.role-card strong,
.setting-card strong {
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
}

.user-card-top small,
.user-card p,
.role-card p,
.setting-card p,
.user-meta span {
  color: #c4b6a5;
  font-size: 11px;
  line-height: 1.35;
}

.user-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.08);
  color: var(--cream);
  font-size: 10px;
}

.auth-user-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(236, 221, 201, 0.24);
  border-radius: 14px;
  background: #191b1b;
  color: var(--cream);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.auth-user-dialog::backdrop {
  background: rgba(6, 7, 7, 0.78);
  backdrop-filter: blur(7px);
}

.auth-user-dialog form {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.auth-user-dialog-head,
.auth-user-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-user-dialog-head small {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: .14em;
}

.auth-user-dialog-head h2 {
  margin: 4px 0 0;
  color: var(--cream);
  font-size: 18px;
  font-weight: 560;
}

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

.auth-user-fields label {
  display: grid;
  gap: 6px;
}

.auth-user-fields label span {
  color: #bbaa98;
  font-size: 10px;
}

.auth-user-fields input,
.auth-user-fields select {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(236, 221, 201, 0.2);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.06);
  color: var(--cream);
  font: inherit;
}

.auth-user-fields input:disabled {
  opacity: .5;
}

.auth-user-password-field {
  grid-column: 1 / -1;
}

.auth-user-form-error {
  min-height: 16px;
  margin: -6px 0 0;
  color: #ff9c82;
  font-size: 11px;
}

.auth-user-dialog-actions {
  justify-content: flex-end;
}

.user-card-login {
  color: var(--accent) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 620px) {
  .auth-user-fields { grid-template-columns: 1fr; }
  .auth-user-password-field { grid-column: auto; }
}

.user-status-active {
  background: rgba(136, 157, 102, 0.2);
  color: #dfe9d3;
}

.user-status-paused {
  background: rgba(173, 108, 108, 0.22);
  color: #f0dddb;
}

.user-status-disabled {
  background: rgba(173, 108, 108, 0.22);
  color: #f0dddb;
}

/* Nik and Craft project release campaigns */
.project-release-command {
  border-color: rgba(200, 130, 82, .42) !important;
  background: linear-gradient(135deg, rgba(200, 130, 82, .11), rgba(255, 255, 255, .025)) !important;
}

.project-release-command .sw-section-head > div > p {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
}

.project-release-command .sw-section-head > div > span {
  display: block;
  max-width: 760px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.project-release-score {
  display: grid;
  min-width: 88px;
  padding: 10px 12px;
  border: 1px solid rgba(200, 130, 82, .3);
  border-radius: 4px;
  text-align: right;
}

.project-release-score strong { color: var(--accent); font-size: 20px; font-weight: 520; }
.project-release-score small { color: var(--muted); font-size: 8px; }
.project-release-core { margin-top: 15px; }

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

.project-release-timeline > label {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .025);
}

.project-release-timeline > label.is-done { border-color: rgba(123, 153, 76, .42); background: rgba(123, 153, 76, .08); }
.project-release-timeline input,
.project-release-portals input { accent-color: var(--accent); }
.project-release-timeline time { color: var(--text); font-size: 10px; font-weight: 650; }
.project-release-timeline time small { display: block; margin-top: 2px; color: var(--accent); font-size: 8px; }
.project-release-timeline strong,
.project-release-timeline span small { display: block; }
.project-release-timeline strong { color: var(--text); font-size: 10px; font-weight: 620; }
.project-release-timeline span small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }

.project-release-portals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.project-release-portals > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .025);
}

.project-release-portals > label.is-done { border-color: rgba(123, 153, 76, .42); }
.project-release-portals strong,
.project-release-portals small { display: block; }
.project-release-portals strong { color: var(--text); font-size: 9px; }
.project-release-portals small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.project-release-portals a { color: var(--accent); font-size: 8px; text-decoration: none; }

.project-release-docs .sw-section-head > button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(200, 130, 82, .5);
  border-radius: 3px;
  background: var(--accent);
  color: #201d1a;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.project-release-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.project-release-doc-grid label { display: grid; gap: 5px; }
.project-release-doc-grid label > span { color: var(--muted); font-size: 9px; }
.project-release-doc-grid textarea { min-height: 150px; resize: vertical; }
.project-release-ai { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin-top: 10px; padding: 11px; border: 1px dashed rgba(200, 130, 82, .4); border-radius: 4px; }
.project-release-ai > span { grid-row: 1 / 3; align-self: center; padding: 5px 7px; color: var(--accent); background: rgba(200, 130, 82, .11); font-size: 8px; font-weight: 800; }
.project-release-ai strong { color: var(--text); font-size: 10px; }
.project-release-ai small { color: var(--muted); font-size: 8px; }

.craft-shell .sw-hero {
  background: linear-gradient(135deg, rgba(200, 130, 82, .16), rgba(28, 32, 31, .96));
}

@media (max-width: 900px) {
  .project-release-portals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .project-release-timeline,
  .project-release-portals,
  .project-release-doc-grid { grid-template-columns: 1fr; }
  .project-release-timeline > label { grid-template-columns: auto 62px minmax(0, 1fr); }
}

.user-meta,
.user-tags,
.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.08);
  color: #ddd1c3;
  font-size: 10px;
}

.setting-card select {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.54);
  color: var(--text);
  font-size: 12px;
  padding: 0 10px;
}

.setting-card input,
.setting-card textarea {
  width: 100%;
  border: 1px solid rgba(226, 196, 166, 0.26);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.7);
  color: #231d18;
  font-size: 12px;
  padding: 10px;
}

.setting-card input {
  height: 34px;
  padding: 0 10px;
}

.setting-card textarea {
  min-height: 120px;
  resize: vertical;
}

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

.setting-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ddd1c3;
  font-size: 11px;
}

.setting-meta {
  display: grid;
  gap: 4px;
}

.setting-meta span {
  color: #c4b6a5;
  font-size: 11px;
  line-height: 1.35;
}

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

.audit-score-card,
.audit-card {
  padding: 12px;
  border: 1px solid rgba(226, 196, 166, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.12);
}

.audit-score-card {
  display: grid;
  gap: 4px;
}

.audit-score-card strong {
  color: var(--cream);
  font-size: 22px;
  font-weight: 500;
}

.audit-score-card small,
.audit-card p,
.audit-card-block small,
.audit-card li {
  color: #d4c5b4;
  line-height: 1.45;
}

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

.audit-card {
  display: grid;
  gap: 10px;
}

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

.audit-card-head strong {
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
}

.audit-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.audit-level-strong {
  background: rgba(117, 166, 120, 0.18);
  color: #dbead9;
}

.audit-level-medium {
  background: rgba(199, 131, 83, 0.18);
  color: #f2ddd0;
}

.audit-level-weak {
  background: rgba(171, 97, 76, 0.2);
  color: #f1d3ca;
}

.audit-card-block {
  display: grid;
  gap: 6px;
}

.audit-card-block ul {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
}

.audit-history-panel { margin-top:10px; }.audit-history-meta { color:#b7aa9c; font-size:9px; }.audit-history { display:grid; gap:7px; }.audit-history-empty { padding:15px; border:1px dashed rgba(226,196,166,.2); border-radius:8px; color:#b7aa9c; font-size:10px; text-align:center; }.audit-history-empty.is-error { color:#d49689; }
.audit-version { display:grid; grid-template-columns:72px minmax(0,1fr) auto; gap:12px; align-items:center; padding:11px 12px; border:1px solid rgba(226,196,166,.16); border-radius:8px; background:rgba(255,248,237,.06); }.audit-version.is-current { border-color:rgba(184,220,96,.3); background:rgba(184,220,96,.055); }.audit-version-rev span,.audit-version-rev strong { display:block; }.audit-version-rev span { color:#9d9185; font-size:7px; font-weight:850; letter-spacing:.1em; }.audit-version-rev strong { margin-top:3px; color:var(--cream); font-size:17px; font-weight:550; }.audit-version-main { min-width:0; }.audit-version-main strong,.audit-version-main small { display:block; overflow:hidden; text-overflow:ellipsis; }.audit-version-main strong { color:#e9e0d5; font-size:10px; white-space:nowrap; }.audit-version-main small { margin-top:4px; color:#9f958a; font-size:8px; line-height:1.35; white-space:nowrap; }.audit-version button,.audit-version-state { padding:7px 9px; border:1px solid rgba(226,196,166,.2); border-radius:6px; color:#ddd1c4; background:rgba(255,255,255,.04); font:inherit; font-size:8px; font-weight:750; cursor:pointer; }.audit-version button:hover { border-color:rgba(200,130,82,.5); background:rgba(200,130,82,.1); }.audit-version-state { color:#b9d57b; border-color:rgba(184,220,96,.18); cursor:default; }

.panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.22), rgba(255, 248, 237, 0.07) 32%),
    var(--glass);
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    0 12px 28px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
}

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

.panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(198, 179, 155, 0.46);
}

.panel-title-inline {
  flex-wrap: wrap;
  justify-content: space-between;
}

.panel-title-stack {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.panel-actions {
  display: flex;
  gap: 6px;
}

.panel-action {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(226, 196, 166, 0.26);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.38);
  color: #312822;
  font-size: 10px;
  font-weight: 500;
}

.panel-action[data-busy="true"] {
  opacity: 0.72;
  border-color: rgba(199, 131, 83, 0.34);
  background: rgba(248, 239, 228, 0.56);
}

.panel-action[data-state="success"] {
  border-color: rgba(123, 158, 104, 0.34);
  background: rgba(212, 231, 203, 0.55);
  color: #304026;
}

.panel-icon {
  min-width: 28px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.danger-action {
  border-color: rgba(157, 95, 56, 0.3);
  color: #6a2d16;
}

.panel-title h2 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.focus {
  color: #2f2823;
  line-height: 1.4;
  font-size: 13px;
}

.goal {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid rgba(226, 196, 166, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.18), rgba(255, 248, 237, 0.08) 42%),
    rgba(236, 221, 204, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.16);
}

.goal span,
.resource-row small,
.task-row small {
  color: #4c4239;
  font-size: 12px;
  line-height: 1.35;
}

.chips,
.rule-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips {
  margin-top: 12px;
}

.rule-list {
  gap: 6px;
  margin-top: 8px;
}

.news-rules-subtle {
  align-items: center;
  gap: 6px 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(198, 179, 155, 0.22);
}

.news-rules-label {
  color: rgba(114, 102, 90, 0.82);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.news-meta {
  margin-top: 0;
  color: #4a4037;
  font-size: 11px;
  line-height: 1.35;
}

.news-feed {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.news-history {
  display: grid;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.16), rgba(255, 248, 237, 0.07) 50%),
    rgba(242, 232, 219, 0.34);
}

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

.news-history-head strong {
  font-size: 12px;
  font-weight: 600;
  color: #1f1a16;
}

.news-history-head small {
  color: #4d443b;
  font-size: 10px;
}

.news-history-links {
  display: grid;
  gap: 6px;
}

.news-item,
.news-empty {
  padding: 10px 11px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.18), rgba(255, 248, 237, 0.08) 50%),
    rgba(242, 232, 219, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.14);
}

.news-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.news-item-top small {
  color: #4d443b;
  font-size: 10px;
}

.news-link {
  display: block;
  margin-top: 6px;
  color: #171310;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.news-link:hover {
  text-decoration: underline;
  text-decoration-color: rgba(199, 131, 83, 0.72);
  text-underline-offset: 3px;
}

.news-item p,
.news-empty {
  margin-top: 6px;
  color: #352d27;
  font-size: 11px;
  line-height: 1.38;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.news-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(233, 220, 201, 0.48);
  color: #45382e;
  font-size: 10px;
  font-weight: 500;
}

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

.subhead {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.passport-list,
.audit-list {
  display: grid;
  gap: 7px;
}

.passport-fold {
  margin-top: 10px;
  border-top: 1px solid rgba(198, 179, 155, 0.22);
  padding-top: 10px;
}

.passport-fold summary {
  cursor: pointer;
  color: var(--orange-3);
  font-size: 11px;
  font-weight: 600;
  list-style: none;
}

.passport-fold summary::-webkit-details-marker {
  display: none;
}

.passport-fold[open] summary {
  margin-bottom: 9px;
}

.passport-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  min-height: 0;
  padding: 8px 9px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.16), rgba(255, 248, 237, 0.07) 48%),
    rgba(242, 232, 219, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.14);
}

.passport-meta {
  min-width: 0;
}

.passport-meta small,
.passport-meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.passport-meta strong {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.passport-meta small {
  font-size: 10px;
  color: #544940;
  letter-spacing: 0.2px;
}

.audit-list p {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.16), rgba(255, 248, 237, 0.07) 48%),
    rgba(242, 232, 219, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.14);
  color: #2f2823;
  line-height: 1.35;
  font-size: 12px;
}

.chips span,
.rule-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  background: rgba(233, 220, 201, 0.3);
  color: #241f1a;
  font-size: 11px;
  font-weight: 500;
}

.rule-list span {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(72, 62, 53, 0.94);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.resource-list,
.task-list,
.activity-list,
.signal-list {
  display: grid;
  gap: 6px;
}

.resource-list-compact {
  gap: 8px;
}

.panel-empty {
  padding: 10px 11px;
  border: 1px dashed rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  color: #4a4037;
  font-size: 11px;
  line-height: 1.4;
}

.resource-row,
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px 12px;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.16), rgba(255, 248, 237, 0.07) 50%),
    rgba(242, 232, 219, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.14);
}

.task-row {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
}

.gap-row {
  grid-template-columns: 18px minmax(0, 1fr);
}

.task-check {
  position: relative;
  width: 16px;
  height: 16px;
}

.task-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.task-check span {
  display: block;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(88, 73, 61, 0.6);
  border-radius: 999px;
}

.task-check input:checked + span {
  background: rgba(199, 131, 83, 0.72);
  border-color: rgba(199, 131, 83, 0.72);
}

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

.task-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f1a16;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
}

.row-link:hover {
  color: var(--orange-3);
}

.task-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 154px;
}

.task-due {
  width: 104px;
  height: 28px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(248, 239, 228, 0.48);
  color: #332c26;
  font-size: 11px;
  padding: 0 8px;
}

.task-mini-action {
  width: 26px;
  min-width: 26px;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
}

.task-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px 86px 118px 72px 92px;
  gap: 8px;
  margin: -1px 0 4px 26px;
  padding: 8px;
  border: 1px solid rgba(226, 196, 166, 0.22);
  border-radius: 0 0 8px 8px;
  background: rgba(248, 239, 228, 0.42);
}

.task-editor-title {
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.6);
  color: #241f1a;
}

.task-editor-priority {
  width: 100%;
}

.task-editor-gap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #332c26;
  font-size: 11px;
}

.resource-row > span:first-child {
  font-size: 12px;
  font-weight: 800;
  color: var(--orange-3);
}

.resource-archived {
  opacity: 0.58;
}

.resource-archived strong,
.resource-archived .resource-link,
.resource-archived small {
  color: #7f7367;
}

.resource-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
}

.resource-row strong,
.resource-row small,
.task-row strong,
.task-row small {
  display: block;
  overflow-wrap: anywhere;
}

.resource-row strong,
.task-row strong {
  font-size: 12px;
  font-weight: 600;
  color: #1f1a16;
  line-height: 1.3;
}

.resource-row small {
  font-size: 11px;
}

.resource-link {
  color: #1b1713;
  font-weight: 600;
  text-decoration-color: rgba(199, 131, 83, 0.72);
  text-underline-offset: 3px;
}

.resource-details {
  justify-self: start;
  font-size: 11px;
}

.resource-details[open] {
  grid-column: 1 / -1;
}

.resource-details summary {
  color: var(--orange-3);
  cursor: pointer;
  font-weight: 600;
}

.resource-details p {
  margin-top: 5px;
  color: #4a4037;
  line-height: 1.35;
}

.status-pill {
  min-width: 68px;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  background: rgba(230, 214, 194, 0.34);
  color: #2d241d;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-align: center;
}

select {
  width: 92px;
  height: 30px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(248, 239, 228, 0.48);
  color: var(--text);
  font-size: 11px;
  backdrop-filter: blur(10px);
}

.signal-list p,
.activity-list p {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.4;
  color: #241f1a;
  font-size: 12px;
}

.database-view {
  display: grid;
  gap: 10px;
}

.database-hero {
  display: grid;
  gap: 10px;
}

.sync-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(226, 196, 166, 0.22);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.28);
  color: #5a4d42;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.sync-state.is-busy {
  color: #8b4e2b;
  border-color: rgba(199, 131, 83, 0.34);
}

.sync-state.is-saved {
  color: #3a5a2c;
  border-color: rgba(123, 158, 104, 0.34);
  background: rgba(212, 231, 203, 0.34);
}

.sync-state.is-error {
  color: #8a3f34;
  border-color: rgba(173, 108, 108, 0.34);
  background: rgba(243, 220, 214, 0.34);
}

.save-toast {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(226, 196, 166, 0.26);
  border-radius: 12px;
  background: rgba(32, 37, 36, 0.94);
  color: #f5ebde;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.save-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.save-toast.is-error {
  background: rgba(76, 37, 33, 0.96);
}

/* Premium cleanup pass: keep dormant modules in code, but remove visual noise from daily work. */
[hidden] {
  display: none !important;
}

body {
  background:
    linear-gradient(180deg, rgba(199, 131, 83, 0.05), transparent 22%),
    radial-gradient(circle at 50% -14%, rgba(236, 221, 201, 0.12), transparent 34%),
    linear-gradient(180deg, #151919 0%, #202625 100%);
}

.sidebar {
  padding: 14px 12px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.035), transparent 28%),
    linear-gradient(180deg, #141818 0%, #1d2322 100%);
  border-right-color: rgba(236, 221, 201, 0.12);
}

.brand {
  padding-bottom: 12px;
}

.brand-mark,
.bot {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #d49a68, #aa6e43);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.24), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.brand-switcher span {
  font-size: 18px;
  letter-spacing: 0;
}

.brand-switcher select,
select,
.database-search input,
.database-filter select,
.drawer-field input,
.drawer-field select,
.drawer-field textarea,
.setting-card input,
.setting-card textarea,
.setting-card select,
.drawer-history-composer input {
  border-color: rgba(189, 169, 143, 0.28);
  border-radius: 9px;
  background-color: rgba(255, 250, 242, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.18);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 13px) 50%,
    calc(100% - 8px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 24px;
}

.nav-item {
  min-height: 38px;
  padding: 8px 9px;
  border-radius: 9px;
  background: transparent;
  border-color: transparent;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: rgba(199, 131, 83, 0.24);
  background: rgba(255, 248, 237, 0.075);
}

.nav-item strong {
  font-size: 11px;
  font-weight: 500;
}

.nav-item small {
  font-size: 9px;
  opacity: 0.74;
}

.workspace {
  padding: 16px 18px 100px;
  background:
    radial-gradient(circle at 18% -4%, rgba(199, 131, 83, 0.11), transparent 26%),
    radial-gradient(circle at 72% -8%, rgba(236, 221, 201, 0.08), transparent 24%),
    linear-gradient(180deg, #1f2524 0%, #171c1c 100%);
}

.topbar {
  align-items: center;
  margin-bottom: 14px;
}

.topbar-actions {
  gap: 5px;
}

.topbar-action {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  justify-content: center;
  padding: 0;
  border-color: rgba(236, 221, 201, 0.14);
  background: rgba(255, 248, 237, 0.06);
  font-size: 14px;
}

.topbar-profile {
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(255, 248, 237, 0.06);
}

.topbar-badge {
  position: absolute;
  transform: translate(13px, -10px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 9px;
}

h1 {
  font-size: 27px;
  letter-spacing: 0;
}

.eyebrow,
.overview-header p,
.subhead {
  letter-spacing: 0;
}

.panel,
.overview-card,
.focus-card,
.agenda-item,
.user-card,
.role-card,
.setting-card,
.audit-score-card,
.audit-card,
.timeline-card,
.inbox-column,
.automation-rule-card,
.automation-item,
.database-hero,
.db-board-column {
  border-color: rgba(231, 214, 191, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.18), rgba(255, 248, 237, 0.055) 42%),
    rgba(229, 219, 205, 0.54);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 237, 0.16),
    0 16px 32px rgba(0, 0, 0, 0.13);
}

.panel {
  padding: 13px;
}

.panel-title {
  min-height: 28px;
  margin-bottom: 9px;
  padding-bottom: 7px;
  border-bottom-color: rgba(189, 169, 143, 0.24);
}

.panel-title > span,
.panel-title-stack > span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(189, 169, 143, 0.2);
  border-radius: 999px;
  color: #8f5a37;
  font-size: 11px;
}

.panel-title h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
}

.panel-action,
.quick-view-chip,
.dataset-tab,
.template-chip,
.presence-dot,
.quick-action-link {
  border-color: rgba(189, 169, 143, 0.24);
  background: rgba(255, 248, 237, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.16);
}

.panel-action:hover,
.quick-view-chip:hover,
.dataset-tab:hover,
.template-chip:hover,
.presence-dot:hover,
.quick-action-link:hover {
  background: rgba(255, 248, 237, 0.52);
  border-color: rgba(199, 131, 83, 0.28);
}

.panel-icon,
.task-create-trigger {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
}

.task-create-trigger {
  font-size: 17px;
}

.quick-view-chip.is-active,
.dataset-tab.is-active,
.mode-chip.is-active {
  background: #1f2322;
  color: #fff8ed;
  border-color: rgba(199, 131, 83, 0.28);
}

.database-toolbar {
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.24), rgba(255, 248, 237, 0.08) 46%),
    rgba(226, 216, 204, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 248, 237, 0.18), 0 14px 30px rgba(0, 0, 0, 0.12);
}

.database-table-wrap {
  border-radius: 10px;
  background: rgba(239, 231, 219, 0.34);
}

.database-table th {
  background: rgba(236, 226, 213, 0.94);
  letter-spacing: 0.2px;
}

.database-table th,
.database-table td {
  padding: 9px 10px;
}

.resource-row,
.task-row,
.passport-row,
.audit-list p,
.news-item,
.news-empty,
.history-item,
.drawer-field,
.drawer-info-card,
.drawer-related-card,
.db-card,
.db-board-card,
.request-card {
  border-color: rgba(189, 169, 143, 0.22);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.18), rgba(255, 248, 237, 0.06) 48%),
    rgba(242, 232, 219, 0.42);
}

.panel-empty {
  border-color: rgba(189, 169, 143, 0.2);
  background: rgba(255, 248, 237, 0.14);
}

.ai-command {
  border-radius: 10px;
  border-color: rgba(231, 214, 191, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.25), rgba(255, 248, 237, 0.08) 44%),
    rgba(229, 219, 205, 0.72);
}

.ai-command button {
  border-radius: 9px;
}

.save-toast {
  border-radius: 10px;
}

.database-intro {
  color: #2f2823;
  font-size: 13px;
  line-height: 1.45;
}

.dataset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.database-hero-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.db-view-modes,
.db-saved-views {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dataset-tab {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.36);
  color: #2b241e;
  font-size: 11px;
  font-weight: 500;
}

.dataset-tab.is-active {
  background: #242321;
  color: var(--cream);
}

.database-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(5, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  position: sticky;
  top: 8px;
  z-index: 4;
  padding: 10px;
  border: 1px solid rgba(226, 210, 191, 0.2);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.3), rgba(255, 248, 237, 0.12) 50%),
    rgba(234, 223, 210, 0.58);
  backdrop-filter: blur(18px);
}

.database-search,
.database-filter {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.database-search span,
.database-filter span {
  color: #544940;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.database-search input,
.database-filter select {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.54);
  color: var(--text);
  font-size: 12px;
  padding: 0 11px;
}

.database-meta {
  margin-top: 10px;
  color: #4d443b;
  font-size: 11px;
  line-height: 1.4;
}

.db-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.db-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  background: rgba(248, 239, 228, 0.32);
  color: #3f332a;
  font-size: 10px;
  font-weight: 600;
}

.db-summary-ready { color: #5a6e42; }
.db-summary-work { color: #415b84; }
.db-summary-missing { color: #7a5640; }
.db-summary-muted { color: #65584c; }

.database-reset {
  height: 36px;
  min-width: 94px;
}

.db-quick-views {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.db-board[hidden] {
  display: none;
}

.db-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.db-board-column {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.18), rgba(255, 248, 237, 0.08) 50%),
    rgba(242, 232, 219, 0.3);
}

.db-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.db-board-head strong {
  color: #241f1a;
  font-size: 12px;
  font-weight: 700;
}

.db-board-head small {
  color: #675a4d;
  font-size: 10px;
}

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

.db-board-card {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.42);
}

.db-board-card p,
.db-board-card small {
  color: #544940;
  font-size: 10px;
  line-height: 1.35;
}

.db-board-meta {
  display: grid;
  gap: 4px;
}

.quick-view-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.34);
  color: #3b3028;
  font-size: 10px;
  font-weight: 500;
}

.quick-view-chip.is-active {
  background: #242321;
  color: var(--cream);
}

.database-table-wrap {
  margin-top: 10px;
  overflow: auto;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.18);
}

.database-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.database-table th,
.database-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(198, 179, 155, 0.24);
  vertical-align: top;
  text-align: left;
}

.database-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(244, 236, 226, 0.92);
  color: #3d332b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.database-table td {
  color: #211b17;
  font-size: 12px;
  line-height: 1.35;
}

.db-col-company,
.db-cell-company {
  min-width: 210px;
}

.db-col-region,
.db-cell-region {
  width: 86px;
}

.db-col-category,
.db-cell-category {
  width: 148px;
}

.db-col-email,
.db-cell-email {
  width: 166px;
}

.db-col-contacts,
.db-cell-contacts {
  width: 156px;
}

.db-col-site,
.db-cell-site {
  width: 132px;
  max-width: 132px;
}

.db-col-presence,
.db-cell-presence {
  width: 72px;
}

.db-col-crm,
.db-cell-crm {
  min-width: 190px;
}

.database-table td strong,
.database-table td small {
  display: block;
}

.database-table td small {
  margin-top: 4px;
  color: #5a4f46;
  font-size: 10px;
}

.database-table a,
.db-card a {
  color: #1b1713;
  text-decoration-color: rgba(199, 131, 83, 0.72);
  text-underline-offset: 3px;
}

.db-site-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
}

.db-crm-select {
  width: 100%;
  min-width: 110px;
  margin-top: 4px;
}

.db-crm-summary,
.db-card-meta {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.db-crm-summary small,
.db-card-meta small {
  color: #5a4f46;
  font-size: 10px;
  line-height: 1.35;
}

.quick-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.presence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.presence-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.32);
  color: #2b241e;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  text-transform: lowercase;
}

.presence-dot-wa {
  color: #425f35;
}

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

.channel-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.channel-more {
  display: inline-flex;
  align-items: center;
}

.channel-more summary {
  cursor: pointer;
  min-height: 20px;
  padding: 3px 7px;
  border: 1px solid rgba(226, 196, 166, 0.22);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.42);
  color: #6a5848;
  font-size: 10px;
  list-style: none;
}

.channel-more summary::-webkit-details-marker {
  display: none;
}

.channel-more[open] {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.channel-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.58);
  border: 1px solid rgba(226, 196, 166, 0.24);
  color: #43372d;
  font-size: 10px;
  line-height: 1.2;
}

.channel-whatsapp {
  background: rgba(143, 173, 124, 0.18);
  color: #51683b;
}

.channel-unverified {
  background: rgba(160, 132, 109, 0.16);
  color: #6c4c35;
}

.channel-legacy {
  background: rgba(131, 138, 150, 0.16);
  color: #4d596a;
}

.quick-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.38);
  color: #2b241e;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  text-transform: lowercase;
}

.quick-action-empty {
  color: #74685d;
  font-size: 11px;
}

.database-empty {
  color: #4a4037;
  font-size: 12px;
}

.db-mobile-list {
  display: none;
  gap: 8px;
  margin-top: 10px;
}

.db-card {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.18), rgba(255, 248, 237, 0.08) 50%),
    rgba(242, 232, 219, 0.36);
}

.db-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.db-card-top strong {
  color: #1f1a16;
  font-size: 13px;
  font-weight: 600;
}

.db-card-top .db-crm-select {
  max-width: 124px;
  margin-top: 0;
}

.task-composer {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 100px 88px 118px auto auto auto;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.task-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.template-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -2px 0 10px;
}

.template-chip {
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.2);
  color: #4b4037;
  font-size: 10px;
  font-weight: 500;
}

.task-composer input,
.task-composer select {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.54);
  color: var(--text);
  font-size: 12px;
  padding: 0 10px;
}

.task-gap-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.4);
  color: #4c4239;
  font-size: 11px;
  white-space: nowrap;
}

.task-gap-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--orange);
  flex: 0 0 auto;
}

.request-composer {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 120px 120px minmax(0, 1fr) 132px auto;
  gap: 8px;
  margin-bottom: 10px;
}

.request-composer input,
.request-composer select {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.54);
  color: var(--text);
  font-size: 12px;
  padding: 0 10px;
}

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

.request-column {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(226, 210, 191, 0.28);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.12);
}

.request-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.request-column-head strong {
  color: #241f1a;
  font-size: 12px;
  font-weight: 700;
}

.request-column-head small {
  color: #675a4d;
  font-size: 10px;
}

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

.request-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.42);
}

.request-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.request-card-top strong {
  color: #1f1a16;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.request-stage-select {
  min-width: 124px;
  margin: 0;
}

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

.request-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.5);
  color: #4c4036;
  font-size: 10px;
}

.request-card p,
.request-card small {
  color: #544940;
  font-size: 10px;
  line-height: 1.35;
}

.db-card p,
.db-card small {
  color: #4d443b;
  font-size: 11px;
  line-height: 1.4;
}

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

.db-card-links a,
.db-card-links span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(226, 196, 166, 0.22);
  border-radius: 999px;
  background: rgba(248, 239, 228, 0.34);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

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

.database-footer {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.detail-drawer[hidden] {
  display: none;
}

.overlay-shell[hidden] {
  display: none;
}

.overlay-shell {
  position: fixed;
  inset: 0;
  z-index: 28;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(16, 18, 18, 0.54);
  backdrop-filter: blur(8px);
}

.overlay-panel {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 36px);
  display: grid;
  gap: 12px;
  padding: 16px;
  overflow: auto;
  border: 1px solid rgba(236, 221, 201, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.22), rgba(255, 248, 237, 0.08) 38%),
    rgba(233, 223, 211, 0.94);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

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

.command-center-panel {
  width: min(860px, calc(100vw - 24px));
}

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

.command-search span {
  color: #5a4f46;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.command-search input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(226, 196, 166, 0.26);
  border-radius: 10px;
  background: rgba(255, 248, 237, 0.76);
  color: #231d18;
  font-size: 13px;
  padding: 0 12px;
}

.command-quick-actions,
.command-results,
.notifications-summary,
.notifications-list {
  display: grid;
  gap: 8px;
}

.command-quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.command-result,
.notification-card {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(226, 196, 166, 0.24);
  border-radius: 10px;
  background: rgba(255, 248, 237, 0.46);
  text-align: left;
  color: #1f1a16;
}

.command-result strong,
.notification-card strong {
  font-size: 13px;
  font-weight: 600;
}

.command-result small,
.notification-card small {
  color: #5a4f46;
  font-size: 10px;
  line-height: 1.35;
}

.notify-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.34);
  color: #3c332b;
  font-size: 10px;
}

.notifications-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notification-danger {
  border-color: rgba(173, 108, 108, 0.28);
}

.notification-warn {
  border-color: rgba(185, 120, 84, 0.28);
}

.notification-info {
  border-color: rgba(115, 135, 170, 0.28);
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 20, 20, 0.5);
  backdrop-filter: blur(6px);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.2), rgba(255, 248, 237, 0.08) 40%),
    rgba(233, 223, 211, 0.92);
  border-left: 1px solid rgba(226, 196, 166, 0.3);
  box-shadow: -18px 0 44px rgba(0, 0, 0, 0.26);
  overflow: auto;
}

.drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(198, 179, 155, 0.4);
}

.drawer-eyebrow {
  color: #74675a;
}

.drawer-title {
  color: #1f1a16;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.05;
}

.drawer-meta {
  margin-top: 6px;
  color: #52473c;
  font-size: 12px;
  line-height: 1.4;
}

.drawer-body {
  display: grid;
  gap: 14px;
  align-content: start;
}

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

.drawer-field,
.drawer-info-card {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.24), rgba(255, 248, 237, 0.1) 48%),
    rgba(248, 239, 228, 0.48);
}

.drawer-field span,
.drawer-info-card span {
  color: #594e44;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.drawer-field input,
.drawer-field select,
.drawer-field textarea {
  width: 100%;
  border: 1px solid rgba(226, 196, 166, 0.26);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.7);
  color: #231d18;
  font-size: 12px;
  padding: 10px;
}

.drawer-field input,
.drawer-field select {
  height: 38px;
  padding: 0 10px;
}

.drawer-field textarea {
  min-height: 120px;
  resize: vertical;
}

.drawer-field-wide,
.drawer-info-card-wide {
  grid-column: 1 / -1;
}

.drawer-check {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.drawer-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.drawer-check span:last-child {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
  color: #2d241d;
}

.drawer-info-card strong,
.drawer-info-card a {
  color: #1f1a16;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.drawer-channel-wrap {
  display: grid;
  gap: 6px;
}

.drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.drawer-related {
  display: grid;
  gap: 8px;
}

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

.drawer-related-head strong,
.drawer-related-head small {
  color: #3d332b;
}

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

.drawer-related-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 11px;
  text-align: left;
  border: 1px solid rgba(226, 196, 166, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.22), rgba(255, 248, 237, 0.08) 48%),
    rgba(248, 239, 228, 0.42);
  color: #1f1a16;
}

.drawer-related-card strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.drawer-related-card small {
  color: #5a4f46;
  font-size: 10px;
  line-height: 1.35;
}

.drawer-history {
  display: grid;
  gap: 10px;
}

.contact-comm-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(160px, .75fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid rgba(226, 196, 166, 0.22);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(31, 35, 34, 0.92), rgba(45, 43, 39, 0.84));
  color: #f5ebde;
}

.comm-primary,
.comm-last {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.comm-primary small,
.comm-last small,
.comm-facts small {
  color: rgba(227, 213, 196, 0.58);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comm-primary strong,
.comm-last strong {
  display: block;
  overflow: hidden;
  color: #fff7eb;
  font-size: 12px;
  font-weight: 620;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-primary span,
.comm-last span {
  display: block;
  overflow: hidden;
  color: rgba(245, 235, 222, 0.62);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.comm-facts span {
  min-width: 0;
  padding: 7px 6px;
  border: 1px solid rgba(236, 221, 201, 0.1);
  border-radius: 4px;
  background: rgba(255, 248, 237, 0.055);
}

.comm-facts b {
  display: block;
  overflow: hidden;
  color: #f4d196;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.drawer-history-head strong {
  font-size: 13px;
  font-weight: 600;
  color: #1f1a16;
}

.drawer-history-head small {
  color: #5a4f46;
  font-size: 11px;
}

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

.history-item {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(226, 196, 166, 0.22);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.42);
}

.history-item small {
  color: #5b4f45;
  font-size: 10px;
}

.history-item p {
  color: #241f1a;
  font-size: 12px;
  line-height: 1.4;
}

.drawer-history-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.drawer-quick-touch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer-quick-touch button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(88, 73, 61, 0.16);
  border-radius: 4px;
  color: #2f2924;
  background: rgba(255, 248, 237, 0.52);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.drawer-quick-touch button:hover {
  border-color: rgba(199, 131, 83, 0.32);
  background: rgba(255, 248, 237, 0.78);
}

.drawer-history-composer input {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(226, 196, 166, 0.26);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.7);
  color: #231d18;
  font-size: 12px;
  padding: 0 10px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 15;
    gap: 8px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid #3a4140;
  }

  .brand {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 124px;
    padding: 8px 10px;
  }

  .sidebar-footer {
    display: none;
  }

  .ai-command {
    left: 16px;
    right: 16px;
  }

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

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

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

  .automation-rules-grid,
  .automation-queue {
    grid-template-columns: 1fr;
  }

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

  .users-grid,
  .roles-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .agenda-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .agenda-badge {
    justify-self: start;
  }

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

  .topbar-side {
    justify-items: stretch;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .quick-stats {
    width: 100%;
    justify-content: flex-start;
  }

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

  .database-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .db-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .request-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .database-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .sidebar {
    padding: 10px;
    gap: 8px;
  }

  .workspace {
    padding: 12px;
    padding-bottom: 96px;
    padding-right: 12px;
  }

  .brand {
    gap: 9px;
    align-items: center;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 13px;
  }

  .brand-switcher {
    gap: 4px;
  }

  .brand-switcher span {
    font-size: 16px;
  }

  .brand-switcher select {
    height: 32px;
    font-size: 11px;
    padding: 0 8px;
  }

  .nav-item {
    min-width: 116px;
    padding: 7px 9px;
  }

  .nav-item strong {
    font-size: 11px;
  }

  .nav-item small {
    font-size: 9px;
  }

  .topbar {
    gap: 10px;
    margin-bottom: 10px;
  }

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

  .topbar-action,
  .topbar-profile {
    width: 100%;
    justify-content: center;
    min-height: 34px;
    padding: 0 9px;
    font-size: 10px;
  }

  .topbar-profile {
    padding: 6px 8px;
    justify-items: center;
  }

  .topbar-profile small {
    display: none;
  }

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

  .overview-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agenda-item {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 9px 10px;
  }

  .agenda-date strong {
    font-size: 16px;
  }

  .ai-command {
    left: 10px;
    right: 10px;
    bottom: 10px;
    align-items: center;
    min-height: 48px;
    padding: 7px 8px 7px 9px;
  }

  .ai-command .bot {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .ai-command button {
    min-width: 92px;
    padding: 0 12px;
  }

  h1 {
    font-size: 22px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 9px;
    letter-spacing: 1.1px;
  }

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

  .stat {
    min-width: 0;
    width: 100%;
    padding: 6px 8px;
  }

  .stat strong { font-size: 14px; }

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

  .mode-chip {
    width: 100%;
  }

  .panel {
    padding: 12px;
  }

  .panel-title-inline {
    align-items: flex-start;
  }

  .panel-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .dataset-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

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

  .resource-row,
  .resource-row > div {
    grid-template-columns: 1fr;
  }

  .resource-row {
    gap: 6px;
  }

  .resource-details {
    justify-self: start;
  }

  .task-row {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .task-controls,
  .task-editor {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .task-controls {
    display: grid;
    min-width: 0;
  }

  .task-composer {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .task-composer input {
    grid-column: 1 / -1;
  }

  .task-composer select:nth-of-type(3) {
    grid-column: 1 / -1;
  }

  .task-gap-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 0 12px;
  }

  .task-composer .panel-action {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .database-toolbar {
    grid-template-columns: 1fr;
    position: static;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .database-hero-controls {
    align-items: stretch;
  }

  .db-view-modes,
  .db-saved-views {
    width: 100%;
  }

  .db-saved-views select,
  .db-saved-views .panel-action {
    flex: 1 1 100%;
  }

  .db-board {
    grid-template-columns: 1fr;
  }

  .db-quick-views {
    gap: 5px;
  }

  .quick-view-chip {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
  }

  .database-table-wrap {
    display: none;
  }

  .db-mobile-list {
    display: grid;
  }

  .db-card {
    gap: 6px;
    padding: 10px;
  }

  .db-card-top .db-crm-select {
    max-width: 112px;
  }

  .database-footer {
    justify-content: stretch;
  }

  .database-footer .panel-action {
    width: 100%;
  }

  .drawer-panel {
    width: 100%;
    padding: 14px 12px 90px;
  }

  .command-quick-actions,
  .notifications-summary,
  .audit-summary,
  .audit-grid {
    grid-template-columns: 1fr;
  }

  .audit-version { grid-template-columns:58px minmax(0,1fr); }.audit-version button,.audit-version-state { grid-column:2; width:max-content; }.audit-version-main strong,.audit-version-main small { white-space:normal; }

  .workbench-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .workbench-actions {
    justify-content: flex-start;
  }

  .overlay-panel {
    top: 10px;
    width: min(100vw - 20px, 760px);
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .drawer-title {
    font-size: 20px;
  }

  .contact-comm-desk {
    grid-template-columns: 1fr;
  }

  .comm-primary strong,
  .comm-primary span,
  .comm-last strong,
  .comm-last span {
    white-space: normal;
  }

  .drawer-quick-touch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .drawer-history-composer {
    grid-template-columns: 1fr;
  }

  .setting-card-wide {
    grid-column: auto;
  }
}


/* CN OS premium system pass: faster surfaces, clear hierarchy, app-like mobile navigation. */
:root {
  --sidebar-width: 218px;
  --asphalt-0: #121616;
  --asphalt-1: #181d1c;
  --asphalt-2: #222827;
  --surface: #e8e0d5;
  --surface-strong: #f5efe7;
  --surface-soft: #ddd3c6;
  --ink: #201d1a;
  --ink-soft: #655d55;
  --accent: #c88252;
  --accent-dark: #8b5030;
  --hairline: rgba(69, 57, 47, 0.18);
}

* {
  letter-spacing: 0 !important;
}

body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--asphalt-0);
}

.stat,
.panel,
.goal,
.news-item,
.news-empty,
.passport-row,
.audit-list p,
.resource-row,
.task-row,
.status-pill,
select,
.database-toolbar,
.ai-command {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.sidebar {
  gap: 14px;
  padding: 16px 12px 14px;
  background: var(--asphalt-1);
  border-right-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.brand {
  gap: 10px;
  padding: 0 4px 14px;
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.brand-mark,
.bot {
  width: 32px;
  height: 32px;
  border-radius: 3px !important;
  background: var(--accent);
  box-shadow: none;
  font-size: 12px;
}

.brand-switcher span {
  font-size: 16px;
  font-weight: 600;
}

.brand-switcher select {
  height: 28px;
  border-color: rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.055);
  color: #f4eee5;
}

.sidebar-nav {
  gap: 2px;
}

.nav-item {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 8px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 !important;
  background: transparent;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #bcb3a8;
  font-size: 14px;
}

.nav-item.is-active .nav-icon {
  color: #e4a276;
}

.nav-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.nav-item strong {
  color: #f2ece3;
  font-size: 11px;
  font-weight: 600;
}

.nav-item small {
  overflow: hidden;
  color: #928a80;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  padding: 16px 18px 98px;
  background: linear-gradient(180deg, var(--asphalt-2), var(--asphalt-1));
}

.workspace-frame {
  max-width: 1380px;
}

.topbar {
  min-height: 54px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eyebrow {
  margin-bottom: 3px;
  color: #a89f94;
  font-size: 9px;
  text-transform: uppercase;
}

h1 {
  font-size: 24px;
  font-weight: 500;
}

.topbar-side {
  grid-template-columns: auto auto;
  align-items: center;
  gap: 12px;
}

.topbar-actions {
  grid-column: 2;
  grid-row: 1;
}

.quick-stats {
  grid-column: 1;
  grid-row: 1;
  gap: 0;
}

.stat {
  min-width: 72px;
  padding: 2px 12px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none;
}

.stat:first-child {
  padding-left: 0;
}

.stat:last-child {
  border-right: 0;
}

.stat span {
  color: #a69d92;
  font-size: 9px;
}

.stat strong {
  color: #f7f0e7;
  font-size: 14px;
}

.topbar-action,
.topbar-profile {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px !important;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.overview-header {
  margin: 0 0 9px;
}

.overview-header h2 {
  font-size: 17px;
}

.overview-header p {
  color: #aaa197;
  font-size: 11px;
}

.overview-section-nav {
  position: sticky;
  top: 0;
  z-index: 14;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(520px, 100%);
  margin: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(31, 36, 35, .94);
  backdrop-filter: blur(14px);
}

.overview-section-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, .08);
  border-radius: 0 !important;
  color: #aaa39a;
  background: transparent;
  font-size: 10px;
  font-weight: 550;
}

.overview-section-tab:last-child { border-right: 0; }
.overview-section-tab:hover { color: #f1e9df; background: rgba(255, 255, 255, .04); }
.overview-section-tab.is-active { color: #171918; background: var(--accent); }
.overview-section-tab strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid currentColor;
  font-size: 9px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  opacity: .72;
}

.overview-project-pulse {
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--cmd-line);
  border-radius: 8px;
  background: var(--cmd-panel);
}

.overview-project-pulse-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--cmd-line);
}

.overview-project-pulse-head p { margin: 0 0 4px; color: var(--cmd-copper); font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.overview-project-pulse-head h3 { margin: 0; color: var(--cmd-text); font-size: 14px; font-weight: 600; }
.overview-project-pulse-head small { color: var(--cmd-muted); font-size: 8px; }
.overview-project-pulse-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pulse-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--cmd-line);
  border-bottom: 1px solid var(--cmd-line);
  border-radius: 0 !important;
  color: var(--cmd-text);
  background: transparent;
  text-align: left;
}
.pulse-row:hover { background: rgba(255,255,255,.035); }
.pulse-row > i { width: 7px; height: 7px; border-radius: 50%; background: #809087; }
.pulse-row > span { min-width: 0; }
.pulse-row strong,
.pulse-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse-row strong { font-size: 10px; font-weight: 600; }
.pulse-row small { margin-top: 3px; color: var(--cmd-muted); font-size: 7px; }
.pulse-row > b { font-size: 14px; font-weight: 550; font-variant-numeric: tabular-nums; }
.pulse-row.is-critical > i { background: #cf675c; }
.pulse-row.is-watch > i { background: #d4a052; }
.pulse-row.is-calm > i { background: #96b85a; }

@media (max-width: 760px) {
  .overview-section-nav { width: 100%; }
  .overview-section-tab { min-height: 44px; padding: 0 10px; }
  .overview-project-pulse-head { align-items: start; flex-direction: column; gap: 4px; }
  .overview-project-pulse-grid { grid-template-columns: 1fr; }
  .pulse-row { min-height: 50px; border-right: 0; }
}

.panel {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.panel-title {
  min-height: 28px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom-color: var(--hairline);
}

.panel-title > span,
.panel-title-stack > span {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 2px !important;
  background: rgba(139, 80, 48, 0.1);
  color: var(--accent-dark);
}

.panel-title h2 {
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
}

.panel-action,
.quick-view-chip,
.dataset-tab,
.template-chip,
.presence-dot,
.quick-action-link,
.mode-chip {
  border-color: rgba(62, 51, 43, 0.2);
  background: rgba(255, 255, 255, 0.34);
  box-shadow: none;
}

.panel-action:hover,
.quick-view-chip:hover,
.dataset-tab:hover,
.template-chip:hover,
.presence-dot:hover,
.quick-action-link:hover {
  border-color: rgba(139, 80, 48, 0.48);
  background: rgba(255, 255, 255, 0.62);
}

.panel-action[data-state="success"] {
  box-shadow: inset 3px 0 0 #76915f;
}

.overview-grid {
  gap: 8px;
}

.overview-card {
  position: relative;
  gap: 8px;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #292e2d;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.overview-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: #5d6462;
}

.overview-card[data-priority="1"]::before,
.overview-card[data-priority="2"]::before {
  background: var(--accent);
}

.overview-card:hover {
  border-color: rgba(215, 153, 108, 0.42);
  background: #303635;
  transform: translateY(-1px);
}

.overview-card p {
  color: #cbc3b9;
  font-size: 11px;
}

.overview-card-next {
  padding: 5px 7px;
  border-left: 2px solid rgba(200, 130, 82, 0.55);
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.035);
}

.overview-card-stats {
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.overview-card-stats span {
  min-height: 36px;
  padding: 7px 8px 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 !important;
  background: transparent;
  font-size: 9px;
}

.overview-card-stats span:last-child {
  border-right: 0;
}

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

.priority-chip {
  border-radius: 2px;
}

.focus-card,
.agenda-item,
.timeline-card,
.inbox-column,
.automation-rule-card,
.automation-item,
.user-card,
.role-card,
.setting-card,
.audit-score-card,
.audit-card {
  border-color: rgba(255, 255, 255, 0.09);
  background: #292e2d;
  box-shadow: none;
}

.resource-row,
.task-row,
.passport-row,
.audit-list p,
.news-item,
.news-empty,
.history-item,
.drawer-field,
.drawer-info-card,
.drawer-related-card,
.db-card,
.db-board-card,
.request-card,
.goal {
  border-color: rgba(74, 61, 50, 0.18);
  background: var(--surface-strong);
  box-shadow: none;
}

.database-toolbar {
  top: 6px;
  border-color: rgba(74, 61, 50, 0.18);
  background: #d8cec1;
  box-shadow: 0 7px 18px rgba(32, 29, 26, 0.14);
}

.database-table-wrap {
  border-color: rgba(74, 61, 50, 0.18);
  background: var(--surface-strong);
}

.database-table th {
  background: #d8cec1;
  color: #4a423b;
}

.database-table tbody tr:hover {
  background: rgba(200, 130, 82, 0.08);
}

input,
select,
textarea,
.database-search input,
.database-filter select,
.drawer-field input,
.drawer-field select,
.drawer-field textarea,
.setting-card input,
.setting-card textarea,
.setting-card select,
.drawer-history-composer input {
  border-color: rgba(74, 61, 50, 0.22);
  background-color: #fbf7f1;
  box-shadow: none;
}

.ai-command {
  min-height: 50px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #e7ded2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ai-command button {
  border-radius: 3px !important;
  background: #202423;
}

.save-toast {
  border-radius: 3px !important;
}

@media (max-width: 1080px) {
  .sidebar {
    padding: 9px 10px 8px;
  }

  .brand {
    padding: 0 0 8px;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    overflow: visible;
  }

  .nav-item {
    min-width: 0;
    min-height: 38px;
    padding: 6px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .nav-item:hover,
  .nav-item.is-active {
    border-bottom-color: var(--accent);
  }

  .nav-item small {
    display: none;
  }

  .topbar-side {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 10px 10px 88px;
  }

  .sidebar {
    gap: 6px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

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

  .brand-switcher span {
    font-size: 14px;
  }

  .brand-switcher select {
    height: 28px;
  }

  .sidebar-nav .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    width: auto;
    min-width: 0;
    gap: 2px;
    padding: 4px 2px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }

  .nav-copy {
    display: block;
    max-width: 100%;
  }

  .nav-item strong {
    display: block;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar {
    min-height: 0;
    gap: 7px;
    padding-bottom: 8px;
  }

  .topbar-side {
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    gap: 7px;
  }

  .quick-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .stat {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 2px 6px;
  }

  .stat:first-child {
    padding-left: 0;
  }

  .stat span {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
  }

  .stat strong {
    font-size: 13px;
  }

  .topbar-actions {
    gap: 3px;
  }

  .topbar-action {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
  }

  .topbar-profile {
    min-width: 58px;
    min-height: 30px;
    padding: 4px 7px;
  }

  h1 {
    font-size: 20px;
  }

  .overview-card-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .overview-card-stats span {
    min-width: 0;
    padding-inline: 5px;
  }

  .panel-actions {
    width: auto;
    margin-left: auto;
  }

  .panel-title-inline {
    align-items: center;
  }

  .panel-action:not(.panel-icon) {
    min-height: 26px;
    padding-inline: 7px;
  }

  .ai-command {
    left: 8px;
    right: 8px;
    bottom: 8px;
    min-height: 46px;
    padding: 6px;
  }

  .ai-command .bot {
    width: 34px;
    height: 34px;
  }

  .ai-command button {
    min-width: 76px;
    height: 34px;
    padding-inline: 9px;
  }
}

@media (max-width: 720px) {
  html,
  body,
  .app-shell,
  .sidebar,
  .workspace,
  .workspace-frame {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell,
  .workspace,
  .overview-grid,
  .grid,
  .panel,
  .overview-card {
    min-width: 0;
  }

  .sidebar-nav {
    max-width: 100%;
  }

  .sidebar-nav .nav-item {
    flex: 0 0 106px;
    width: 106px;
    min-width: 106px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-side {
    justify-items: start;
  }

  .topbar-actions {
    display: flex;
    width: auto;
    gap: 5px;
  }

  .topbar-action {
    width: 34px;
    min-width: 34px;
    padding: 0;
    font-size: 13px;
  }

  .topbar-profile {
    width: auto;
    min-width: 78px;
    justify-items: start;
    padding: 5px 9px;
  }

  .overview-header p {
    max-width: 34ch;
  }

  #overviewFocusPanel[hidden],
  #overviewAgendaPanel[hidden],
  #overviewWorkbenchPanel[hidden],
#databaseTasksPanel[hidden],
#gapsPanel[hidden],
#signalsPanel[hidden],
  #activityPanel[hidden] {
    display: none !important;
  }
}

/* Daily-work density pass: project and outreach screens should feel like a tool, not a report. */
#projectView {
  align-items: start;
  gap: 10px;
}

#projectView .panel:not(.passport-panel) {
  min-height: 0;
}

.passport-panel {
  padding-bottom: 10px;
}

.passport-grid {
  gap: 10px;
}

.passport-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.passport-row,
.audit-list p,
.task-row,
.news-item,
.db-card,
.db-board-card {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.22), rgba(255, 250, 244, 0.08) 52%),
    rgba(236, 226, 213, 0.48);
}

.goal {
  margin-top: 9px;
  padding: 9px 10px;
}

.chips {
  gap: 6px;
  margin-top: 9px;
}

.chips span,
.rule-list span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 10px;
}

.news-rules-subtle {
  margin-top: 8px;
  padding-top: 8px;
  opacity: 0.72;
}

.database-hero {
  gap: 8px;
}

.database-intro {
  max-width: 78ch;
  margin: -2px 0 0;
  opacity: 0.74;
  font-size: 11px;
}

.database-workspace-panel {
  padding: 10px;
}

.database-toolbar {
  grid-template-columns: minmax(210px, 1.25fr) repeat(5, minmax(112px, 1fr)) auto;
  gap: 7px;
  padding: 8px;
}

.database-search span,
.database-filter span {
  font-size: 9px;
}

.database-search input,
.database-filter select,
.database-reset {
  height: 32px;
}

.database-table {
  min-width: 840px;
}

.database-table th,
.database-table td {
  padding: 7px 8px;
}

.db-col-company,
.db-cell-company {
  min-width: 190px;
}

.db-col-site,
.db-cell-site {
  width: 104px;
  max-width: 104px;
}

.db-col-contacts,
.db-cell-contacts {
  width: 138px;
}

.db-col-crm,
.db-cell-crm {
  min-width: 156px;
}

.db-crm-select {
  height: 28px;
  margin-top: 0;
}

.db-crm-summary {
  gap: 2px;
  margin-top: 4px;
}

.db-card {
  gap: 7px;
}

.db-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 114px;
  align-items: start;
}

.db-card-top .row-link {
  font-size: 13px;
}

.db-card-top .db-crm-select {
  width: 114px;
}

.db-card p {
  margin: 0;
}

.db-card-meta {
  gap: 3px;
  margin-top: 0;
}

.presence-row {
  gap: 4px;
}

.presence-dot {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
}

@media (max-width: 720px) {
  .passport-list {
    grid-template-columns: 1fr;
  }

  .database-intro {
    display: none;
  }

  .database-workspace-panel {
    padding: 9px;
  }

  .database-toolbar {
    gap: 6px;
  }

  .database-search,
  .database-filter {
    gap: 3px;
  }

  .db-summary-chips,
  .db-quick-views {
    margin-top: 7px;
  }

  .db-card-top {
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 7px;
  }

  .db-card-top .db-crm-select {
    width: 108px;
    min-width: 0;
  }

  .task-controls {
    min-width: 0;
    justify-content: flex-start;
  }

  .task-due {
    width: 100%;
  }
}

/* Executive geometry pass: stricter surfaces, fewer pills, denser controls. */
:root {
  --radius-ui: 3px;
  --radius-panel: 6px;
  --radius-soft: 4px;
}

button,
select,
input,
textarea,
.panel-action,
.topbar-action,
.topbar-profile,
.quick-view-chip,
.dataset-tab,
.template-chip,
.mode-chip,
.presence-dot,
.quick-action-link,
.db-summary-chip,
.status-pill,
.sync-state,
.channel-badge,
.channel-more summary,
.task-flag,
.overview-shortcut,
.brand-switcher select,
.database-search input,
.database-filter select,
.drawer-field input,
.drawer-field select,
.drawer-field textarea,
.setting-card input,
.setting-card textarea,
.setting-card select,
.drawer-history-composer input {
  border-radius: var(--radius-ui) !important;
}

.panel,
.overview-card,
.focus-card,
.agenda-item,
.user-card,
.role-card,
.setting-card,
.audit-score-card,
.audit-card,
.timeline-card,
.inbox-column,
.automation-rule-card,
.automation-item,
.database-hero,
.database-toolbar,
.database-table-wrap,
.db-board-column,
.db-card,
.db-board-card,
.request-card,
.request-column,
.passport-row,
.resource-row,
.task-row,
.news-item,
.news-empty,
.history-item,
.drawer-info-card,
.drawer-field,
.drawer-related-card,
.overlay-panel,
.drawer-panel,
.ai-command,
.save-toast {
  border-radius: var(--radius-panel) !important;
}

.brand-mark,
.bot,
.panel-title > span,
.panel-title-stack > span,
.task-check span,
.topbar-badge {
  border-radius: var(--radius-soft) !important;
}

.panel-action,
.quick-view-chip,
.dataset-tab,
.template-chip,
.presence-dot,
.quick-action-link {
  min-height: 26px;
  text-transform: none;
}

.panel-action,
.quick-view-chip,
.dataset-tab,
.template-chip {
  padding-left: 8px;
  padding-right: 8px;
}

.dataset-tab,
.quick-view-chip {
  height: 28px;
}

.presence-dot,
.quick-action-link {
  height: 22px;
  min-width: 24px;
}

select {
  height: 30px;
  background-position:
    calc(100% - 12px) 50%,
    calc(100% - 7px) 50%;
  padding-right: 22px;
}

.database-search input,
.database-filter select,
.db-crm-select {
  min-height: 30px;
}

.chips,
.rule-list,
.dataset-tabs,
.db-quick-views,
.task-filter-chips,
.template-chips,
.presence-row,
.quick-action-group {
  gap: 4px;
}

.chips span,
.rule-list span,
.db-summary-chip,
.channel-badge {
  border-radius: var(--radius-ui) !important;
}

.topbar-action:hover,
.panel-action:hover,
.quick-view-chip:hover,
.dataset-tab:hover,
.template-chip:hover,
.presence-dot:hover,
.quick-action-link:hover {
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .ai-command {
    border-radius: var(--radius-panel) !important;
  }

  .ai-command .bot {
    width: 40px;
    height: 40px;
  }

  .ai-command button {
    min-width: 88px;
  }

  .dataset-tab,
  .quick-view-chip,
  .panel-action {
    min-height: 28px;
  }
}

/* Final responsive contract. Keep this last so legacy density rules cannot widen mobile UI. */
@media (max-width: 1080px) {
  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }

  .sidebar-nav .nav-item {
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .sidebar-nav .nav-item {
    flex: initial;
    width: auto;
    min-width: 0;
  }

  .database-workspace-panel {
    width: 100%;
    min-width: 0;
    padding: 8px;
    overflow: hidden;
  }

  .database-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    gap: 6px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .database-search,
  .database-filter,
  .database-reset {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .database-search input,
  .database-filter select {
    width: 100%;
    min-width: 0;
  }

  .database-hero-controls,
  .db-view-modes,
  .db-saved-views {
    width: 100%;
    min-width: 0;
  }

  .db-saved-views select,
  .db-saved-views .panel-action {
    width: 100%;
  }
}

/* Management center: settings are a navigable app surface, not one long form. */
.settings-section-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section-button {
  min-height: 32px;
  padding: 0 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0 !important;
  background: transparent;
  color: #aaa197;
  font-size: 11px;
  font-weight: 600;
}

.settings-section-button:hover {
  color: #f5eee5;
  background: rgba(255, 255, 255, 0.04);
}

.settings-section-button.is-active {
  border-bottom-color: var(--accent);
  color: #fff7ee;
}

.setting-card[hidden] {
  display: none !important;
}

.settings-journal-card {
  gap: 10px;
}

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

.settings-team-list {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-team-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.settings-team-row > div {
  display: grid;
  gap: 2px;
}

.settings-team-row strong {
  color: #f2ece3;
  font-size: 11px;
  font-weight: 500;
}

.settings-team-row small {
  color: #9d958b;
  font-size: 9px;
}

.settings-user-initial {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(200, 130, 82, 0.32);
  color: #e4a276;
  font-size: 10px;
  font-weight: 700;
}

.settings-journal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.settings-count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(200, 130, 82, 0.36);
  color: #e7a879;
  font-size: 10px;
}

.settings-journal-list {
  display: grid;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-journal-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.settings-journal-row > div {
  display: grid;
  gap: 3px;
}

.settings-journal-row strong {
  color: #f2ece3;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.settings-journal-row small {
  color: #9d958b;
  font-size: 9px;
}

.settings-journal-mark {
  width: 5px;
  height: 5px;
  margin-top: 5px;
  background: #878e8c;
}

.settings-journal-crm {
  background: var(--accent);
}

.settings-journal-project {
  background: #8c9c76;
}

.settings-journal-user {
  background: #8797ad;
}

@media (max-width: 720px) {
  .settings-section-nav {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .settings-section-nav::-webkit-scrollbar {
    display: none;
  }

  .settings-section-button {
    flex: 1 0 auto;
    min-height: 30px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .settings-journal-head {
    align-items: center;
  }
}

/* Today workspace: one operational queue across projects, requests and outreach. */
.operational-route {
  margin: 0 0 10px;
}

.operational-route-main,
.operational-route-empty {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  overflow: hidden;
  border: 1px solid rgba(200, 130, 82, .42);
  border-radius: 4px;
  background: #252a29;
  color: #fff7ee;
  box-shadow: 0 14px 34px rgba(15, 18, 17, .16);
}

.operational-route-main.is-urgent {
  border-color: rgba(184, 111, 99, .75);
}

.operational-route-current,
.operational-route-empty > div:first-child {
  padding: 22px;
  background: linear-gradient(130deg, rgba(200, 130, 82, .13), transparent 70%);
}

.operational-route-main.is-urgent .operational-route-current {
  background: linear-gradient(130deg, rgba(184, 111, 99, .16), transparent 70%);
}

.operational-route-current > small,
.operational-route-empty small {
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .14em;
}

.operational-route-current h2,
.operational-route-empty h2 {
  margin: 10px 0 7px;
  color: #fff7ee;
  font-size: clamp(19px, 2.1vw, 28px);
  font-weight: 520;
  letter-spacing: -.035em;
}

.operational-route-current p,
.operational-route-empty p {
  max-width: 720px;
  margin: 0 0 16px;
  color: #bdb4aa;
  font-size: 11px;
  line-height: 1.55;
}

.operational-route-current > button,
.operational-route-empty-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(200, 130, 82, .5);
  border-radius: 3px;
  background: var(--accent);
  color: #201d1a;
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.operational-route-next {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 18px;
  border-left: 1px solid rgba(255, 255, 255, .08);
}

.operational-route-next > span {
  margin-bottom: 4px;
  color: #958c82;
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.operational-route-next > button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 8px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.operational-route-next > button:hover { background: rgba(255, 255, 255, .055); }
.operational-route-next i { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid rgba(200, 130, 82, .34); border-radius: 50%; color: var(--accent); font-size: 9px; font-style: normal; }
.operational-route-next strong { display: block; color: #f3e9de; font-size: 10px; font-weight: 560; }
.operational-route-next small { display: block; margin-top: 2px; overflow: hidden; color: #9e958b; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.operational-route-empty-actions {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border-left: 1px solid rgba(255, 255, 255, .08);
}

.operational-route-empty-actions button + button {
  background: transparent;
  color: #e9ded1;
}

.inbox-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid rgba(69, 57, 47, 0.2);
  background: rgba(69, 57, 47, 0.16);
}

.today-metric {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 9px;
  border: 0;
  border-top: 2px solid transparent;
  border-radius: 0 !important;
  background: #f4eee6;
  color: var(--ink);
  text-align: left;
}

.today-metric:hover {
  background: #fffaf4;
}

.today-metric.is-active {
  border-top-color: var(--accent);
  background: #252a29;
  color: #fff7ee;
}

.today-metric span {
  overflow: hidden;
  color: #6a6158;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-metric.is-active span {
  color: #b9b0a5;
}

.today-metric strong {
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.inbox-owner-filter {
  min-width: 128px;
  border-color: rgba(69, 57, 47, 0.2);
  border-radius: 3px !important;
  background-color: #f7f1e9;
  color: var(--ink);
}

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

.inbox-column {
  align-content: start;
  gap: 7px;
  padding: 10px;
  border-color: rgba(255, 255, 255, 0.09);
  background: #292e2d;
}

.inbox-column-overdue {
  box-shadow: inset 2px 0 0 #a55f54;
}

.inbox-column-today {
  box-shadow: inset 2px 0 0 var(--accent);
}

.inbox-column-hot {
  box-shadow: inset 2px 0 0 #b89158;
}

.inbox-column-blocked {
  box-shadow: inset 2px 0 0 #b86f63;
}

.inbox-column-head {
  min-height: 24px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inbox-column-head strong {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.inbox-column-head small {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d4cbc0;
}

.inbox-column-list {
  gap: 5px;
}

.inbox-card {
  position: relative;
  gap: 3px;
  min-height: 64px;
  padding: 9px 10px 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px !important;
  background: rgba(255, 255, 255, 0.035);
}

.inbox-card::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 5px;
  width: 2px;
  background: #718280;
}

.inbox-card.inbox-danger::before {
  background: #b86f63;
}

.inbox-card.inbox-warn::before {
  background: var(--accent);
}

.inbox-card:hover {
  border-color: rgba(200, 130, 82, 0.35);
  background: rgba(255, 255, 255, 0.065);
}

.inbox-card-type {
  color: #9f968b;
  font-size: 8px;
  text-transform: uppercase;
}

.inbox-card strong {
  font-size: 11px;
  font-weight: 550;
}

.inbox-card small {
  overflow: hidden;
  color: #aaa197;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-clear-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 22px;
  border: 1px solid rgba(69, 57, 47, 0.18);
  background: #f4eee6;
  text-align: center;
}

.today-clear-state strong {
  color: var(--ink);
  font-size: 13px;
}

.today-clear-state span {
  color: var(--ink-soft);
  font-size: 10px;
}

@media (max-width: 1080px) {
  .operational-route-main,
  .operational-route-empty { grid-template-columns: 1fr; }
  .operational-route-next,
  .operational-route-empty-actions { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); }

  .inbox-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inbox-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .operational-route-current,
  .operational-route-empty > div:first-child,
  .operational-route-next,
  .operational-route-empty-actions { padding: 15px; }

  .inbox-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-metric {
    min-height: 46px;
    padding: 7px 8px;
  }

  .today-metric strong {
    font-size: 15px;
  }

  .inbox-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #inboxView .panel-title-inline {
    flex-wrap: nowrap;
  }

  #inboxView .panel-actions {
    flex: 0 0 auto;
  }

  .inbox-owner-filter {
    width: 112px;
    min-width: 112px;
  }
}

/* Contact master-detail workspace. Desktop stays in context; mobile keeps the full drawer. */
.database-results-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.database-results-shell.has-inspector {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.database-results-main {
  min-width: 0;
}

.database-inspector {
  position: sticky;
  top: 80px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 98px);
  padding: 11px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #292e2d;
  color: #f3ece3;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.database-inspector[hidden] {
  display: none !important;
}

.db-inspector-head,
.db-inspector-actions,
.db-inspector-primary-actions,
.db-inspector-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.db-inspector-head {
  align-items: start;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.db-inspector-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.db-inspector-head small {
  overflow: hidden;
  color: #9f968b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-inspector-head strong {
  color: #fff7ee;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.2;
}

.db-inspector-actions {
  align-items: start;
}

.db-inspector-actions .presence-row {
  flex: 1;
}

.db-inspector-actions .presence-dot {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eee5da;
}

.db-inspector-actions > .panel-action,
.db-inspector-primary-actions .panel-action,
.db-inspector-touch .panel-action,
.db-inspector-head .panel-action {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eee5da;
}

.db-inspector-form {
  display: grid;
  gap: 7px;
}

.db-inspector-form label {
  display: grid;
  gap: 3px;
}

.db-inspector-form label > span {
  color: #9f968b;
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
}

.db-inspector-form input,
.db-inspector-form select,
.db-inspector-form textarea,
.db-inspector-touch input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px !important;
  background: #f7f1e9;
  color: #26211d;
  font-size: 11px;
  box-shadow: none;
}

.db-inspector-form input,
.db-inspector-form select,
.db-inspector-touch input {
  height: 30px;
  padding: 0 8px;
}

.db-inspector-form textarea {
  min-height: 64px;
  padding: 7px 8px;
  resize: vertical;
}

.db-inspector-primary-actions {
  justify-content: stretch;
}

.db-inspector-primary-actions .panel-action {
  flex: 1;
}

.db-inspector-history {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.db-inspector-section-head strong {
  color: #eee6dc;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.db-inspector-section-head small {
  color: #9f968b;
  font-size: 9px;
}

.db-inspector-history-row {
  display: grid;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.db-inspector-history-row span {
  color: #ddd4ca;
  font-size: 10px;
  line-height: 1.35;
}

.db-inspector-history-row small {
  color: #8f887f;
  font-size: 8px;
}

.db-inspector-touch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 5px;
}

.database-table tr.is-selected td,
.db-card.is-selected,
.db-board-card.is-selected {
  background: rgba(200, 130, 82, 0.13);
}

.database-table tr.is-selected td:first-child {
  box-shadow: inset 2px 0 0 var(--accent);
}

@media (max-width: 1099px) {
  .database-results-shell,
  .database-results-shell.has-inspector {
    grid-template-columns: minmax(0, 1fr);
  }

  .database-inspector {
    display: none !important;
  }
}

/* Compact task actions: date and row commands always share one toolbar. */
.task-row {
  align-items: center;
}

.task-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: auto;
  min-width: 0;
}

.task-due {
  flex: 0 1 112px;
  width: 112px;
  min-width: 0;
  height: 28px;
  border-radius: 3px;
}

.task-controls .task-mini-action {
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  height: 28px;
}

@media (max-width: 720px) {
  .task-row {
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    padding: 8px;
  }

  .task-controls {
    grid-column: 2;
    display: flex;
    width: 100%;
    margin-top: 1px;
    justify-content: flex-start;
  }

  .task-due {
    flex: 1 1 104px;
    width: auto;
    max-width: 132px;
  }
}

/* Partner decisions: a compact management layer, not another dashboard card. */
.decisions-panel {
  padding: 10px 12px;
  border-color: rgba(200, 130, 82, 0.28);
  background: #e9dfd2;
}

.decisions-panel .panel-title {
  min-height: 28px;
  margin-bottom: 6px;
  padding-bottom: 6px;
}

.decision-list {
  display: grid;
  gap: 3px;
}

.decision-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.4fr) minmax(160px, 0.8fr) 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid rgba(74, 61, 50, 0.14);
  border-radius: 3px;
  background: rgba(255, 250, 244, 0.42);
  color: #27211c;
  text-align: left;
}

.decision-row:hover {
  border-color: rgba(200, 130, 82, 0.54);
  background: rgba(255, 250, 244, 0.68);
}

.decision-row.is-decided {
  opacity: 0.62;
}

.decision-status {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(139, 80, 48, 0.34);
  color: var(--accent-dark);
  font-size: 12px;
}

.decision-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.decision-copy strong {
  overflow: hidden;
  color: #27211c;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-copy small,
.decision-outcome {
  overflow: hidden;
  color: #665b52;
  font-size: 9px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-outcome {
  color: #443a32;
}

.decision-arrow {
  color: #9b6c4d;
  font-size: 18px;
  text-align: right;
}

.decision-brief {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 10px;
  border-left: 2px solid var(--accent);
  background: rgba(200, 130, 82, 0.09);
}

.decision-brief span {
  color: #8b5030;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.decision-brief strong {
  color: #312a24;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .decisions-panel {
    padding: 8px;
  }

  .decision-row {
    grid-template-columns: 22px minmax(0, 1fr) 12px;
    min-height: 46px;
    padding: 6px;
  }

  .decision-outcome {
    display: none;
  }

  .decision-copy strong {
    white-space: normal;
  }
}

/* Drawer refinement: fields read as one professional form, not nested cards. */
.drawer-grid {
  gap: 12px 10px;
}

.drawer-field {
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
}

.drawer-field span {
  color: #62564b;
  font-size: 9px;
  font-weight: 650;
}

.drawer-field input,
.drawer-field select {
  height: 34px;
  padding-inline: 9px;
}

.drawer-field textarea {
  min-height: 88px;
  padding: 9px;
}

.drawer-actions {
  position: static;
  margin-top: 2px;
  padding: 7px 0 0;
  border-top: 1px solid rgba(74, 61, 50, 0.12);
  background: transparent;
}

.drawer-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.drawer-body {
  min-height: 0;
  padding-right: 3px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.drawer-head > div {
  min-width: 0;
}

.drawer-close {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0 !important;
  border-radius: 4px !important;
  font-size: 22px;
  line-height: 1;
}

.drawer-save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  margin-top: 8px;
  color: #6b6056;
  font-size: 10px;
  font-weight: 550;
}

.drawer-save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b8178;
}

.drawer-save-status.is-dirty { color: #8b5030; }
.drawer-save-status.is-dirty .drawer-save-dot { background: #c57645; }
.drawer-save-status.is-saving .drawer-save-dot { background: #9b754f; animation: drawer-status-pulse 0.9s ease-in-out infinite; }
.drawer-save-status.is-saved { color: #426452; }
.drawer-save-status.is-saved .drawer-save-dot { background: #4f8062; }
.drawer-save-status.is-error { color: #914841; }
.drawer-save-status.is-error .drawer-save-dot { background: #b6574f; }

@keyframes drawer-status-pulse {
  50% { opacity: 0.35; }
}

.drawer-action-bar {
  align-items: center;
}

.drawer-actions-primary {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 4px;
  padding: 10px 0 2px;
  border-top-color: rgba(64, 53, 44, 0.2);
  background: linear-gradient(180deg, rgba(233, 223, 211, 0.72), #e9dfd3 30%);
}

.drawer-action-status {
  margin-right: auto;
  color: #74685d;
  font-size: 10px;
  white-space: nowrap;
}

.drawer-action-status.is-dirty { color: #8b5030; }
.drawer-action-status.is-saving { color: #9b754f; }
.drawer-action-status.is-saved { color: #426452; }

.drawer-primary-action {
  min-width: 112px;
  border-color: #252927 !important;
  background: #252927 !important;
  color: #f5ede4 !important;
}

.drawer-discard-bar {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(173, 93, 64, 0.34);
  background: #f1e4d8;
  box-shadow: 0 -10px 28px rgba(31, 26, 22, 0.12);
}

.drawer-discard-bar[hidden] { display: none; }

.drawer-discard-bar > div:first-child {
  display: grid;
  gap: 2px;
}

.drawer-discard-bar strong { color: #422f26; font-size: 12px; }
.drawer-discard-bar span { color: #756458; font-size: 10px; }

.drawer-discard-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .drawer-panel {
    gap: 10px;
    padding: 13px;
  }

  .drawer-grid {
    gap: 10px;
  }

  .drawer-actions {
    gap: 5px;
  }

  .drawer-panel {
    width: 100vw;
    padding: 12px;
  }

  .drawer-actions-primary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .drawer-action-status {
    grid-column: 1 / -1;
    margin: 0 0 2px;
  }

  .drawer-primary-action {
    min-height: 44px;
  }

  .drawer-discard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Project cockpit: one dense workspace, four intentional contexts. */
.project-section-nav {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  margin: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #202524;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.project-section-tab {
  min-width: 82px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 !important;
  background: transparent;
  color: #aaa39a;
  font-size: 10px;
  font-weight: 550;
}

.project-section-tab:last-child {
  border-right: 0;
}

.project-section-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #f1e9df;
}

.project-section-tab.is-active {
  background: #c88252;
  color: #1d1c1a;
}

/* Nik — songwriter demo vault */
.songwriter-view { display:block; }.songwriter-view[hidden]{display:none}.sw-shell{display:grid;gap:14px;color:#262421}.sw-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:25px;border-radius:22px;color:#f8f3ed;background:radial-gradient(circle at 82% 0%,rgba(255,111,121,.25),transparent 34%),linear-gradient(135deg,#201c2c,#33253b 56%,#171821);box-shadow:0 18px 45px rgba(17,14,25,.24)}.sw-hero p{margin:0 0 8px;color:#ff9ca4;font-size:9px;font-weight:900;letter-spacing:.13em}.sw-hero h2{margin:0;font-size:clamp(28px,4vw,43px);line-height:1;letter-spacing:-.045em}.sw-hero>div>span{display:block;max-width:670px;margin-top:12px;color:rgba(255,255,255,.65);font-size:11px;line-height:1.5}.sw-hero-stats{display:flex;gap:8px}.sw-hero-stats b{min-width:72px;padding:11px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:rgba(255,255,255,.06);font-size:18px}.sw-hero-stats small{display:block;margin-top:4px;color:rgba(255,255,255,.48);font-size:8px;font-weight:600}.sw-intake{display:grid;grid-template-columns:1.1fr 1fr .65fr 1fr auto;gap:9px;align-items:end;padding:14px;border:1px solid rgba(255,255,255,.1);border-radius:15px;color:#eee7df;background:#292e2d}.sw-intake>div{align-self:center}.sw-intake strong,.sw-intake small{display:block}.sw-intake strong{font-size:12px}.sw-intake small{margin-top:4px;color:#9faaa5;font-size:8px}.sw-intake label,.sw-form label,.sw-mini-fields label{display:grid;gap:5px}.sw-intake label>span,.sw-form label>span,.sw-mini-fields label>span{color:#a7aaa5;font-size:8px;font-weight:750}.sw-intake input,.sw-intake select,.sw-form input,.sw-form textarea,.sw-mini-fields input,.sw-mini-fields textarea,.sw-lifecycle select{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid rgba(255,255,255,.12);border-radius:8px;color:inherit;background:rgba(255,255,255,.05);font:inherit;font-size:10px}.sw-intake button,.sw-song-head button,.sw-next button,.sw-lyrics-actions button,.sw-add-row,.sw-upload-row label{padding:9px 12px;border:0;border-radius:9px;color:#2a1820;background:#ff9ba4;font:inherit;font-size:9px;font-weight:850;cursor:pointer}.sw-rail{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px}.sw-rail-card{min-width:205px;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:13px;color:#eee7df;background:#292e2d;text-align:left;cursor:pointer}.sw-rail-card.is-active{border-color:#f78d98;box-shadow:0 0 0 2px rgba(247,141,152,.12)}.sw-rail-card small,.sw-rail-card strong,.sw-rail-card span{display:block}.sw-rail-card small{color:#ad9ca4;font-size:8px}.sw-rail-card strong{margin-top:5px;font-size:12px}.sw-rail-card span{margin-top:4px;color:#9fa6a2;font-size:8px}.sw-rail-card>i{display:block;height:4px;margin-top:9px;overflow:hidden;border-radius:99px;background:rgba(255,255,255,.08)}.sw-rail-card>i b{display:block;height:100%;background:linear-gradient(90deg,#e67481,#ffb06f)}.sw-empty{padding:46px;border:1px dashed rgba(255,255,255,.14);border-radius:18px;color:#e9e1d7;text-align:center}.sw-empty p{color:#e78a96;font-size:9px;font-weight:850;letter-spacing:.12em}.sw-empty h2{margin:7px 0}.sw-empty span{color:#9ba39e;font-size:10px}.sw-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.sw-wide{grid-column:1/-1}.sw-panel{padding:17px;border:1px solid #ded9d0;border-radius:17px;background:#f8f6f2;box-shadow:0 10px 26px rgba(12,15,14,.08)}.sw-song-head{display:flex;align-items:center;justify-content:space-between;gap:15px}.sw-song-head p{margin:0 0 5px;color:#c95767;font-size:9px;font-weight:850;letter-spacing:.1em}.sw-song-head h2{margin:0;font-size:22px;letter-spacing:-.035em}.sw-song-head span{display:block;margin-top:5px;color:#77736e;font-size:9px}.sw-song-head>div:last-child{display:flex;gap:6px}.sw-song-head button{color:#43232a;background:#ffd0d4}.sw-song-head button.is-danger{color:#9f3d47;background:#f6e8e8}.sw-next{display:grid;grid-template-columns:minmax(0,1fr) auto 90px;gap:18px;align-items:center;padding:19px 21px;border:1px solid #ed9ba4;border-radius:18px;color:#f8f2ed;background:linear-gradient(120deg,#30202d,#3f2939)}.sw-next p{margin:0 0 7px;color:#ff9ca5;font-size:8px;font-weight:900;letter-spacing:.12em}.sw-next h3{margin:0;font-size:20px;letter-spacing:-.03em}.sw-next>div>span{display:block;margin-top:5px;color:rgba(255,255,255,.62);font-size:10px;line-height:1.4}.sw-next button{white-space:nowrap}.sw-ready{text-align:right}.sw-ready strong,.sw-ready small{display:block}.sw-ready strong{font-size:24px}.sw-ready small{margin-top:3px;color:rgba(255,255,255,.52);font-size:8px}.sw-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.sw-section-head h3{margin:0;font-size:15px;letter-spacing:-.02em}.sw-section-head p{margin:4px 0 0;color:#7c7872;font-size:9px}.sw-pill{padding:4px 7px;border-radius:99px;color:#9e4552;background:#f7e2e4;font-size:8px;font-weight:850}.sw-lifecycle>div:last-child{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.sw-lifecycle>div:last-child span{display:flex;align-items:center;gap:5px;padding:8px;border:1px solid #e3ded6;border-radius:8px;color:#8a857e;font-size:8px}.sw-lifecycle span i{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#ece8e1;font-style:normal;font-weight:800}.sw-lifecycle span.is-done{color:#8c3d49;border-color:#efb8bf;background:#fff1f2}.sw-lifecycle span.is-done i{color:#49232a;background:#ffadb6}.sw-lifecycle select{width:auto;color:#393632;background:#f1eee8}.sw-audio-drop{display:grid;place-items:center;min-height:112px;padding:15px;border:1px dashed #d47d89;border-radius:13px;background:#fff0f1;text-align:center;cursor:pointer}.sw-audio-drop input{display:none}.sw-audio-drop strong,.sw-audio-drop small{display:block}.sw-audio-drop small{margin-top:5px;color:#9b777b;font-size:8px}.sw-panel audio{width:100%;height:34px;margin-top:10px}.sw-audio-facts{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:9px}.sw-audio-facts span{padding:8px;border-radius:9px;color:#8c8780;background:#efede8;font-size:7px}.sw-audio-facts b{display:block;margin-bottom:3px;color:#3c3935;font-size:11px}.sw-upload-row{display:grid;grid-template-columns:1fr auto;gap:6px;margin-top:12px;padding-top:12px;border-top:1px solid #e7e1da}.sw-upload-row select{padding:9px;border:1px solid #ddd7cf;border-radius:9px;background:#f1eee8}.sw-upload-row label{display:grid;place-items:center}.sw-upload-row input{display:none}.sw-file-empty{padding:10px;border-radius:8px;color:#7e7973;background:#efede8;font-size:9px}.sw-files{display:grid;gap:6px;margin-top:9px}.sw-file{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px;border:1px solid #e3ded6;border-radius:9px}.sw-file>span{padding:3px 5px;border-radius:5px;color:#a04451;background:#f8e4e6;font-size:7px;font-weight:850}.sw-file strong,.sw-file small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sw-file strong{font-size:9px}.sw-file small{margin-top:2px;color:#8a857e;font-size:7px}.sw-file>div:last-child{display:flex;gap:4px}.sw-file a,.sw-file button{display:grid;place-items:center;width:25px;height:25px;border:0;border-radius:6px;color:#393632;background:#efede8;text-decoration:none;cursor:pointer}.sw-panel>textarea,.sw-form textarea,.sw-mini-fields textarea{width:100%;box-sizing:border-box;min-height:220px;padding:13px;border:1px solid #ddd7cf;border-radius:11px;color:#35322f;background:#fffdf9;font:inherit;font-size:11px;line-height:1.55;resize:vertical}.sw-lyrics-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}.sw-lyrics-actions small{color:#817c75;font-size:8px}.sw-lyrics-history{display:flex;gap:6px;margin-top:9px;overflow-x:auto}.sw-lyrics-history span{min-width:95px;padding:7px;border-radius:8px;background:#efede8}.sw-lyrics-history b,.sw-lyrics-history small{display:block}.sw-lyrics-history b{font-size:9px}.sw-lyrics-history small{margin-top:3px;color:#817c75;font-size:7px}.sw-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.sw-form .is-wide,.sw-mini-fields .is-wide{grid-column:1/-1}.sw-form input,.sw-form textarea,.sw-mini-fields input,.sw-mini-fields textarea{color:#35322f;background:#fffdf9;border-color:#ddd7cf}.sw-form textarea,.sw-mini-fields textarea{min-height:80px}.sw-rights-separation{display:grid;grid-template-columns:1fr 50px 1fr;gap:18px;align-items:center;background:linear-gradient(100deg,#fff3f4,#f5f3ee 50%,#eef2fa)}.sw-rights-separation>i{display:grid;place-items:center;width:43px;height:43px;border-radius:50%;color:#8b4c58;background:#fff;font-size:22px;font-style:normal}.sw-rights-separation>div>span{color:#a94b58;font-size:8px;font-weight:900;letter-spacing:.1em}.sw-rights-separation>div:last-child>span{color:#5572a1}.sw-rights-separation h3{margin:6px 0 4px;font-size:15px}.sw-rights-separation p{margin:0;color:#79746e;font-size:9px;line-height:1.4}.sw-split-total{padding:5px 8px;border-radius:8px;font-size:11px;font-weight:900}.sw-split-total.is-ok{color:#5d7623;background:#eaf1d7}.sw-split-total.is-bad{color:#a84643;background:#f5dfdd}.sw-splits{display:grid;gap:6px}.sw-split{display:grid;grid-template-columns:1.1fr 1fr .8fr .7fr 90px 28px;gap:5px}.sw-split input,.sw-split select{min-width:0;padding:8px;border:1px solid #ddd7cf;border-radius:7px;background:#fffdf9;font:inherit;font-size:8px}.sw-split label{display:grid;grid-template-columns:1fr auto;align-items:center}.sw-split label span{padding:0 6px;color:#777}.sw-split button{border:0;border-radius:7px;color:#a33d49;background:#f6e5e7;cursor:pointer}.sw-add-row{margin-top:8px;color:#8b3d49;background:#f7e1e4}.sw-mini-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #e4ded7}.sw-checks{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.sw-checks label{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start;padding:8px;border:1px solid #e2ddd5;border-radius:9px}.sw-checks input{margin-top:2px;accent-color:#d36575}.sw-checks b,.sw-checks small{display:block}.sw-checks b{font-size:9px}.sw-checks small{margin-top:2px;color:#8b857e;font-size:7px}.sw-checks label.is-done{opacity:.68;background:#eef2df}.sw-checks label.is-done b{text-decoration:line-through}
@media(max-width:1050px){.sw-intake{grid-template-columns:1fr 1fr}.sw-intake>div{grid-column:1/-1}.sw-lifecycle>div:last-child{grid-template-columns:repeat(4,1fr)}.sw-form{grid-template-columns:repeat(2,1fr)}.sw-split{grid-template-columns:1fr 1fr 1fr}.sw-split label,.sw-split button{min-height:32px}}
@media(max-width:800px){.sw-grid{grid-template-columns:1fr}.sw-wide{grid-column:auto}.sw-hero{align-items:flex-start;flex-direction:column}.sw-next{grid-template-columns:1fr}.sw-ready{text-align:left}.sw-lifecycle>div:last-child{grid-template-columns:repeat(2,1fr)}.sw-rights-separation{grid-template-columns:1fr}.sw-rights-separation>i{transform:rotate(90deg)}.sw-split{grid-template-columns:1fr 1fr}.sw-form,.sw-mini-fields{grid-template-columns:1fr}.sw-form .is-wide,.sw-mini-fields .is-wide{grid-column:auto}}
@media(max-width:520px){.sw-hero-stats{width:100%}.sw-hero-stats b{min-width:0;flex:1}.sw-intake{grid-template-columns:1fr}.sw-intake>div{grid-column:auto}.sw-song-head,.sw-section-head,.sw-lyrics-actions{align-items:flex-start;flex-direction:column}.sw-audio-facts,.sw-checks{grid-template-columns:1fr 1fr}.sw-upload-row,.sw-split{grid-template-columns:1fr}.sw-split button{width:100%}}

/* Void Room — production music release desk */
.vrl-view { display: block; }
.vrl-view[hidden] { display: none; }
.vrl-shell { display: grid; gap: 18px; }
.vrl-hero {
  position: relative; overflow: hidden; padding: 28px; border-radius: 26px;
  color: #f7f5ef; background:
    radial-gradient(circle at 85% 0%, rgba(205,255,97,.2), transparent 34%),
    linear-gradient(135deg, #171918 0%, #292d29 58%, #151715 100%);
  box-shadow: 0 20px 55px rgba(20,24,20,.16);
}
.vrl-hero::after { content:"VRL"; position:absolute; right:24px; bottom:-28px; font-size:112px; font-weight:800; letter-spacing:-.08em; color:rgba(255,255,255,.035); }
.vrl-hero-top,.vrl-section-head,.vrl-release-head,.vrl-inline-actions { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.vrl-kicker { margin:0 0 8px; color:#cfff69; font-size:11px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }
.vrl-hero h2 { margin:0; max-width:720px; font-size:clamp(28px,4vw,46px); line-height:.98; letter-spacing:-.045em; }
.vrl-hero-copy { max-width:690px; margin:14px 0 0; color:rgba(255,255,255,.67); line-height:1.55; }
.vrl-primary,.vrl-secondary,.vrl-icon-button { border:0; cursor:pointer; font:inherit; }
.vrl-primary { padding:11px 16px; border-radius:13px; color:#18200f; background:#cfff69; font-weight:800; }
.vrl-secondary { padding:10px 14px; border-radius:12px; color:inherit; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); }
.vrl-hero-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:25px; }
.vrl-hero-stat { padding:14px; border:1px solid rgba(255,255,255,.1); border-radius:15px; background:rgba(255,255,255,.055); backdrop-filter:blur(10px); }
.vrl-hero-stat span { display:block; color:rgba(255,255,255,.48); font-size:11px; }
.vrl-hero-stat strong { display:block; margin-top:6px; font-size:20px; }
.vrl-preflight { padding:22px; border:1px solid var(--line,#ddd); border-radius:24px; background:linear-gradient(145deg,rgba(207,255,105,.055),transparent 42%),var(--panel,#fff); }
.vrl-preflight-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; }
.vrl-preflight-head h2 { margin:0; font-size:25px; letter-spacing:-.035em; }.vrl-preflight-head p:not(.vrl-kicker) { margin:6px 0 0; color:var(--muted,#777); font-size:12px; }
.vrl-preflight-head .vrl-score { flex:none; width:82px; height:82px; }.vrl-preflight-head .vrl-score strong { font-size:18px; }
.vrl-preflight-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }.vrl-preflight-grid > .vrl-panel { box-shadow:none; }
.vrl-foundation-list { display:grid; gap:7px; }
.vrl-foundation { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:start; padding:10px 11px; border:1px solid var(--line,#ddd); border-radius:11px; cursor:pointer; }
.vrl-foundation input { margin-top:3px; accent-color:#9abb48; }.vrl-foundation strong,.vrl-foundation small { display:block; }.vrl-foundation strong { font-size:11px; line-height:1.3; }.vrl-foundation small { margin-top:3px; color:var(--muted,#777); font-size:9px; }.vrl-foundation.is-done { opacity:.68; background:rgba(190,224,104,.08); }
.vrl-platform-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.vrl-platform { display:grid; grid-template-columns:minmax(0,1fr) 120px auto; gap:10px; align-items:center; padding:11px 12px; border:1px solid var(--line,#ddd); border-radius:12px; }
.vrl-platform strong,.vrl-platform small { display:block; }.vrl-platform strong { font-size:11px; }.vrl-platform small { margin-top:3px; color:var(--muted,#777); font-size:9px; line-height:1.3; }.vrl-platform select { min-width:0; padding:8px; border:1px solid var(--line,#ddd); border-radius:9px; background:var(--surface,#f5f5f3); color:inherit; font:inherit; font-size:10px; }.vrl-platform a { color:#78942f; font-size:10px; font-weight:800; text-decoration:none; white-space:nowrap; }
.vrl-kit-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.vrl-kit-card { display:grid; grid-template-columns:auto 1fr; gap:5px 9px; align-items:start; padding:13px; border:1px solid var(--line,#ddd); border-radius:13px; color:inherit; text-decoration:none; transition:.18s ease; }.vrl-kit-card:hover { transform:translateY(-2px); border-color:#a9c45d; }.vrl-kit-card span { grid-row:1 / 4; padding:5px 7px; border-radius:7px; color:#6d852b; background:rgba(190,224,104,.14); font-size:9px; font-weight:900; }.vrl-kit-card strong,.vrl-kit-card small,.vrl-kit-card b { display:block; }.vrl-kit-card strong { font-size:11px; }.vrl-kit-card small { color:var(--muted,#777); font-size:9px; line-height:1.35; }.vrl-kit-card b { color:#76902f; font-size:9px; }
.vrl-dryrun { background:linear-gradient(115deg,rgba(116,154,255,.08),transparent 52%),var(--panel,#fff); }
.vrl-dryrun-empty { display:flex; justify-content:space-between; gap:15px; padding:13px; border:1px dashed var(--line,#ddd); border-radius:12px; }.vrl-dryrun-empty strong { font-size:11px; }.vrl-dryrun-empty span { color:var(--muted,#777); font-size:10px; }
.vrl-dryrun-report { display:grid; grid-template-columns:minmax(220px,.65fr) 1.35fr; gap:14px; padding:14px; border:1px solid var(--line,#ddd); border-radius:13px; }.vrl-dryrun-report.is-passed { border-color:#a4c354; background:rgba(190,224,104,.08); }.vrl-dryrun-report.is-failed { border-color:#cf786b; background:rgba(207,95,80,.07); }.vrl-dryrun-report > div:first-child span,.vrl-dryrun-report > div:first-child strong,.vrl-dryrun-report > div:first-child small { display:block; }.vrl-dryrun-report > div:first-child span { color:#78932f; font-size:9px; font-weight:900; letter-spacing:.1em; }.vrl-dryrun-report > div:first-child strong { margin-top:5px; font-size:13px; }.vrl-dryrun-report > div:first-child small { margin-top:5px; color:var(--muted,#777); font-size:9px; }
.vrl-dryrun-tests { display:flex; flex-wrap:wrap; gap:6px; align-content:start; }.vrl-dryrun-tests span { padding:6px 8px; border-radius:8px; background:var(--surface,#f5f5f3); font-size:9px; }.vrl-dryrun-tests span small { display:block; margin-top:2px; color:var(--muted,#777); font-size:8px; }.vrl-dryrun-tests .is-pass { color:#688424; }.vrl-dryrun-tests .is-fail { color:#b55347; }
.vrl-intake { background:linear-gradient(115deg,rgba(207,255,105,.11),transparent 50%),var(--panel,#fff); }
.vrl-intake-grid { display:grid; grid-template-columns:1.2fr 1fr .8fr .8fr auto; gap:10px; align-items:end; }.vrl-intake-grid .vrl-primary { min-height:40px; white-space:nowrap; }
.vrl-intake-warning,.vrl-intake-ready { margin:12px 0 0; padding:10px 12px; border-radius:10px; font-size:10px; }.vrl-intake-warning { color:#a56b20; background:rgba(218,163,69,.11); }.vrl-intake-ready { color:#688424; background:rgba(190,224,104,.12); }
.vrl-release-rail { display:flex; gap:10px; overflow-x:auto; padding:2px 2px 7px; }
.vrl-release-card { min-width:210px; padding:14px; text-align:left; border:1px solid var(--line, #ddd); border-radius:16px; background:var(--panel, #fff); color:inherit; cursor:pointer; }
.vrl-release-card.is-active { border-color:#9ebd4a; box-shadow:0 0 0 2px rgba(181,222,81,.17); }
.vrl-release-card small,.vrl-muted { color:var(--muted, #777); }
.vrl-release-card strong { display:block; margin:5px 0; }
.vrl-progress { height:7px; overflow:hidden; border-radius:99px; background:rgba(120,130,120,.13); }
.vrl-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#99b747,#cfff69); }
.vrl-empty { padding:48px; text-align:center; border:1px dashed var(--line, #ddd); border-radius:22px; }
.vrl-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr); gap:16px; }
.vrl-panel { padding:20px; border:1px solid var(--line, #ddd); border-radius:20px; background:var(--panel, #fff); }
.vrl-panel-wide { grid-column:1 / -1; }
.vrl-operator { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr); gap:0; overflow:hidden; border:1px solid #9db65c; border-radius:22px; background:var(--panel,#fff); box-shadow:0 15px 34px rgba(47,57,34,.09); }
.vrl-operator.is-urgent { border-color:#d79b45; }
.vrl-operator-now { padding:23px; background:linear-gradient(135deg,rgba(207,255,105,.17),transparent 70%); }
.vrl-operator.is-urgent .vrl-operator-now { background:linear-gradient(135deg,rgba(226,165,70,.18),transparent 70%); }
.vrl-operator-label { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#6d852b; font-size:9px; font-weight:900; letter-spacing:.11em; }
.vrl-operator-label b { padding:5px 8px; border-radius:8px; background:rgba(121,151,47,.12); font-size:10px; letter-spacing:0; }
.vrl-operator-now h3 { margin:13px 0 6px; font-size:24px; letter-spacing:-.035em; }
.vrl-operator-now p { max-width:670px; margin:0 0 18px; color:var(--muted,#777); font-size:12px; line-height:1.55; }
.vrl-operator .vrl-secondary { color:inherit; text-decoration:none; }
.vrl-operator-queue { display:grid; align-content:start; gap:7px; padding:20px; border-left:1px solid var(--line,#ddd); }
.vrl-operator-queue>span { margin-bottom:3px; color:var(--muted,#777); font-size:9px; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.vrl-operator-queue button { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:start; width:100%; padding:9px; border:0; border-radius:11px; color:inherit; background:transparent; text-align:left; cursor:pointer; }
.vrl-operator-queue button:hover { background:var(--surface,#f5f5f3); }
.vrl-operator-queue i { display:grid; place-items:center; width:23px; height:23px; border-radius:50%; color:#607722; background:rgba(190,224,104,.18); font-size:9px; font-style:normal; font-weight:900; }
.vrl-operator-queue strong,.vrl-operator-queue small { display:block; }.vrl-operator-queue strong { font-size:11px; }.vrl-operator-queue small { margin-top:3px; color:var(--muted,#777); font-size:9px; line-height:1.35; }
.vrl-guardrail { grid-column:1 / -1; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:11px; align-items:center; padding:11px 16px; border-top:1px solid rgba(215,155,69,.28); background:rgba(226,165,70,.08); }
.vrl-guardrail strong { color:#9a651d; font-size:10px; }.vrl-guardrail span { color:var(--muted,#777); font-size:9px; line-height:1.4; }.vrl-guardrail a { color:#8a6528; font-size:9px; font-weight:850; text-decoration:none; white-space:nowrap; }
.vrl-command { overflow:hidden; padding:0; background:linear-gradient(145deg,rgba(207,255,105,.07),transparent 38%),var(--panel,#fff); }
.vrl-command-head { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:22px 23px 18px; }
.vrl-command-head .vrl-kicker { color:#71892e; }.vrl-command-head h3 { margin:0; font-size:24px; letter-spacing:-.035em; }.vrl-command-head p:not(.vrl-kicker) { margin:6px 0 0; color:var(--muted,#777); font-size:11px; }
.vrl-command-score { flex:none; text-align:right; }.vrl-command-score strong,.vrl-command-score span { display:block; }.vrl-command-score strong { font-size:28px; letter-spacing:-.04em; }.vrl-command-score span { margin-top:2px; color:var(--muted,#777); font-size:9px; text-transform:uppercase; letter-spacing:.08em; }
.vrl-stage-map { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-top:1px solid var(--line,#ddd); border-bottom:1px solid var(--line,#ddd); }
.vrl-stage { display:grid; grid-template-columns:1fr auto; gap:8px; padding:13px 15px; border:0; border-right:1px solid var(--line,#ddd); color:inherit; background:rgba(120,130,120,.025); text-align:left; cursor:pointer; }.vrl-stage:last-child { border-right:0; }.vrl-stage:hover { background:rgba(190,224,104,.08); }.vrl-stage span { color:var(--muted,#777); font-size:10px; font-weight:750; }.vrl-stage strong { font-size:11px; }.vrl-stage>i { grid-column:1 / -1; height:4px; overflow:hidden; border-radius:99px; background:rgba(120,130,120,.12); }.vrl-stage>i b { display:block; height:100%; border-radius:inherit; background:#d4a04a; }.vrl-stage.is-progress>i b { background:#b2ca69; }.vrl-stage.is-ready>i b { background:#91b83d; }
.vrl-command-body { display:grid; grid-template-columns:minmax(240px,.68fr) minmax(0,1.32fr); }
.vrl-command-blockers { display:grid; align-content:start; gap:7px; padding:18px; border-right:1px solid var(--line,#ddd); }.vrl-command-blockers>span,.vrl-manifest-head>span { color:#9b6d28; font-size:9px; font-weight:900; letter-spacing:.11em; }.vrl-command-blockers button { display:grid; grid-template-columns:23px 1fr; gap:9px; align-items:start; padding:8px; border:0; border-radius:10px; color:inherit; background:rgba(218,163,69,.07); text-align:left; cursor:pointer; }.vrl-command-blockers button:hover { background:rgba(218,163,69,.14); }.vrl-command-blockers button i { display:grid; place-items:center; width:21px; height:21px; border-radius:7px; color:#9f681c; background:rgba(218,163,69,.18); font-size:10px; font-style:normal; font-weight:900; }.vrl-command-blockers button span { padding-top:3px; font-size:10px; line-height:1.35; }
.vrl-clear { display:grid; grid-template-columns:30px 1fr; gap:10px; align-items:center; padding:12px; border-radius:12px; background:rgba(190,224,104,.1); }.vrl-clear>i { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:#31420f; background:#cfff69; font-style:normal; font-weight:900; }.vrl-clear strong,.vrl-clear small { display:block; }.vrl-clear strong { font-size:11px; }.vrl-clear small { margin-top:3px; color:var(--muted,#777); font-size:9px; }
.vrl-manifest { padding:18px; }.vrl-manifest-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }.vrl-manifest-head>span { color:#71892e; }.vrl-manifest-head small { color:var(--muted,#777); font-size:9px; }
.vrl-manifest-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }.vrl-manifest-item { display:grid; grid-template-columns:27px minmax(0,1fr); gap:9px; align-items:start; min-width:0; padding:10px; border:1px solid var(--line,#ddd); border-radius:12px; color:inherit; background:transparent; text-align:left; cursor:pointer; }.vrl-manifest-item:hover { border-color:#a9be70; }.vrl-manifest-item>i { display:grid; place-items:center; width:25px; height:25px; border-radius:8px; color:#7c8280; background:var(--surface,#f5f5f3); font-size:11px; font-style:normal; font-weight:900; }.vrl-manifest-item strong,.vrl-manifest-item small,.vrl-manifest-item em { display:block; overflow:hidden; text-overflow:ellipsis; }.vrl-manifest-item strong { font-size:10px; }.vrl-manifest-item small { margin-top:3px; color:var(--muted,#777); font-size:8px; line-height:1.3; white-space:nowrap; }.vrl-manifest-item em { width:max-content; max-width:100%; margin-top:6px; padding:3px 6px; border-radius:6px; color:#787d76; background:var(--surface,#f5f5f3); font-size:8px; font-style:normal; font-weight:800; }.vrl-manifest-item.is-ready { border-color:rgba(145,184,61,.48); background:rgba(190,224,104,.055); }.vrl-manifest-item.is-ready>i { color:#3e5511; background:#cfff69; }.vrl-manifest-item.is-ready em { color:#617b22; background:rgba(190,224,104,.16); }.vrl-manifest-item.is-partial { border-color:rgba(218,163,69,.42); }.vrl-manifest-item.is-partial>i { color:#98651f; background:rgba(218,163,69,.15); }.vrl-manifest-item.is-partial em { color:#936522; background:rgba(218,163,69,.12); }
.vrl-section-head { margin-bottom:16px; }
.vrl-section-head h3 { margin:0; font-size:17px; letter-spacing:-.02em; }
.vrl-section-head p { margin:4px 0 0; font-size:12px; color:var(--muted, #777); }
.vrl-readiness { display:grid; grid-template-columns:112px 1fr; gap:20px; align-items:center; }
.vrl-score { width:104px; height:104px; display:grid; place-items:center; border-radius:50%; background:conic-gradient(#b7db5a var(--score),rgba(120,130,120,.12) 0); position:relative; }
.vrl-score::before { content:""; position:absolute; inset:9px; border-radius:50%; background:var(--panel,#fff); }
.vrl-score strong { position:relative; font-size:24px; }
.vrl-blockers { display:grid; gap:8px; }
.vrl-blocker { display:flex; gap:9px; align-items:flex-start; font-size:13px; }
.vrl-dot { width:8px; height:8px; flex:none; margin-top:5px; border-radius:50%; background:#e2a546; }
.vrl-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.vrl-field { display:grid; gap:6px; font-size:11px; color:var(--muted,#777); }
.vrl-field-wide { grid-column:1 / -1; }
.vrl-field input,.vrl-field select,.vrl-field textarea { width:100%; box-sizing:border-box; padding:11px 12px; border:1px solid var(--line,#ddd); border-radius:11px; background:var(--surface,#fafafa); color:inherit; font:inherit; font-size:13px; }
.vrl-field textarea { min-height:82px; resize:vertical; }
.vrl-copilot { margin-bottom:16px; overflow:hidden; border:1px solid #a5ba6d; border-radius:17px; background:linear-gradient(135deg,rgba(207,255,105,.11),transparent 55%),var(--surface,#f7f7f5); }
.vrl-copilot-main { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:16px 17px 12px; }.vrl-copilot-main .vrl-kicker { margin-bottom:5px; color:#71892e; font-size:9px; }.vrl-copilot-main h4 { margin:0; font-size:17px; letter-spacing:-.025em; }.vrl-copilot-main p:not(.vrl-kicker) { max-width:660px; margin:5px 0 0; color:var(--muted,#777); font-size:10px; line-height:1.45; }
.vrl-copilot-score { flex:none; text-align:right; }.vrl-copilot-score strong,.vrl-copilot-score span { display:block; }.vrl-copilot-score strong { font-size:23px; }.vrl-copilot-score span { color:var(--muted,#777); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.vrl-copilot-signals { display:grid; grid-template-columns:repeat(3,1fr); border-top:1px solid var(--line,#ddd); border-bottom:1px solid var(--line,#ddd); }.vrl-copilot-signals>span { display:grid; grid-template-columns:auto 1fr; gap:2px 7px; padding:10px 12px; border-right:1px solid var(--line,#ddd); }.vrl-copilot-signals>span:last-child { border-right:0; }.vrl-copilot-signals i { grid-row:1 / 3; display:grid; place-items:center; width:19px; height:19px; border-radius:6px; color:#8e682d; background:rgba(218,163,69,.13); font-size:9px; font-style:normal; font-weight:900; }.vrl-copilot-signals .is-ready i { color:#52691d; background:rgba(190,224,104,.22); }.vrl-copilot-signals b { font-size:9px; }.vrl-copilot-signals small { color:var(--muted,#777); font-size:8px; }
.vrl-copilot-actions { display:flex; align-items:center; flex-wrap:wrap; gap:7px; padding:12px 16px; }.vrl-copilot-actions .vrl-secondary { color:inherit; background:var(--panel,#fff); border-color:var(--line,#ddd); }.vrl-copilot-actions>small { margin-left:auto; color:var(--muted,#777); font-size:9px; }
.vrl-drop { display:grid; place-items:center; min-height:145px; padding:18px; border:1px dashed #9aae6b; border-radius:16px; background:rgba(190,224,104,.07); text-align:center; cursor:pointer; }
.vrl-drop input { display:none; }
.vrl-drop strong { display:block; }
.vrl-drop small { display:block; margin-top:7px; color:var(--muted,#777); }
.vrl-audio { width:100%; margin-top:12px; height:36px; }
.vrl-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
.vrl-metric { padding:10px; border-radius:12px; background:var(--surface,#f5f5f3); }
.vrl-metric span { display:block; font-size:10px; color:var(--muted,#777); }
.vrl-metric strong { display:block; margin-top:4px; font-size:13px; }
.vrl-metric.is-pass strong { color:#6d8e21; }.vrl-metric.is-fail strong { color:#c45f50; }
.vrl-review { background:linear-gradient(140deg,rgba(98,126,198,.07),transparent 45%),var(--panel,#fff); }.vrl-review .vrl-section-head { align-items:flex-start; }.vrl-review .vrl-kicker { margin-bottom:5px; color:#7183bd; font-size:9px; }
.vrl-review-total { flex:none; min-width:92px; padding:10px 12px; border-radius:12px; text-align:right; }.vrl-review-total strong,.vrl-review-total span { display:block; }.vrl-review-total strong { font-size:20px; }.vrl-review-total span { margin-top:2px; font-size:8px; font-weight:850; letter-spacing:.06em; text-transform:uppercase; }.vrl-review-total.is-open { color:#9b681f; background:rgba(218,163,69,.12); }.vrl-review-total.is-ready { color:#607a20; background:rgba(190,224,104,.14); }
.vrl-review-toolbar { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:10px; padding:9px 10px; border:1px solid var(--line,#ddd); border-radius:11px; background:var(--surface,#f6f6f4); }.vrl-review-toolbar>div { display:flex; flex-wrap:wrap; gap:12px; }.vrl-review-toolbar span { display:flex; align-items:center; gap:5px; color:var(--muted,#777); font-size:9px; }.vrl-review-toolbar i { width:7px; height:7px; border-radius:50%; background:#b8bbb4; }.vrl-review-toolbar i.is-auto { background:#728bd1; }.vrl-review-toolbar i.is-human { background:#94b83f; }.vrl-review-toolbar .vrl-secondary { padding:7px 10px; color:inherit; background:var(--panel,#fff); border-color:var(--line,#ddd); font-size:9px; }
.vrl-review-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }.vrl-review-item { display:grid; grid-template-columns:minmax(0,1fr) 150px; gap:8px 12px; align-items:center; padding:11px 12px; border:1px solid var(--line,#ddd); border-radius:12px; background:var(--panel,#fff); }.vrl-review-item.is-gate:not(.is-done) { border-color:rgba(218,163,69,.48); box-shadow:inset 3px 0 #d9a247; }.vrl-review-item.is-done { border-color:rgba(151,181,78,.37); }.vrl-review-item strong,.vrl-review-item small { display:block; }.vrl-review-item strong { font-size:10px; }.vrl-review-item strong b { margin-left:4px; padding:2px 4px; border-radius:4px; color:#9d681d; background:rgba(218,163,69,.13); font-size:7px; }.vrl-review-item small { margin-top:3px; color:var(--muted,#777); font-size:8px; line-height:1.3; }.vrl-review-item select { min-width:0; padding:8px 9px; border:1px solid var(--line,#ddd); border-radius:9px; color:inherit; background:var(--surface,#f7f7f5); font:inherit; font-size:9px; }.vrl-review-item em { grid-column:2; width:max-content; padding:3px 6px; border-radius:6px; color:#777; background:var(--surface,#f5f5f3); font-size:7px; font-style:normal; font-weight:800; }.vrl-review-item em.is-audio,.vrl-review-item em.is-context { color:#6175af; background:rgba(105,130,195,.11); }.vrl-review-item em.is-operator { color:#607a20; background:rgba(190,224,104,.15); }
.vrl-phase-list,.vrl-route-list,.vrl-version-list,.vrl-content-list { display:grid; gap:9px; }
.vrl-calendar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; }
.vrl-calendar-item { display:grid; grid-template-columns:auto 62px minmax(0,1fr); gap:10px; align-items:start; min-height:105px; padding:13px; border:1px solid var(--line,#ddd); border-radius:14px; background:var(--panel,#fff); transition:.18s ease; }
.vrl-calendar-item select { grid-column:2 / -1; width:100%; padding:7px 9px; border:1px solid var(--line,#ddd); border-radius:9px; background:var(--surface,#f5f5f3); color:inherit; font:inherit; font-size:10px; }
.vrl-calendar-check input { position:absolute; opacity:0; pointer-events:none; }.vrl-calendar-check span { width:23px; height:23px; display:grid; place-items:center; border:1px solid #9ca589; border-radius:7px; color:#24300e; background:var(--surface,#f5f5f3); cursor:pointer; font-size:11px; font-weight:900; }
.vrl-calendar-date strong,.vrl-calendar-date small,.vrl-calendar-copy strong,.vrl-calendar-copy small { display:block; }
.vrl-calendar-date strong { color:#76902f; font-size:11px; }.vrl-calendar-date small { margin-top:4px; color:var(--muted,#777); font-size:9px; line-height:1.25; }
.vrl-calendar-copy strong { font-size:11px; line-height:1.25; }.vrl-calendar-copy small { margin-top:5px; color:var(--muted,#777); font-size:9px; line-height:1.35; }
.vrl-calendar-item.is-done { opacity:.62; background:rgba(190,224,104,.08); }.vrl-calendar-item.is-done .vrl-calendar-check span { border-color:#9aba4b; background:#cfff69; }.vrl-calendar-item.is-done .vrl-calendar-copy strong { text-decoration:line-through; }
.vrl-calendar-item.is-overdue { border-color:rgba(199,82,69,.55); box-shadow:inset 3px 0 #c75d4e; }.vrl-calendar-item.is-today { border-color:#d5a044; box-shadow:inset 3px 0 #d5a044; }
.vrl-calendar-item.is-focused { animation:vrlFocus 1.8s ease; }
@keyframes vrlFocus { 0%,100%{box-shadow:inherit} 35%{box-shadow:0 0 0 4px rgba(207,255,105,.34)} }
.vrl-phase { border:1px solid var(--line,#ddd); border-radius:14px; overflow:hidden; }
.vrl-phase-head { display:flex; align-items:center; justify-content:space-between; padding:12px 13px; background:var(--surface,#f7f7f5); }
.vrl-phase-head strong { font-size:13px; }.vrl-phase-head small { color:var(--muted,#777); }
.vrl-check { display:flex; gap:10px; align-items:flex-start; padding:10px 13px; border-top:1px solid var(--line,#eee); font-size:12px; }
.vrl-check input { margin-top:2px; accent-color:#91b33c; }
.vrl-check.is-done span { color:var(--muted,#777); text-decoration:line-through; }
.vrl-route { display:grid; grid-template-columns:1.2fr .75fr .65fr auto; gap:10px; align-items:center; padding:11px 12px; border:1px solid var(--line,#ddd); border-radius:13px; }
.vrl-route strong,.vrl-route small { display:block; }.vrl-route small { color:var(--muted,#777); font-size:10px; }
.vrl-pill { width:max-content; padding:4px 8px; border-radius:99px; font-size:10px; font-weight:700; background:rgba(190,224,104,.15); color:#667d26; }
.vrl-version { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line,#eee); }
.vrl-version:last-child { border-bottom:0; }.vrl-version input { accent-color:#91b33c; }
.vrl-vault-upload { display:grid; grid-template-columns:1fr auto; gap:8px; margin-top:16px; padding-top:16px; border-top:1px solid var(--line,#eee); }
.vrl-vault-upload select { min-width:0; padding:10px 11px; border:1px solid var(--line,#ddd); border-radius:11px; background:var(--surface,#f5f5f3); color:inherit; font:inherit; }
.vrl-vault-upload .vrl-primary { display:grid; place-items:center; padding:10px 13px; cursor:pointer; }
.vrl-file-list { display:grid; gap:7px; margin-top:12px; }
.vrl-file-empty { margin:0; padding:12px; border-radius:11px; background:var(--surface,#f5f5f3); font-size:11px; }
.vrl-file { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:center; padding:9px 10px; border:1px solid var(--line,#ddd); border-radius:11px; }
.vrl-file-kind { padding:4px 6px; border-radius:7px; background:rgba(190,224,104,.14); color:#71862f; font-size:9px; font-weight:800; text-transform:uppercase; }
.vrl-file strong,.vrl-file small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.vrl-file strong{font-size:11px}.vrl-file small{margin-top:3px;color:var(--muted,#777);font-size:9px}
.vrl-file-actions { display:flex; gap:5px; }.vrl-file-actions a,.vrl-file-actions button { width:28px; height:28px; display:grid; place-items:center; border:0; border-radius:8px; background:var(--surface,#f5f5f3); color:inherit; text-decoration:none; cursor:pointer; }
.vrl-version code { font-size:10px; color:var(--muted,#777); }
.vrl-content { display:grid; grid-template-columns:54px 1fr auto; gap:12px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line,#eee); }
.vrl-day { font-size:11px; font-weight:800; color:#718b2d; }.vrl-content strong { display:block; font-size:12px; }.vrl-content small { color:var(--muted,#777); font-size:10px; }
.vrl-danger { color:#b75347; background:rgba(200,80,70,.08); }
@media (max-width:1100px) { .vrl-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}.vrl-intake-grid{grid-template-columns:1fr 1fr}.vrl-platform-grid{grid-template-columns:1fr}.vrl-kit-grid{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:900px) { .vrl-grid{grid-template-columns:1fr}.vrl-panel-wide{grid-column:auto}.vrl-hero-stats{grid-template-columns:repeat(2,1fr)}.vrl-operator{grid-template-columns:1fr}.vrl-operator-queue{border-left:0;border-top:1px solid var(--line,#ddd)}.vrl-guardrail{grid-column:auto}.vrl-command-body{grid-template-columns:1fr}.vrl-command-blockers{border-right:0;border-bottom:1px solid var(--line,#ddd)}.vrl-manifest-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.vrl-review-grid{grid-template-columns:1fr} }
@media (max-width:900px) { .system-command-main{grid-template-columns:1fr}.system-next{border-right:0;border-bottom:1px solid rgba(255,255,255,.08)}.system-project-pulse{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:900px) { .vrl-preflight-grid{grid-template-columns:1fr}.vrl-preflight-grid>.vrl-panel-wide{grid-column:auto} }
@media (max-width:600px) { .vrl-hero{padding:21px}.vrl-hero-top,.vrl-release-head,.vrl-preflight-head{align-items:flex-start;flex-direction:column}.vrl-inline-actions{flex-wrap:wrap}.vrl-form-grid,.vrl-metrics{grid-template-columns:1fr 1fr}.vrl-route{grid-template-columns:1fr auto}.vrl-route > :nth-child(2){display:none}.vrl-readiness{grid-template-columns:1fr}.vrl-score{margin:auto}.vrl-vault-upload{grid-template-columns:1fr}.vrl-file{grid-template-columns:auto minmax(0,1fr)}.vrl-file-actions{grid-column:2}.vrl-calendar,.vrl-intake-grid,.vrl-kit-grid,.vrl-dryrun-report{grid-template-columns:1fr}.vrl-platform{grid-template-columns:1fr}.vrl-preflight{padding:15px}.vrl-dryrun-empty{flex-direction:column}.vrl-operator-now,.vrl-operator-queue{padding:16px}.vrl-operator-now h3{font-size:20px}.vrl-guardrail{grid-template-columns:1fr}.vrl-guardrail a{white-space:normal}.vrl-command-head{align-items:flex-start;padding:18px;flex-direction:column}.vrl-command-score{text-align:left}.vrl-stage-map{grid-template-columns:1fr 1fr}.vrl-stage{border-bottom:1px solid var(--line,#ddd)}.vrl-manifest-grid{grid-template-columns:1fr}.vrl-manifest-head{align-items:flex-start;flex-direction:column}.vrl-copilot-main{align-items:flex-start;flex-direction:column}.vrl-copilot-score{text-align:left}.vrl-copilot-signals{grid-template-columns:1fr}.vrl-copilot-signals>span{border-right:0;border-bottom:1px solid var(--line,#ddd)}.vrl-copilot-signals>span:last-child{border-bottom:0}.vrl-copilot-actions>small{width:100%;margin-left:0}.vrl-review .vrl-section-head,.vrl-review-toolbar{align-items:flex-start;flex-direction:column}.vrl-review-item{grid-template-columns:1fr}.vrl-review-item em{grid-column:1}.vrl-review-item select{width:100%} }
@media (max-width:600px) { .system-command-head{align-items:flex-start;flex-direction:column}.system-health-flags{justify-content:flex-start}.system-project-pulse{grid-template-columns:1fr}.system-pulse-head{align-items:flex-start;flex-direction:column} }

@media (max-width: 720px) {
  .project-section-nav {
    top: 0;
    width: 100%;
    margin-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .project-section-nav::-webkit-scrollbar {
    display: none;
  }

  .project-section-tab {
    flex: 1 0 auto;
    min-width: 76px;
    height: 30px;
    padding-inline: 9px;
  }
}
/* Command Center visual system — shared across every project */
:root {
  --cmd-bg: #202523;
  --cmd-panel: #292e2d;
  --cmd-panel-raised: #303635;
  --cmd-line: rgba(255, 255, 255, .09);
  --cmd-line-strong: rgba(255, 255, 255, .16);
  --cmd-text: #f3ece4;
  --cmd-muted: #9da6a1;
  --cmd-copper: #c98254;
  --cmd-lime: #cfff69;
  --cmd-rose: #ff9ba4;
}

/* The same operational surfaces outside the specialist workspaces. */
.overview-card,
.focus-card,
.agenda-item,
.timeline-card,
.inbox-column,
.automation-card,
.automation-item,
.user-card,
.role-card,
.setting-card,
.audit-card,
.audit-item,
.database-hero,
.database-results-shell {
  border-color: var(--cmd-line);
  border-radius: 10px;
  color: var(--cmd-text);
  background-color: var(--cmd-panel);
  box-shadow: none;
}

.overview-card input,
.overview-card select,
.overview-card textarea,
.focus-card input,
.focus-card select,
.focus-card textarea,
.agenda-item input,
.agenda-item select,
.agenda-item textarea,
.inbox-column input,
.inbox-column select,
.inbox-column textarea,
.automation-card input,
.automation-card select,
.automation-card textarea,
.database-results-shell input,
.database-results-shell select,
.database-results-shell textarea {
  border-color: var(--cmd-line);
  border-radius: 7px;
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
}

/* Void Room — Command Center grammar with a lime release signal. */
.vrl-shell {
  --panel: var(--cmd-panel);
  --surface: var(--cmd-panel-raised);
  --line: var(--cmd-line);
  --muted: var(--cmd-muted);
  color: var(--cmd-text);
}

.vrl-hero,
.vrl-preflight,
.vrl-panel,
.vrl-operator,
.vrl-release-card,
.vrl-calendar-item,
.vrl-review-item {
  border-color: var(--cmd-line);
  border-radius: 10px;
  color: var(--cmd-text);
  background-color: var(--cmd-panel);
  box-shadow: none;
}

.vrl-hero {
  background: radial-gradient(circle at 83% 0%, rgba(207, 255, 105, .15), transparent 34%), linear-gradient(135deg, #202523, #2c332f);
}

.vrl-panel,
.vrl-intake,
.vrl-command,
.vrl-review {
  background-image: linear-gradient(135deg, rgba(207, 255, 105, .035), transparent 42%);
}

.vrl-preflight,
.vrl-operator,
.vrl-copilot,
.vrl-drop,
.vrl-empty,
.vrl-phase,
.vrl-route,
.vrl-file,
.vrl-manifest-item,
.vrl-calendar-item,
.vrl-review-toolbar,
.vrl-review-item {
  border-radius: 9px;
}

.vrl-field input,
.vrl-field select,
.vrl-field textarea,
.vrl-review-item select,
.vrl-calendar-item select,
.vrl-vault-upload select {
  border-color: var(--cmd-line);
  border-radius: 7px;
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
}

.vrl-score::before,
.vrl-copilot-actions .vrl-secondary,
.vrl-review-toolbar .vrl-secondary {
  background: var(--cmd-panel);
}

.vrl-phase-head,
.vrl-metric,
.vrl-file-empty,
.vrl-file-actions a,
.vrl-file-actions button,
.vrl-operator-queue button:hover,
.vrl-manifest-item > i,
.vrl-manifest-item em,
.vrl-dryrun-tests span {
  color: var(--cmd-text);
  background: var(--cmd-panel-raised);
}

.vrl-section-head h3,
.vrl-command-head h3,
.vrl-release-head h2 {
  color: var(--cmd-text);
}

.vrl-kicker,
.vrl-operator-label,
.vrl-command-head .vrl-kicker,
.vrl-manifest-head > span,
.vrl-day,
.vrl-calendar-date strong {
  color: var(--cmd-lime);
}

/* Nik / Songwriter Vault — same system, rose authorship signal. */
.sw-shell {
  color: var(--cmd-text);
}

.sw-hero,
.sw-panel,
.sw-next,
.sw-intake,
.sw-rail-card,
.sw-empty {
  border-color: var(--cmd-line);
  border-radius: 10px;
  color: var(--cmd-text);
  background-color: var(--cmd-panel);
  box-shadow: none;
}

.sw-hero {
  background: radial-gradient(circle at 82% 0%, rgba(255, 155, 164, .19), transparent 34%), linear-gradient(135deg, #202523, #32262f);
}

.sw-panel {
  background-image: linear-gradient(135deg, rgba(255, 155, 164, .03), transparent 38%);
}

.sw-next {
  background: linear-gradient(120deg, #292e2d, #382b34);
}

.sw-intake input,
.sw-intake select,
.sw-form input,
.sw-form textarea,
.sw-mini-fields input,
.sw-mini-fields textarea,
.sw-panel > textarea,
.sw-lifecycle select,
.sw-upload-row select,
.sw-split input,
.sw-split select {
  border-color: var(--cmd-line);
  border-radius: 7px;
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
}

.sw-section-head p,
.sw-song-head span,
.sw-lyrics-actions small,
.sw-file small,
.sw-checks small,
.sw-rights-separation p {
  color: var(--cmd-muted);
}

.sw-lifecycle > div:last-child span,
.sw-checks label,
.sw-file,
.sw-audio-drop {
  border-color: var(--cmd-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
}

.sw-lifecycle span i,
.sw-audio-facts span,
.sw-file-empty,
.sw-file a,
.sw-file button,
.sw-lyrics-history span {
  color: var(--cmd-text);
  background: var(--cmd-panel-raised);
}

.sw-audio-facts b {
  color: var(--cmd-text);
}

.sw-rights-separation {
  background: linear-gradient(100deg, rgba(255, 155, 164, .08), rgba(255, 255, 255, .02) 50%, rgba(107, 139, 205, .08));
}

.sw-rights-separation > i {
  color: var(--cmd-rose);
  background: var(--cmd-panel-raised);
}

.sw-mini-fields,
.sw-upload-row {
  border-color: var(--cmd-line);
}

.sw-pill,
.sw-file > span,
.sw-add-row {
  color: #ffc5ca;
  background: rgba(255, 155, 164, .13);
}

@media (max-width: 600px) {
  .vrl-hero,
  .vrl-panel,
  .vrl-preflight,
  .sw-hero,
  .sw-panel,
  .sw-next,
  .sw-intake {
    border-radius: 8px;
  }
}

/* CN Lab: a dense product portfolio, intentionally separate from business projects. */
.startups-view[hidden] { display: none; }
.startups-view { color: var(--cmd-text); }
.startup-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 24px;
  border: 1px solid var(--cmd-line);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(201, 130, 84, .16), transparent 42%), #232826;
}
.startup-command-copy p,
.startup-section-head p,
.startup-portfolio-footer span {
  margin: 0 0 7px;
  color: var(--cmd-copper);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}
.startup-command h2 { margin: 0; max-width: 720px; font-size: 27px; line-height: 1.08; font-weight: 600; }
.startup-command-copy > span { display: block; max-width: 720px; margin-top: 10px; color: var(--cmd-muted); font-size: 12px; line-height: 1.55; }
.startup-command-metrics { display: grid; grid-template-columns: repeat(3, auto); border: 1px solid var(--cmd-line); }
.startup-command-metrics span { min-width: 94px; padding: 12px; border-right: 1px solid var(--cmd-line); color: var(--cmd-muted); font-size: 9px; }
.startup-command-metrics span:last-child { border-right: 0; }
.startup-command-metrics strong { display: block; margin-bottom: 3px; color: var(--cmd-text); font-size: 20px; font-weight: 600; }
.startup-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 22px 0 10px; }
.startup-section-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.startup-section-head small { color: var(--cmd-muted); font-size: 9px; }
.startup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.startup-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: 270px; overflow: hidden; border: 1px solid var(--cmd-line); border-radius: 9px; background: var(--cmd-panel); }
.startup-preview { position: relative; min-height: 100%; overflow: hidden; background: #171b1a; }
.startup-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 46%, rgba(10, 12, 12, .82)); pointer-events: none; }
.startup-preview img { width: 100%; height: 100%; min-height: 270px; object-fit: cover; display: block; }
.startup-stage,
.startup-version { position: absolute; z-index: 1; left: 10px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.18); color: #fff; background: rgba(20,23,22,.76); backdrop-filter: blur(9px); font-size: 8px; font-weight: 650; }
.startup-stage { top: 10px; }
.startup-version { bottom: 10px; }
.startup-card-body { display: flex; flex-direction: column; min-width: 0; padding: 16px; }
.startup-card-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.startup-card-title small { color: var(--cmd-copper); font-size: 8px; }
.startup-card-title h3 { margin: 4px 0 0; font-size: 18px; font-weight: 600; }
.startup-card-title time { color: var(--cmd-muted); font-size: 8px; white-space: nowrap; }
.startup-card-body > p { margin: 11px 0; color: #c9cfcb; font-size: 10px; line-height: 1.55; }
.startup-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.startup-tags span { padding: 4px 6px; border: 1px solid var(--cmd-line); color: var(--cmd-muted); font-size: 7px; }
.startup-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 12px; }
.startup-progress i { display: block; height: 3px; overflow: hidden; background: rgba(255,255,255,.08); }
.startup-progress b { display: block; height: 100%; background: var(--cmd-copper); }
.startup-progress span { color: var(--cmd-muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.startup-next { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--cmd-line); }
.startup-next span,
.startup-next strong { display: block; }
.startup-next span { color: var(--cmd-copper); font-size: 7px; font-weight: 700; text-transform: uppercase; }
.startup-next strong { margin-top: 4px; color: #dfe3df; font-size: 9px; line-height: 1.4; font-weight: 500; }
.startup-action { min-height: 36px; margin-top: auto; padding: 8px 10px; border: 1px solid var(--cmd-line-strong); border-radius: 6px; color: var(--cmd-text); background: transparent; font-size: 9px; text-align: left; }
.startup-action:hover { border-color: rgba(201,130,84,.62); background: rgba(201,130,84,.08); }
.startup-card-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; gap: 5px; margin-top: auto; padding-top: 12px; }
.startup-card-actions :is(a, button) { display: inline-flex; align-items: center; min-width: 0; min-height: 34px; padding: 0 10px; border: 1px solid var(--cmd-line-strong); border-radius: 4px; color: var(--cmd-text); background: transparent; font-size: 9px; font-weight: 550; text-decoration: none; }
.startup-card-actions :is(a, button):hover { border-color: rgba(201,130,84,.62); background: rgba(201,130,84,.08); }
.startup-open { justify-content: space-between; background: rgba(201,130,84,.1) !important; }
.startup-open span { color: var(--cmd-copper); font-size: 12px; }
.startup-details { justify-content: center; }
.startup-add-task { justify-content: center; padding: 0 !important; color: var(--cmd-copper) !important; font-size: 17px !important; }
.startup-property-primary-link { position: relative; display: grid; gap: 4px; padding: 14px 42px 14px 14px; border: 1px solid rgba(201,130,84,.34); border-radius: 5px; color: #f2e8de; background: #252a28; text-decoration: none; }
.startup-property-primary-link span { color: #c98254; font-size: 9px; font-weight: 650; text-transform: uppercase; }
.startup-property-primary-link strong { overflow: hidden; font-size: 13px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.startup-property-primary-link i { position: absolute; top: 50%; right: 15px; color: #c98254; font-size: 18px; font-style: normal; transform: translateY(-50%); }
.startup-property-section { border-top: 1px solid rgba(74,61,50,.16); }
.startup-property-head { display: flex; align-items: center; justify-content: space-between; min-height: 34px; color: #5c5046; }
.startup-property-head span { font-size: 9px; font-weight: 700; text-transform: uppercase; }
.startup-property-head small { font-size: 9px; font-variant-numeric: tabular-nums; }
.startup-property-list { display: grid; border: 1px solid rgba(74,61,50,.14); border-bottom: 0; }
.startup-property-row { display: grid; grid-template-columns: 128px minmax(0,1fr); align-items: start; gap: 12px; min-height: 38px; padding: 9px 10px; border-bottom: 1px solid rgba(74,61,50,.14); }
.startup-property-row > span { color: #77695d; font-size: 9px; line-height: 1.45; }
.startup-property-row :is(strong,a) { min-width: 0; color: #29231e; font-size: 10px; font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.startup-property-row a { color: #8d5131; text-decoration: none; }
.startup-property-row i { font-style: normal; }
.startup-property-next { display: grid; gap: 4px; padding: 11px 12px; border-left: 2px solid #c98254; background: rgba(201,130,84,.08); }
.startup-property-next span { color: #8d5131; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.startup-property-next strong { color: #342b25; font-size: 11px; font-weight: 550; line-height: 1.45; }
.startup-property-actions { border-top: 0; padding-top: 0; }
.startup-property-actions .panel-action { min-height: 38px; border-radius: 4px !important; text-decoration: none; }
.startup-portfolio-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 10px; padding: 14px 16px; border: 1px solid var(--cmd-line); border-radius: 8px; background: #252a28; }
.startup-portfolio-footer strong { display: block; font-size: 11px; font-weight: 500; }
.startup-portfolio-footer button { min-height: 38px; padding: 8px 12px; border: 1px solid var(--cmd-line-strong); border-radius: 6px; color: var(--cmd-text); background: transparent; font-size: 9px; }

/* Adaptive application shell: stable sidebar on desktop, five destinations on mobile. */
@media (max-width: 980px) {
  .app-shell { display: block; }
  .workspace { padding: 12px 12px calc(160px + env(safe-area-inset-bottom)); }
  .sidebar { position: fixed; z-index: 90; top: auto; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); left: 8px; display: block; padding: 5px; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; background: rgba(28,33,32,.94); box-shadow: 0 12px 32px rgba(0,0,0,.3); backdrop-filter: blur(16px); }
  .sidebar .brand,
  .sidebar-footer { display: none; }
  .sidebar-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .nav-item { display: flex; min-width: 0; min-height: 52px; align-items: center; justify-content: center; gap: 5px; padding: 6px 3px; border: 0; border-radius: 7px; background: transparent; text-align: center; }
  .nav-item[data-route="users"] { display: none; }
  .nav-item .nav-copy small { display: none; }
  .nav-item .nav-copy strong { display: block; overflow: hidden; font-size: 9px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  .nav-icon { font-size: 14px; }
  .nav-item.is-active { background: rgba(201,130,84,.16); }
  .topbar { align-items: center; }
  .startup-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .startup-command { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .startup-command h2 { font-size: 23px; }
  .startup-command-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .startup-command-metrics span { min-width: 0; padding: 9px; }
  .startup-command-metrics strong { font-size: 16px; }
  .startup-section-head { align-items: start; flex-direction: column; gap: 4px; }
  .startup-card { grid-template-columns: 116px minmax(0, 1fr); min-height: 304px; }
  .startup-preview img { min-height: 304px; }
  .startup-card-body { padding: 13px; }
  .startup-card-title { flex-direction: column; gap: 4px; }
  .startup-card-title h3 { font-size: 16px; }
  .startup-tags span:nth-child(n+4) { display: none; }
  .startup-property-row { grid-template-columns: 104px minmax(0,1fr); gap: 8px; padding-inline: 8px; }
  .startup-portfolio-footer { align-items: stretch; flex-direction: column; }
}

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


/* Core project workspaces share the same graphite operational canvas. */
.system-command-center,
.panel,
.goal,
.task-row,
.request-column,
.resource-row,
.passport-row,
.news-item,
.news-empty,
.database-toolbar,
.ai-command {
  border-color: var(--cmd-line);
  color: var(--cmd-text);
  background-color: var(--cmd-panel);
  box-shadow: none;
}

.panel,
.goal,
.task-row,
.request-column,
.resource-row,
.passport-row,
.news-item,
.news-empty,
.database-toolbar,
.ai-command {
  border-radius: 7px;
}

.panel input,
.panel select,
.panel textarea,
.task-row input,
.task-row select,
.request-column input,
.request-column select,
.database-toolbar input,
.database-toolbar select,
.ai-command input,
.ai-command textarea {
  border-color: var(--cmd-line);
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
}

.panel .muted,
.task-row small,
.request-column small,
.resource-row small,
.passport-row small,
.news-item small {
  color: var(--cmd-muted);
}

/* Unified workspace contract v2: contrast, density and typography. */
.workspace {
  color: var(--cmd-text);
}

.workspace :is(
  .panel,
  .goal,
  .task-row,
  .request-card,
  .request-column,
  .resource-row,
  .passport-row,
  .news-item,
  .news-empty,
  .history-item,
  .database-toolbar,
  .database-table-wrap,
  .db-board-column,
  .db-card,
  .db-board-card,
  .drawer-info-card,
  .drawer-field,
  .drawer-related-card,
  .automation-rule-card,
  .automation-item
) {
  border-color: var(--cmd-line);
  color: var(--cmd-text);
  background-color: var(--cmd-panel);
  box-shadow: none;
}

.workspace :is(
  .task-row,
  .request-card,
  .request-column,
  .resource-row,
  .passport-row,
  .history-item,
  .db-card,
  .db-board-card,
  .drawer-info-card,
  .drawer-field,
  .drawer-related-card,
  .automation-rule-card,
  .automation-item
) {
  background-image: none;
  background-color: var(--cmd-panel-raised);
}

.workspace :is(
  .panel,
  .goal,
  .task-row,
  .request-card,
  .request-column,
  .resource-row,
  .passport-row,
  .news-item,
  .news-empty,
  .history-item,
  .database-toolbar,
  .database-table-wrap,
  .db-board-column,
  .db-card,
  .db-board-card
) :is(h1, h2, h3, h4, strong) {
  color: var(--cmd-text);
}

.workspace :is(
  .panel,
  .goal,
  .task-row,
  .request-card,
  .request-column,
  .resource-row,
  .passport-row,
  .news-item,
  .news-empty,
  .history-item,
  .database-toolbar,
  .database-table-wrap,
  .db-board-column,
  .db-card,
  .db-board-card
) :is(p, small) {
  color: var(--cmd-muted);
}

.workspace .panel-title {
  border-bottom-color: var(--cmd-line);
}

.workspace .panel-title h2,
.workspace .panel-title-stack h2,
.workspace .row-link,
.workspace .task-open-card,
.workspace .db-board-head strong {
  color: var(--cmd-text);
}

.workspace :is(.task-meta, .meta-line, .task-due-label, .db-board-head small) {
  color: var(--cmd-muted);
}

.workspace .panel-title > span,
.workspace .panel-title-stack > span {
  color: #e4a276;
  background: rgba(201, 130, 84, .14);
}

.workspace :is(
  .panel-action,
  .quick-view-chip,
  .dataset-tab,
  .template-chip,
  .presence-dot,
  .quick-action-link,
  .mode-chip
) {
  border-color: var(--cmd-line);
  color: #d8d0c7;
  background: rgba(255, 255, 255, .055);
}

.workspace :is(
  .panel-action,
  .quick-view-chip,
  .dataset-tab,
  .template-chip,
  .presence-dot,
  .quick-action-link,
  .mode-chip
):hover {
  border-color: rgba(201, 130, 84, .5);
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .09);
}

.workspace :is(.quick-view-chip, .dataset-tab, .mode-chip).is-active {
  border-color: var(--cmd-copper);
  color: #1d1c1a;
  background: var(--cmd-copper);
}

.workspace :is(.task-due, input, select, textarea) {
  border-color: var(--cmd-line);
  color: var(--cmd-text);
  background-color: rgba(255, 255, 255, .045);
}

.workspace :is(input, textarea)::placeholder {
  color: #7f8984;
}

/* Specialist workspaces now use the same compact header rhythm. */
.vrl-shell,
.sw-shell {
  gap: 10px;
}

.vrl-hero,
.sw-hero {
  padding: 16px 18px;
  border-left-width: 3px;
  border-left-style: solid;
  border-radius: 7px;
  box-shadow: none;
}

.vrl-hero {
  border-left-color: var(--cmd-lime);
  background: linear-gradient(110deg, rgba(207, 255, 105, .065), transparent 48%), var(--cmd-panel);
}

.sw-hero {
  border-left-color: var(--cmd-rose);
  background: linear-gradient(110deg, rgba(255, 155, 164, .07), transparent 48%), var(--cmd-panel);
}

.vrl-hero::after {
  right: 18px;
  bottom: -12px;
  font-size: 58px;
}

.vrl-hero h2,
.sw-hero h2 {
  max-width: 720px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
}

.vrl-hero-copy,
.sw-hero > div > span {
  max-width: 700px;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.45;
}

.vrl-kicker,
.sw-hero p {
  margin-bottom: 6px;
  font-size: 9px;
}

.vrl-hero-stats {
  gap: 6px;
  margin-top: 13px;
}

.vrl-hero-stat,
.sw-hero-stats b {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .04);
}

.vrl-hero-stat span,
.sw-hero-stats small {
  font-size: 8px;
}

.vrl-hero-stat strong,
.sw-hero-stats b {
  font-size: 16px;
}

.vrl-preflight {
  padding: 14px;
}

.vrl-preflight-head {
  margin-bottom: 12px;
}

.vrl-preflight-head h2,
.vrl-command-head h3,
.vrl-operator-now h3,
.sw-empty h2 {
  font-size: 17px;
  line-height: 1.2;
}

.vrl-preflight-head p:not(.vrl-kicker) {
  font-size: 10px;
}

.vrl-preflight-head .vrl-score {
  width: 60px;
  height: 60px;
}

.vrl-preflight-head .vrl-score strong {
  font-size: 14px;
}

.vrl-panel,
.sw-panel {
  padding: 14px;
}

.vrl-section-head h3,
.sw-section-head h3 {
  font-size: 14px;
}

.sw-empty {
  padding: 26px;
}

@media (max-width: 600px) {
  .vrl-hero,
  .sw-hero {
    padding: 14px;
  }

  .vrl-hero h2,
  .sw-hero h2 {
    font-size: 20px;
  }

  .vrl-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Unified brand contract v3: one accent for the whole operating system. */
:root {
  --cmd-accent: #c98254;
  --cmd-lime: #c98254;
  --cmd-rose: #c98254;
}

/* Generic project sections, including Structure and Media, never inherit ink colors. */
#projectView :is(h1, h2, h3, h4, strong, .row-link, .resource-link) {
  color: var(--cmd-text);
}

#projectView :is(
  .focus,
  .subhead,
  .news-meta,
  .news-rules-label,
  .signal-list p,
  .activity-list p,
  .resource-row small,
  .resource-details p,
  .panel-empty,
  .audit-list p,
  .rule-list span
) {
  color: var(--cmd-muted);
}

#projectView :is(.passport-row, .audit-list p, .news-history, .chips span, .status-pill) {
  border-color: var(--cmd-line);
  background-image: none;
  background-color: var(--cmd-panel-raised);
  box-shadow: none;
}

#projectView .chips span {
  color: #d8d0c7;
}

#projectView :is(.passport-fold summary, .resource-details summary) {
  color: #e4a276;
}

#projectView .news-rules-subtle,
#projectView .passport-fold {
  border-color: var(--cmd-line);
}

#projectView .resource-archived :is(strong, small, .resource-link) {
  color: #7f8984;
}

/* Void Room uses the same copper controls as every other project. */
.vrl-hero {
  border-left-color: var(--cmd-accent);
  background: linear-gradient(110deg, rgba(201, 130, 84, .07), transparent 48%), var(--cmd-panel);
}

.vrl-primary,
.vrl-clear > i,
.vrl-calendar-item.is-done .vrl-calendar-check span,
.vrl-manifest-item.is-ready > i {
  color: #1d1c1a;
  background: var(--cmd-accent);
}

.vrl-kicker,
.vrl-operator-label,
.vrl-command-head .vrl-kicker,
.vrl-manifest-head > span,
.vrl-day,
.vrl-calendar-date strong,
.vrl-platform a,
.vrl-kit-card b,
.vrl-file-kind {
  color: #e4a276;
}

.vrl-score {
  background: conic-gradient(var(--cmd-accent) var(--score), rgba(255, 255, 255, .1) 0);
}

.vrl-progress i,
.vrl-stage.is-progress > i b,
.vrl-stage.is-ready > i b {
  background: var(--cmd-accent);
}

.vrl-release-card.is-active,
.vrl-copilot,
.vrl-drop {
  border-color: rgba(201, 130, 84, .55);
}

.vrl-manifest-item.is-ready,
.vrl-calendar-item.is-done,
.vrl-clear,
.vrl-foundation.is-done {
  border-color: rgba(201, 130, 84, .35);
  background-color: rgba(201, 130, 84, .08);
}

/* Songwriter Vault is a catalog, not a song generator. */
.sw-hero {
  border-left-color: var(--cmd-accent);
  background: linear-gradient(110deg, rgba(201, 130, 84, .07), transparent 48%), var(--cmd-panel);
}

.sw-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sw-hero-actions > button,
.sw-intake button,
.sw-song-head button,
.sw-next button,
.sw-lyrics-actions button,
.sw-add-row,
.sw-upload-row label {
  border: 0;
  color: #1d1c1a;
  background: var(--cmd-accent);
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.sw-catalog {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--cmd-line);
  border-radius: 7px;
  color: var(--cmd-text);
  background: var(--cmd-panel);
}

.sw-catalog p,
.sw-catalog h3,
.sw-catalog span {
  margin: 0;
}

.sw-catalog p {
  color: #e4a276;
  font-size: 8px;
  font-weight: 850;
}

.sw-catalog h3 {
  margin-top: 4px;
  font-size: 14px;
}

.sw-catalog > div > span {
  display: block;
  margin-top: 4px;
  color: var(--cmd-muted);
  font-size: 9px;
}

.sw-rail-card.is-active,
.sw-audio-drop {
  border-color: rgba(201, 130, 84, .58);
  box-shadow: 0 0 0 2px rgba(201, 130, 84, .1);
}

.sw-rail-card > i b {
  background: var(--cmd-accent);
}

.sw-rail-card em {
  display: block;
  margin-top: 7px;
  color: #e4a276;
  font-size: 8px;
  font-style: normal;
}

.sw-player-empty {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--cmd-line);
  color: var(--cmd-text);
  background: var(--cmd-panel-raised);
}

.sw-player-empty small {
  color: var(--cmd-muted);
  font-size: 8px;
}

.sw-pill,
.sw-file > span,
.sw-add-row {
  color: #e8b18b;
  background: rgba(201, 130, 84, .14);
}

.sw-song-head p,
.sw-rights-separation > div > span,
.sw-rights-separation > div:last-child > span,
.sw-hero p {
  color: #e4a276;
}

.sw-lifecycle span.is-done {
  border-color: rgba(201, 130, 84, .45);
  color: #e4a276;
  background: rgba(201, 130, 84, .08);
}

.sw-lifecycle span.is-done i {
  color: #1d1c1a;
  background: var(--cmd-accent);
}

@media (max-width: 800px) {
  .sw-hero-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Application authentication */
body.auth-pending .app-shell,
body.auth-required .app-shell {
  visibility: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--cmd-text);
  background: radial-gradient(circle at 72% 12%, rgba(201, 130, 84, .12), transparent 30%), var(--cmd-bg);
}

.auth-card {
  width: min(100%, 390px);
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--cmd-line);
  border-left: 3px solid var(--cmd-accent);
  border-radius: 7px;
  background: var(--cmd-panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}

.auth-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #1d1c1a;
  background: var(--cmd-accent);
  font-size: 11px;
  font-weight: 850;
}

.auth-card p,
.auth-card h1,
.auth-card h2,
.auth-card > span {
  margin: 0;
}

.auth-card p {
  color: #e4a276;
  font-size: 8px;
  font-weight: 850;
}

.auth-card h1,
.auth-card h2 {
  font-size: 22px;
  line-height: 1.15;
}

.auth-card > span {
  color: var(--cmd-muted);
  font-size: 10px;
  line-height: 1.45;
}

.auth-card label {
  display: grid;
  gap: 5px;
}

.auth-card label b {
  color: var(--cmd-muted);
  font-size: 8px;
}

.auth-card input {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 0 11px;
  border: 1px solid var(--cmd-line);
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
}

.auth-card button {
  min-height: 38px;
  border: 0;
  color: #1d1c1a;
  background: var(--cmd-accent);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.auth-card button:disabled {
  opacity: .6;
  cursor: wait;
}

.auth-error {
  min-height: 14px;
  color: #eaa39b;
  font-size: 9px;
}

.auth-dialog {
  background: rgba(18, 22, 22, .88);
}

.auth-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.auth-dialog-actions button:first-child {
  border: 1px solid var(--cmd-line);
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
}

.sidebar-auth-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.sidebar-auth-actions button {
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, .08);
  color: #9dA6a1;
  background: rgba(255, 255, 255, .035);
  font: inherit;
  font-size: 8px;
  cursor: pointer;
}

/* Shared Media Center */
.media-library-view {
  display: grid;
  gap: 10px;
  color: var(--cmd-text);
}

.media-library-view[hidden] {
  display: none;
}

.media-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid var(--cmd-line);
  border-left: 3px solid var(--cmd-accent);
  border-radius: 7px;
  background: linear-gradient(110deg, rgba(201, 130, 84, .07), transparent 48%), var(--cmd-panel);
}

.media-command p,
.media-command h2,
.media-command span {
  margin: 0;
}

.media-command p {
  color: #e4a276;
  font-size: 9px;
  font-weight: 850;
}

.media-command h2 {
  margin-top: 5px;
  color: var(--cmd-text);
  font-size: 22px;
  line-height: 1.15;
}

.media-command > div > span {
  display: block;
  margin-top: 6px;
  color: var(--cmd-muted);
  font-size: 10px;
}

.media-summary {
  display: flex;
  gap: 6px;
}

.media-summary b {
  min-width: 76px;
  padding: 8px 10px;
  border: 1px solid var(--cmd-line);
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .04);
  font-size: 16px;
}

.media-summary small {
  display: block;
  margin-top: 3px;
  color: var(--cmd-muted);
  font-size: 8px;
  font-weight: 500;
}

.media-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) repeat(3, minmax(130px, .65fr));
  gap: 8px;
  padding: 12px;
}

.media-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--cmd-muted);
  font-size: 8px;
}

.media-toolbar :is(input, select) {
  width: 100%;
  height: 32px;
  border: 1px solid var(--cmd-line);
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
}

.media-upload-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, .5fr) auto;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--cmd-line);
}

.media-upload-button {
  display: grid !important;
  place-items: center;
  min-width: 110px;
  color: #1d1c1a !important;
  background: var(--cmd-accent);
  font-weight: 850;
  cursor: pointer;
}

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

.media-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--cmd-line);
  border-radius: 7px;
  color: var(--cmd-text);
  background: var(--cmd-panel);
}

.media-card-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.media-card.is-playable .media-card-main {
  cursor: pointer;
}

.media-kind-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #1d1c1a;
  background: var(--cmd-accent);
  font-size: 12px;
}

.media-card-copy {
  min-width: 0;
}

.media-card-copy :is(small, strong, em) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card-copy small,
.media-card-copy em {
  color: var(--cmd-muted);
  font-size: 8px;
  font-style: normal;
}

.media-card-copy strong {
  margin: 4px 0;
  color: var(--cmd-text);
  font-size: 11px;
}

.media-card-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.media-card-actions :is(button, a, span) {
  min-height: 27px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--cmd-line);
  color: #d8d0c7;
  background: rgba(255, 255, 255, .045);
  font: inherit;
  font-size: 8px;
  text-decoration: none;
}

.media-card-actions button {
  cursor: pointer;
}

.media-card-actions .is-danger {
  color: #eaa39b;
}

.media-now-playing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(201, 130, 84, .52);
  border-radius: 7px;
  color: var(--cmd-text);
  background: var(--cmd-panel);
}

.media-now-playing[hidden] {
  display: none;
}

.media-now-playing p,
.media-now-playing h3,
.media-now-playing span {
  margin: 0;
}

.media-now-playing p {
  color: #e4a276;
  font-size: 8px;
  font-weight: 850;
}

.media-now-playing h3 {
  margin-top: 4px;
  font-size: 15px;
}

.media-now-playing span {
  display: block;
  margin-top: 4px;
  color: var(--cmd-muted);
  font-size: 9px;
}

.media-now-playing > button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--cmd-line);
  color: var(--cmd-text);
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
}

.media-now-playing :is(audio, video, img) {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 420px;
}

.media-tech {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--cmd-line);
}

.media-tech :is(span, b) {
  margin: 0;
  padding: 4px 7px;
  color: #d8d0c7;
  background: rgba(255, 255, 255, .045);
  font-size: 8px;
}

.media-tech b {
  color: #eaa39b;
}

.media-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  padding: 34px;
  border: 1px dashed var(--cmd-line);
  color: var(--cmd-text);
  background: var(--cmd-panel);
  text-align: center;
}

.media-empty span {
  color: var(--cmd-muted);
  font-size: 9px;
}

@media (max-width: 1080px) {
  .sidebar-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

  .memory-list {
    max-height: none;
  }
}

@media (max-width: 800px) {
  .workspace-sync-pill {
    align-self: stretch;
    max-width: none;
    width: 100%;
    text-align: center;
  }

  .overview-memory-panel {
    margin-bottom: 8px;
  }

  .overview-memory-grid {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .overview-memory-grid .memory-column {
    flex: 0 0 min(318px, 86vw);
    scroll-snap-align: start;
  }

  .memory-column-head {
    padding: 7px 8px;
  }

  .memory-row {
    padding: 8px;
  }

  .memory-row em {
    min-width: 54px;
  }

  .memory-row strong,
  .memory-row small {
    white-space: normal;
  }

  .media-command {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-toolbar,
  .media-library-grid {
    grid-template-columns: 1fr;
  }

  .media-upload-controls {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .media-card {
    grid-template-columns: 1fr;
  }

  .media-card-actions {
    flex-wrap: wrap;
  }
}

/* CN OS Interface Contract v3
   Final authority for shared geometry, color, typography and interaction states. */
:root {
  color-scheme: dark;
  --ui-canvas: #1d2221;
  --ui-canvas-deep: #171b1a;
  --ui-surface: #272c2a;
  --ui-surface-raised: #303634;
  --ui-surface-active: #383e3b;
  --ui-line: rgba(255, 255, 255, .105);
  --ui-line-strong: rgba(255, 255, 255, .19);
  --ui-text: #f2ebe3;
  --ui-text-soft: #c8c0b7;
  --ui-muted: #9ca49f;
  --ui-accent: #ca8457;
  --ui-accent-soft: rgba(202, 132, 87, .13);
  --ui-success: #83b99a;
  --ui-warning: #e0a16e;
  --ui-danger: #e58f8c;
  --ui-focus: rgba(225, 160, 111, .72);
  --ui-control-radius: 4px;
  --ui-panel-radius: 6px;
  --ui-sheet-radius: 8px;
  --ui-shadow-sheet: -18px 0 46px rgba(0, 0, 0, .34);
}

body {
  color: var(--ui-text);
  background: linear-gradient(180deg, #1a1f1e, var(--ui-canvas) 36%, #202523);
}

:where(button, a, input, select, textarea, summary) {
  letter-spacing: 0;
  touch-action: manipulation;
}

:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--ui-focus);
  outline-offset: 2px;
}

:where(.panel-action, .topbar-action, .quick-view-chip, .dataset-tab, .template-chip, .mode-chip, .startup-card-actions a, .startup-card-actions button) {
  min-height: 36px;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  font-size: 10px;
  font-weight: 600;
}

:where(.panel-action, .topbar-action, .quick-view-chip, .dataset-tab, .template-chip, .mode-chip, .startup-card-actions a, .startup-card-actions button):hover {
  border-color: rgba(202, 132, 87, .62);
  color: var(--ui-text);
  background: var(--ui-accent-soft);
  box-shadow: none;
}

:where(.panel-action, .topbar-action, .quick-view-chip, .dataset-tab, .template-chip, .mode-chip, .startup-card-actions a, .startup-card-actions button):active {
  transform: translateY(1px);
  background: rgba(202, 132, 87, .2);
}

:where(button, .panel-action)[disabled],
:where(button, .panel-action)[data-busy="true"] {
  cursor: not-allowed;
  opacity: .48;
}

.panel-action[data-state="success"],
.drawer-primary-action[data-state="success"] {
  border-color: rgba(131, 185, 154, .6) !important;
  color: #e9fff1 !important;
  background: rgba(131, 185, 154, .18) !important;
}

.danger-action,
.panel-action.danger-action,
.media-card-actions .is-danger {
  border-color: rgba(229, 143, 140, .3) !important;
  color: #f2aaa6 !important;
  background: rgba(229, 143, 140, .055) !important;
}

.drawer-primary-action,
.panel-action.drawer-primary-action {
  border-color: var(--ui-accent) !important;
  color: #1c1f1e !important;
  background: var(--ui-accent) !important;
}

:where(
  .panel,
  .overview-card,
  .focus-card,
  .agenda-item,
  .timeline-card,
  .inbox-column,
  .automation-card,
  .automation-item,
  .user-card,
  .role-card,
  .setting-card,
  .audit-card,
  .database-hero,
  .database-toolbar,
  .database-table-wrap,
  .database-results-shell,
  .db-board-column,
  .db-card,
  .db-board-card,
  .media-card,
  .media-now-playing,
  .overlay-panel
) {
  border-color: var(--ui-line);
  border-radius: var(--ui-panel-radius) !important;
  color: var(--ui-text);
  background-color: var(--ui-surface);
  box-shadow: none;
}

:where(.panel-title h2, .setting-card strong, .user-card strong, .role-card strong, .audit-card strong) {
  color: var(--ui-text);
  font-weight: 600;
}

:where(.panel p, .setting-card p, .user-card p, .role-card p, .audit-card p, .panel-empty) {
  color: var(--ui-muted);
}

:where(
  .panel input,
  .panel select,
  .panel textarea,
  .setting-card input,
  .setting-card select,
  .setting-card textarea,
  .database-toolbar input,
  .database-toolbar select,
  .db-crm-select,
  .db-inspector-form input,
  .db-inspector-form select,
  .db-inspector-form textarea,
  .media-toolbar input,
  .media-toolbar select
) {
  min-height: 40px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: var(--ui-surface-raised);
  box-shadow: none;
}

:where(input, textarea)::placeholder {
  color: #7f8984;
  opacity: 1;
}

/* Drawers, product properties and contact sheets use the same application skin. */
.drawer-backdrop,
.overlay-backdrop {
  background: rgba(10, 13, 12, .7);
  backdrop-filter: blur(5px);
}

.drawer-panel {
  border-left: 1px solid var(--ui-line-strong);
  border-radius: 0 !important;
  color: var(--ui-text);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sheet);
}

.drawer-head {
  border-bottom-color: var(--ui-line);
  background: var(--ui-surface);
}

.drawer-eyebrow,
.drawer-meta {
  color: var(--ui-muted);
}

.drawer-title {
  color: var(--ui-text);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.18;
}

.drawer-close {
  border-color: var(--ui-line) !important;
  color: var(--ui-text-soft) !important;
  background: transparent !important;
}

.drawer-save-status,
.drawer-action-status {
  color: var(--ui-muted);
}

.drawer-save-status.is-dirty,
.drawer-action-status.is-dirty { color: var(--ui-warning); }
.drawer-save-status.is-saved,
.drawer-action-status.is-saved { color: var(--ui-success); }
.drawer-save-status.is-error { color: var(--ui-danger); }

.drawer-field span,
.drawer-info-card span,
.drawer-history-head small,
.drawer-related-head small {
  color: var(--ui-muted);
}

.drawer-field input,
.drawer-field select,
.drawer-field textarea,
.drawer-history-composer input {
  min-height: 40px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: var(--ui-surface-raised);
  box-shadow: none;
}

.drawer-field textarea { min-height: 96px; }

.drawer-check span:last-child,
.drawer-info-card strong,
.drawer-info-card a,
.drawer-related-head strong,
.drawer-history-head strong {
  color: var(--ui-text-soft);
}

.drawer-info-card,
.drawer-related-card,
.drawer-history,
.drawer-related,
.decision-brief {
  border-color: var(--ui-line);
  border-radius: var(--ui-panel-radius) !important;
  color: var(--ui-text);
  background: rgba(255, 255, 255, .022);
  box-shadow: none;
}

.drawer-related-card strong,
.decision-brief strong { color: var(--ui-text); }
.drawer-related-card small { color: var(--ui-muted); }

.drawer-actions {
  border-top-color: var(--ui-line);
  background: transparent;
}

.drawer-actions-primary {
  background: linear-gradient(180deg, rgba(39, 44, 42, .78), var(--ui-surface) 32%);
}

.drawer-discard-bar {
  border-color: rgba(229, 143, 140, .34);
  color: var(--ui-text);
  background: #352b29;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .24);
}

.drawer-discard-bar strong { color: #ffd7d4; }
.drawer-discard-bar span { color: var(--ui-text-soft); }

.startup-property-primary-link {
  border-color: rgba(202, 132, 87, .42);
  color: var(--ui-text);
  background: var(--ui-surface-raised);
}

.startup-property-section { border-top-color: var(--ui-line); }
.startup-property-head { color: var(--ui-muted); }
.startup-property-list { border-color: var(--ui-line); }
.startup-property-row { border-bottom-color: var(--ui-line); }
.startup-property-row > span { color: var(--ui-muted); }
.startup-property-row :is(strong, a) { color: var(--ui-text-soft); }
.startup-property-row a { color: #e0a16e; }
.startup-property-next { border-left-color: var(--ui-accent); background: var(--ui-accent-soft); }
.startup-property-next span { color: #e0a16e; }
.startup-property-next strong { color: var(--ui-text); }

.save-toast {
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: var(--ui-surface-raised);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
}

.save-toast.is-success { border-color: rgba(131, 185, 154, .48); }
.save-toast.is-error { border-color: rgba(229, 143, 140, .52); color: #ffd0cd; }

@media (max-width: 720px) {
  .drawer-panel {
    width: 100vw;
    height: 100dvh;
    padding: 12px;
    border-left: 0;
  }

  .drawer-title { font-size: 18px; }

  :where(
    .panel-action,
    .topbar-action,
    .quick-view-chip,
    .dataset-tab,
    .template-chip,
    .mode-chip,
    .drawer-field input,
    .drawer-field select,
    .setting-card input,
    .setting-card select,
    .database-toolbar input,
    .database-toolbar select
  ) { min-height: 44px; }

  .drawer-field span,
  .drawer-info-card span { font-size: 10px; }
  .drawer-field input,
  .drawer-field select,
  .drawer-field textarea { font-size: 14px; }
}

/* Specificity lock: legacy component selectors must not override the contract. */
.detail-drawer,
.overlay-shell {
  z-index: 200;
}

.save-toast {
  z-index: 240;
}

.panel-action,
.topbar-action,
.quick-view-chip,
.dataset-tab,
.template-chip,
.mode-chip {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  font-size: 10px;
  font-weight: 600;
}

.panel-action:hover,
.topbar-action:hover,
.quick-view-chip:hover,
.dataset-tab:hover,
.template-chip:hover,
.mode-chip:hover {
  border-color: rgba(202, 132, 87, .62);
  color: var(--ui-text);
  background: var(--ui-accent-soft);
  box-shadow: none;
}

.panel,
.overview-card,
.focus-card,
.agenda-item,
.timeline-card,
.inbox-column,
.automation-card,
.automation-item,
.user-card,
.role-card,
.setting-card,
.audit-card,
.database-hero,
.database-toolbar,
.database-table-wrap,
.database-results-shell,
.db-board-column,
.db-card,
.db-board-card,
.media-card,
.media-now-playing,
.overlay-panel {
  border-color: var(--ui-line);
  border-radius: var(--ui-panel-radius) !important;
  color: var(--ui-text);
  background-color: var(--ui-surface);
  box-shadow: none;
}

.panel input,
.panel select,
.panel textarea,
.setting-card input,
.setting-card select,
.setting-card textarea,
.database-toolbar input,
.database-toolbar select,
.db-crm-select,
.db-inspector-form input,
.db-inspector-form select,
.db-inspector-form textarea,
.media-toolbar input,
.media-toolbar select {
  min-height: 40px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: var(--ui-surface-raised);
  box-shadow: none;
}

.startup-property-row > span {
  font-size: 10px;
  line-height: 1.45;
}

.startup-property-row strong,
.startup-property-row a {
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .panel-action,
  .topbar-action,
  .quick-view-chip,
  .dataset-tab,
  .template-chip,
  .mode-chip,
  .panel input,
  .panel select,
  .setting-card input,
  .setting-card select,
  .database-toolbar input,
  .database-toolbar select {
    min-height: 44px;
  }

  .startup-property-row strong,
  .startup-property-row a { font-size: 12px; }
}

/* Contract coverage: system dialogs and account forms use the application shell. */
.auth-user-dialog,
.auth-dialog {
  width: min(560px, calc(100vw - 24px));
  padding: 0;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-sheet-radius) !important;
  color: var(--ui-text);
  background: var(--ui-surface-raised);
  box-shadow: 0 24px 72px rgba(0, 0, 0, .48);
}

.auth-user-dialog::backdrop {
  background: rgba(8, 10, 10, .76);
  backdrop-filter: blur(4px);
}

.auth-user-dialog form,
.auth-dialog .auth-card {
  gap: 16px;
  padding: 20px;
}

.auth-user-dialog-head,
.overlay-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ui-line);
}

.auth-user-dialog-head h2,
.overlay-head h2 {
  color: var(--ui-text);
  font-size: 18px;
  font-weight: 600;
}

.auth-user-dialog-head small,
.auth-user-fields label span {
  color: var(--ui-muted);
  font-size: 10px;
  letter-spacing: 0;
}

.auth-user-fields input,
.auth-user-fields select,
.overlay-panel input,
.overlay-panel select,
.overlay-panel textarea {
  min-height: 40px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: var(--ui-surface);
  box-shadow: none;
}

.auth-user-dialog-actions button,
.auth-dialog-actions button,
.overlay-panel button {
  min-height: 36px;
  border: 1px solid var(--ui-line-strong);
  border-radius: var(--ui-control-radius) !important;
  color: var(--ui-text);
  background: rgba(255, 255, 255, .035);
  box-shadow: none;
  font-weight: 600;
}

.auth-user-dialog-actions button[type="submit"],
.auth-dialog-actions button[type="submit"] {
  border-color: var(--ui-accent);
  color: #1c1815;
  background: var(--ui-accent);
}

.auth-user-dialog-actions button:hover,
.auth-dialog-actions button:hover,
.overlay-panel button:hover {
  border-color: rgba(202, 132, 87, .62);
  background: var(--ui-accent-soft);
}

.auth-user-dialog-actions button[type="submit"]:hover,
.auth-dialog-actions button[type="submit"]:hover {
  color: #171310;
  background: #d89161;
}

:is(button, a, input, select, textarea):active:not(:disabled) {
  transform: translateY(1px);
}

:is(button, input, select, textarea)[aria-busy="true"],
:is(button, input, select, textarea):disabled {
  cursor: wait;
  opacity: .58;
}

@media (max-width: 720px) {
  .auth-user-dialog,
  .auth-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .auth-user-dialog form,
  .auth-dialog .auth-card { padding: 16px; }

  .auth-user-dialog-actions button,
  .auth-dialog-actions button,
  .overlay-panel button,
  .auth-user-fields input,
  .auth-user-fields select,
  .overlay-panel input,
  .overlay-panel select { min-height: 44px; }
}
