/*!
 * sc-ui: the Skillscharts design system (#6185769283).
 *
 * One file, no build step. Tokens live on :root as --scu-* custom properties; components are plain
 * classes prefixed scu- (the app already uses sc-* for older helpers and jQuery UI owns ui-*).
 * Nothing in this file styles a bare element or an existing class, so loading it on a page changes
 * nothing until markup opts in with an scu- class. Usage rules: documentation/tech/sc-ui-design-system.md
 *
 * Sizes are in px on purpose: the Metronic shell sets the root font size to 13px, so rem values
 * come out a size smaller than they read.
 */

/* ══ 1. TOKENS ══════════════════════════════════════════════════════════════════════════════════ */
:root {
    /* type */
    --scu-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --scu-font-display: "Poppins", var(--scu-font-sans);
    --scu-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --scu-text-xs: 12px;     /* captions, table headings, eyebrows */
    --scu-text-sm: 13.5px;   /* secondary text, chips, helper text */
    --scu-text-base: 15px;   /* body text and values */
    --scu-text-md: 16px;     /* emphasised values, inputs on phones (no iOS zoom) */
    --scu-text-lg: 18px;     /* card titles */
    --scu-text-xl: 20px;     /* section titles */
    --scu-text-2xl: 24px;    /* page title on phones */
    --scu-text-3xl: 28px;    /* page title */
    --scu-text-kpi: 30px;    /* KPI figures */
    --scu-leading-tight: 1.25;
    --scu-leading: 1.5;
    --scu-weight-regular: 400;
    --scu-weight-medium: 500;
    --scu-weight-semibold: 600;
    --scu-weight-bold: 700;

    /* spacing: a 4px base, 8px rhythm */
    --scu-space-1: 4px;
    --scu-space-2: 8px;
    --scu-space-3: 12px;
    --scu-space-4: 16px;
    --scu-space-5: 20px;
    --scu-space-6: 24px;
    --scu-space-8: 32px;
    --scu-space-10: 40px;
    --scu-space-12: 48px;

    /* shape and depth */
    --scu-radius-sm: 6px;
    --scu-radius: 10px;
    --scu-radius-lg: 14px;
    --scu-radius-xl: 18px;
    --scu-radius-pill: 999px;
    --scu-shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --scu-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 6px rgba(15, 23, 42, .05);
    --scu-shadow-md: 0 4px 12px rgba(15, 23, 42, .07), 0 1px 3px rgba(15, 23, 42, .05);
    --scu-shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);
    --scu-touch: 44px;            /* smallest tap target on touch screens */
    --scu-control-h: 40px;        /* buttons and inputs on desktop */

    /* surfaces and text (light) */
    --scu-bg: #f3f5f9;
    --scu-surface: #ffffff;
    --scu-surface-2: #f8fafc;
    --scu-surface-3: #f1f4f9;
    --scu-line: #e2e8f0;
    --scu-line-soft: #edf1f6;
    --scu-line-strong: #cbd5e1;
    --scu-control-line: #758faf;   /* input/select/textarea border, 3:1 on every surface (WCAG 1.4.11, #6185769567) */
    --scu-text: #0f172a;
    --scu-text-2: #334155;
    --scu-muted: #617187;
    --scu-faint: #5e718d;
    --scu-on-color: #ffffff;

    /* brand: Skillscharts indigo, with the logo orange as the accent */
    --scu-brand: #3b42bf;
    --scu-brand-hover: #3036a6;
    --scu-brand-strong: #262b85;
    --scu-brand-soft: #eceefc;
    --scu-brand-line: #d3d7f6;
    --scu-accent: #de3710;
    --scu-accent-hover: #c93817;
    --scu-accent-soft: #fdece7;
    --scu-accent-line: #f9cdbf;

    /* meaning */
    --scu-success: #15803d;  --scu-success-soft: #dcfce7;  --scu-success-line: #bbf7d0;  --scu-success-solid: #16a34a;
    --scu-warning: #9f6107;  --scu-warning-soft: #fef3c7;  --scu-warning-line: #fde68a;  --scu-warning-solid: #f59e0b;
    --scu-danger: #b91c1c;   --scu-danger-soft: #fee2e2;   --scu-danger-line: #fecaca;   --scu-danger-solid: #dc2626;
    --scu-info: #0369a1;     --scu-info-soft: #e0f2fe;     --scu-info-line: #bae6fd;     --scu-info-solid: #0284c7;

    /* extra categorical hues for chips (types, not states) */
    --scu-violet: #6d28d9;   --scu-violet-soft: #ede9fe;   --scu-violet-line: #ddd6fe;
    --scu-teal: #0f766e;     --scu-teal-soft: #ccfbf1;     --scu-teal-line: #99f6e4;
    --scu-rose: #be185d;     --scu-rose-soft: #fce7f3;     --scu-rose-line: #fbcfe8;
    --scu-slate: #475569;    --scu-slate-soft: #f1f5f9;    --scu-slate-line: #e2e8f0;

    --scu-focus: 0 0 0 3px rgba(59, 66, 191, .28);
    --scu-star: #f59e0b;

    /* page-specific pairs added by the dark page sweep (#6185769639): the lighter indigo of the projects/tasks pages, the quiet grey of their secondary text, and the ink of their shadows */
    --scu-brand-mid: #5867dd;
    --scu-subtle: #9098b1;
    --scu-shadow-ink: #000000;
}

