/* The superadmin desktop console (desk.js): admin.collinmallery.com in a window 900px or wider.
   Floating glass sidebar (240px, 84px collapsed), a sticky 56px toolbar, glass cards and menus.
   The window scrolls the page; the sidebar is fixed. Page-specific styles are in desk-*.css.
   Class names start with d-. */

body.is-desk {
  --d-chrome: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Instrument Sans", system-ui, sans-serif;
  --d-card: rgba(251, 247, 240, .75);
  --d-box: rgba(251, 247, 240, .78);
  --d-glass: rgba(251, 247, 240, .62);
  --d-tint: rgba(31, 26, 22, .07);
  --rust-ink: #a83a17; --ochre: #c98a1e; --ochre-100: #f6ead2; --ochre-ink: #7a520c; --sage-ink: #3f4a36;
  --warn-bg: #f6e2d6; --warn-ink: #8a3415;
  background: var(--sand-100);
  scrollbar-color: var(--sand-600) transparent;
}
body.is-desk::-webkit-scrollbar { width: 12px; }
body.is-desk::-webkit-scrollbar-thumb { background: var(--sand-500); border-radius: 999px; border: 3px solid var(--sand-100); }

.d-glass, .d-side, .d-tb__pill, .d-tb__round, .d-tb__search {
  background: var(--d-glass);
  -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 0 0 .5px rgba(255, 255, 255, .6), 0 6px 20px -10px rgba(31, 26, 22, .3);
}

