:root {
    --sidebar-w: 255px;
    --sidebar-bg: #12253a;
    --sidebar-hover: rgba(255,255,255,0.07);
    --sidebar-active: rgba(42,181,181,0.15);
    --sidebar-accent: #2ab5b5;
    --admin-bg: #f0f4f9;
    --card-bg: #ffffff;
    --border: #e4eaf3;
    --primary: #1a6fc4;
    --text: #1e2d3d;
    --muted: #6b7a8d;
    --danger: #e53e3e;
    --success-bg: #e8f8f0;
    --success-border: #9ae6c4;
    --success-text: #1a6b42;
    --scrollbar: #cdd7e6;
    --scrollbar-hover: #aab8cc;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.admin-body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--admin-bg);
    color: var(--text);
    font-size: 0.9rem;
}

/* ── SCROLLBARS (themed, subtle) ─────────────────────────────
   admin.css is only loaded inside the admin layout, so these
   rules never touch the public site. */
.admin-body,
.admin-body * { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }
.admin-body ::-webkit-scrollbar,
.admin-body::-webkit-scrollbar { width: 8px; height: 8px; }
.admin-body ::-webkit-scrollbar-track,
.admin-body::-webkit-scrollbar-track { background: transparent; }
.admin-body ::-webkit-scrollbar-thumb,
.admin-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.admin-body ::-webkit-scrollbar-thumb:hover,
.admin-body::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); background-clip: padding-box; }
.admin-body ::-webkit-scrollbar-corner { background: transparent; }

/* Dark sidebar needs a light translucent thumb to blend in */
.sidebar-nav { scrollbar-color: rgba(255,255,255,0.18) transparent; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border: 2px solid transparent;
    background-clip: padding-box;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); background-clip: padding-box; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-brand .brand-icon {
    width: 38px; height: 38px;
    background: var(--sidebar-accent);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 10px;
}
.sidebar-brand .brand-name {
    display: block;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}
.sidebar-brand .brand-sub {
    color: rgba(255,255,255,0.45);
    font-size: 0.75rem;
}

.sidebar-section-label {
    padding: 16px 20px 6px;
    color: rgba(255,255,255,0.3);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 600;
}

.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.18s;
}
.sidebar-nav a i { font-size: 1rem; min-width: 18px; }
.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: rgba(255,255,255,0.92);
}
.sidebar-nav a.active {
    background: var(--sidebar-active);
    color: white;
    border-left-color: var(--sidebar-accent);
}