/* #6185770445: the sizes of the app shell (left menu, header, chat rail, footer), approved with the shell redesign.
   Sizes only, no colour: the same in both themes. The menu label is 14px, between the sm and base steps. */
:root {
    --scu-text-nav: 14px;          /* a left-menu label */
    --scu-shell-header-h: 65px;    /* the desktop top bar (the Hub chat rail starts under it, config hub.rail.top) */
    --scu-shell-aside-w: 248px;    /* the left menu, open */
    --scu-shell-aside-min-w: 76px; /* the left menu, folded to its icon strip */
    --scu-shell-rail-w: 56px;      /* the Hub chat rail on the right */
    --scu-shell-footer-h: 48px;    /* the footer bar */
    --scu-shell-row-h: 40px;       /* a left-menu row on desktop (44px, --scu-touch, on touch screens) */
    --scu-shell-icon: 20px;        /* a shell icon */
}

/* Dark theme. Applied by data-theme="dark" on <html> (the switch a future app setting will set), or
   automatically from the OS setting on pages that opt in with class="scu-theme-auto" on <html>. Pages
   inside the light Metronic shell do not opt in yet: a dark card in a light frame reads as broken. */
:root[data-theme="dark"] {
    --scu-bg: #0b1120; --scu-surface: #111827; --scu-surface-2: #172033; --scu-surface-3: #1e293b;
    --scu-line: #263248; --scu-line-soft: #1f2a3d; --scu-line-strong: #3a4a63; --scu-control-line: #5a7399; --scu-on-color: #0b1120; --scu-danger-solid: #ef4444;
    --scu-text: #e5e9f0; --scu-text-2: #cbd5e1; --scu-muted: #94a3b8; --scu-faint: #8190a5;
    --scu-brand: #8b93ff; --scu-brand-hover: #a3a9ff; --scu-brand-strong: #c7cbff; --scu-brand-soft: #1e2350; --scu-brand-line: #343b80;
    --scu-accent: #ff7a59; --scu-accent-hover: #ff9478; --scu-accent-soft: #3a1a12; --scu-accent-line: #6b2c1c;
    --scu-success: #4ade80; --scu-success-soft: #0f2e1d; --scu-success-line: #1f5134;
    --scu-warning: #fbbf24; --scu-warning-soft: #33260a; --scu-warning-line: #5c4512;
    --scu-danger: #f87171;  --scu-danger-soft: #3a1414;  --scu-danger-line: #6b2020;
    --scu-info: #38bdf8;    --scu-info-soft: #0b2a3d;    --scu-info-line: #144a6b;
    --scu-violet: #a78bfa; --scu-violet-soft: #251a45; --scu-violet-line: #3f2d78;
    --scu-teal: #2dd4bf;   --scu-teal-soft: #0c2e2b;   --scu-teal-line: #155e56;
    --scu-rose: #f472b6;   --scu-rose-soft: #3a1228;   --scu-rose-line: #6b1f47;
    --scu-slate: #cbd5e1;  --scu-slate-soft: #1e293b;  --scu-slate-line: #334155;
    --scu-shadow-xs: none; --scu-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --scu-shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
    --scu-focus: 0 0 0 3px rgba(139, 147, 255, .4);
    --scu-brand-mid: #8b93ff; --scu-subtle: #8190a5; --scu-shadow-ink: #000000;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
    :root.scu-theme-auto:not([data-theme="light"]) {
        --scu-bg: #0b1120; --scu-surface: #111827; --scu-surface-2: #172033; --scu-surface-3: #1e293b;
        --scu-line: #263248; --scu-line-soft: #1f2a3d; --scu-line-strong: #3a4a63; --scu-control-line: #5a7399; --scu-on-color: #0b1120; --scu-danger-solid: #ef4444;
        --scu-text: #e5e9f0; --scu-text-2: #cbd5e1; --scu-muted: #94a3b8; --scu-faint: #8190a5;
        --scu-brand: #8b93ff; --scu-brand-hover: #a3a9ff; --scu-brand-strong: #c7cbff; --scu-brand-soft: #1e2350; --scu-brand-line: #343b80;
        --scu-accent: #ff7a59; --scu-accent-hover: #ff9478; --scu-accent-soft: #3a1a12; --scu-accent-line: #6b2c1c;
        --scu-success: #4ade80; --scu-success-soft: #0f2e1d; --scu-success-line: #1f5134;
        --scu-warning: #fbbf24; --scu-warning-soft: #33260a; --scu-warning-line: #5c4512;
        --scu-danger: #f87171;  --scu-danger-soft: #3a1414;  --scu-danger-line: #6b2020;
        --scu-info: #38bdf8;    --scu-info-soft: #0b2a3d;    --scu-info-line: #144a6b;
        --scu-violet: #a78bfa; --scu-violet-soft: #251a45; --scu-violet-line: #3f2d78;
        --scu-teal: #2dd4bf;   --scu-teal-soft: #0c2e2b;   --scu-teal-line: #155e56;
        --scu-rose: #f472b6;   --scu-rose-soft: #3a1228;   --scu-rose-line: #6b1f47;
        --scu-slate: #cbd5e1;  --scu-slate-soft: #1e293b;  --scu-slate-line: #334155;
        --scu-shadow-xs: none; --scu-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --scu-shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
        --scu-focus: 0 0 0 3px rgba(139, 147, 255, .4);
        --scu-brand-mid: #8b93ff; --scu-subtle: #8190a5; --scu-shadow-ink: #000000;
        color-scheme: dark;
    }
}