/* ---------- frame ---------- */
.d-app { --d-side: 240px; min-height: 100vh; padding-left: calc(var(--d-side) + 16px); transition: padding-left .25s var(--ease); font: 400 13px/1.45 var(--d-chrome); color: var(--ink-900); }
.d-app.is-collapsed { --d-side: 84px; }
.d-stage { min-width: 0; display: flex; flex-direction: column; }
.d-main { min-width: 0; flex: 1; }
/* Pages fill the window; only form-style pages (--narrow) keep a reading width. */
.d-pad { padding: 18px 30px 48px 14px; display: flex; flex-direction: column; gap: 16px; }
.d-pad--narrow { max-width: 1040px; }
.d-pad--cc { gap: 18px; }
.d-flex1 { flex: 1; }
.d-nowrap { white-space: nowrap; }
.d-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- sidebar ---------- */
.d-side { position: fixed; z-index: 30; top: 8px; bottom: 8px; left: 8px; width: var(--d-side); transition: width .25s var(--ease); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.d-side__logo { display: flex; justify-content: center; align-items: center; height: 72px; flex: none; padding: 14px 12px 12px; }
.d-side__wide { width: 200px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.d-side__sq { display: none; width: 36px; height: 36px; border-radius: 9px; object-fit: cover; box-shadow: 0 0 0 .5px rgba(31, 26, 22, .15); }
.d-side__nav { flex: 1; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: none; }
.d-side__nav::-webkit-scrollbar { display: none; }
.d-nav { position: relative; flex: none; display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 8px; color: var(--ink-900); text-decoration: none; font-size: 13px; }
.d-nav:hover { background: rgba(31, 26, 22, .05); color: var(--ink-900); }
.d-nav.is-on { background: rgba(194, 70, 31, .14); color: var(--rust-ink); }
.d-nav__icon { width: 16px; height: 16px; flex: none; display: flex; }
.d-nav__icon svg { width: 16px; height: 16px; stroke-width: 2; }
.d-nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-nav__badge { min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font: 700 11px var(--d-chrome); background: rgba(31, 26, 22, .1); color: var(--ink-600); }
.d-nav.is-on .d-nav__badge { background: var(--rust-600); color: var(--sand-50); }
.d-side__group { padding: 14px 10px 4px; font-size: 11px; font-weight: 600; color: var(--ink-500); }
.d-side__sep { display: none; height: 1px; margin: 10px 8px; background: var(--line); }
.d-side__me { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.d-side__me:hover { background: rgba(31, 26, 22, .04); }
.d-side__avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--ink-900); color: var(--sand-100); display: flex; align-items: center; justify-content: center; font: 400 14px var(--display); }
.d-side__who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.d-side__who strong { font-size: 12.5px; font-weight: 600; }
.d-side__who span { font-size: 10.5px; color: var(--ink-500); }

.is-collapsed .d-side__wide, .is-collapsed .d-nav__label, .is-collapsed .d-side__group, .is-collapsed .d-side__who { display: none; }
.is-collapsed .d-side__sq { display: block; }
.is-collapsed .d-side__sep { display: block; }
.is-collapsed .d-side__nav { gap: 6px; align-items: center; }
.is-collapsed .d-nav { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 12px; }
.is-collapsed .d-nav__icon, .is-collapsed .d-nav__icon svg { width: 18px; height: 18px; }
.is-collapsed .d-nav__badge { position: absolute; top: 2px; right: 0; transform: scale(.75); transform-origin: top right; }
.is-collapsed .d-side__me { justify-content: center; padding: 12px 0; }

/* ---------- toolbar ---------- */
.d-tb { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 6px; background: rgba(243, 236, 224, .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.d-tb__pill { display: flex; align-items: center; border-radius: 999px; flex: none; }
.d-tb__btn { width: 34px; height: 32px; border: 0; background: none; cursor: pointer; color: var(--ink-900); display: flex; align-items: center; justify-content: center; border-radius: 999px; }
.d-tb__btn:first-child { width: 38px; }
.d-tb__btn:disabled { color: var(--ink-400); cursor: default; }
.d-tb__btn svg { width: 16px; height: 16px; stroke-width: 2.2; }
.d-tb__rule { width: 1px; height: 18px; background: var(--line); }
.d-sideglyph { width: 16px; height: 13px; border: 1.6px solid currentColor; border-radius: 3px; display: flex; }
.d-sideglyph span { width: 5px; border-right: 1.6px solid currentColor; }
.is-collapsed .d-sideglyph span { background: currentColor; }
.d-tb__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.d-tb__title { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-tb__sub { font-size: 11.5px; color: var(--ink-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-tb__acts { display: flex; gap: 8px; align-items: center; flex: none; }
.d-tb__acts:empty { display: none; }
.d-tb__new { flex: none; height: 34px; padding: 0 14px 0 12px; border: 0; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 6px; font: 600 13px var(--d-chrome); color: var(--sand-50); background: rgba(194, 70, 31, .88); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 14px -6px rgba(194, 70, 31, .6); }
.d-tb__new span { font-size: 17px; line-height: 1; }
.d-tb__new:hover { background: var(--rust-600); }
.d-tb__round { flex: none; width: 34px; height: 34px; border: 0; border-radius: 999px; cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-900); }
.d-tb__search { flex: none; width: 220px; height: 34px; border: 0; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 0 12px; font: 400 13px var(--d-chrome); color: var(--ink-600); }
.d-tb__sicon, .d-tb__sicon svg { width: 14px; height: 14px; display: flex; }
.d-tb__stext { flex: 1; text-align: left; }
.d-tb__kbd { font-size: 12px; color: var(--ink-500); }
@media (max-width: 1180px) { .d-tb__search { width: 150px; } }
@media (max-width: 1040px) { .d-tb__search { width: auto; } .d-tb__stext { display: none; } .d-tb__acts { display: none; } }

/* ---------- type ---------- */
.d-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.d-head__l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.d-head__r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d-title { margin: 0; font: 400 64px/.86 var(--display); text-transform: uppercase; }
.d-eyebrow { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-600); }
.d-label { font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-600); }
.d-label--big { font-size: 12.5px; }
.d-meta { font-size: 12.5px; color: var(--ink-600); }
.d-meta-ink { font-size: 12.5px; color: var(--ink-300); }
.d-mono { font: 500 14px var(--mono); }
.d-mono-s { font: 500 12px var(--mono); color: var(--ink-600); }
.d-summary { margin: -4px 0 0; font-size: 16px; font-weight: 500; font-family: var(--body); }
.d-empty { margin: 0; padding: 14px 0; font-size: 14px; color: var(--ink-500); }
.d-err { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; }
.d-loading { padding: 24px 0; color: var(--ink-500); }
.tone-rust { color: var(--rust-600); } .tone-ochre { color: var(--ochre-ink); } .tone-sage { color: var(--sage-ink); } .tone-ink { color: var(--ink-900); }
.tone-muted { color: var(--ink-500); } .tone-rust-light { color: var(--rust-400); }
.bg-rust { background: var(--rust-600); } .bg-ochre { background: var(--ochre); } .bg-sage { background: var(--sage-600); } .bg-ink { background: var(--ink-900); } .bg-muted { background: var(--ink-400); }

/* ---------- pieces ---------- */
.d-row { display: flex; align-items: center; gap: 8px; }
.d-row--between { justify-content: space-between; }
.d-row--wrap { flex-wrap: wrap; }
.d-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.d-grid { display: grid; gap: 12px; }
.d-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.d-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.d-grid--tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.d-grid--bill { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 10px; align-items: stretch; }
@media (max-width: 1100px) { .d-grid--bill { grid-template-columns: 1fr; } }

.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer; font: 600 13px var(--d-chrome); white-space: nowrap; text-decoration: none; background: var(--d-tint); color: var(--ink-900); flex: none; }
.d-btn:hover { background: rgba(31, 26, 22, .12); color: var(--ink-900); }
.d-btn--s { height: 28px; }
.d-btn--primary { background: var(--rust-600); color: var(--sand-50); }
.d-btn--primary:hover { background: var(--rust-ink); color: var(--sand-50); }
.d-btn--ink { background: var(--ink-900); color: var(--sand-50); }
.d-btn--ink:hover { background: var(--ink-800); color: var(--sand-50); }
.d-btn--danger { color: var(--rust-600); }
.d-btn:disabled, .d-btn.is-off { opacity: .45; cursor: default; }
.d-btn__kbd { font: 500 11px var(--mono); opacity: .65; }
.d-link { border: 0; background: none; padding: 0; cursor: pointer; font: 600 12.5px var(--d-chrome); color: var(--rust-600); white-space: nowrap; }
.d-link:hover { text-decoration: underline; }
.d-link--danger { color: var(--rust-ink); }
.d-round { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer; font-size: 15px; background: var(--d-tint); color: var(--ink-900); display: inline-flex; align-items: center; justify-content: center; }
.d-confirm { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }

.d-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 600 11.5px var(--body); white-space: nowrap; flex: none; }
.d-chip--sage { background: var(--sage-100); color: var(--sage-ink); }
.d-chip--rust { background: var(--warn-bg); color: var(--warn-ink); }
.d-chip--ochre { background: var(--ochre-100); color: var(--ochre-ink); }
.d-chip--ink { background: var(--ink-900); color: var(--sand-100); }
.d-chip--sand { background: var(--sand-300); color: var(--ink-900); }
.d-chip--outline, .d-chip--muted { background: transparent; color: var(--ink-600); box-shadow: inset 0 0 0 1px var(--line); }
.d-hpill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font: 600 11.5px var(--body); white-space: nowrap; }
.d-hpill--rust { background: var(--warn-bg); color: var(--warn-ink); }
.d-hpill--ochre { background: var(--ochre-100); color: var(--ochre-ink); }
.d-hpill--ink { background: var(--sand-300); color: var(--ink-900); }
.d-hpill--sage { background: var(--sage-100); color: var(--sage-ink); }
.d-hpill--muted { background: var(--sand-200); color: var(--ink-600); }
.d-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: currentColor; display: inline-block; }
.d-dot--rust { background: var(--rust-600); } .d-dot--ochre { background: var(--ochre); } .d-dot--ink { background: var(--ink-900); }
.d-dot--sage { background: var(--sage-600); } .d-dot--muted { background: var(--ink-400); }
.d-hpill--rust .d-dot { background: var(--rust-600); } .d-hpill--ochre .d-dot { background: var(--ochre); } .d-hpill--ink .d-dot { background: var(--ink-900); }
.d-hpill--sage .d-dot { background: var(--sage-600); } .d-hpill--muted .d-dot { background: var(--ink-400); }

.d-card { background: var(--d-card); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.d-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.d-card__title { margin: 0; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-600); }
.d-card__big { margin: 0; font: 400 26px/.9 var(--display); text-transform: uppercase; }
.d-card--ink { background: var(--ink-900); color: var(--sand-100); }
.d-span2 { min-width: 0; }
.d-kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; width: 100%; color: inherit; text-decoration: none; }
.d-kv--link { border-left: 0; border-right: 0; border-bottom: 0; background: none; cursor: pointer; font: inherit; font-size: 14px; text-align: left; }
.d-kv--link:hover .d-kv__k, a.d-kv:hover .d-kv__k { color: var(--rust-600); }
.d-kv__k { min-width: 0; }
.d-kv__v { font-weight: 600; text-align: right; }
.d-kv--ink { border-top-color: rgba(243, 236, 224, .14); }
.d-tile { flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--ink-900); color: var(--sand-100); font: 400 12px var(--display); width: 26px; height: 26px; border-radius: 7px; }
.d-tile--s { width: 26px; height: 26px; }
.d-tile--xl { width: 58px; height: 58px; border-radius: 16px; font-size: 24px; }

.d-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--d-tint); align-self: flex-start; max-width: 100%; }
.d-seg > button, .d-seg > a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 0; border-radius: 999px; cursor: pointer; background: transparent; color: var(--ink-600); font: 600 13px var(--d-chrome); white-space: nowrap; text-decoration: none; }
.d-seg > [aria-pressed="true"] { background: var(--sand-50); color: var(--ink-900); box-shadow: 0 1px 3px rgba(31, 26, 22, .15); }
.d-seg > button:disabled { opacity: .45; cursor: default; }
.d-seg--s > button, .d-seg--s > a { height: 24px; padding: 0 10px; font-size: 12px; }
.d-seg--fill { display: flex; width: 100%; }
.d-seg--fill > button { flex: 1; padding: 0 6px; }
.d-seg--wrap { flex-wrap: wrap; border-radius: 14px; }
.d-seg--tabs { overflow-x: auto; scrollbar-width: none; }
.d-seg--tabs::-webkit-scrollbar { display: none; }
.d-tabdot { width: 6px; height: 6px; border-radius: 50%; background: var(--rust-600); flex: none; }
.d-tabdot--ochre { background: var(--ochre); } .d-tabdot--ink { background: var(--ink-900); } .d-tabdot--sage { background: var(--sage-600); }

.d-switch { width: 34px; height: 20px; flex: none; border: 0; border-radius: 999px; padding: 2px; cursor: pointer; display: flex; background: rgba(31, 26, 22, .2); transition: background .18s; }
.d-switch[aria-checked="true"] { background: var(--sage-600); }
.d-switch__knob { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.d-switch[aria-checked="true"] .d-switch__knob { transform: translateX(14px); }

.d-search { flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; background: rgba(31, 26, 22, .05); color: var(--ink-500); }
.d-search__icon, .d-search__icon svg { width: 14px; height: 14px; display: flex; flex: none; }
.d-search__in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 14px var(--body); color: var(--ink-900); }
.d-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink-900); }
.d-input { height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(31, 26, 22, .05); font: 400 14px var(--body); outline: 0; }
.d-input:focus { box-shadow: inset 0 0 0 1.5px var(--ink-900); }
.d-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.d-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.d-chipbtn { display: inline-flex; align-items: center; height: 30px; padding: 0 13px; border-radius: 999px; border: 1.5px solid var(--ink-900); font: 600 13px var(--body); white-space: nowrap; text-decoration: none; color: var(--ink-900); background: transparent; }
.d-chipbtn.is-on { background: var(--ink-900); color: var(--sand-100); }
.d-chipbtn:hover { color: var(--ink-900); background: rgba(31, 26, 22, .06); }
.d-chipbtn.is-on:hover { color: var(--sand-100); background: var(--ink-800); }
.d-count { min-width: 18px; height: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--rust-600); color: var(--sand-50); font: 700 11px var(--d-chrome); display: inline-flex; align-items: center; justify-content: center; }

