/* === Nuvera Admin === lifted brand tokens from client site, retuned for density */
:root {
  --sage: #4A6741;
  --sage-light: #F1F4EF;
  --sage-tint: #E2EAE0;
  --sage-deep: #3A5132;
  --sage-wash: #F6F8F3;
  --gold: #C4A45A;
  --gold-light: #F6EFDC;
  --gold-deep: #9C8244;
  --dark: #1C2420;
  --dark-soft: #2A332D;
  --cream: #FAF8F4;
  --cream-deep: #F3EFE6;
  --white: #FFFFFF;
  --ink: #2A2A2A;
  --ink-2: #4B4F4A;
  --ink-muted: #6B6F6A;
  --ink-faint: #9A9E9A;
  --border: #E2EAE0;
  --border-soft: #ECEEE9;
  --border-line: #DFE3DC;
  --danger: #C47A5A;
  --danger-bg: #FBEEE7;
  --warn: #C4A45A;
  --done: #C8CCC8;
  --pending: #9A9E9A;

  /* Density (overridden when [data-density="compact"] is set) */
  --row-y: 14px;
  --row-x: 18px;
  --card-pad: 24px;
  --gap-md: 20px;
  --gap-lg: 28px;
  --radius: 2px;
}

[data-density="compact"] {
  --row-y: 10px;
  --row-x: 14px;
  --card-pad: 18px;
  --gap-md: 14px;
  --gap-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold-light); }

.serif { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -0.01em; }
.eyebrow { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.label-up { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.mono { font-family: 'SFMono-Regular', Menlo, Consolas, monospace; }
.tabular { font-variant-numeric: tabular-nums; }

/* === Shell === */
.shell { display: grid; grid-template-columns: var(--sb-w, 240px) 1fr; min-height: 100vh; }
.shell[data-sidebar="rail"] { --sb-w: 64px; }

/* Sidebar */
.sidebar { background: var(--white); border-right: 1px solid var(--border-line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 20px; border-bottom: 1px solid var(--border-soft); }
.sb-brand .mk { width: 32px; height: 32px; border: 1px solid var(--sage); color: var(--sage); display: grid; place-items: center; font-family: Georgia; font-size: 17px; font-style: italic; flex: 0 0 32px; }
.sb-brand .nm { font-family: Georgia; font-size: 17px; color: var(--dark); }
.sb-brand .sub { font-size: 8px; letter-spacing: 2.5px; color: var(--gold); text-transform: uppercase; margin-top: 1px; font-weight: 700; }
.sb-nav { flex: 1; overflow-y: auto; padding: 14px 10px 24px; }
.sb-group { padding: 18px 8px 6px; font-size: 9px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.sb-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; font-size: 13px; color: var(--ink-2); border-radius: 2px; position: relative; cursor: pointer; user-select: none; transition: background .15s, color .15s; }
.sb-item:hover { background: var(--sage-wash); color: var(--sage-deep); }
.sb-item.active { background: var(--sage-light); color: var(--sage-deep); font-weight: 600; }
.sb-item.active::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 2px; background: var(--sage); }
.sb-item .ic { width: 16px; height: 16px; flex: 0 0 16px; color: currentColor; }
.sb-item .count { margin-left: auto; font-size: 10px; padding: 2px 7px; background: var(--gold); color: white; border-radius: 10px; font-weight: 700; letter-spacing: .3px; min-width: 18px; text-align: center; }
.sb-item.active .count { background: var(--sage); }
.sb-foot { padding: 14px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-muted); }
.sb-foot .pulse { width: 8px; height: 8px; background: var(--sage); border-radius: 50%; box-shadow: 0 0 0 0 rgba(74,103,65,.5); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,103,65,.45); } 70% { box-shadow: 0 0 0 8px rgba(74,103,65,0); } 100% { box-shadow: 0 0 0 0 rgba(74,103,65,0); } }

[data-sidebar="rail"] .sb-brand .nm-wrap,
[data-sidebar="rail"] .sb-group,
[data-sidebar="rail"] .sb-item .lbl,
[data-sidebar="rail"] .sb-item .count,
[data-sidebar="rail"] .sb-foot span { display: none; }
[data-sidebar="rail"] .sb-brand { justify-content: center; padding: 18px 0; }
[data-sidebar="rail"] .sb-item { justify-content: center; padding: 12px 8px; }
[data-sidebar="rail"] .sb-foot { justify-content: center; }