/* The "paper" scope (#6185769638, dark mode 7d): output that leaves the app as paper or mail (CV and PDF previews, e-mail and cover-letter
   previews) keeps the LIGHT tokens inside a dark page. An element with data-scu-light re-declares every token the dark blocks switch, with
   the light values of the :root block above (a test pins that they are equal), so var(--scu-*) below it resolves light. Nothing matches
   until a page prints the attribute, which it does only while the UI_DARK_MODE_ENABLED flag is ON. */
:root [data-scu-light] {
    --scu-bg: #f3f5f9;
    --scu-surface: #ffffff;
    --scu-surface-2: #f8fafc;
    --scu-surface-3: #f1f4f9;
    --scu-line: #e2e8f0;
    --scu-line-soft: #edf1f6;
    --scu-line-strong: #cbd5e1;
    --scu-control-line: #758faf;
    --scu-on-color: #ffffff;
    --scu-danger-solid: #dc2626;
    --scu-text: #0f172a;
    --scu-text-2: #334155;
    --scu-muted: #617187;
    --scu-faint: #5e718d;
    --scu-brand: #3b42bf;
    --scu-brand-hover: #3036a6;
    --scu-brand-strong: #262b85;
    --scu-brand-soft: #eceefc;
    --scu-brand-line: #d3d7f6;
    --scu-accent: #de3710;
    --scu-accent-hover: #c93817;
    --scu-accent-soft: #fdece7;
    --scu-accent-line: #f9cdbf;
    --scu-success: #15803d;
    --scu-success-soft: #dcfce7;
    --scu-success-line: #bbf7d0;
    --scu-warning: #9f6107;
    --scu-warning-soft: #fef3c7;
    --scu-warning-line: #fde68a;
    --scu-danger: #b91c1c;
    --scu-danger-soft: #fee2e2;
    --scu-danger-line: #fecaca;
    --scu-info: #0369a1;
    --scu-info-soft: #e0f2fe;
    --scu-info-line: #bae6fd;
    --scu-violet: #6d28d9;
    --scu-violet-soft: #ede9fe;
    --scu-violet-line: #ddd6fe;
    --scu-teal: #0f766e;
    --scu-teal-soft: #ccfbf1;
    --scu-teal-line: #99f6e4;
    --scu-rose: #be185d;
    --scu-rose-soft: #fce7f3;
    --scu-rose-line: #fbcfe8;
    --scu-slate: #475569;
    --scu-slate-soft: #f1f5f9;
    --scu-slate-line: #e2e8f0;
    --scu-shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --scu-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 6px rgba(15, 23, 42, .05);
    --scu-shadow-md: 0 4px 12px rgba(15, 23, 42, .07), 0 1px 3px rgba(15, 23, 42, .05);
    --scu-focus: 0 0 0 3px rgba(59, 66, 191, .28);
    --scu-brand-mid: #5867dd;
    --scu-subtle: #9098b1;
    --scu-shadow-ink: #000000;
    color-scheme: light;
}

/* ══ 2. ROOT OF A DESIGN-SYSTEM AREA ════════════════════════════════════════════════════════════ */
.scu {
    font-family: var(--scu-font-sans);
    font-size: var(--scu-text-base);
    line-height: var(--scu-leading);
    color: var(--scu-text-2);
    -webkit-font-smoothing: antialiased;
}
.scu *, .scu *::before, .scu *::after { box-sizing: border-box; }
.scu-num { font-variant-numeric: tabular-nums; }
.scu-muted { color: var(--scu-muted); }
.scu-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* layout helpers: a 12 column grid, stacks and clusters */
.scu-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--scu-space-4); }
.scu-col-12 { grid-column: span 12; } .scu-col-8 { grid-column: span 8; } .scu-col-6 { grid-column: span 6; }
.scu-col-4 { grid-column: span 4; } .scu-col-3 { grid-column: span 3; }
.scu-stack { display: flex; flex-direction: column; gap: var(--scu-space-4); min-width: 0; }
.scu-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--scu-space-2); }

