/* =============================================================================
   WGS B2B Portal — on-screen stylesheet (new1 "Aurora" version).

   Design identity for THIS version (see NOTES.md):
     - Persistent LEFT SIDEBAR navigation + master/detail drill-in content.
     - Light, comfortable density, indigo accent on a cool-slate neutral system.
     - Card surfaces, soft shadows, rounded corners, generous spacing.
   All design tokens live in the single :root block below.

   This file also styles the report.php fallback error page, which references
   .site-main / .card / .btn / .btn-row — those classes are defined here.
   ============================================================================= */

:root {
    /* Palette */
    --accent:        #4f46e5;   /* indigo-600 */
    --accent-700:    #4338ca;
    --accent-soft:   #eef2ff;
    --accent-ring:   rgba(79, 70, 229, 0.35);

    --bg:            #f5f6fa;
    --surface:       #ffffff;
    --surface-2:     #f1f3f8;
    --surface-3:     #e9edf5;

    --text:          #1d2330;
    --muted:         #65718c;
    --border:        #e2e7f0;
    --border-strong: #cfd6e4;

    --ok:            #15803d;
    --ok-soft:       #effbf2;
    --ok-border:     #b7e4c4;
    --error:         #c0271f;
    --error-soft:    #fdf1f0;
    --error-border:  #f3c2bd;
    --warn:          #b45309;

    /* Shape + depth */
    --radius:        12px;
    --radius-sm:     8px;
    --shadow-sm:     0 1px 2px rgba(20, 28, 48, 0.06), 0 1px 3px rgba(20, 28, 48, 0.05);
    --shadow-md:     0 4px 16px rgba(20, 28, 48, 0.08);
    --shadow-lg:     0 12px 32px rgba(20, 28, 48, 0.14);

    --sidebar-w:     250px;
    --font:          system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono:          ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p  { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 5px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ----------------------------------------------------------------------------
   Boot spinner (shown until app.js renders)
   ---------------------------------------------------------------------------- */
.app-loading { display: grid; place-items: center; min-height: 100vh; }
.spinner {
    display: inline-block; width: 28px; height: 28px;
    border: 3px solid var(--surface-3); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 0.7s linear infinite;
}
.spinner--sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================================
   App layout — sidebar + content
   ========================================================================== */
.layout { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar__brand {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 1.15rem 1.25rem;
    font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.sidebar__brand .logo {
    width: 30px; height: 30px; border-radius: 8px; flex: none;
    background: linear-gradient(135deg, var(--accent), #7c73f0);
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}
.sidebar__nav { padding: 0.75rem; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.navlink {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 550;
    cursor: pointer; user-select: none;
    border: none; background: none; width: 100%; text-align: left; font-size: 0.95rem;
}
.navlink:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.navlink[aria-current="page"] { background: var(--accent-soft); color: var(--accent-700); font-weight: 650; }
.navlink .ico { width: 18px; text-align: center; flex: none; opacity: 0.9; }

.sidebar__user {
    margin-top: auto;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 0.5rem;
}
.userchip { display: flex; align-items: center; gap: 0.6rem; }
.userchip .avatar {
    width: 34px; height: 34px; border-radius: 50%; flex: none;
    background: var(--accent-soft); color: var(--accent-700);
    display: grid; place-items: center; font-weight: 700; font-size: 0.85rem;
}
.userchip__name { font-weight: 600; font-size: 0.9rem; line-height: 1.15; }
.userchip__meta { font-size: 0.75rem; color: var(--muted); }

.content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1.75rem 2rem 4rem;
    max-width: 1280px;
}

/* ============================================================================
   Page headers / toolbars
   ========================================================================== */
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.page-head__titles { display: flex; flex-direction: column; gap: 0.2rem; }
.crumbs { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.crumb-link { background: none; border: none; padding: 0; cursor: pointer; color: var(--accent); font: inherit; }
.crumb-link:hover { text-decoration: underline; }
.page-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ============================================================================
   Cards / surfaces
   ========================================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}
.card > h2 { margin-bottom: 0.85rem; }
.card--danger { border-color: var(--error-border); background: var(--error-soft); }
.card--pad-lg { padding: 1.6rem 1.75rem; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 1.25rem; }
.tile {
    display: block; text-align: left; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.15rem 1.25rem;
    box-shadow: var(--shadow-sm); transition: transform 0.08s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    font: inherit; color: inherit;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); text-decoration: none; }
.tile h2 { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.tile .ico { font-size: 1.1rem; }

/* Definition summary grid */
.summary {
    display: grid; gap: 0.85rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin: 0 0 1.25rem;
}
.summary > div { display: flex; flex-direction: column; gap: 0.15rem; }
.summary dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 600; }
.summary dd { margin: 0; font-size: 1.02rem; font-weight: 550; }

/* ============================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.55rem 1rem; border-radius: var(--radius-sm);
    background: var(--accent); color: #fff; border: 1px solid var(--accent);
    font: inherit; font-weight: 600; font-size: 0.92rem; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: background 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--accent-700); border-color: var(--accent-700); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: none; }
.btn--secondary:hover { background: var(--surface-2); color: var(--text); }
.btn--danger { background: var(--error); border-color: var(--error); }
.btn--danger:hover { background: #a51f18; border-color: #a51f18; }
.btn--sm { padding: 0.35rem 0.7rem; font-size: 0.84rem; }
.btn-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }

.linkbtn {
    background: none; border: none; padding: 0.2rem 0.35rem; margin: 0;
    color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; border-radius: 5px;
}
.linkbtn:hover { background: var(--accent-soft); text-decoration: none; }
.linkbtn--danger { color: var(--error); }
.linkbtn--danger:hover { background: var(--error-soft); }

:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; border-radius: 4px; }

/* ============================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.85rem; }
.field > label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.field--check { flex-direction: row; align-items: center; gap: 0.5rem; }
.field--check label { display: flex; align-items: center; gap: 0.45rem; color: var(--text); font-weight: 550; cursor: pointer; }

input[type="text"], input[type="search"], input[type="password"],
input[type="number"], input[type="date"], select, textarea {
    font: inherit; color: var(--text);
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); width: 100%;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring);
}
textarea { resize: vertical; min-height: 4.5rem; }
select { cursor: pointer; }

.grid2 { display: grid; gap: 0 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.filterbar {
    display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}
.filterbar .field { margin-bottom: 0; min-width: 140px; }
.filterbar .field--check { align-self: center; }
.cell-input { padding: 0.35rem 0.45rem; font-size: 0.88rem; min-width: 7rem; }
.cell-input--num { text-align: right; min-width: 5.5rem; }

/* ============================================================================
   Tables
   ========================================================================== */
.table-wrap {
    overflow-x: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 1.25rem;
}
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table thead th {
    text-align: left; font-weight: 650; font-size: 0.76rem;
    text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted);
    padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border);
    background: var(--surface-2); white-space: nowrap; position: sticky; top: 0;
}
.table tbody td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.neg { color: var(--error); }   /* negative quantities/prices (Inventory) */
.table .actions { white-space: nowrap; display: flex; gap: 0.25rem; align-items: center; }
.row-link { font-weight: 600; }
.table.is-loading tbody { opacity: 0.4; }

.count-note { font-size: 0.84rem; color: var(--muted); margin-top: -0.6rem; margin-bottom: 1.25rem; }

/* Status pills */
.pill {
    display: inline-block; padding: 0.12rem 0.55rem; border-radius: 999px;
    font-size: 0.76rem; font-weight: 650; letter-spacing: 0.01em;
    background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.pill--open    { background: #e7efff; color: #2b4ea8; }
.pill--closed  { background: var(--surface-3); color: #4a5468; }
.pill--cancel  { background: #fbeaea; color: #a32820; }
.pill--yes     { background: var(--ok-soft); color: var(--ok); }
.pill--no      { background: var(--surface-3); color: #5a6478; }

/* ============================================================================
   Tooltips (styled, keyboard-accessible) — adds info, not noise (§4.D)
   ========================================================================== */
.tip {
    /* The ⓘ (U+24D8) glyph draws its own circle — do not re-draw one in CSS,
       or we get a ring inside a ring. Just size/colour the character. */
    position: relative;
    display: inline-block; margin-left: 0.3rem;
    color: var(--muted);
    font-size: 0.95rem; font-weight: 400; font-style: normal; cursor: help;
    vertical-align: middle; line-height: 1;
}
.tip:hover, .tip:focus-visible { color: var(--accent-700); }
.tip::after, .rl-transit::after {
    content: attr(data-tip);
    /* Drop the bubble BELOW the pip: column headers sit at the top of a
       .table-wrap whose overflow clips upward content, so an above-bubble gets
       cut off. Below the header it renders into the (visible) table area. */
    position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(-4px);
    background: #1d2330; color: #fff; text-align: left;
    padding: 0.5rem 0.65rem; border-radius: 8px;
    font-size: 0.78rem; font-weight: 500; line-height: 1.35; letter-spacing: 0;
    text-transform: none; white-space: normal; width: max-content; max-width: 240px;
    box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; z-index: 50;
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.tip::before, .rl-transit::before {
    content: ""; position: absolute; top: calc(100% + 2px); left: 50%;
    transform: translateX(-50%); border: 6px solid transparent; border-bottom-color: #1d2330;
    opacity: 0; pointer-events: none; transition: opacity 0.12s ease; z-index: 50;
}
.tip:hover::after, .tip:focus-visible::after,
.rl-transit:hover::after, .rl-transit:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.tip:hover::before, .tip:focus-visible::before,
.rl-transit:hover::before, .rl-transit:focus-visible::before { opacity: 1; }
/* Keep tooltips for last columns from clipping off the right edge. */
.tip--left::after { left: auto; right: -4px; transform: translateY(-4px); }
.tip--left:hover::after, .tip--left:focus-visible::after { transform: translateY(0); }
.tip--left::before { left: auto; right: 4px; }

/* ============================================================================
   Alerts / inline feedback
   ========================================================================== */
.alert {
    padding: 0.75rem 1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border); margin-bottom: 1.25rem; font-size: 0.92rem;
}
.alert--error { background: var(--error-soft); border-color: var(--error-border); color: #8f1d16; }
.alert--ok { background: var(--ok-soft); border-color: var(--ok-border); color: #0f6b32; }

.empty {
    text-align: center; padding: 2.5rem 1rem; color: var(--muted);
    background: var(--surface); border: 1px dashed var(--border-strong);
    border-radius: var(--radius); margin-bottom: 1.25rem;
}
.empty .ico { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; opacity: 0.7; }

.related-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

/* Bottom "Go back" bar on drill-in detail views (§4.I.5). */
.backbar { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* ============================================================================
   Skeleton loaders
   ========================================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px;
}
.skeleton-row { height: 14px; margin: 0.55rem 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-inline { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; }

/* ============================================================================
   Toasts
   ========================================================================== */
.toast-wrap {
    position: fixed; top: 1rem; right: 1rem; z-index: 1000;
    display: flex; flex-direction: column; gap: 0.6rem; max-width: min(92vw, 360px);
}
.toast {
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--muted);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
    padding: 0.75rem 0.9rem; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.5rem;
    animation: toastin 0.18s ease;
}
.toast--ok { border-left-color: var(--ok); }
.toast--error { border-left-color: var(--error); }
.toast--info { border-left-color: var(--accent); }
.toast .ico { flex: none; }
@keyframes toastin { from { opacity: 0; transform: translateX(12px); } }

/* ============================================================================
   Modal (confirm dialogs)
   ========================================================================== */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(20, 28, 48, 0.45);
    display: grid; place-items: center; z-index: 900; padding: 1rem;
    animation: fadein 0.12s ease;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    max-width: 440px; width: 100%; padding: 1.4rem 1.5rem;
}
.modal h2 { margin-bottom: 0.6rem; }
.modal p { color: var(--muted); margin-bottom: 1.2rem; }
.modal .btn-row { justify-content: flex-end; margin-top: 0; }

/* ============================================================================
   Login view
   ========================================================================== */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(120% 120% at 50% 0%, #eef1fb 0%, var(--bg) 55%); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2rem 1.9rem; }
.login-brand { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 1.4rem; font-weight: 700; font-size: 1.15rem; }
.login-brand .logo { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #7c73f0); display: grid; place-items: center; color: #fff; font-weight: 800; }
.login-card h1 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.login-card .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.4rem; }
.login-card .btn { width: 100%; margin-top: 0.4rem; padding: 0.65rem; }

/* The report.php fallback error page renders <main class="site-main">. */
.site-main { max-width: 640px; margin: 3rem auto; padding: 0 1.25rem; }

/* ============================================================================
   Responsive — tablet / narrow: sidebar becomes a top bar
   ========================================================================== */
@media (max-width: 860px) {
    .layout { flex-direction: column; }
    .sidebar {
        width: 100%; flex-basis: auto; height: auto; position: sticky; top: 0; z-index: 20;
        border-right: none; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
    }
    .sidebar__brand { border-bottom: none; padding: 0.8rem 1rem; }
    .sidebar__nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 0 0.5rem 0.5rem; gap: 4px; }
    .navlink { white-space: nowrap; }
    .navlink .ico { display: none; }
    .sidebar__user { margin-top: 0; border-top: 1px solid var(--border); flex-direction: row; align-items: center; justify-content: space-between; }
    .content { padding: 1.25rem 1.1rem 3rem; }
}
@media (max-width: 520px) {
    .summary { grid-template-columns: repeat(2, 1fr); }
    .filterbar { padding: 0.85rem; }
}

/* ============================================================================
   Reverb Listings (rl-*) — ported from .context/reverb-listings.html onto the
   Aurora token system. New classes only; the sheet above is untouched. The two
   flow/marketplace accent colours (teal/amber tints) that the mockup uses but
   the Aurora :root does not define are kept as literals to avoid editing :root.
   ========================================================================== */
/* store chip in the page-head actions */
.rl-store { display: flex; align-items: center; gap: 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.4rem 0.7rem; font-size: 0.85rem; box-shadow: var(--shadow-sm); }
.rl-store__flag { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.rl-store b { font-weight: 650; }
.rl-storecol { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }   /* store chip + Refresh button stacked */
.rl-lastref { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }
.rl-lastref--busy { color: var(--warn); font-weight: 600; }
.rl-refresh { white-space: nowrap; }
.rl-refresh:disabled { opacity: 0.6; }
/* snapshot time-travel cluster + "not live" state */
.rl-tt { display: inline-flex; align-items: center; gap: 2px; }
.rl-tt__b { min-width: 30px; padding: 0.3rem 0.5rem; font-weight: 600; }
.rl-tt__b:disabled { opacity: 0.45; }
.rl-tt__label { font-size: 0.8rem; color: var(--muted); width: 118px; text-align: right; padding: 0 0.5rem 0 0; white-space: nowrap; flex: none; }   /* fixed width so the arrows never bounce */
.rl-histbar { background: #fef3c7; border: 1px solid #f2ddb8; color: #8a5313; border-radius: var(--radius-sm); padding: 0.55rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }
.rl-histbar .linkbtn { color: #8a5313; text-decoration: underline; }
.rl-historical .sidebar__brand { background: #fef3c7; }
.rl-historical .navlink[aria-current="page"] { background: #fdebc0; color: #8a5313; }

/* stat strip — rendered OUTSIDE the table card */
.rl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-bottom: 1.25rem; }
.rl-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1.1rem; box-shadow: var(--shadow-sm); }
.rl-stat__k { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.rl-stat__v { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.1rem; }
.rl-stat__v small { font-size: 0.72rem; color: var(--muted); font-weight: 500; margin-left: 0.35rem; }
.rl-stat--held .rl-stat__v { color: var(--warn); }

/* degraded-mode banner (warn tint) */
.rl-degraded { background: #fef7ec; border: 1px solid #f2ddb8; color: #8a5313; border-radius: var(--radius-sm); padding: 0.7rem 1rem; margin-bottom: 1.25rem; font-size: 0.9rem; }

/* card head: search + chips */
.rl-card { padding: 0; overflow: hidden; }
.rl-cardhead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--border); }
.rl-search { display: flex; align-items: center; gap: 0.5rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.05rem 0.6rem; flex: 0 1 260px; min-width: 220px; }
.rl-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.rl-search__ico { color: var(--muted); font-size: 1rem; flex: none; }
.rl-search input { border: none; background: none; box-shadow: none; padding: 0.35rem 0; }
.rl-search input:focus { outline: none; border: none; box-shadow: none; }
.rl-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.rl-chip { font-size: 0.78rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-family: inherit; }
.rl-chip:hover { background: var(--surface-2); }
.rl-chip.on { background: var(--accent-soft); border-color: #c7cdf9; color: var(--accent-700); }

/* table specifics (built on the shared .table styles) */
.rl-tablewrap { border: none; border-radius: 0; box-shadow: none; margin: 0; }
.rl-table { font-size: 0.85rem; }
.rl-table thead th { position: static; }   /* card owns the head; no sticky needed */
.rl-sortable { cursor: pointer; user-select: none; }
.rl-sortable:hover { background: var(--surface-3); }
.rl-table thead th.rl-sorted { color: var(--accent-700); }

/* Freeze the toolbar (header + stats + search/filters) AND the column-header row;
   only the data rows scroll. The view is capped to the viewport and the table
   body becomes the sole scroll area, with a sticky thead pinned to its top. */
.rl-view { display: flex; flex-direction: column; height: calc(100vh - 6rem); min-height: 380px; max-height: 97vh; min-width: 520px; max-width: none; resize: both; overflow: hidden; }   /* widen freely (overflows the content column into horizontal scroll) */
.rl-view > div { flex: none; }                         /* header + stats + banner stay put */
.rl-view > .rl-cardwrap { flex: 1 1 auto; min-height: 0; display: flex; }
.rl-view .rl-card { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; width: 100%; }
.rl-view .rl-cardhead { flex: none; }
.rl-view .rl-tableslot { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.rl-view .rl-tablewrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.rl-view .rl-table thead th { position: sticky; top: 0; z-index: 2; }   /* pin the column header */
/* The z-index above makes EACH th its own stacking context, so a header's
   tooltip (z-50 inside it) paints UNDER the next th. Raise the hovered/focused
   th above its siblings so its tooltip is never covered. */
.rl-view .rl-table thead th:hover, .rl-view .rl-table thead th:focus-within { z-index: 4; }
.rl-view .rl-foot { flex: none; }
@media (max-width: 960px) {                            /* small screens: fall back to normal page scroll */
    .rl-view { height: auto; display: block; resize: none; overflow: visible; max-height: none; }
    .rl-view > .rl-cardwrap, .rl-view .rl-card, .rl-view .rl-tableslot, .rl-view .rl-tablewrap { display: block; min-height: 0; }
}
.rl-table td.grp, .rl-table th.grp { border-left: 1px solid var(--border); }
.rl-table td.dim { color: var(--muted); }
.rl-table td.zero { color: #a3adc4; }
.rl-table tbody tr.held { background: #fef7ec; }
.rl-table tbody tr.held:hover { background: #fdf3e3; }
.rl-sku { font-family: var(--mono); font-weight: 600; font-size: 0.8rem; white-space: nowrap; padding-right: 1.25rem; }
.rl-prod { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-aud { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.rl-aud b { color: var(--text); font-weight: 600; }
.rl-aud-btn { background: none; border: none; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.rl-aud-btn:hover { text-decoration: underline; }

/* toggle-history popup */
.rl-hist-modal { min-width: 400px; }
.rl-hist-modal > p { margin-bottom: 0.9rem; }
.rl-hist-list { display: flex; flex-direction: column; gap: 0.5rem; max-height: 320px; overflow-y: auto; margin-bottom: 1.1rem; }
.rl-hist-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; }
.rl-hist-when { color: var(--muted); margin-left: auto; }

/* reverb-state pills */
.rl-pill { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 650; padding: 0.15rem 0.55rem; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.rl-pill .d { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.rl-pill--live { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok); }
.rl-pill--live .d { background: var(--ok); }
.rl-pill--sold { background: var(--surface-3); border-color: var(--border-strong); color: var(--muted); }
.rl-pill--sold .d { background: #98a2bc; }
.rl-pill--ended { background: var(--error-soft); border-color: var(--error-border); color: var(--error); }
.rl-pill--ended .d { background: var(--error); }
.rl-pill--none { background: var(--surface-2); border-color: var(--border); color: #a3adc4; }
.rl-pill--none .d { background: #c4ccdd; }

/* read-only ON/OFF state (non-managers) */
.rl-state-wrap { display: inline-flex; align-items: center; gap: 0.4rem; }
.rl-transit { position: relative; color: #d97706; font-size: 0.95rem; line-height: 1; cursor: help; }
.rl-state { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.15rem 0.5rem; border-radius: 999px; }
.rl-state--on { background: var(--accent-soft); color: var(--accent-700); }
.rl-state--off { background: #fef7ec; color: var(--warn); }

/* the Listing-Live toggle switch (managers) — aria-pressed button */
.rl-tgl-cell { display: flex; align-items: center; gap: 0.6rem; }
.rl-tgl { width: 42px; height: 24px; border-radius: 999px; position: relative; border: none; padding: 0; cursor: pointer; flex: none; transition: background 0.15s ease; }
.rl-tgl.on { background: var(--accent); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); }
.rl-tgl.off { background: var(--border-strong); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12); }
.rl-tgl::after { content: ""; position: absolute; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(20, 28, 48, 0.35); transition: 0.15s ease; }
.rl-tgl.on::after { right: 2px; }
.rl-tgl.off::after { left: 2px; }
.rl-tgl:disabled { opacity: 0.6; cursor: progress; }
.rl-tgl-lab { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; }
.rl-tgl-lab.on { color: var(--accent-700); }
.rl-tgl-lab.off { color: var(--warn); }

/* card foot: legend + footnote */
.rl-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.8rem 1.1rem; font-size: 0.78rem; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--border); }
.rl-legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.rl-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.rl-legend .d { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.rl-dot--live { background: var(--ok); }
.rl-dot--sold { background: #98a2bc; }
.rl-dot--ended { background: var(--error); }
.rl-dot--held { background: var(--warn); }
.rl-footnote code { font-family: var(--mono); font-size: 0.72rem; }

@media (max-width: 860px) { .rl-stats { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================================
   System Map (sm-*) — ported from .context/system-map.html onto Aurora tokens.
   Desktop-first internal tool: a fixed 1000x660 canvas inside an overflow:auto
   scroller; narrow viewports scroll rather than re-layout (PRD §3).
   ========================================================================== */
.sm-legend { display: flex; gap: 0.9rem; font-size: 0.78rem; color: var(--muted); align-items: center; flex-wrap: wrap; }
.sm-legend__item { display: inline-flex; align-items: center; gap: 0.4rem; }
.sm-sw { width: 22px; height: 0; border-top: 2.5px solid; display: inline-block; border-radius: 2px; flex: none; }
.sm-sw--orders { border-color: var(--accent); }
.sm-sw--stock { border-color: #0d9488; }
.sm-sw--track { border-color: #d97706; border-top-style: dashed; }

.sm-stage { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }   /* wrap the panel below when the map is resized wide */
.sm-canvas-wrap { flex: 1 1 auto; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }   /* clips the free-panned canvas (translate, not scroll) */
.sm-canvas { position: relative; background-image: radial-gradient(circle, #dfe4f0 1px, transparent 1px); background-size: 22px 22px; background-position: 11px 11px; }   /* size set in JS from SM_W/SM_H */
.sm-hint { position: absolute; top: 14px; left: 16px; z-index: 3; font-size: 0.75rem; color: var(--muted); background: rgba(255, 255, 255, 0.85); border: 1px solid var(--border); padding: 0.25rem 0.6rem; border-radius: 999px; box-shadow: var(--shadow-sm); }
.sm-col-label { position: absolute; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #9aa3bd; }
svg.sm-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }   /* don't clip connectors to boxes dragged past the canvas */
.sm-labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sm-edge-label { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; font-size: 0.66rem; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.92); padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; cursor: grab; font-family: inherit; user-select: none; -webkit-user-select: none; touch-action: none; }
.sm-edge-label:hover { box-shadow: var(--shadow-sm); }
.sm-edge-label--dragging { cursor: grabbing; box-shadow: var(--shadow-md); z-index: 5; }
.sm-edge-label--orders { color: var(--accent-700); border-color: #c7cdf9; }
.sm-edge-label--stock { color: #0d9488; border-color: #b9e4de; }
.sm-edge-label--track { color: #d97706; border-color: #f2ddb8; }

.sm-node { position: absolute; z-index: 2; width: 180px; text-align: left; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 11px; box-shadow: var(--shadow-sm); padding: 0.6rem 0.75rem; cursor: pointer; font: inherit; color: inherit; }
.sm-node:hover { box-shadow: var(--shadow-md); }
.sm-node--sm { width: 158px; }
.sm-node--truth { border-color: #0f766e; background: linear-gradient(180deg, #f0fdfa, #fff 65%); }
.sm-node--selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring), var(--shadow-md); }
.sm-nk { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); }
.sm-nt { font-size: 0.84rem; font-weight: 650; margin-top: 0.05rem; }
.sm-ns { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; line-height: 1.35; }
.sm-st { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; }
.sm-dot--truth { background: #0d9488; box-shadow: 0 0 0 3px #f0fdfa; }
.sm-dot--gate { background: var(--warn); box-shadow: 0 0 0 3px #fef7ec; }
.sm-dot--idle { background: #c4ccdd; box-shadow: 0 0 0 3px var(--surface-3); }
.sm-dot--neutral { background: #98a2bc; box-shadow: 0 0 0 3px var(--surface-3); }
.sm-badge { display: inline-block; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; padding: 0.12rem 0.5rem; border-radius: 999px; margin-top: 0.4rem; background: var(--surface-3); color: var(--muted); }
.sm-badge--truth { background: #0f766e; color: #fff; }
.sm-badge--gate { background: #fef7ec; color: var(--warn); border: 1px solid #f2ddb8; }

/* drill / flow / explainer panel — kept below the modal backdrop (z-index 900) */
.sm-panel { flex: 0 0 340px; align-self: flex-start; position: relative; z-index: 10; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.1rem 1.25rem; }
.sm-panelbody { display: flex; flex-direction: column; gap: 0.8rem; }
.sm-p-kind { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent-700); font-weight: 700; }
.sm-panel h2 { font-size: 1.05rem; }
.sm-p-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.sm-kv { display: grid; grid-template-columns: 96px 1fr; gap: 0.35rem 0.6rem; font-size: 0.8rem; }
.sm-kv__k { color: var(--muted); }
.sm-kv__v { font-weight: 550; word-break: break-word; }
.sm-kv__v code, .sm-p-desc code { font-family: var(--mono); font-size: 0.72rem; }
.sm-p-sec { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-top: 1px solid var(--border); padding-top: 0.7rem; }
.sm-flowline { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; }
.sm-flowline--feed { flex-wrap: wrap; }
.sm-arr { color: var(--muted); }
.sm-links { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sm-linkbtn { display: inline-block; font-size: 0.75rem; color: var(--accent); background: var(--accent-soft); border: 1px solid #c7cdf9; border-radius: var(--radius-sm); padding: 0.25rem 0.6rem; text-decoration: none; font-weight: 550; }
.sm-linkbtn:hover { text-decoration: none; background: #e3e8ff; }
.sm-linkbtn.is-disabled { color: var(--muted); background: var(--surface-2); border-color: var(--border); cursor: not-allowed; }
.sm-governance { margin-top: 1rem; font-size: 0.75rem; color: var(--muted); }
.sm-governance code { font-family: var(--mono); font-size: 0.72rem; }

/* --- draggable boxes: tidy the layout by hand (not persisted) --- */
.sm-node { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.sm-node--dragging { cursor: grabbing; z-index: 6; box-shadow: var(--shadow-lg); }
.sm-node--dragging * { pointer-events: none; }        /* keep the pointer captured on the card */
.sm-canvas { transform-origin: top left; cursor: grab; }   /* scale from the corner in full screen; grab = pannable */
.sm-canvas--panning { cursor: grabbing; }
.sm-canvas--panning .sm-edge-label, .sm-canvas--panning .sm-node { pointer-events: none; }   /* don't snag boxes/labels mid-pan */
/* "drag to tidy" hint, mirror of .sm-hint but pinned top-right */
.sm-tip { position: absolute; top: 14px; right: 16px; z-index: 3; font-size: 0.75rem; color: var(--muted); background: rgba(255, 255, 255, 0.85); border: 1px solid var(--border); padding: 0.25rem 0.6rem; border-radius: 999px; box-shadow: var(--shadow-sm); }

/* --- full-screen toggle button (page-head action) --- */
.sm-maxbtn { gap: 0.4rem; }
.sm-maxbtn svg { flex: none; }

/* --- full-screen ("maximize") overlay --- */
.sm-stage--max {
    position: fixed; inset: 0; z-index: 150; margin: 0; gap: 16px;
    padding: 36px; background: var(--bg);
    align-items: center; justify-content: center; overflow: auto;
}
.sm-stage--max .sm-canvas-wrap { flex: 0 0 auto; overflow: hidden; }
.sm-stage--max .sm-panel { flex: 0 0 360px; max-height: calc(100vh - 72px); overflow: auto; }
.sm-exit { position: fixed; top: 18px; right: 20px; z-index: 160; box-shadow: var(--shadow-md); }

/* --- zoom toolbar + resizable / zoomable canvas --- */
.sm-toolbar { display: inline-flex; align-items: center; gap: 0.5rem; }
.sm-zoom { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; }
.sm-zoom__b, .sm-zoom__pct { background: none; border: none; font: inherit; cursor: pointer; color: var(--text); line-height: 1; }
.sm-zoom__b { font-size: 1.1rem; font-weight: 600; width: 30px; padding: 0.3rem 0; }
.sm-zoom__pct { font-size: 0.78rem; min-width: 54px; padding: 0.35rem 0.4rem; color: var(--muted); border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.sm-zoom__b:hover, .sm-zoom__pct:hover { background: var(--surface-2); }
.sm-canvas-sizer { position: relative; }               /* JS sizes it to the scaled canvas */
.sm-canvas-wrap { resize: both; flex: 0 0 auto; min-height: 320px; max-height: none; min-width: 360px; max-width: none; }   /* drag the corner to resize both axes — no width/height cap (page scrolls if very wide) */
.sm-stage--max .sm-canvas-wrap { resize: none; min-height: 0; max-height: none; min-width: 0; max-width: none; }

@media (max-width: 960px) {
    .sm-stage { flex-direction: column; }
    .sm-panel { flex-basis: auto; width: 100%; }
    .sm-stage--max { flex-direction: column; padding: 20px; padding-top: 60px; align-items: center; }
    .sm-stage--max .sm-panel { flex-basis: auto; width: 100%; max-height: none; }
}

/* ===== Reverb Listings — row-detail popup (centered) ===== */
.rl-drawer-backdrop { place-items: center; }
.rl-drawer {
  width: 720px; max-width: 96vw; max-height: 88vh; background: #fff;   /* wide enough for one-line open-order rows */
  border-radius: 14px; box-shadow: 0 24px 60px rgba(15,23,42,.28); overflow-y: auto;
  display: flex; flex-direction: column;
  animation: rl-pop-in .16s ease-out;
}
.rl-drawer-body { overflow-x: auto; }   /* if a very long ship-to still overflows, scroll rather than clip */
@keyframes rl-pop-in { from { transform: translateY(8px) scale(.985); opacity: .5; } to { transform: none; opacity: 1; } }
.rl-drawer-head { padding: 16px 18px; border-bottom: 1px solid #eef2f7; display: flex; align-items: flex-start; gap: 10px; }
.rl-drawer-head h3 { margin: 0; font-size: 17px; color: #0f172a; font-weight: 700; }
.rl-drawer-sub { margin: 2px 0 0; font-size: 12.5px; color: #64748b; }
.rl-drawer-x { margin-left: auto; border: 0; background: none; color: #94a3b8; font-size: 18px; cursor: pointer; line-height: 1; }
.rl-drawer-body { padding: 16px 18px; }
.rl-drawer .rl-secttl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; margin: 0 0 10px; }

.rl-flow { border: 1px solid #eef2f7; border-radius: 12px; overflow: hidden; }
.rl-step { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.rl-num { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; color: #0f172a; }
.rl-lab b { display: block; font-size: 13.5px; color: #0f172a; }
.rl-step--base { background: #f8fafc; }
.rl-step--push { background: #eef2ff; }
.rl-step--push .rl-num { color: #4f46e5; }
.rl-step--avail { background: #ecfdf5; }
.rl-step--avail .rl-num { color: #047857; }
.rl-op { display: flex; align-items: center; gap: 8px; padding: 7px 14px 7px 58px; font-size: 11.5px; color: #64748b; border-top: 1px dashed #eef2f7; border-bottom: 1px dashed #eef2f7; }
.rl-minus { font-weight: 800; color: #dc2626; font-variant-numeric: tabular-nums; }

.rl-sec { margin-top: 16px; }
table.rl-ord { width: auto; border-collapse: collapse; font-size: 12.5px; }   /* size to content — no stretched gap between ship-to and qty */
table.rl-ord th { text-align: left; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: #1e293b; font-weight: 700; padding: 0 8px 6px; white-space: nowrap; }
table.rl-ord th.n, table.rl-ord td.n { text-align: right; font-variant-numeric: tabular-nums; }
table.rl-ord td { padding: 8px; border-top: 1px solid #f1f5f9; color: #334155; white-space: nowrap; }   /* keep every column on one line */
table.rl-ord td b { color: #0f172a; }
.rl-ord-c1 { white-space: nowrap; }
.rl-ord-date { color: #94a3b8; font-size: 11px; margin-left: 8px; }   /* timestamp inline, right of the order number (header sits over the order #) */
.rl-ord-hold { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.rl-ord-resid td { color: #94a3b8; font-style: italic; }
.rl-agg { margin-top: 11px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: #fbfaf5; border: 1px solid #f3ecd6; border-radius: 9px; font-size: 12px; color: #7c5e12; }
.rl-agg b { color: #92400e; }
.rl-agg-tag { margin-left: auto; font-size: 10.5px; color: #a8935a; }

.rl-confirm { margin-top: 15px; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }
.rl-confirm--ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.rl-confirm--drift { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.rl-confirm--muted { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.rl-drawer-foot { margin-top: 15px; padding-top: 11px; border-top: 1px solid #eef2f7; font-size: 11px; color: #94a3b8; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* Reverb drawer flags (B5): two-line xTuple/Shopify order headers, the Shopify
   admin link, the flagged-row tint + Status badge (R8), and the bottom
   "Needs attention" section whose severity color tracks elapsed time. */
.rl-h2 { display: flex; flex-direction: column; line-height: 1.15; }
.rl-h2 b { color: #0f172a; }
.rl-shoplink { color: #4f46e5; text-decoration: none; font-weight: 600; }
.rl-shoplink:hover { text-decoration: underline; }
.rl-shoplink:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; border-radius: 3px; }
.rl-ord-flagged td { background: #fffbeb; }
.rl-ord-flag { display: inline-block; margin-right: 6px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; white-space: nowrap; }
.rl-flags { margin-top: 15px; padding-top: 12px; border-top: 1px solid #eef2f7; }
.rl-flag { margin-top: 8px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; }
.rl-flag--fresh { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.rl-flag--stuck { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.rl-flag-detail { margin-top: 3px; font-weight: 600; }

.rl-rowlink { cursor: pointer; }
.rl-rowlink:hover { background: #f8fafc; }
.rl-rowlink:focus-visible { outline: 2px solid #4f46e5; outline-offset: -2px; }

.rl-table td.has-drift { position: relative; }
.rl-drift { margin-left: 5px; font-weight: 800; color: #b45309; font-size: 11px; vertical-align: 1px; }