/* Topbar */
.topbar { display: flex; align-items: center; gap: 18px; height: 62px; padding: 0 28px; background: var(--white); border-bottom: 1px solid var(--border-line); position: sticky; top: 0; z-index: 30; }
.topbar .search { flex: 0 1 360px; position: relative; }
.topbar .search input { width: 100%; padding: 9px 12px 9px 36px; background: var(--cream); border: 1px solid var(--border); font-size: 13px; outline: none; }
.topbar .search input:focus { border-color: var(--sage); background: white; }
.topbar .search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); width: 14px; height: 14px; }
.topbar .spacer { flex: 1; }
.topbar .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 2px; color: var(--ink-2); position: relative; transition: background .15s; }
.topbar .icon-btn:hover { background: var(--cream-deep); }
.topbar .icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; background: var(--gold); border-radius: 50%; border: 2px solid var(--white); }
.topbar .user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 2px; cursor: pointer; }
.topbar .user:hover { background: var(--cream-deep); }
.topbar .user .av { width: 30px; height: 30px; background: var(--sage); color: white; display: grid; place-items: center; font-family: Georgia; font-size: 13px; font-style: italic; }
.topbar .user .nm { font-size: 13px; font-weight: 600; }
.topbar .user .rl { font-size: 11px; color: var(--ink-faint); }