/* ══ 3. CARD ════════════════════════════════════════════════════════════════════════════════════ */
.scu-card {
    position: relative; min-width: 0;
    background: var(--scu-surface); border: 1px solid var(--scu-line);
    border-radius: var(--scu-radius-lg); box-shadow: var(--scu-shadow-sm);
}
.scu-card__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--scu-space-3);
    padding: var(--scu-space-4) var(--scu-space-5); border-bottom: 1px solid var(--scu-line-soft);
}
.scu-card__body { padding: var(--scu-space-5); }
.scu-card__foot { padding: var(--scu-space-3) var(--scu-space-5); border-top: 1px solid var(--scu-line-soft); background: var(--scu-surface-2); border-radius: 0 0 var(--scu-radius-lg) var(--scu-radius-lg); }
.scu-card--flush .scu-card__body { padding: 0; }

/* ══ 4. SECTION HEADER: icon tile, title with an accent, one line of help, actions ═══════════════ */
.scu-section-head { display: flex; align-items: center; gap: var(--scu-space-3); min-width: 0; }
.scu-section-head__text { min-width: 0; flex: 1 1 auto; }
.scu-section-head__title {
    margin: 0; font-family: var(--scu-font-display); font-size: var(--scu-text-lg); font-weight: var(--scu-weight-semibold);
    line-height: var(--scu-leading-tight); color: var(--scu-text); letter-spacing: -.01em;
}
.scu-section-head__desc { margin: 2px 0 0; font-size: var(--scu-text-sm); color: var(--scu-muted); line-height: 1.4; }
.scu-section-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--scu-space-2); margin-left: auto; }
.scu-eyebrow {
    display: flex; align-items: center; gap: var(--scu-space-2); margin: 0 0 var(--scu-space-3);
    font-size: var(--scu-text-xs); font-weight: var(--scu-weight-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--scu-muted);
}
.scu-eyebrow::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--scu-brand); }
.scu-eyebrow--accent::before { background: var(--scu-accent); }
.scu-eyebrow--success::before { background: var(--scu-success-solid); }
.scu-eyebrow--info::before { background: var(--scu-info-solid); }
.scu-eyebrow--violet::before { background: var(--scu-violet); }
.scu-eyebrow--warning::before { background: var(--scu-warning-solid); }

/* icon tile, toned */
.scu-tile {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--scu-radius);
    background: var(--scu-brand-soft); color: var(--scu-brand); font-size: 20px; line-height: 1;
}
.scu-tile--sm { width: 32px; height: 32px; font-size: 17px; border-radius: 8px; }
.scu-tile--accent { background: var(--scu-accent-soft); color: var(--scu-accent); }
.scu-tile--success { background: var(--scu-success-soft); color: var(--scu-success); }
.scu-tile--warning { background: var(--scu-warning-soft); color: var(--scu-warning); }
.scu-tile--danger { background: var(--scu-danger-soft); color: var(--scu-danger); }
.scu-tile--info { background: var(--scu-info-soft); color: var(--scu-info); }
.scu-tile--violet { background: var(--scu-violet-soft); color: var(--scu-violet); }
.scu-tile--teal { background: var(--scu-teal-soft); color: var(--scu-teal); }
.scu-tile--rose { background: var(--scu-rose-soft); color: var(--scu-rose); }
.scu-tile--slate { background: var(--scu-slate-soft); color: var(--scu-slate); }

/* ══ 5. KEY-VALUE DETAILS LIST ═══════════════════════════════════════════════════════════════════ */
/* <dl class="scu-kv scu-kv--2"> <div class="scu-kv__item"><dt>Label</dt><dd>Value</dd></div> ... </dl> */
.scu-kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--scu-space-4) var(--scu-space-6); margin: 0; }
.scu-kv--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scu-kv--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scu-kv__item { min-width: 0; }
.scu-kv__item--wide { grid-column: 1 / -1; }
.scu-kv dt { margin: 0 0 3px; font-size: var(--scu-text-xs); font-weight: var(--scu-weight-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--scu-muted); }
.scu-kv dd { margin: 0; font-size: var(--scu-text-base); font-weight: var(--scu-weight-medium); line-height: 1.45; color: var(--scu-text); overflow-wrap: anywhere; }
.scu-kv dd a { color: var(--scu-brand); font-weight: var(--scu-weight-semibold); }
.scu-kv__empty { color: var(--scu-faint); font-weight: var(--scu-weight-regular); font-style: italic; }
/* side by side at desktop: label column, value column */
@media (min-width: 1200px) {
    .scu-kv--inline .scu-kv__item { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--scu-space-3); align-items: baseline; }
    .scu-kv--inline dt { margin: 0; }
}

/* a titled group inside a card */
.scu-group + .scu-group { margin-top: var(--scu-space-5); padding-top: var(--scu-space-5); border-top: 1px solid var(--scu-line-soft); }

