/* ── RMG console theme ──────────────────────────────────────────────────────
 * RFD palette pulled straight from the RFD+ logo: red #ff3208 (wordmark),
 * gold #e09824→#fcec8d (emblem + the "+"). Dark branded header, warm-light
 * workspace. Defines every CSS variable the common-mixin components reference,
 * plus RFD-specific tokens and the shared page/table styles the console's
 * page bodies use. Loaded statically (NOT through componentry's namespacing),
 * so its selectors are global. */

:root {
    /* RFD brand */
    --rfd-red: #ff3208;
    --rfd-red-dark: #cc2806;
    --rfd-gold: #e09824;
    --rfd-gold-light: #fcec8d;
    --rfd-gold-dark: #b8791a;
    --rfd-gold-tint: #fbe7c4;
    --rfd-ink: #231f1d;

    /* surfaces */
    --bg-color: #f4f1ea;
    --bg-color-d: #231f1d;
    --bg-color-quiet: #f4f1eaaa;
    --bg-color-quiet-d: #231f1daa;
    --white: #ffffff;
    --neutral: #9a948c;

    /* text */
    --text-color: #231f1d;
    --text-color-d: #f7f4ee;
    --text-color-quiet: #231f1d99;
    --text-quiet: #231f1d99;

    /* lines + actions (RFD red is the action color) */
    --page-border: #231f1d22;
    --action-color: #ff3208;
    --action-color-hilite: #cc2806;
    --page-action: #ff320822;
    --page-selected: #ff320833;
    --tray-hilite: #e0982433;

    /* status */
    --status-error: #d22f12;
    --status-warning: #e09824;
    --status-success: #3c9a4e;

    /* spacing */
    --spacer: 10px;
    --spacer2: 20px;
    --spacer3: 30px;
    --spacerhalf: 5px;
    --spacerquarter: 2px;

    /* layout */
    --header-height: 60px;
}

html, body {
    margin: 0;
    height: 100%;
}
body {
    font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

/* The left nav buttons stack vertically and use RFD accents on hover/active. */
.PageMenu {
    background: var(--rfd-ink);
    padding-top: var(--spacer);
}
.PageMenu .nav-button {
    color: var(--text-color-d);
    background-color: transparent;
}
.PageMenu .nav-button:hover {
    color: var(--white);
    background-color: var(--bg-color-quiet-d);
}
.PageMenu .nav-button:hover .text { color: var(--white); }
.PageMenu .nav-button .icon { color: var(--rfd-gold); }

/* ── Shared page-body styles (used by Directory/Requests/Outbox/Knowledge) ── */
.page-title {
    margin: 0 0 var(--spacerquarter);
    font-size: 1.4em;
    font-weight: 700;
}
.page-sub {
    margin: 0 0 var(--spacer2);
    color: var(--text-color-quiet);
    font-size: 0.9em;
}
.console-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border: 1px solid var(--page-border);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.9em;
}
.console-table th {
    text-align: left;
    padding: var(--spacer) var(--spacer2);
    background: var(--rfd-ink);
    color: var(--text-color-d);
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.console-table td {
    padding: var(--spacer) var(--spacer2);
    border-top: 1px solid var(--page-border);
    vertical-align: top;
}
.chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--rfd-gold-tint);
    color: var(--rfd-gold-dark);
    font-size: 0.85em;
    white-space: nowrap;
}
.muted { color: var(--text-color-quiet); }
.small { font-size: 0.82em; }
.empty { color: var(--text-color-quiet); font-size: 0.9em; }
.page-error { color: var(--rfd-red); font-size: 0.9em; padding: var(--spacer2); }

/* ── Fixed shell (Genia, 2026-07-31) ────────────────────────────────────────
   Header and menu are a fixed boomerang; ONLY the content pane scrolls. Our
   project Main overrides common-mixin's Main and so never picked up its shell
   CSS — these rules restore (and pin) the viewport-locked layout. When a page
   needs an external URL it renders an <iframe> INSIDE the content pane; the
   shell itself stays a div. */
html, body {
    height: 100%;
    overflow: hidden;
}
.Main {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.page-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    min-height: 0;      /* lets the row shrink so children can scroll */
    overflow: hidden;
}
.page-main > .PageMenu {
    flex: 0 0 auto;
    overflow-y: auto;
}
.page-main > .PageBody {
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    /* content breathing room off the menu and header */
    padding: var(--spacer);
}
