@import url("../fonts/proxima.css");
/* ==========================================================================
   Console — DMG / Done In One internal app
   Single stylesheet. Flat, brand-faithful. Inter, two weights (400/500).
   ========================================================================== */

:root {
  /* Text */
  --ink: #22333D;
  --text-secondary: #51646F;
  --text-tertiary: #84929C;

  /* Surfaces */
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --border: #E4E2DC;

  /* Brand */
  --navy: #2F4452;
  --steel: #4C7288;
  --accent: #256C9A;
  --orange: #ED873C;
  --silver: #D1D3D3;      /* working accent (Daniel 2026-08-27) */
  /* green #BACE61 retired from the palette 2026-08-27 — do not reintroduce */

  /* Status */
  --success-text: #5F7A22;
  --success-bg: #F2F6E2;
  --warning-text: #ED873C;
  --warning-bg: #F7EDDD;
  --danger-text: #B3402F;
  --danger-bg: #FBEEEB;
  --info-text: #256C9A;
  --info-bg: #E7EFF5;

  /* Neutral badge */
  --neutral-text: #51646F;
  --neutral-bg: #E7EFF5;

  /* Metrics */
  --rail-width: 150px;
  --rail-collapsed: 52px;

  --font: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-weight: 500;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

/* tabular numerals helper */
.tnum { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   App shell layout
   -------------------------------------------------------------------------- */
.shell {
  display: flex;
  min-height: 100vh;
}

/* --- Nav rail --- */
.rail {
  width: var(--rail-width);
  flex: 0 0 var(--rail-width);
  background: var(--navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .15s ease, flex-basis .15s ease;
}

.rail__logo {
  padding: 16px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}
.rail__logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.rail__nav {
  flex: 1 1 auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}
.nav-item:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: -2px;
}
.nav-item.is-active {
  background: var(--accent);
  color: #fff;
}
.nav-item__icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-item__icon svg { width: 18px; height: 18px; display: block; }
.nav-item__label { transition: opacity .1s ease; }

/* --- Rail footer (user + logout) --- */
.rail__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px;
  font-size: 13px;
}
.rail__user-name {
  color: #fff;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail__user-role {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.rail__logout {
  margin-top: 10px;
}
.btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-logout:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-logout:focus-visible { outline: 2px solid rgba(255,255,255,0.6); outline-offset: 1px; }

/* --- Collapse toggle (checkbox hack) --- */
#rail-collapse { position: absolute; opacity: 0; pointer-events: none; }
.rail__toggle {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 0 8px 6px;
}
.rail__toggle:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.rail__toggle svg { width: 16px; height: 16px; }

#rail-collapse:checked ~ .shell .rail {
  width: var(--rail-collapsed);
  flex-basis: var(--rail-collapsed);
}
#rail-collapse:checked ~ .shell .rail .nav-item__label,
#rail-collapse:checked ~ .shell .rail .rail__footer .rail__user,
#rail-collapse:checked ~ .shell .rail .rail__toggle span,
#rail-collapse:checked ~ .shell .rail .btn-logout span {
  display: none;
}
#rail-collapse:checked ~ .shell .rail .rail__logo { padding: 14px 6px; }
#rail-collapse:checked ~ .shell .rail .nav-item { justify-content: center; padding: 9px 0; }
#rail-collapse:checked ~ .shell .rail .btn-logout { justify-content: center; }
#rail-collapse:checked ~ .shell .rail .rail__toggle { justify-content: center; }

/* --------------------------------------------------------------------------
   Main column
   -------------------------------------------------------------------------- */
.main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--orange);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}
.topbar__action { display: flex; align-items: center; gap: 8px; }