/* ---------- toast, dialogs, menus, palette ---------- */
.d-toast { position: fixed; z-index: 90; top: 64px; right: 20px; width: 340px; max-width: calc(100vw - 40px); display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: rgba(251, 247, 240, .9); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 16px 40px -12px rgba(31, 26, 22, .4); pointer-events: none; opacity: 0; transform: translateY(-10px); transition: transform .35s var(--ease), opacity .25s; font-family: var(--d-chrome); }
.d-toast.is-on { opacity: 1; transform: none; }
.d-toast__tile { width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--rust-600); color: var(--sand-50); display: flex; align-items: center; justify-content: center; font: 400 13px var(--display); letter-spacing: .04em; }
.d-toast__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.35; }
.d-toast__text span { color: var(--ink-600); }
/* app.js's own toast (embedded sections) in the same place and look. */
body.is-desk .toast { top: 64px; right: 20px; bottom: auto; left: auto; transform: none; width: 340px; max-width: calc(100vw - 40px); z-index: 90; padding: 14px 16px; border-radius: 18px; background: rgba(251, 247, 240, .92); color: var(--ink-900); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 16px 40px -12px rgba(31, 26, 22, .4); font: 400 13px/1.35 var(--d-chrome); }

.d-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(31, 26, 22, .18); }
.d-scrim--clear { background: transparent; }
.d-dialog { position: fixed; z-index: 81; top: 96px; left: 50%; transform: translateX(-50%); width: 480px; max-width: calc(100vw - 40px); max-height: calc(100vh - 120px); overflow: auto; display: flex; flex-direction: column; border-radius: 22px; background: rgba(251, 247, 240, .92); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 24px 60px -16px rgba(31, 26, 22, .5); font-family: var(--d-chrome); }
.d-dialog__body { padding: 22px 24px 8px; display: flex; flex-direction: column; gap: 16px; }
.d-dialog__title { margin: 0; font: 700 17px var(--d-chrome); }
.d-dialog__text { margin: 0; font-size: 14px; color: var(--ink-600); line-height: 1.45; }
.d-dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 20px; }
.d-field { display: flex; flex-direction: column; gap: 6px; }
.d-field__label { font: 500 13px var(--d-chrome); color: var(--ink-600); }
.d-field input, .d-field textarea { height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: rgba(31, 26, 22, .05); font: 400 14px var(--body); outline: 0; }
.d-field textarea { height: auto; padding: 10px 12px; resize: none; }
.d-field input:focus, .d-field textarea:focus { box-shadow: inset 0 0 0 1.5px var(--ink-900); }

.d-menu { position: fixed; z-index: 85; min-width: 240px; max-height: 72vh; overflow-y: auto; padding: 5px; border-radius: 12px; background: rgba(251, 247, 240, .92); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .7), 0 12px 36px -8px rgba(31, 26, 22, .4), 0 0 0 .5px rgba(31, 26, 22, .15); font-family: var(--d-chrome); }
.d-menu__head { display: block; padding: 8px 10px 3px; font-size: 11px; font-weight: 600; color: var(--ink-500); }
.d-menu__rule { border: 0; height: 1px; margin: 5px 8px; background: var(--line); }
.d-menu__item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; text-align: left; font: 500 13px var(--d-chrome); color: var(--ink-900); }
.d-menu__item:hover, .d-menu__item:focus-visible { background: var(--rust-600); color: var(--sand-50); outline: 0; }
.d-menu__item:disabled { opacity: .45; cursor: default; background: transparent; color: var(--ink-900); }
.d-menu__item--danger { color: var(--rust-600); }
.d-menu__label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.d-menu__sub { font-size: 11.5px; font-weight: 400; opacity: .7; }
.d-menu__kbd { font-size: 12px; opacity: .6; white-space: nowrap; }