/* ══ 6. CHIPS, BADGES, STATUS ════════════════════════════════════════════════════════════════════ */
.scu-chip {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 28px;
    padding: 3px 11px; border-radius: var(--scu-radius-pill); border: 1px solid var(--scu-slate-line);
    background: var(--scu-slate-soft); color: var(--scu-slate);
    font-size: var(--scu-text-sm); font-weight: var(--scu-weight-medium); line-height: 1.3; white-space: nowrap; text-decoration: none;
}
.scu-chip > span { overflow: hidden; text-overflow: ellipsis; }
.scu-chip > i, .scu-chip__icon { font-size: 15px; opacity: .9; }
a.scu-chip:hover { filter: brightness(.97); text-decoration: none; box-shadow: var(--scu-shadow-xs); }
.scu-chip--brand { background: var(--scu-brand-soft); border-color: var(--scu-brand-line); color: var(--scu-brand); }
.scu-chip--accent { background: var(--scu-accent-soft); border-color: var(--scu-accent-line); color: var(--scu-accent-hover); }
.scu-chip--success { background: var(--scu-success-soft); border-color: var(--scu-success-line); color: var(--scu-success); }
.scu-chip--warning { background: var(--scu-warning-soft); border-color: var(--scu-warning-line); color: var(--scu-warning); }
.scu-chip--danger { background: var(--scu-danger-soft); border-color: var(--scu-danger-line); color: var(--scu-danger); }
.scu-chip--info { background: var(--scu-info-soft); border-color: var(--scu-info-line); color: var(--scu-info); }
.scu-chip--violet { background: var(--scu-violet-soft); border-color: var(--scu-violet-line); color: var(--scu-violet); }
.scu-chip--teal { background: var(--scu-teal-soft); border-color: var(--scu-teal-line); color: var(--scu-teal); }
.scu-chip--rose { background: var(--scu-rose-soft); border-color: var(--scu-rose-line); color: var(--scu-rose); }
.scu-chip--outline { background: var(--scu-surface); }

.scu-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: var(--scu-radius-pill); background: var(--scu-surface-3); color: var(--scu-muted);
    font-size: 12px; font-weight: var(--scu-weight-bold); font-variant-numeric: tabular-nums; line-height: 1;
}
.scu-badge--brand { background: var(--scu-brand); color: var(--scu-on-color); }

/* status: a dot and a label; the tone carries the meaning */
.scu-status { display: inline-flex; align-items: center; gap: 8px; font-weight: var(--scu-weight-semibold); color: var(--scu-text-2); }
.scu-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--scu-faint); box-shadow: 0 0 0 3px var(--scu-slate-soft); }
.scu-status--success::before { background: var(--scu-success-solid); box-shadow: 0 0 0 3px var(--scu-success-soft); }
.scu-status--warning::before { background: var(--scu-warning-solid); box-shadow: 0 0 0 3px var(--scu-warning-soft); }
.scu-status--danger::before { background: var(--scu-danger-solid); box-shadow: 0 0 0 3px var(--scu-danger-soft); }
.scu-status--info::before { background: var(--scu-info-solid); box-shadow: 0 0 0 3px var(--scu-info-soft); }

/* ══ 7. BUTTONS ═════════════════════════════════════════════════════════════════════════════════ */
.scu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: var(--scu-control-h); padding: 0 16px; border-radius: var(--scu-radius);
    border: 1px solid transparent; background: var(--scu-surface); color: var(--scu-text-2);
    font-family: inherit; font-size: 14px; font-weight: var(--scu-weight-semibold); line-height: 1.2; white-space: nowrap;
    cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.scu-btn:hover { text-decoration: none; }
.scu-btn:focus-visible { outline: none; box-shadow: var(--scu-focus); }
.scu-btn[disabled], .scu-btn.is-disabled { opacity: .5; cursor: not-allowed; }
.scu-btn i { font-size: 16px; }
.scu-btn--primary { background: var(--scu-brand); color: var(--scu-on-color); box-shadow: 0 1px 2px rgba(59, 66, 191, .3); }
.scu-btn--primary:hover { background: var(--scu-brand-hover); color: var(--scu-on-color); }
.scu-btn--accent { background: var(--scu-accent); color: var(--scu-on-color); }
.scu-btn--accent:hover { background: var(--scu-accent-hover); color: var(--scu-on-color); }
.scu-btn--secondary { border-color: var(--scu-line); color: var(--scu-text-2); }
.scu-btn--secondary:hover { border-color: var(--scu-line-strong); background: var(--scu-surface-2); color: var(--scu-text); }
.scu-btn--soft { background: var(--scu-brand-soft); color: var(--scu-brand); }
.scu-btn--soft:hover { background: var(--scu-brand-line); color: var(--scu-brand-strong); }
.scu-btn--ghost { background: transparent; color: var(--scu-muted); }
.scu-btn--ghost:hover { background: var(--scu-surface-3); color: var(--scu-text); }
.scu-btn--danger { border-color: var(--scu-danger-line); color: var(--scu-danger); }
.scu-btn--danger:hover { background: var(--scu-danger-soft); color: var(--scu-danger); }
.scu-btn--sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.scu-btn--icon { width: var(--scu-control-h); padding: 0; }
.scu-btn--sm.scu-btn--icon { width: 32px; }