.content {
  flex: 1 1 auto;
  overflow-y: auto;
}
.content__inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 24px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .1s ease, border-color .1s ease, color .1s ease;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: #256C9A; border-color: #256C9A; text-decoration: none; }
.btn-primary:active { background: #256C9A; }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { background: #E7EFF5; border-color: #D1D3D3; text-decoration: none; }
.btn-secondary:active { background: #E7EFF5; }

.btn-sm { padding: 6px 10px; font-size: 13px; }

/* --------------------------------------------------------------------------
   Cards & sections
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.card + .card { margin-top: 16px; }

.section { margin-top: 24px; }
.section:first-child { margin-top: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section__title {
  font-size: 16px;
  font-weight: 500;
}
.section__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.caption {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.muted { color: var(--text-secondary); }
.label-text { font-size: 13px; color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #F6F5F2;
  white-space: nowrap;
}
table.data tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #F6F5F2; }
table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cell-primary { color: var(--ink); }
.cell-sub { color: var(--text-tertiary); font-size: 12px; margin-top: 2px; }

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 6px;
}
.badge--success { color: var(--success-text); background: var(--success-bg); }
.badge--warning { color: var(--warning-text); background: var(--warning-bg); }
.badge--danger  { color: var(--danger-text);  background: var(--danger-bg); }
.badge--info    { color: var(--info-text);    background: var(--info-bg); }
.badge--neutral { color: var(--neutral-text); background: var(--neutral-bg); }

/* type/label badges (no dot, subtle) */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--neutral-bg);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.field__hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  line-height: 1.4;
}
input::placeholder { color: var(--text-tertiary); }
input:hover, select:hover, textarea:hover { border-color: #D1D3D3; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 108, 154, 0.12);
}
input[type="file"] {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  padding: 8px 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.form-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Inline status notes / alerts
   -------------------------------------------------------------------------- */
.note {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.note--success { color: var(--success-text); background: var(--success-bg); }
.note--danger  { color: var(--danger-text);  background: var(--danger-bg); }
.note--info    { color: var(--info-text);    background: var(--info-bg); }

/* --------------------------------------------------------------------------
   Metric cards
   -------------------------------------------------------------------------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.metric__label {
  font-size: 13px;
  color: var(--text-secondary);
}
.metric__value {
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin-top: 6px;
  line-height: 1.2;
}
.metric__sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Completeness bar
   -------------------------------------------------------------------------- */
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}
.bar__track {
  flex: 1 1 auto;
  height: 6px;
  background: var(--neutral-bg);
  border-radius: 999px;
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--steel);
}
.bar__fill--low { background: var(--danger-text); }
.bar__fill--mid { background: var(--warning-text); }
.bar__fill--high { background: var(--success-text); }
.bar__pct {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  min-width: 34px;
  text-align: right;
}

/* --------------------------------------------------------------------------
   Ownership / definition lists
   -------------------------------------------------------------------------- */
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 16px;
  font-size: 14px;
}
.kv dt { color: var(--text-secondary); font-size: 13px; }
.kv dd { margin: 0; color: var(--ink); }

.owners {
  list-style: none;
  margin: 0;
  padding: 0;
}
.owners li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.owners li:last-child { border-bottom: none; }
.owners .pct { font-variant-numeric: tabular-nums; color: var(--ink); }

/* entity card grid */
.entity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.entity-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.entity-card__name { font-size: 16px; font-weight: 500; }
.entity-card__legal { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.entity-card__block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.entity-card__block-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* empty state */
.empty {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
  padding: 28px 16px;
}

/* --------------------------------------------------------------------------
   Source connection rows
   -------------------------------------------------------------------------- */
.conn-list { display: flex; flex-direction: column; }
.conn-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.conn-row:last-child { border-bottom: none; }
.conn-row__main { flex: 1 1 auto; min-width: 0; }
.conn-row__label { font-size: 14px; color: var(--ink); }
.conn-row__detail { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.conn-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.conn-row__badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Login page (standalone)
   -------------------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* DIO brand pattern — the blue concentric-circle motif (2023 guide cover, blue variant) */
  background: #4C7288 url(../img/pattern-blue.svg);
  background-size: 190px;
  padding: 24px;
}
.login-card { box-shadow: 0 12px 40px rgba(21, 36, 46, .35); }
.login-card {
  background: var(--surface);
  border: 3px solid var(--orange);
  border-radius: 12px;
  width: 100%;
  max-width: 380px;
  padding: 28px 28px 24px;
}
.login-card__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.login-card__logo img { max-width: 260px; height: auto; display: block; }
.login-card__title {
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 18px;
}
.login-card__caption {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 18px;
}
.login-card .btn-primary { width: 100%; justify-content: center; }

/* --------------------------------------------------------------------------
   Misc utility
   -------------------------------------------------------------------------- */
.stack-sm > * + * { margin-top: 8px; }
.flow-row .dir { color: var(--text-tertiary); padding: 0 4px; }

/* --------------------------------------------------------------------------
   Nav rail divider
   -------------------------------------------------------------------------- */
.rail__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 6px 10px;
  flex: 0 0 1px;
}

/* --------------------------------------------------------------------------
   Status rows (emoji-driven, subtle left border on first cell)
   -------------------------------------------------------------------------- */
tr.status-row--red td:first-child    { box-shadow: inset 3px 0 0 var(--danger-text); }
tr.status-row--orange td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
tr.status-row--yellow td:first-child { box-shadow: inset 3px 0 0 var(--warning-text); }
tr.status-row--green td:first-child  { box-shadow: inset 3px 0 0 var(--success-text); }
tr.status-row--paused td:first-child { box-shadow: inset 3px 0 0 var(--text-tertiary); }

/* same treatment for list rows (P1 flags) */
li.status-row--red    { box-shadow: inset 3px 0 0 var(--danger-text); }
li.status-row--orange { box-shadow: inset 3px 0 0 var(--orange); }
li.status-row--yellow { box-shadow: inset 3px 0 0 var(--warning-text); }
li.status-row--green  { box-shadow: inset 3px 0 0 var(--success-text); }
li.status-row--paused { box-shadow: inset 3px 0 0 var(--text-tertiary); }

/* --------------------------------------------------------------------------
   Metric variants
   -------------------------------------------------------------------------- */
.metric--danger {
  border-color: rgba(194, 54, 47, 0.35);
  background: var(--danger-bg);
}
.metric--danger .metric__value { color: var(--danger-text); }

/* --------------------------------------------------------------------------
   Brand badge (media / podcast)
   -------------------------------------------------------------------------- */
.badge--brand { color: #B95F17; background: #F7EDDD; }

/* --------------------------------------------------------------------------
   Dashboard flag list
   -------------------------------------------------------------------------- */
.flag-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.flag-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.flag-list li:last-child { border-bottom: none; }
.flag-row__item { flex: 1 1 auto; min-width: 0; }
.flag-row__owner { white-space: nowrap; font-size: 13px; }
.flag-row__status { white-space: nowrap; font-size: 13px; }

/* --------------------------------------------------------------------------
   Register cards
   -------------------------------------------------------------------------- */
.register-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.register-card {
  display: block;
  color: var(--ink);
}
.register-card:hover {
  text-decoration: none;
  border-color: var(--accent);
}
.register-card__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
}
.register-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.register-card__updated {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Entity detail layout
   -------------------------------------------------------------------------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}
.detail-grid__aside .card + .card { margin-top: 16px; }

.aside-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}

.file-group { margin-top: 12px; }
.file-group:first-of-type { margin-top: 0; }
.file-group__label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.file-list li {
  padding: 5px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.file-list li:last-child { border-bottom: none; }
.file-row__meta {
  display: block;
  font-size: 12px;
  margin-top: 1px;
}

/* --------------------------------------------------------------------------
   Rendered vault notes
   -------------------------------------------------------------------------- */
.note-body {
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.note-body h2 {
  font-size: 17px;
  font-weight: 500;
  margin: 22px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.note-body h3 {
  font-size: 15px;
  font-weight: 500;
  margin: 18px 0 6px;
}
.note-body h4 {
  font-size: 14px;
  font-weight: 500;
  margin: 14px 0 4px;
  color: var(--text-secondary);
}
.note-body h2:first-child,
.note-body h3:first-child,
.note-body h4:first-child { margin-top: 0; }
.note-body p { margin: 0 0 10px; }
.note-body ul, .note-body ol {
  margin: 0 0 10px;
  padding-left: 22px;
}
.note-body li { margin: 3px 0; }
.note-body blockquote {
  margin: 0 0 10px;
  padding: 6px 14px;
  border-left: 3px solid var(--border);
  color: var(--text-secondary);
}
.note-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.note-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: var(--neutral-bg);
  border-radius: 4px;
  padding: 1px 5px;
}
.note-body pre {
  background: var(--neutral-bg);
  border-radius: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  margin: 0 0 10px;
}
.note-body pre code { background: none; padding: 0; }
.note-body .wl {
  color: var(--accent);
  font-weight: 500;
}
.note-body table,
.note-body .note-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 0 0 12px;
}
.note-body table th,
.note-body .note-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: #F6F5F2;
}
.note-body table td,
.note-body .note-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.note-body table tr:last-child td,
.note-body .note-table tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   Timeline (dashboard "Coming up" + obligations)
   -------------------------------------------------------------------------- */
.timeline { display: flex; flex-direction: column; }

.tl-group { margin-top: 16px; }
.tl-group:first-child { margin-top: 0; }
.tl-group__head {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.tl-group--overdue .tl-group__head { color: var(--danger-text); }

.tl-item {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 7px 8px;
  border-radius: 8px;
  border-left: 3px solid transparent;
}
.tl-item:hover { background: #F6F5F2; }
.tl-item--overdue { border-left-color: rgba(194, 54, 47, 0.55); border-radius: 0 8px 8px 0; }

.tl-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  background: var(--neutral-bg);
  border-radius: 6px;
  padding: 2px 6px;
  text-align: center;
  white-space: nowrap;
  margin-top: 1px;
}

.tl-days {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 2px;
  justify-self: start;
}
.tl-days--overdue { color: var(--danger-text); background: var(--danger-bg); }
.tl-days--soon    { color: #B95F17; background: #F7EDDD; }
.tl-days--near    { color: var(--warning-text); background: var(--warning-bg); }
.tl-days--later   { color: var(--neutral-text); background: var(--neutral-bg); }

.tl-item__label { font-size: 14px; font-weight: 500; color: var(--ink); }
.tl-item__meta { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }

/* --------------------------------------------------------------------------
   Urgent strip (dashboard)
   -------------------------------------------------------------------------- */
.urgent-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--danger-bg);
  border: 1px solid rgba(194, 54, 47, 0.35);
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--danger-text);
  font-size: 14px;
  font-weight: 500;
}
.urgent-strip:hover { text-decoration: none; background: #FBEEEB; }
.urgent-strip__cta { font-size: 13px; font-weight: 400; white-space: nowrap; }

#action-now { scroll-margin-top: 76px; }

/* --------------------------------------------------------------------------
   Two-column layouts (dashboard + reference)
   -------------------------------------------------------------------------- */
.cols-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .cols-2 { grid-template-columns: 1fr; }
}
.dash-col__block { margin-top: 24px; }

/* --------------------------------------------------------------------------
   Tighter metric cards + compact tables
   -------------------------------------------------------------------------- */
.metrics--tight { gap: 12px; }
.metrics--tight .metric { padding: 12px 14px; }
.metrics--tight .metric__value { font-size: 20px; margin-top: 4px; }

table.data--compact thead th { padding: 8px 10px; }
table.data--compact tbody td { padding: 8px 10px; font-size: 13px; }

/* --------------------------------------------------------------------------
   Financials — provisional banner, P&L bars, caveats
   -------------------------------------------------------------------------- */
.provisional-banner {
  background: var(--warning-bg);
  border: 1px solid rgba(181, 121, 11, 0.45);
  border-left: 4px solid var(--warning-text);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.55;
  color: #B95F17;
  margin-bottom: 20px;
}
.provisional-banner strong { font-weight: 500; }

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) 90px 100px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}
.bar-row:first-child { padding-top: 0; }
.bar-row:last-child { border-bottom: none; padding-bottom: 0; }
.bar-row__name { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.bar-row__track {
  height: 10px;
  background: #E4E2DC;
  border-radius: 999px;
  overflow: hidden;
}
.bar-row__fill {
  height: 100%;
  background: var(--steel);
  border-radius: 999px;
}
.bar-row__income {
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
  color: var(--ink);
}
.bar-row__net { justify-self: end; }
@media (max-width: 700px) {
  .bar-row { grid-template-columns: minmax(0, 1fr) 90px 100px; }
  .bar-row__track { grid-column: 1 / -1; grid-row: 2; }
}

.neg { color: var(--danger-text); }

.caveat-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}
.caveat-list li { margin: 4px 0; }