.d-pal { position: fixed; z-index: 81; top: 16%; left: 50%; transform: translateX(-50%); width: 640px; max-width: calc(100vw - 40px); overflow: hidden; display: flex; flex-direction: column; border-radius: 22px; background: rgba(251, 247, 240, .88); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 24px 60px -16px rgba(31, 26, 22, .45); font-family: var(--d-chrome); }
.d-pal__top { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.d-pal__icon, .d-pal__icon svg { width: 20px; height: 20px; display: flex; flex: none; }
.d-pal__in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 20px var(--d-chrome); color: var(--ink-900); }
.d-pal__esc { font: 500 11px var(--mono); color: var(--ink-500); }
.d-pal__list { max-height: 420px; overflow-y: auto; padding: 6px; }
.d-pal__list .d-empty { padding: 18px 12px; }
.d-pal__head { display: block; padding: 10px 12px 4px; font-size: 11px; font-weight: 600; color: var(--ink-500); }
.d-pal__item { width: 100%; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; color: var(--ink-900); }
.d-pal__item.is-on { background: var(--rust-600); color: var(--sand-50); }
.d-pal__ic, .d-pal__ic svg { width: 16px; height: 16px; display: flex; flex: none; }
.d-pal__label { flex: 1; min-width: 0; font: 500 14px var(--d-chrome); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-pal__hint { font-size: 12px; opacity: .65; white-space: nowrap; }

/* ---------- Today ---------- */
.d-goals { display: flex; flex-direction: column; gap: 10px; }
.d-goals__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-goals__head .d-row { gap: 14px; flex-wrap: wrap; }
.d-goals__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.d-goal { padding: 16px 18px; }
.d-goal__n { font: 400 32px/.95 var(--display); }
.d-goal__of { font: 500 14px var(--body); color: var(--ink-600); }
.d-goal__edit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.d-goal__input { width: 84px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: rgba(31, 26, 22, .06); font: 500 15px var(--body); outline: 0; }
.d-goal__input:focus { box-shadow: inset 0 0 0 1.5px var(--rust-600); }
.d-gbar { position: relative; height: 8px; border-radius: 999px; background: var(--sand-300); display: block; }
.d-gbar__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; transition: width .3s; background: var(--ink-400); }
.d-gbar__fill--sage { background: var(--sage-600); } .d-gbar__fill--ochre { background: var(--ochre); } .d-gbar__fill--rust { background: var(--rust-600); }
.d-gbar__tick { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink-900); }
.d-kpi { border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--ink-900); text-decoration: none; padding: 14px 16px; gap: 4px; }
.d-kpi:hover { color: var(--ink-900); background: rgba(251, 247, 240, .95); }
.d-kpi__n { font: 400 42px/.9 var(--display); }
.d-kpi__sub { font-size: 13px; color: var(--ink-600); }
.d-kpi--tile { cursor: default; gap: 6px; }
a.d-kpi--tile { cursor: pointer; }
.d-kpi--tile .d-kpi__n { font-size: 40px; }
.d-kpi--ink { background: var(--ink-900); color: var(--sand-100); }
.d-kpi--ink:hover { background: var(--ink-900); color: var(--sand-100); }
.d-kpi--ink .d-label, .d-kpi--ink .d-kpi__sub { color: var(--ink-300); }
.d-kpi--rust .d-kpi__n { color: var(--rust-600); }
.d-kpi--ochre .d-kpi__n { color: var(--ochre-ink); }
.d-today { display: grid; gap: 12px; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.d-goal__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 1180px) { .d-today { grid-template-columns: 1fr; } }
.d-today__bottom { align-items: start; }
.d-needs { gap: 16px; padding: 18px 20px; }
.d-needs__group { display: flex; flex-direction: column; }
.d-needs__title { display: flex; align-items: center; gap: 7px; padding-bottom: 6px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.d-needs__title .d-dot { width: 8px; height: 8px; }
.d-need { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.d-need__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; font-family: var(--body); }
.d-need__text strong { font-weight: 600; font-size: 15px; }
.d-need__text span { font-size: 13.5px; color: var(--ink-600); }
a.d-need__text:hover strong { color: var(--rust-600); }
.d-queue { padding-left: 4px; }

.d-chart { padding: 18px 20px; gap: 12px; }
.d-chart__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.d-chart__title { margin: 0; font: 400 24px/.9 var(--display); text-transform: uppercase; }
.d-chart__title--mono { font: 600 12px var(--mono); letter-spacing: .12em; color: var(--ink-900); }
.d-chart__link { font: 600 13px var(--d-chrome); color: var(--rust-600); text-decoration: none; }
.d-svg { width: 100%; height: auto; display: block; overflow: visible; }
.d-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-600); }
.d-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.d-legend__item::before { content: ""; width: 14px; height: 0; border-top: 3px solid var(--rust-600); }
.d-legend__item--goal::before { border-top: 2px dashed var(--sage-600); }
.d-legend__item--proj::before { border-top: 2px dotted var(--rust-600); }
body.is-desk .c-grid { stroke: rgba(31, 26, 22, .1); stroke-width: 1; }
body.is-desk .c-area { fill: rgba(194, 70, 31, .1); }
body.is-desk .c-line { fill: none; stroke: var(--rust-600); stroke-width: 2.5; stroke-linejoin: round; }
body.is-desk .c-goal { stroke: var(--sage-600); stroke-width: 1.5; stroke-dasharray: 6 5; }
body.is-desk .c-proj { stroke: var(--rust-600); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; }
body.is-desk .c-dot { fill: var(--rust-600); stroke: var(--sand-50); stroke-width: 2; }
body.is-desk .c-label { font: 500 11px var(--mono); fill: var(--ink-500); }
body.is-desk .c-label--s { font-size: 9px; letter-spacing: .1em; }
body.is-desk .c-label--rust { fill: var(--rust-600); }
body.is-desk .c-big { font: 400 30px var(--display); fill: var(--ink-900); }
body.is-desk .c-text { font: 400 13px var(--body); fill: var(--ink-900); }
body.is-desk .c-text--b { font-weight: 600; font-size: 12px; }
body.is-desk .c-text--rust { fill: var(--rust-600); }
body.is-desk .c-bar { fill: var(--ink-900); }
body.is-desk .c-bar--sage { fill: var(--sage-600); } body.is-desk .c-bar--rust { fill: var(--rust-600); } body.is-desk .c-bar--ink { fill: var(--ink-800); } body.is-desk .c-bar--empty { fill: var(--sand-300); }
body.is-desk .c-seg { fill: none; stroke-width: 16; }
body.is-desk .c-seg--track { stroke: var(--sand-300); } body.is-desk .c-seg--sage { stroke: var(--sage-600); } body.is-desk .c-seg--ink { stroke: var(--ink-900); } body.is-desk .c-seg--ochre { stroke: var(--ochre); }
body.is-desk .c-seg--rust { stroke: var(--rust-600); } body.is-desk .c-seg--muted { stroke: var(--ink-400); }
.d-hchart { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.d-donut { width: 150px; height: 150px; flex: none; }
.d-hchart__list { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.d-hrow { display: grid; grid-template-columns: 110px 28px minmax(0, 1fr); gap: 10px; align-items: center; border: 0; background: none; padding: 2px 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.d-hrow:hover .d-hrow__label { color: var(--rust-600); }
.d-hrow__label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.d-hrow strong { font-size: 14px; }
.d-hrow__bar { height: 8px; border-radius: 999px; min-width: 2px; }

/* ---------- Clients ---------- */
.d-onbar { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-onbar .d-input { flex: 1 1 200px; min-width: 160px; max-width: 280px; }
.d-others { gap: 6px; }
.d-htiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.d-htile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 0; border-radius: 14px; background: var(--d-card); cursor: pointer; text-align: left; font: inherit; color: var(--ink-900); }
.d-htile:hover { background: rgba(251, 247, 240, .95); }
.d-htile.is-on { box-shadow: inset 0 0 0 2px currentColor; }
.d-htile--rust.is-on { color: var(--rust-600); } .d-htile--ochre.is-on { color: var(--ochre); } .d-htile--ink.is-on { color: var(--ink-900); }
.d-htile--sage.is-on { color: var(--sage-600); } .d-htile--muted.is-on { color: var(--ink-400); }
.d-htile__label { display: flex; align-items: center; gap: 7px; font: 600 13px var(--body); color: var(--ink-900); }
.d-htile__n { font: 400 42px/.9 var(--display); }
.d-htile--rust .d-htile__n { color: var(--rust-600); } .d-htile--ochre .d-htile__n { color: var(--ochre); } .d-htile--sage .d-htile__n { color: var(--sage-600); }
.d-htile--muted .d-htile__n { color: var(--ink-400); }
.d-htile__sub { font-size: 12.5px; color: var(--ink-600); }
div.d-htile--ink { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--ink-900); color: var(--sand-100); cursor: default; }
div.d-htile--ink > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
div.d-htile--ink .d-label, div.d-htile--ink .d-htile__sub { color: var(--ink-300); }
div.d-htile--ink .d-htile__n { color: var(--sand-100); }
div.d-htile--ink .d-htile__n.tone-rust-light { color: var(--rust-400); }
.d-ctable { padding: 0; overflow-x: auto; scrollbar-width: thin; }
.d-ctable__in { min-width: 1040px; }
.d-crow { display: grid; grid-template-columns: 132px minmax(240px, 2.2fr) 72px 64px 104px minmax(150px, 1.2fr) 108px 96px; gap: 12px; align-items: center; padding: 12px 14px 12px 12px; border-top: 1px solid var(--line); border-left: 3px solid transparent; color: var(--ink-900); text-decoration: none; font-size: 14px; }
.d-crow:hover { background: rgba(31, 26, 22, .04); color: var(--ink-900); }
.d-crow:focus-visible { outline: 2px solid var(--rust-600); outline-offset: -2px; }
.d-crow--head { border-top: 0; padding-top: 10px; padding-bottom: 10px; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-600); }
.d-crow--head:hover { background: none; }
.edge-rust { border-left-color: var(--rust-600); } .edge-ochre { border-left-color: var(--ochre); } .edge-ink { border-left-color: var(--ink-900); }
.edge-sage { border-left-color: var(--sage-600); } .edge-muted { border-left-color: var(--ink-300); }
.d-crow__client { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.d-crow__line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.d-crow__line strong { font-weight: 600; font-size: 15px; }
.d-crow__for { display: flex; flex-direction: column; gap: 1px; }
.d-crow__bill { display: flex; align-items: center; gap: 7px; font-size: 13.5px; }
.d-crow__bill .d-dot { background: currentColor; }
.d-crow__bill.tone-ink, .d-crow__bill.tone-muted { color: var(--ink-600); }
.d-osegs { display: inline-flex; align-items: center; gap: 6px; }
.d-osegs__bar { display: flex; gap: 2px; }
.d-oseg { width: 10px; height: 6px; border-radius: 2px; background: var(--sand-300); }
.d-oseg.is-done { background: var(--ink-900); }
.d-osegs__n { font: 500 11px var(--mono); color: var(--ink-600); }
.d-legendline { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-600); }
.d-legendline > span { display: inline-flex; align-items: center; gap: 6px; }
.d-legendline strong { color: var(--ink-900); font-weight: 600; }

/* ---------- client control center ---------- */
.d-cctop { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-600); }
.d-cctop__back { font: 500 13px var(--d-chrome); color: var(--rust-600); text-decoration: none; }
.d-cchead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.d-cchead__who { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.d-cchead__name { margin: 0; font: 400 46px/.88 var(--display); text-transform: uppercase; }
.d-cchead__acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.d-cc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 300px); gap: 24px; align-items: start; }
@media (max-width: 1100px) { .d-cc { grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; } }
.d-cc__main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.d-cctabs { max-width: 100%; }
.d-cc__title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.d-cc__h { margin: 0; font: 400 28px/.9 var(--display); text-transform: uppercase; }
.d-rail { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.d-railsec { display: flex; flex-direction: column; gap: 8px; }
.d-railcard { background: var(--d-box); border-radius: 14px; overflow: hidden; }
.d-railcard__pad { padding: 12px 12px 10px; }
.d-railcard .d-kv { padding: 10px 16px; font-size: 13.5px; min-height: 42px; }
.d-railcard .d-kv__k { color: var(--ink-600); flex: none; }
.d-railcard .d-kv:first-child { border-top: 0; }
.d-railcard__pad + .d-kv { border-top: 1px solid var(--line); }
.d-kv__btn { min-width: 0; border: 0; background: none; padding: 0; cursor: text; font: 500 13.5px var(--body); color: var(--ink-900); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-kv__btn:hover { color: var(--rust-600); }
.d-kv__in { flex: 1; min-width: 0; height: 26px; padding: 0 8px; border: 0; border-radius: 6px; outline: 2px solid var(--rust-600); background: var(--sand-50); font: 500 13.5px var(--body); text-align: right; }
.d-kv a.d-kv__v { min-width: 0; color: var(--ink-900); font-weight: 500; }
.d-notes { width: 100%; resize: vertical; padding: 12px 14px; border: 0; border-radius: 14px; background: var(--d-box); font: 400 14px/1.5 var(--body); outline: 0; }
.d-notes:focus { box-shadow: inset 0 0 0 1.5px var(--rust-600); }
.d-ccbody { min-width: 0; }

/* the client's Billing */
.d-bill { gap: 22px; }
.d-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d-block__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 24px; flex-wrap: wrap; }
.d-block__head .d-label { margin: 0; }
.d-glassbox { background: var(--d-box); border-radius: 14px; overflow: hidden; }
.d-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px; font-size: 14px; border-top: 1px solid var(--line); }
.d-glassbox > .d-line:first-child, .d-glassbox > .d-charge:first-child { border-top: 0; }
.d-line.is-strong { font-weight: 600; }
.d-line__v { font-family: var(--mono); text-align: right; }
.d-line__k { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.d-pad-s { margin: 0; padding: 12px 16px; }
.d-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; background: var(--sand-300); font-size: 14px; font-weight: 500; }
.d-banner > span { flex: 1; }
.d-banner--ochre { background: var(--ochre-100); color: var(--ochre-ink); }
.d-banner--rust { background: var(--warn-bg); color: var(--warn-ink); }
.d-ttiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.d-ttile { padding: 12px 16px; border-radius: 14px; display: flex; flex-direction: column; gap: 3px; background: var(--d-card); min-width: 0; }
.d-ttile__n { font: 400 30px/.95 var(--display); }
.d-ttile--ink { background: var(--ink-900); color: var(--sand-100); }
.d-ttile--ink .d-label, .d-ttile--ink .d-meta { color: var(--ink-300); }
.d-ttile--sand { background: var(--sand-300); }
.d-ttile--ochre { background: var(--ochre-100); }
.d-ttile--sage { background: var(--sage-100); }
.d-card-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.d-brand { width: 34px; height: 22px; flex: none; border-radius: 4px; background: var(--ink-900); color: var(--sand-100); display: flex; align-items: center; justify-content: center; font: 700 8.5px var(--body); letter-spacing: .04em; }
.d-charge { border-top: 1px solid var(--line); }
.d-charge > .d-line { border-top: 0; }
.d-charge__note { margin: 0; padding: 0 16px 10px; }
.d-refund { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 16px 12px; }
.d-money { display: inline-flex; align-items: center; gap: 2px; width: 110px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--sand-50); box-shadow: inset 0 0 0 1px rgba(31, 26, 22, .1); font: 500 13px var(--mono); color: var(--ink-500); }
.d-money__in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 13.5px var(--mono); color: var(--ink-900); }
.is-struck { text-decoration: line-through; color: var(--ink-500); }
/* ---------- Billing page ---------- */
.d-linetabs { display: flex; gap: 2px; border-bottom: 1.5px solid var(--ink-900); }
.d-linetabs a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 10px 10px 0 0; font: 500 14.5px var(--d-chrome); color: var(--ink-600); text-decoration: none; }
.d-linetabs a.is-on { background: var(--ink-900); color: var(--sand-100); }
.d-bgrid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .d-bgrid { grid-template-columns: minmax(0, 1fr) 280px; } }
.d-btable { padding: 0; gap: 0; overflow: hidden; }
.d-btable > .d-empty { padding: 28px; text-align: center; }
.d-brow { display: grid; grid-template-columns: minmax(0, 1.6fr) 90px 96px 120px; gap: 12px; align-items: center; padding: 12px 16px 12px 13px; border: 0; border-top: 1px solid var(--line); border-left: 3px solid transparent; background: none; cursor: pointer; text-align: left; font: inherit; color: var(--ink-900); width: 100%; }
.d-brow:first-child { border-top: 0; }
.d-brow:hover { background: rgba(31, 26, 22, .04); }
.d-brow.is-on { background: rgba(194, 70, 31, .08); }
.d-brow__who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.d-brow__who strong { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-brow__end { justify-self: end; text-align: right; font-size: 12.5px; }
.d-bpanel { position: sticky; top: 64px; }
.d-bpanel__in { display: flex; flex-direction: column; gap: 12px; }
.d-bpanel__more { padding-top: 4px; }
.d-panel__name { margin: 0; font: 400 30px/.95 var(--display); text-transform: uppercase; }

/* ---------- list + detail (Previews, Changes, Pre-founding) ---------- */
.d-ldhost { min-height: calc(100vh - 56px); display: flex; }
.d-ld { --d-list: 340px; display: flex; flex: 1; min-width: 0; min-height: calc(100vh - 56px); }
.d-ld__col { position: sticky; top: 56px; width: var(--d-list); flex: none; height: calc(100vh - 56px); border-right: 1px solid var(--line); display: flex; }
.d-ld__list { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; }
.d-ld__grip { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; z-index: 5; cursor: col-resize; }
.d-ld__grip:hover, .d-ld.is-dragging .d-ld__grip, .d-ld__grip:focus-visible { background: rgba(194, 70, 31, .18); outline: 0; }
.d-ld.is-dragging { user-select: none; cursor: col-resize; }
.d-ld__head { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.d-ld__head .d-search { flex: none; max-width: none; height: 32px; }
.d-ld__title { font: 700 15px var(--d-chrome); }
.d-ld__rows { padding: 0 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.d-ld__rows .d-empty { padding: 24px 12px; text-align: center; }
.d-ld__detail { flex: 1; min-width: 0; }
.d-lrow { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 10px 24px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; font: inherit; color: var(--ink-900); width: 100%; }
.d-lrow:hover { background: rgba(31, 26, 22, .04); }
.d-lrow.is-on { background: var(--rust-600); color: var(--sand-50); }
.d-lrow::before { content: ""; position: absolute; left: 3px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: transparent; }
.d-lrow__dot { position: absolute; left: 10px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.d-lrow.is-unread .d-lrow__dot { background: var(--rust-600); }
.d-lrow__dot--ochre { background: var(--ochre) !important; } .d-lrow__dot--ink { background: var(--ink-900) !important; }
.d-lrow.is-unread .d-lrow__dot--ochre { background: var(--ochre); }
.d-lrow.is-on .d-lrow__dot { background: var(--sand-50) !important; }
.d-lrow__top { display: flex; justify-content: space-between; gap: 8px; }
.d-lrow__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-lrow.is-unread .d-lrow__title { font-weight: 700; }
.d-lrow__meta { flex: none; font-size: 12px; color: var(--ink-500); }
.d-lrow__sub { font-size: 13px; line-height: 1.4; color: var(--ink-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.d-lrow.is-on .d-lrow__meta, .d-lrow.is-on .d-lrow__sub { color: rgba(251, 247, 240, .8); }
.d-lrow > .d-chip, .d-lrow > .d-row { align-self: flex-start; margin-top: 3px; }
.d-lrow.is-on .d-chip { background: rgba(251, 247, 240, .2); color: var(--sand-50); box-shadow: none; }
.d-detail { max-width: 780px; padding: 28px 36px 48px; display: flex; flex-direction: column; gap: 16px; }
.d-detail__title { margin: 0; font: 400 44px/.9 var(--display); text-transform: uppercase; text-wrap: balance; }
.d-detail__title a { color: inherit; text-decoration: none; }
.d-detail__none { height: 100%; min-height: 50vh; display: flex; align-items: center; justify-content: center; color: var(--ink-500); font-size: 14px; padding: 40px; }
.d-dl { margin: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr); background: var(--d-card); border-radius: 14px; padding: 4px 16px; }
.d-dl dt { padding: 11px 0; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-600); border-top: 1px solid var(--line); }
.d-dl dd { margin: 0; padding: 11px 0; font-size: 15px; min-width: 0; overflow-wrap: anywhere; border-top: 1px solid var(--line); }
.d-dl dt:first-of-type, .d-dl dt:first-of-type + dd { border-top: 0; }
.d-pfsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--ink-900); color: var(--sand-100); }
.d-pfsum > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.d-pfsum .d-label, .d-pfsum .d-meta { color: var(--ink-300); }
.d-pfsum__n { font: 400 28px/.95 var(--display); }

/* ---------- Legal ---------- */
.d-lgstate { font-size: 12.5px; color: var(--sage-ink); font-weight: 600; }
.d-lgstate.is-dirty { color: var(--ochre-ink); }
.d-lg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
@media (max-width: 1280px) { .d-lg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .d-lg__side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; } }
.d-lg__col, .d-lg__side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.d-lg__side { gap: 16px; }
.d-lgedit { width: 100%; min-height: 560px; resize: vertical; padding: 16px 18px; border: 0; border-radius: 14px; outline: 0; font: 400 14px/1.6 var(--mono); color: var(--ink-900); background: rgba(251, 247, 240, .85); box-shadow: inset 0 0 0 1px rgba(31, 26, 22, .08); }
.d-lgedit:focus { box-shadow: inset 0 0 0 1.5px var(--ink-900); }
.d-lgprev { background: var(--sand-50); border-radius: 14px; padding: 26px 28px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 0 0 1px rgba(31, 26, 22, .06); max-height: 640px; overflow-y: auto; font-family: var(--body); }
.d-lgprev__host { font: 500 11px var(--mono); color: var(--ink-500); }
.d-lgprev__title { margin: 0; font: 400 34px/.9 var(--display); text-transform: uppercase; }
.d-lgprev__meta { margin: 0; font-size: 12.5px; color: var(--ink-600); }
.d-lgprev__body { display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; line-height: 1.6; }
.d-lgprev__body h2 { margin: 8px 0 0; font: 700 16px var(--body); }
.d-lgprev__body p { margin: 0; text-wrap: pretty; }
.d-lgprev__body ul { margin: 0; padding-left: 20px; list-style: disc; display: flex; flex-direction: column; gap: 4px; }
.d-lgprev__body a { color: var(--rust-600); }

@media print {
  .d-side, .d-tb { display: none; }
  .d-app { padding-left: 0; }
}

/* ---------- shared bits from desk-lib.js ---------- */
.d-textmsg { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--d-box); }
.d-textmsg__body { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.d-pays { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 600; }
.d-waived s { color: var(--ink-500); }
.d-waived { color: var(--sage-ink); font-weight: 500; }
.d-credit { align-items: center; }
.d-credit__why { flex: 1 1 200px; height: 30px; }