/* Sortable table-header links (admin Requests) */
.sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}
.sort-link:hover { color: var(--sidebar-accent, #2563eb); }
.sort-link i { font-size: .8rem; }

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sidebar-footer a, .sidebar-footer button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    transition: all 0.18s;
}
.sidebar-footer a:hover, .sidebar-footer button:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.9);
}
.sidebar-footer button { color: rgba(229,115,115,0.8); }
.sidebar-footer button:hover { color: #fc8181; background: rgba(229,115,115,0.08); }

/* ── MAIN ────────────────────────────────────────────────── */
.admin-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    /* min-width:0 lets this flex item shrink below its content's intrinsic
       width, so wide tables scroll inside .table-responsive instead of
       stretching the whole page (horizontal scroll on mobile). */
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title { font-weight: 700; font-size: 1rem; color: var(--text); }
.topbar-breadcrumb { color: var(--muted); font-size: 0.82rem; margin-left: auto; }

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

.admin-content { padding: 28px; flex: 1; min-width: 0; }

/* ── CARDS ───────────────────────────────────────────────── */
.a-card {
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 6px rgba(26,111,196,0.05);
}
.a-card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.a-card-header h6 { font-weight: 700; font-size: 0.9rem; margin: 0; }
.a-card-body { padding: 22px; }

/* ── DASHBOARD STATS ─────────────────────────────────────── */
.dash-stat {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.dash-stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.dash-stat-icon.blue { background: #e8f1fb; color: var(--primary); }
.dash-stat-icon.teal { background: #e0f7f7; color: #2ab5b5; }
.dash-stat-icon.green { background: #e8f8f0; color: #2e7d52; }
.dash-stat-icon.purple { background: #f0ebff; color: #6b46c1; }

.dash-stat-val { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; }
.dash-stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

.dash-quick a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: var(--admin-bg);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.18s;
}
.dash-quick a:hover { background: #e8f1fb; border-color: rgba(26,111,196,0.2); color: var(--primary); }
.dash-quick a i { color: var(--primary); font-size: 1rem; }

/* ── TABLE ───────────────────────────────────────────────── */
/* List tables live in a padding-less card body; let it scroll horizontally
   so a wide table never stretches the page on narrow screens. */
.a-card-body.p-0 { overflow-x: auto; }

.a-table { width: 100%; border-collapse: collapse; }
.a-table th {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--muted); font-weight: 600; padding: 10px 14px;
    border-bottom: 2px solid var(--border); white-space: nowrap;
}
.a-table td {
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    vertical-align: middle; font-size: 0.87rem;
}
.a-table tr:last-child td { border-bottom: none; }
.a-table tr:hover td { background: #fafcff; }
.a-table th:last-child { text-align: center; }
.a-table td:last-child { text-align: center; }
.a-table td:last-child .d-flex { justify-content: center; }

/* Drag-and-drop reordering (sortable content grids) */
.a-table[data-sortable] .drag-cell { width: 34px; padding-right: 0; text-align: center; }
.drag-handle {
    display: inline-flex; align-items: center; justify-content: center;
    color: #bcc7d6; cursor: grab; font-size: 1.05rem; line-height: 1;
    padding: 4px; border-radius: 6px;
    touch-action: none; user-select: none;
}
.drag-handle:hover { color: var(--primary); background: #eef3fb; }
.drag-handle:active { cursor: grabbing; }
.a-table tr.dragging { opacity: 0.45; }
.a-table tr.dragging td { background: #eef3fb; }

.a-icon-preview {
    width: 36px; height: 36px;
    background: #e8f1fb; color: var(--primary);
    border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}

/* ── FORM ────────────────────────────────────────────────── */
.a-label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: #4a5568; margin-bottom: 5px;
}
.a-hint { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }

.form-control, .form-select {
    border-color: var(--border);
    border-radius: 9px;
    font-size: 0.88rem;
    color: var(--text);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,111,196,0.1);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary-admin {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 9px;
    padding: 9px 20px;
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    transition: all 0.18s;
}
.btn-primary-admin:hover { background: #14589e; color: white; }

.btn-outline-admin {
    background: none;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 9px;
    padding: 8px 18px;
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    transition: all 0.18s;
}
.btn-outline-admin:hover { background: var(--primary); color: white; }

.btn-icon {
    background: none; border: none; cursor: pointer;
    padding: 6px 8px; border-radius: 7px;
    font-size: 1rem; transition: all 0.15s;
    display: inline-flex; align-items: center;
    text-decoration: none;
}
.btn-icon.edit { color: var(--primary); }
.btn-icon.edit:hover { background: #e8f1fb; color: var(--primary); }
.btn-icon.del { color: var(--danger); }
.btn-icon.del:hover { background: #fff5f5; color: var(--danger); }

/* ── ALERTS ──────────────────────────────────────────────── */
.a-success {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
    border-radius: 9px;
    padding: 11px 16px;
    font-size: 0.87rem;
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 20px;
}
.a-error {
    background: #fff5f5;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    border-radius: 9px;
    padding: 11px 16px;
    font-size: 0.87rem;
    margin-bottom: 20px;
}

/* ── TOASTS (top-right, slide in, do not affect layout) ──── */
.toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.toast-item {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.87rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--muted);
    box-shadow: 0 10px 28px rgba(18, 37, 58, 0.18);
    transform: translateX(120%);
    opacity: 0;
    transition: transform .32s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
}
.toast-item.show { transform: translateX(0); opacity: 1; }
.toast-item.hide { transform: translateX(120%); opacity: 0; }
.toast-item .toast-icon { font-size: 1.05rem; line-height: 1.25; }
.toast-item .toast-body { flex: 1; color: var(--text); word-break: break-word; }
.toast-item .toast-close {
    background: none; border: none; color: var(--muted);
    font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 2px;
}
.toast-item.toast-success { border-left-color: var(--success-border); }
.toast-item.toast-success .toast-icon { color: var(--success-text); }
.toast-item.toast-error { border-left-color: #fca5a5; }
.toast-item.toast-error .toast-icon { color: #b91c1c; }
.toast-item.toast-warning { border-left-color: #ffcf6b; }
.toast-item.toast-warning .toast-icon { color: #b7791f; }

/* ── EDIT MODAL (section forms loaded via AJAX) ──────────── */
#editModalBody { padding: 18px 20px; }
/* Flatten only the top-level page columns so the form fills the dialog;
   nested field rows (col-md-*) inside the form keep their layout. */
#editModalBody > .row { margin: 0; }
#editModalBody > .row > [class^="col-"],
#editModalBody > .row > [class*=" col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
}
#editModalBody .a-card {
    border: 0;
    box-shadow: none;
    background: transparent;
    margin-bottom: 14px;
}
#editModalBody .a-card-header { display: none; }   /* the modal has its own title */
#editModalBody .a-card-body { padding: 0; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d3a73 0%, #1a6fc4 60%, #1e8fb5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #1a6fc4, #2ab5b5);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: white;
    margin: 0 auto 20px;
}

/* ── ICON PICKER ─────────────────────────────────────────── */
.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 2px;
}
.icon-picker-item {
    background: #f0f4f9;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 4px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: var(--text);
    aspect-ratio: 1;
}
.icon-picker-item:hover {
    background: #e8f1fb;
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.08);
}
.icon-picker-section {
    grid-column: 1 / -1;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    padding: 10px 2px 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2px;
}
.icon-picker-section:first-child { padding-top: 2px; }

/* ── STATISTICS (request charts) ─────────────────────── */
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.stat-tile {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 6px rgba(26,111,196,0.05);
    padding: 14px 18px;
}
.stat-tile .st-label { font-size: 0.74rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.stat-tile .st-value { font-size: 1.55rem; font-weight: 700; line-height: 1.15; }
.stat-tile .st-delta { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.stat-tile .st-delta.up { color: #1a6b42; }
.stat-tile .st-delta.down { color: var(--danger); }

.cbar .cbar-fill { transition: opacity 0.12s; }
.cbar:hover .cbar-fill, .cbar:focus-within .cbar-fill { opacity: 0.8; }
.cbar rect[data-tip]:focus { outline: none; }
.cbar rect[data-tip]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* Chart view toggle (bars / line) */
.chart-toggle { display: flex; gap: 6px; }
.chart-toggle button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--muted);
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.chart-toggle button:hover { color: var(--text); border-color: #c9d6e8; }
.chart-toggle button.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Chart layers: bars mode hides the line, line mode hides the bars */
.stat-chart .line-area, .stat-chart .line-path, .stat-chart .line-dot,
.stat-chart .pt, .stat-chart .pt-x { pointer-events: none; }
.stat-chart.mode-line .cbar-fill { display: none; }
.stat-chart.mode-bars .line-area, .stat-chart.mode-bars .line-path, .stat-chart.mode-bars .line-dot,
.stat-chart.mode-bars .pt, .stat-chart.mode-bars .pt-x { display: none; }

/* Line: 2px, round joints; drawn left to right via dashoffset */
.stat-chart .line-path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stat-chart.mode-line .line-path.animate {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: chart-draw 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.stat-chart .line-area { opacity: 0; }
.stat-chart.mode-line .line-area.animate { animation: chart-fade 0.6s ease-out 0.85s forwards; }
.stat-chart .line-dot { opacity: 0; }
.stat-chart.mode-line .line-dot.animate { animation: chart-fade 0.3s ease-out 1.1s forwards; }
@keyframes chart-draw { to { stroke-dashoffset: 0; } }
@keyframes chart-fade { to { opacity: 1; } }

/* Crosshair + point marker on hover/focus (line view) */
.stat-chart .pt, .stat-chart .pt-x { opacity: 0; transition: opacity 0.1s; }
.stat-chart.mode-line .cbar:hover .pt, .stat-chart.mode-line .cbar:focus-within .pt,
.stat-chart.mode-line .cbar:hover .pt-x, .stat-chart.mode-line .cbar:focus-within .pt-x { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .stat-chart.mode-line .line-path.animate { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
    .stat-chart.mode-line .line-area.animate,
    .stat-chart.mode-line .line-dot.animate { animation: none; opacity: 1; }
}

.hbar-row {
    display: grid;
    grid-template-columns: 130px 1fr 74px;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.hbar-label {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hbar-label i { margin-right: 4px; }
.hbar-track { min-height: 18px; display: flex; align-items: center; }
.hbar-fill {
    height: 18px;
    min-width: 2px;
    border-radius: 0 4px 4px 0;   /* rounded data end, flat side near the axis */
    transition: opacity 0.12s;
}
.hbar-fill:hover { opacity: 0.8; }
.hbar-value { font-size: 0.82rem; font-weight: 600; text-align: right; }
.hbar-value .hbar-share { color: var(--muted); font-weight: 400; font-size: 0.74rem; }

.chart-tooltip {
    position: fixed;
    z-index: 1200;
    display: none;
    background: #12253a;
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.76rem;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    white-space: nowrap;
}

details.chart-data summary {
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 8px;
}
details.chart-data table { font-size: 0.82rem; }

/* ── MOBILE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 30px rgba(0,0,0,0.2); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .admin-content { padding: 18px; }
    .topbar-breadcrumb { display: none; }
}

/* === REQUEST NOTES — inline rich-text editor (bold / italic / highlight) === */
.notes-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.notes-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    padding: 0;
    transition: border-color .15s, color .15s, filter .15s;
}
.notes-btn:hover { border-color: var(--primary); color: var(--primary); }
.notes-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.notes-sep { width: 1px; height: 20px; background: var(--border); margin: 0 3px; }
.notes-hl-label { font-size: .8rem; color: var(--muted); }
.notes-hl { border-color: rgba(0,0,0,.12); }
.notes-hl:hover { border-color: var(--muted); color: inherit; filter: brightness(.95); }
.notes-hl.hl-sage { background: #cfe0c2; }
.notes-hl.hl-clay { background: #f0cbb9; }
.notes-hl.hl-yellow { background: #ffe9a6; }

.notes-editor {
    min-height: 120px;
    max-height: 460px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 13px;
    background: #fff;
    outline: none;
    line-height: 1.65;
    color: var(--text);
}
.notes-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,111,196,.12); }
.notes-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.notes-editor p { margin: 0 0 .4rem; }

/* Highlight marks — brand-toned, used both in the editor and when notes are rendered */
.notes-editor mark, mark.hl-sage, mark.hl-clay, mark.hl-yellow {
    color: inherit;
    padding: 0 .14em;
    border-radius: 3px;
}
mark.hl-sage { background: #cfe0c2; }
mark.hl-clay { background: #f0cbb9; }
mark.hl-yellow { background: #ffe9a6; }