/* --------------------------------------------------------------------------
   Monospace / tabular IDs (reference page)
   -------------------------------------------------------------------------- */
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Divider heading (obligations "Full calendar")
   -------------------------------------------------------------------------- */
.divider-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  margin: 28px 0 4px;
}
.divider-head::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}

/* --- calendar + charts (2026-07-23) --- */
.chart-title { font-size: 14px; font-weight: 500; color: var(--text-secondary, #51646F); margin: 0 0 12px; }
.subscribe-card { display: flex; align-items: flex-start; gap: 12px; }
.subscribe-url { display: inline-block; background: #F6F5F2; border: 1px solid #E4E2DC; border-radius: 6px; padding: 6px 10px; font-size: 12px; word-break: break-all; user-select: all; }
#obl-calendar { font-size: 13px; }
#obl-calendar .fc-toolbar-title { font-size: 16px; font-weight: 500; color: #22333D; }
#obl-calendar .fc-button { background: #fff; border: 1px solid #E4E2DC; color: #51646F; font-size: 12px; text-transform: none; box-shadow: none; }
#obl-calendar .fc-button-active, #obl-calendar .fc-button:hover { background: #E7EFF5; color: #256C9A; border-color: #256C9A; }
#obl-calendar .fc-daygrid-event { border-radius: 4px; font-size: 11px; padding: 1px 4px; cursor: pointer; }
#obl-calendar .fc-day-today { background: #F7EDDD33; }

/* --- sources: qbo + bank upload (2026-07-23) --- */
.note--warning { background: #F7EDDD; border: 1px solid #ED873C55; color: #ED873C; border-radius: 8px; padding: 10px 14px; font-size: 13px; }
.note--warning a { color: #ED873C; font-weight: 500; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.bank-upload .form-row { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.bank-upload label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #51646F; }
.bank-upload input[type="text"] { min-width: 280px; }
.entity-select { font-size: 12px; padding: 4px 6px; border: 1px solid #E4E2DC; border-radius: 6px; color: #22333D; max-width: 180px; }

/* --- financial pulse card (2026-07-23) --- */
.pulse-card { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.pulse-stat { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; border-bottom: 1px solid #E7EFF5; }
.pulse-stat__label { color: #51646F; }
@media (max-width: 800px) { .pulse-card { grid-template-columns: 1fr; } }
.mfa-secret { background: #F6F5F2; border: 1px solid #E4E2DC; border-radius: 8px; padding: 10px 14px; text-align: center; }
.tie-badge { font-size: 11px; font-weight: 500; color: #5F7A22; background: #F2F6E2; border-radius: 10px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
tr.row-total td { border-top: 2px solid #84929C; font-weight: 500; }

/* --- financials entity selector (2026-07-23) --- */
.fin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid #E4E2DC; padding-bottom: 10px; }
.fin-tab { font-size: 13px; padding: 6px 14px; border-radius: 8px; color: #51646F; text-decoration: none; border: 1px solid transparent; }
.fin-tab:hover { background: #F6F5F2; }
.fin-tab.is-active { background: #256C9A; color: #fff; }
.fin-tab--export { margin-left: auto; border: 1px solid #4C7288; color: #2F4452; font-weight: 600; }
.fin-tab--export:hover { background: #2F4452; color: #fff; }

/* ---- 2026-08-05 consistency pass ---- */
.table-wrap { overflow-x: auto; }                 /* was hidden — tables clipped */
.register-grid--fixed { max-width: 900px; }
.reg-red { color: #B3402F; font-weight: 600; }
.reg-amber { color: #ED873C; font-weight: 600; }
.reg-h { margin-bottom: 10px; }
.reg-prose { font-size: 13px; color: #51646F; margin: 0 0 10px; max-width: 78ch; }