/* ══ 8. TABS ════════════════════════════════════════════════════════════════════════════════════ */
/* <nav class="scu-tabs"><a class="scu-tab is-active">...</a></nav>; Bootstrap .nav-link.active also counts */
.scu-tabs {
    display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-snap-type: x proximity;
}
.scu-tabs::-webkit-scrollbar { display: none; }
.scu-tab {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: var(--scu-touch);
    padding: 0 14px; border-radius: var(--scu-radius); scroll-snap-align: start;
    font-size: 14.5px; font-weight: var(--scu-weight-medium); color: var(--scu-muted); white-space: nowrap; text-decoration: none;
}
.scu-tab:hover { color: var(--scu-text); background: var(--scu-surface-3); text-decoration: none; }
.scu-tab.is-active, .scu-tab.active, .scu-tab[aria-selected="true"] { color: var(--scu-brand); background: var(--scu-brand-soft); font-weight: var(--scu-weight-semibold); }

/* ══ 9. TABLES ══════════════════════════════════════════════════════════════════════════════════ */
/* First column "aa" (row number), every heading a sort button: <th aria-sort><button>Name</button></th>.
   For DataTables, keep the shared sort (public/js/company/table-sort.js, ScTableSort.register). */
.scu-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--scu-line); border-radius: var(--scu-radius); background: var(--scu-surface); }
.scu-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; color: var(--scu-text-2); }
.scu-table th, .scu-table td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--scu-line-soft); }
.scu-table thead th {
    position: sticky; top: 0; z-index: 1; background: var(--scu-surface-2); border-bottom-color: var(--scu-line);
    font-size: var(--scu-text-xs); font-weight: var(--scu-weight-bold); letter-spacing: .05em; text-transform: uppercase; color: var(--scu-muted); white-space: nowrap;
}
.scu-table thead th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.scu-table thead th button:focus-visible { box-shadow: var(--scu-focus); border-radius: 4px; }
.scu-table thead th button::after { content: "\2195"; font-size: 11px; opacity: .45; }
.scu-table thead th[aria-sort="ascending"] button::after { content: "\2191"; opacity: 1; color: var(--scu-brand); }
.scu-table thead th[aria-sort="descending"] button::after { content: "\2193"; opacity: 1; color: var(--scu-brand); }
.scu-table tbody tr:last-child td { border-bottom: 0; }
.scu-table tbody tr:hover td { background: var(--scu-surface-2); }
.scu-table .scu-aa { width: 3.5em; color: var(--scu-faint); font-variant-numeric: tabular-nums; text-align: right; }
/* the aa column of any table, DataTables included (public/js/company/table-aa.js numbers it) */
.scu-aa { width: 3.5em; color: var(--scu-faint); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.scu-table td.scu-num { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.scu-table a { color: var(--scu-brand); font-weight: var(--scu-weight-semibold); }

/* ══ 10. EMPTY STATE ════════════════════════════════════════════════════════════════════════════ */
.scu-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
    padding: var(--scu-space-8) var(--scu-space-5); border: 1px dashed var(--scu-line-strong); border-radius: var(--scu-radius);
    background: var(--scu-surface-2); color: var(--scu-muted);
}
.scu-empty__icon { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--scu-brand-soft); color: var(--scu-brand); font-size: 22px; margin-bottom: 4px; }
.scu-empty__title { margin: 0; font-size: var(--scu-text-md); font-weight: var(--scu-weight-semibold); color: var(--scu-text); }
.scu-empty__text { margin: 0; font-size: var(--scu-text-sm); max-width: 44ch; }

/* ══ 11. LINK ROWS: a star, the title and the FULL address, actions always visible ══════════════ */
.scu-linkrow { display: flex; align-items: flex-start; gap: var(--scu-space-3); min-width: 0; padding: 2px 0; }
.scu-linkrow__star { flex: 0 0 auto; }
.scu-linkrow__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scu-linkrow__title { font-size: var(--scu-text-base); font-weight: var(--scu-weight-semibold); color: var(--scu-text); line-height: 1.35; overflow-wrap: anywhere; }
a.scu-linkrow__title { color: var(--scu-brand); }
a.scu-linkrow__title:hover { color: var(--scu-brand-hover); text-decoration: underline; }
.scu-linkrow__url { font-size: 12.5px; color: var(--scu-muted); line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; font-family: var(--scu-font-mono); }
.scu-linkrow__actions { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.scu-iconbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 8px;
    border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--scu-muted);
    font-size: 13px; font-weight: var(--scu-weight-semibold); line-height: 1; cursor: pointer; white-space: nowrap;
}
.scu-iconbtn i { font-size: 16px; }
.scu-iconbtn:hover { background: var(--scu-surface-3); color: var(--scu-text); }
.scu-iconbtn:focus-visible { outline: none; box-shadow: var(--scu-focus); }
.scu-iconbtn--brand { color: var(--scu-brand); background: var(--scu-brand-soft); }
.scu-iconbtn--brand:hover { background: var(--scu-brand-line); color: var(--scu-brand-strong); }
.scu-iconbtn--danger { color: var(--scu-danger); }
.scu-iconbtn--danger:hover { background: var(--scu-danger-soft); color: var(--scu-danger); }
.scu-iconbtn--star { color: var(--scu-faint); padding: 0; min-width: 32px; }
.scu-iconbtn--star:hover, .scu-iconbtn--star.is-starred { color: var(--scu-star); background: var(--scu-warning-soft); }

/* ══ 12. TOUCH AND PHONE RULES ══════════════════════════════════════════════════════════════════ */
@media (pointer: coarse) {
    .scu-btn, .scu-iconbtn, .scu-tab { min-height: var(--scu-touch); }
    .scu-iconbtn { min-width: var(--scu-touch); }
}
@media (max-width: 1100px) {
    .scu-col-8, .scu-col-6, .scu-col-4 { grid-column: span 12; }
    .scu-col-3 { grid-column: span 6; }
    .scu-kv--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .scu-grid { gap: var(--scu-space-3); }
    .scu-col-3 { grid-column: span 12; }
    .scu-kv--2, .scu-kv--3 { grid-template-columns: minmax(0, 1fr); gap: var(--scu-space-3); }
    .scu-card { border-radius: var(--scu-radius); }
    .scu-card__head, .scu-card__body { padding: var(--scu-space-4); }
    .scu-section-head { flex-wrap: wrap; }
    .scu-section-head__actions { width: 100%; margin-left: 0; }
    .scu-section-head__actions > .scu-btn { flex: 1 1 auto; }
    .scu-btn { min-height: var(--scu-touch); }
    .scu-iconbtn { min-width: var(--scu-touch); height: var(--scu-touch); }
    /* tables: scroll inside their box, the first column stays in view */
    .scu-table--sticky th:first-child, .scu-table--sticky td:first-child { position: sticky; left: 0; z-index: 2; background: var(--scu-surface); box-shadow: 1px 0 0 var(--scu-line); }
    .scu-table--sticky thead th:first-child { z-index: 3; background: var(--scu-surface-2); }
    /* or turn rows into cards: <td data-label="Status"> */
    .scu-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .scu-table--stack, .scu-table--stack tbody, .scu-table--stack tr, .scu-table--stack td { display: block; width: 100%; }
    .scu-table--stack tr { padding: var(--scu-space-3) var(--scu-space-4); border-bottom: 1px solid var(--scu-line); }
    .scu-table--stack td { border: 0; padding: 4px 0; display: flex; gap: var(--scu-space-3); justify-content: space-between; text-align: right; }
    .scu-table--stack td::before { content: attr(data-label); font-size: var(--scu-text-xs); font-weight: var(--scu-weight-semibold); text-transform: uppercase; letter-spacing: .04em; color: var(--scu-muted); text-align: left; }
    /* link rows: actions move under the address, full width and thumb sized */
    .scu-linkrow { flex-wrap: wrap; }
    .scu-linkrow__actions { flex: 1 0 100%; padding-left: 44px; gap: var(--scu-space-2); }
}

@media (prefers-reduced-motion: reduce) {
    .scu-btn, .scu-iconbtn, .scu-tab { transition: none; }
}

/* ══ 13. FORM FIELDS: label above the field, one height for inputs and selects (#6185769377) ═══ */
.scu-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0 0 var(--scu-space-4); }
.scu-field:last-child { margin-bottom: 0; }
.scu-field__label { margin: 0; font-size: var(--scu-text-xs); font-weight: var(--scu-weight-semibold); text-transform: uppercase; letter-spacing: .04em; color: var(--scu-muted); }
.scu-field__hint { margin: 0; font-size: var(--scu-text-sm); color: var(--scu-muted); }
.scu-field__error { margin: 0; font-size: var(--scu-text-sm); color: var(--scu-danger); }
.scu-input, .scu-select, .scu-textarea {
    box-sizing: border-box; width: 100%; min-height: var(--scu-control-h); padding: 8px 12px; margin: 0;
    border: 1px solid var(--scu-control-line); border-radius: var(--scu-radius-sm); background: var(--scu-surface);
    font-family: var(--scu-font-sans); font-size: var(--scu-text-base); line-height: 1.4; color: var(--scu-text);
}
.scu-select { height: var(--scu-control-h); padding-top: 0; padding-bottom: 0; }
.scu-textarea { min-height: 96px; resize: vertical; }
.scu-input:focus, .scu-select:focus, .scu-textarea:focus { outline: none; border-color: var(--scu-brand); box-shadow: var(--scu-focus); }

/* ══ 14. BANNER: one message across a card or page (amber = needs attention) ═════════════════════ */
.scu-banner {
    display: flex; align-items: flex-start; gap: var(--scu-space-3); padding: var(--scu-space-3) var(--scu-space-4);
    border: 1px solid var(--scu-info-line); border-left-width: 4px; border-radius: var(--scu-radius);
    background: var(--scu-info-soft); color: var(--scu-text); font-size: var(--scu-text-base); line-height: var(--scu-leading);
}
.scu-banner__icon { flex: 0 0 auto; font-size: 20px; line-height: 1.2; color: var(--scu-info); }
.scu-banner__body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.scu-banner__title { margin: 0 0 2px; font-weight: var(--scu-weight-semibold); }
.scu-banner__actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: var(--scu-space-2); align-self: center; }
.scu-banner--warning { border-color: var(--scu-warning-line); background: var(--scu-warning-soft); }
.scu-banner--warning .scu-banner__icon { color: var(--scu-warning); }
.scu-banner--danger { border-color: var(--scu-danger-line); background: var(--scu-danger-soft); }
.scu-banner--danger .scu-banner__icon { color: var(--scu-danger); }
.scu-banner--success { border-color: var(--scu-success-line); background: var(--scu-success-soft); }
.scu-banner--success .scu-banner__icon { color: var(--scu-success); }

/* ══ 15. MODAL: the app's shared dialog (<x-scu-modal>, public/js/scu-modal.js) ═════════════════
 * .scu-modal[hidden] > .scu-modal__backdrop + .scu-modal__dialog[role=dialog] > __head (__title, __close), __body, __foot.
 * Variants: --warning, --danger (a 3px top bar and a toned title icon), --sm / --lg widths.
 * Under 576px the dialog is a full-width sheet: the body scrolls, the footer stays in reach, buttons stack full width. */
.scu-modal { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: var(--scu-space-6); font-family: var(--scu-font-sans); }
.scu-modal[hidden] { display: none; }
.scu-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); }
.scu-modal__dialog {
    position: relative; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; max-width: 560px;
    max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
    background: var(--scu-surface); color: var(--scu-text); border-radius: var(--scu-radius-lg); box-shadow: var(--scu-shadow-lg);
    border-top: 3px solid var(--scu-brand); font-size: var(--scu-text-base); line-height: var(--scu-leading);
}
.scu-modal--sm .scu-modal__dialog { max-width: 440px; }
.scu-modal--lg .scu-modal__dialog { max-width: 800px; }
.scu-modal--warning .scu-modal__dialog { border-top-color: var(--scu-warning-solid, var(--scu-warning)); }
.scu-modal--danger .scu-modal__dialog { border-top-color: var(--scu-danger); }
.scu-modal__head { flex: 0 0 auto; display: flex; align-items: center; gap: var(--scu-space-3); padding: var(--scu-space-4) var(--scu-space-4) var(--scu-space-4) var(--scu-space-6); border-bottom: 1px solid var(--scu-line-soft); }
.scu-modal__icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: var(--scu-radius); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; background: var(--scu-brand-soft); color: var(--scu-brand); }
.scu-modal--warning .scu-modal__icon { background: var(--scu-warning-soft); color: var(--scu-warning); }
.scu-modal--danger .scu-modal__icon { background: var(--scu-danger-soft); color: var(--scu-danger); }
.scu-modal__title { flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--scu-font-display); font-size: var(--scu-text-lg); font-weight: var(--scu-weight-semibold); line-height: var(--scu-leading-tight); color: var(--scu-text); overflow-wrap: anywhere; }
.scu-modal__close {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--scu-touch); height: var(--scu-touch);
    margin: 0; padding: 0; border: 0; border-radius: var(--scu-radius); background: transparent; color: var(--scu-muted); font-size: 22px; line-height: 1; cursor: pointer;
}
.scu-modal__close:hover { background: var(--scu-surface-3); color: var(--scu-text); }
.scu-modal__close:focus-visible { outline: none; box-shadow: var(--scu-focus); }
.scu-modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: var(--scu-space-5) var(--scu-space-6); overflow-wrap: anywhere; }
.scu-modal__body > :first-child { margin-top: 0; }
.scu-modal__body > :last-child { margin-bottom: 0; }
.scu-modal__foot { flex: 0 0 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--scu-space-2); padding: var(--scu-space-4) var(--scu-space-6); border-top: 1px solid var(--scu-line-soft); background: var(--scu-surface-2); border-radius: 0 0 var(--scu-radius-lg) var(--scu-radius-lg); }
.scu-modal__foot > .scu-btn { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: center; }
.scu-modal-open, .scu-modal-open body { overflow: hidden; }   /* set on <html> while a modal is open */
@media (max-width: 575.98px) {
    .scu-modal { align-items: flex-end; padding: 0; }
    .scu-modal__dialog, .scu-modal--sm .scu-modal__dialog, .scu-modal--lg .scu-modal__dialog {
        max-width: none; max-height: 100vh; max-height: 100dvh; border-radius: var(--scu-radius-lg) var(--scu-radius-lg) 0 0;
    }
    .scu-modal__head { padding-left: var(--scu-space-4); }
    .scu-modal__body { padding: var(--scu-space-4); }
    .scu-modal__foot { flex-direction: column-reverse; align-items: stretch; padding: var(--scu-space-3) var(--scu-space-4) calc(var(--scu-space-3) + env(safe-area-inset-bottom, 0px)); border-radius: 0; }
    .scu-modal__foot > .scu-btn { width: 100%; min-height: var(--scu-touch); }
    .scu-input, .scu-select, .scu-textarea { font-size: var(--scu-text-md); min-height: var(--scu-touch); }
    .scu-select { height: var(--scu-touch); }
    .scu-banner { flex-wrap: wrap; }
    .scu-banner__actions { flex: 1 0 100%; }
    .scu-banner__actions > .scu-btn { flex: 1 1 auto; }
}