/* Page wrapper */
.main { background: var(--cream); min-height: 100vh; }
.page { padding: 22px 32px 64px; }
.crumb { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; font-weight: 600; }
.crumb a:hover { color: var(--sage); }
.crumb .sep { margin: 0 8px; color: var(--ink-faint); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-head h1 { font-family: Georgia; font-size: 30px; color: var(--dark); font-weight: 400; letter-spacing: -0.01em; }
.page-head .sub { color: var(--ink-muted); font-size: 13px; margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; font-weight: 700; padding: 10px 16px; border: 1px solid var(--sage); transition: background .15s, color .15s, border-color .15s; white-space: nowrap; }
.btn:hover { transform: none; }
.btn-primary { background: var(--sage); color: white; }
.btn-primary:hover { background: var(--sage-deep); border-color: var(--sage-deep); }
.btn-gold { background: var(--gold); color: white; border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn-ghost { background: transparent; color: var(--sage); }
.btn-ghost:hover { background: var(--sage-light); }
.btn-neutral { background: white; color: var(--ink); border-color: var(--border); }
.btn-neutral:hover { background: var(--cream-deep); border-color: var(--ink-faint); }
.btn-danger { background: white; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; }
.btn-sm { padding: 7px 12px; font-size: 10px; letter-spacing: 1.4px; }
.btn-xs { padding: 5px 9px; font-size: 9.5px; letter-spacing: 1.3px; }
.btn-icon { padding: 7px; min-width: 30px; }

/* Cards */
.card { background: white; border: 1px solid var(--border-soft); }
.card-pad { padding: var(--card-pad); }
.card-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-soft); }
.card-hd h3 { font-family: Georgia; font-size: 17px; font-weight: 400; color: var(--dark); }
.card-hd .meta { font-size: 12px; color: var(--ink-muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; border: 1px solid; }
.badge .pip { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-new { color: var(--gold-deep); background: var(--gold-light); border-color: #E8D9A8; }
.badge-conf { color: var(--sage-deep); background: var(--sage-light); border-color: var(--sage-tint); }
.badge-done { color: var(--ink-muted); background: #ECEEE9; border-color: #DCDFD9; }
.badge-cancel { color: var(--danger); background: var(--danger-bg); border-color: #EBD0C2; }
.badge-draft { color: var(--ink-muted); background: #F1F1EE; border-color: #DCDFD9; }
.badge-pub { color: var(--sage-deep); background: var(--sage-light); border-color: var(--sage-tint); }
.badge-unread { color: var(--gold-deep); background: var(--gold-light); border-color: #E8D9A8; }
.badge-read { color: var(--ink-muted); background: #ECEEE9; border-color: #DCDFD9; }
.badge-arch { color: var(--ink-faint); background: #F1F1EE; border-color: #DCDFD9; }
.badge-role-super { color: white; background: var(--dark); border-color: var(--dark); }
.badge-role-recep { color: var(--sage-deep); background: var(--sage-light); border-color: var(--sage-tint); }
.badge-role-edit { color: var(--gold-deep); background: var(--gold-light); border-color: #E8D9A8; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
.stat { background: white; border: 1px solid var(--border-soft); padding: 22px; position: relative; overflow: hidden; }
.stat .lbl { font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
.stat .val { font-family: Georgia; font-size: 42px; color: var(--dark); margin-top: 12px; letter-spacing: -0.02em; }
.stat .delta { font-size: 11px; margin-top: 8px; color: var(--ink-muted); display: flex; align-items: center; gap: 6px; }
.stat .delta.up { color: var(--sage); }
.stat .delta.down { color: var(--danger); }
.stat .accent { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--sage); }
.stat.gold .accent { background: var(--gold); }
.stat .spark { position: absolute; right: 0; bottom: 0; opacity: .85; }

/* Tables */
.table-wrap { background: white; border: 1px solid var(--border-soft); overflow: hidden; }
.table-tools { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; padding: 11px var(--row-x); border-bottom: 1px solid var(--border-soft); background: var(--cream); white-space: nowrap; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--sage); }
.table th .arr { display: inline-block; margin-left: 4px; opacity: .5; }
.table td { padding: var(--row-y) var(--row-x); border-bottom: 1px solid var(--border-soft); font-size: 13px; vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--sage-wash); }
.table tbody tr.selected { background: var(--sage-light); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .name { font-weight: 600; color: var(--dark); }
.table .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.table .row-actions .icon-btn { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid transparent; transition: background .12s, border-color .12s; color: var(--ink-2); border-radius: 2px; }
.table .row-actions .icon-btn:hover { background: white; border-color: var(--border); color: var(--sage); }
.table .row-actions .icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.table .check { width: 28px; }
.table input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--sage); cursor: pointer; }

/* Filter chips / pills */
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); background: white; font-size: 11.5px; letter-spacing: .2px; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.filter-chip:hover { border-color: var(--sage); color: var(--sage); }
.filter-chip.active { background: var(--sage); color: white; border-color: var(--sage); }
.filter-chip .ct { background: rgba(0,0,0,.08); padding: 1px 6px; border-radius: 8px; font-size: 10px; font-weight: 700; }
.filter-chip.active .ct { background: rgba(255,255,255,.2); }
.filter-group { display: inline-flex; gap: 0; border: 1px solid var(--border); }
.filter-group .filter-chip { border: 0; border-right: 1px solid var(--border); border-radius: 0; }
.filter-group .filter-chip:last-child { border-right: 0; }

select.dropdown, input.text-in, .input { padding: 8px 12px; border: 1px solid var(--border); background: white; font-size: 12.5px; outline: none; min-height: 34px; color: var(--ink); }
select.dropdown:focus, input.text-in:focus, .input:focus { border-color: var(--sage); }

/* Forms */
.form-row { display: grid; gap: 18px; }
.form-row.two { grid-template-columns: 1fr 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 10.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
.field .help { font-size: 11px; color: var(--ink-faint); }
.field .err { font-size: 11px; color: var(--danger); }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field input[type="time"], .field input[type="date"], .field input[type="password"], .field select, .field textarea {
  background: var(--cream);
  border: 1px solid var(--border);
  padding: 10px 13px;
  font-family: Arial;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sage); background: white; }
.field .counter { font-size: 10.5px; color: var(--ink-faint); align-self: flex-end; }
.field-row-end { display: flex; justify-content: space-between; align-items: baseline; }

/* Toggle */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .tk { width: 32px; height: 18px; background: #D6D9D3; border-radius: 20px; position: relative; transition: background .2s; }
.toggle .tk::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: white; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.toggle input:checked + .tk { background: var(--sage); }
.toggle input:checked + .tk::after { transform: translateX(14px); }
.toggle .lbl { font-size: 12.5px; color: var(--ink-2); }

/* Drawer */
.drawer-back { position: fixed; inset: 0; background: rgba(28,36,32,.36); backdrop-filter: blur(2px); z-index: 80; opacity: 0; animation: fadeIn .2s ease forwards; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: calc(100vw - 80px); background: var(--cream); z-index: 90; display: flex; flex-direction: column; transform: translateX(20px); opacity: 0; animation: slideIn .25s ease forwards; box-shadow: -16px 0 40px rgba(28,36,32,.12); }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideIn { to { transform: translateX(0); opacity: 1; } }
.drawer-hd { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--border-soft); background: white; }
.drawer-hd .num { font-family: Georgia; font-size: 13px; color: var(--gold); margin-right: 6px; }
.drawer-hd h2 { font-family: Georgia; font-size: 20px; font-weight: 400; flex: 1; }
.drawer-bd { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.drawer-ft { padding: 14px 22px; border-top: 1px solid var(--border-soft); background: white; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.section-box { background: white; border: 1px solid var(--border-soft); padding: 18px 20px; }
.section-box h4 { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--ink-muted); margin-bottom: 12px; font-family: Arial; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 18px; font-size: 13px; }
.kv dt { color: var(--ink-faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; padding-top: 2px; }
.kv dd { color: var(--ink); }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(28,36,32,.48); display: grid; place-items: center; z-index: 100; padding: 24px; opacity: 0; animation: fadeIn .15s ease forwards; }
.modal { background: var(--cream); width: 100%; max-width: 520px; box-shadow: 0 30px 60px rgba(0,0,0,.18); transform: translateY(8px); opacity: 0; animation: popIn .2s ease forwards; }
@keyframes popIn { to { transform: translateY(0); opacity: 1; } }
.modal-hd { padding: 18px 22px; border-bottom: 1px solid var(--border-soft); background: white; display: flex; align-items: center; justify-content: space-between; }
.modal-hd h3 { font-family: Georgia; font-size: 19px; font-weight: 400; }
.modal-bd { padding: 22px; }
.modal-ft { padding: 14px 22px; border-top: 1px solid var(--border-soft); background: white; display: flex; gap: 10px; justify-content: flex-end; }

/* Toasts */
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; pointer-events: none; }
.toast { background: var(--dark); color: white; padding: 12px 18px; min-width: 260px; max-width: 360px; font-size: 13px; display: flex; align-items: center; gap: 12px; transform: translateX(8px); opacity: 0; animation: toastIn .25s ease forwards; pointer-events: auto; border-left: 3px solid var(--sage); }
.toast.warn { border-left-color: var(--gold); }
.toast.err { border-left-color: var(--danger); }
.toast .ico { width: 18px; height: 18px; flex: 0 0 18px; color: var(--sage); }
.toast.warn .ico { color: var(--gold); }
.toast.err .ico { color: var(--danger); }
.toast .x { margin-left: auto; opacity: .5; cursor: pointer; }
@keyframes toastIn { to { transform: translateX(0); opacity: 1; } }

/* Empty states */
.empty { padding: 56px 24px; text-align: center; color: var(--ink-muted); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 14px; background: var(--sage-light); border-radius: 50%; display: grid; place-items: center; color: var(--sage); }
.empty h4 { font-family: Georgia; font-size: 18px; color: var(--dark); margin-bottom: 6px; font-weight: 400; }
.empty p { font-size: 13px; max-width: 320px; margin: 0 auto 16px; }

/* Tags / chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; background: var(--sage-light); border: 1px solid var(--sage-tint); color: var(--sage-deep); font-size: 11.5px; font-weight: 600; cursor: grab; user-select: none; transition: all .15s; }
.chip:hover { background: var(--sage); color: white; border-color: var(--sage); }
.chip.dragging { opacity: .5; }
.chip .x { cursor: pointer; opacity: .6; margin-left: 2px; }
.chip .x:hover { opacity: 1; }
.chip.gold { background: var(--gold-light); border-color: #E8D9A8; color: var(--gold-deep); }
.chip.gold:hover { background: var(--gold); color: white; }

/* Calendar */
.cal { background: white; border: 1px solid var(--border-soft); display: grid; grid-template-columns: 70px repeat(7, 1fr); }
.cal-cell { border-right: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); position: relative; min-height: 50px; }
.cal-cell:nth-child(8n) { border-right: 0; }
.cal-head { padding: 12px 10px; text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-muted); font-weight: 700; background: var(--cream); }
.cal-head .d { font-family: Georgia; font-size: 22px; color: var(--dark); margin-top: 4px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.cal-head.today .d { color: var(--sage); }
.cal-head.today .d::after { content: ''; display: block; width: 4px; height: 4px; background: var(--gold); border-radius: 50%; margin: 4px auto 0; }
.cal-hour { padding: 6px 10px; font-size: 11px; color: var(--ink-faint); text-align: right; background: var(--cream); }
.cal-day { min-height: 56px; padding: 4px; cursor: copy; transition: background .12s; }
.cal-day:hover { background: var(--sage-wash); }
.cal-slot { background: var(--sage-light); border-left: 3px solid var(--sage); padding: 6px 8px; font-size: 11.5px; cursor: grab; user-select: none; transition: transform .12s, box-shadow .12s; }
.cal-slot.gold { background: var(--gold-light); border-left-color: var(--gold); }
.cal-slot.blocked { background: #ECEEE9; border-left-color: var(--ink-faint); color: var(--ink-muted); cursor: not-allowed; }
.cal-slot:hover:not(.blocked) { box-shadow: 0 2px 6px rgba(0,0,0,.08); transform: translateY(-1px); }
.cal-slot.dragging { opacity: .4; }
.cal-slot .nm { font-weight: 700; color: var(--dark); }
.cal-slot .sv { color: var(--ink-muted); font-size: 10.5px; }

/* WYSIWYG */
.editor-toolbar { display: flex; gap: 4px; padding: 8px; background: var(--cream); border: 1px solid var(--border); border-bottom: 0; flex-wrap: wrap; }
.editor-toolbar .tb-btn { padding: 6px 9px; font-size: 12px; border: 1px solid transparent; min-width: 30px; color: var(--ink-2); border-radius: 2px; }
.editor-toolbar .tb-btn:hover { background: white; border-color: var(--border); }
.editor-toolbar .tb-btn.active { background: var(--sage); color: white; border-color: var(--sage); }
.editor-toolbar .sep { width: 1px; background: var(--border); margin: 4px 4px; }
.editor-body { border: 1px solid var(--border); background: white; padding: 22px 28px; min-height: 360px; font-family: Georgia; font-size: 16px; line-height: 1.7; color: var(--ink); outline: none; }
.editor-body:focus { border-color: var(--sage); }
.editor-body h1 { font-size: 28px; margin: 20px 0 12px; }
.editor-body h2 { font-size: 22px; margin: 18px 0 10px; }
.editor-body h3 { font-size: 18px; margin: 14px 0 8px; }
.editor-body p { margin: 0 0 12px; }
.editor-body blockquote { border-left: 3px solid var(--gold); padding: 4px 16px; color: var(--ink-muted); font-style: italic; margin: 12px 0; }
.editor-body a { color: var(--sage); text-decoration: underline; }
.editor-body ul, .editor-body ol { padding-left: 22px; margin: 0 0 12px; }

/* Tab strip */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border-soft); margin-bottom: 22px; }
.tabs .tab { padding: 10px 0; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; position: relative; cursor: pointer; transition: color .15s; }
.tabs .tab:hover { color: var(--sage); }
.tabs .tab.active { color: var(--sage-deep); }
.tabs .tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--sage); }

/* Misc */
.divider { height: 1px; background: var(--border-soft); margin: 16px 0; }
.row-gap-sm { display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: var(--gap-md); }
.gap-lg { gap: var(--gap-lg); }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-main { grid-template-columns: 2fr 1fr; }

.bd-bottom { border-bottom: 1px solid var(--border-soft); }
.svc-icon { color: var(--sage); }
.avatar { width: 32px; height: 32px; background: var(--sage); color: white; display: grid; place-items: center; font-family: Georgia; font-style: italic; font-size: 14px; flex: 0 0 32px; }
.avatar.gold { background: var(--gold); }
.avatar.lg { width: 56px; height: 56px; font-size: 24px; }

/* Brand emphasis (bolder) — when enabled, page bg gets a warmer wash */
[data-brand="bold"] .main { background: linear-gradient(180deg, var(--cream-deep), var(--cream) 320px); }
[data-brand="bold"] .stat { background: linear-gradient(180deg, var(--sage-wash), white 60%); }
[data-brand="bold"] .card-hd { background: var(--sage-wash); }
[data-brand="bold"] .topbar { background: var(--cream); }

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; border: 2px solid var(--cream); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }
