/*
|--------------------------------------------------------------------------
| HR-Konnect Design System
|--------------------------------------------------------------------------
|
| Tokens transcribed from design_handoff_hr_konnect/README.md.  Values are
| taken from the handoff exactly rather than approximated, so the built UI
| and the prototypes stay in step.
|
| Leave-type colours are NOT here - they live in the LeaveTypes table and are
| emitted per tenant as inline custom properties, because an administrator can
| add a leave type and choose its colour at run time.
|
*/

/* ==========================================================================
   1. TOKENS
   ========================================================================== */

:root {
    /* -- Brand ---------------------------------------------------------- */
    --tribe-accent:            #D97757;
    --tribe-accent-deep:       #C26342;
    --tribe-accent-soft:       #FBEDE8;
    --tribe-accent-ring:       rgba(217, 119, 87, 0.18);

    /* -- Surfaces ------------------------------------------------------- */
    --tribe-canvas:            #ffffff;
    --tribe-surface:           #ffffff;
    --tribe-panel-header:      #f9fafb;
    --tribe-border:            #e5e7eb;
    --tribe-border-subtle:     #f3f4f6;
    --tribe-border-strong:     #d1d5db;

    /* -- Text ----------------------------------------------------------- */
    --tribe-text:              #111827;
    --tribe-text-secondary:    #374151;
    --tribe-text-tertiary:     #4b5563;
    --tribe-text-muted:        #6b7280;
    --tribe-text-faint:        #9ca3af;
    --tribe-text-inverse:      #ffffff;

    /* -- Semantic ------------------------------------------------------- */
    --tribe-positive:          #374151;
    --tribe-positive-bg:       #f3f4f6;
    --tribe-negative:          #dc2626;
    --tribe-negative-bg:       #fee2e2;
    --tribe-pending-bg:        #fef3c7;
    --tribe-pending-text:      #92400e;
    --tribe-info:              #1d4ed8;
    --tribe-info-bg:           #dbeafe;
    --tribe-toast:             #1f2430;

    /* -- Geometry ------------------------------------------------------- */
    --tribe-radius-card:       8px;
    --tribe-radius-modal:      10px;
    --tribe-radius-button:     6px;
    --tribe-radius-pill:       999px;
    --tribe-radius-input:      5px;

    /* -- Elevation ------------------------------------------------------ */
    --tribe-shadow-card:       0 1px 2px rgba(17, 24, 39, 0.04);
    --tribe-shadow-raised:     0 4px 12px rgba(17, 24, 39, 0.08);
    --tribe-shadow-modal:      0 24px 60px rgba(17, 24, 39, 0.22);
    --tribe-shadow-toast:      0 12px 32px rgba(17, 24, 39, 0.28);

    /* -- Type ----------------------------------------------------------- */
    --tribe-font:  'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Headings use the same face as body copy now — Poppins throughout,
       bold rather than a separate display face. Kept as its own variable
       so a display face could come back here without touching every
       selector that references it. */
    --tribe-font-display: 'Poppins', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --tribe-mono:  ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

    /* -- Layout --------------------------------------------------------- */
    --tribe-sidebar-width:     236px;
    --tribe-topbar-height:     56px;
    --tribe-content-max:       1240px;
}

/* ==========================================================================
   2. RESET
   ========================================================================== */

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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: var(--tribe-font);
    /* 14px. Everything below is sized in px relative to this rather than in
       rem, so the hierarchy is preserved exactly — only the whole scale moves. */
    font-size: 14px;
    line-height: 1.55;
    color: var(--tribe-text);
    background: var(--tribe-canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Every numeric column in this application is compared vertically -
   balances, salaries, headcounts - so figures line up by default. */
table, .tribe-num, .tribe-metric__value, input[type="number"] {
    font-variant-numeric: tabular-nums;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; }

/* Poppins, bold, at whatever size the context already sets — the scale
   itself is untouched, only the weight and face. */
h1, h2, h3, h4,
.tribe-h1, .tribe-h2, .tribe-h3, .tribe-h4,
.tribe-topbar__title,
.tribe-hero__title,
.tribe-page-head__text > h1 {
    font-family: var(--tribe-font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   3. TYPOGRAPHY SCALE
   ========================================================================== */

.tribe-h1 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--tribe-text);
}

.tribe-h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.tribe-h3 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.1px;
}

.tribe-h4 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.1px;
}

.tribe-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--tribe-text-secondary);
}

.tribe-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tribe-text-muted);
}

.tribe-meta   { font-size: 11.5px; color: var(--tribe-text-muted); }
.tribe-muted  { color: var(--tribe-text-muted); }
.tribe-faint  { color: var(--tribe-text-faint); }

.tribe-metric__value {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.05;
}

/* ==========================================================================
   4. LAYOUT
   ========================================================================== */

.tribe-shell { display: flex; min-height: 100vh; }

.tribe-sidebar {
    width: var(--tribe-sidebar-width);
    flex: 0 0 var(--tribe-sidebar-width);
    background: var(--tribe-surface);
    border-right: 1px solid var(--tribe-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.tribe-sidebar__brand {
    height: var(--tribe-topbar-height);
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    border-bottom: 1px solid var(--tribe-border-subtle);
}

.tribe-sidebar__brand img { height: 24px; width: auto; max-width: 140px; object-fit: contain; }

.tribe-sidebar__brand-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.tribe-sidebar__scope {
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--tribe-accent-deep);
    background: var(--tribe-accent-soft);
    padding: 2px 6px;
    border-radius: var(--tribe-radius-pill);
}

.tribe-nav { padding: 12px 8px; overflow-y: auto; flex: 1; }

.tribe-nav__group {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--tribe-text-faint);
    padding: 14px 10px 6px;
}

.tribe-nav__item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 7px 10px;
    border-radius: var(--tribe-radius-button);
    color: var(--tribe-text-tertiary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 1px;
    transition: background 120ms ease, color 120ms ease;
}

.tribe-nav__item:hover {
    background: var(--tribe-border-subtle);
    color: var(--tribe-text);
    text-decoration: none;
}

.tribe-nav__item.is-active {
    background: var(--tribe-accent-soft);
    color: var(--tribe-accent-deep);
    font-weight: 600;
}

.tribe-nav__count {
    margin-left: auto;
    font-size: 10.5px;
    font-weight: 600;
    background: var(--tribe-border);
    color: var(--tribe-text-secondary);
    padding: 1px 6px;
    border-radius: var(--tribe-radius-pill);
}

.tribe-nav__item.is-active .tribe-nav__count {
    background: var(--tribe-accent);
    color: #fff;
}

.tribe-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.tribe-topbar {
    height: var(--tribe-topbar-height);
    background: var(--tribe-surface);
    border-bottom: 1px solid var(--tribe-border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.tribe-topbar__spacer { flex: 1; }

.tribe-content {
    padding: 22px;
    max-width: var(--tribe-content-max);
    width: 100%;
}

.tribe-page-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.tribe-page-head__text { flex: 1; min-width: 0; }
.tribe-page-head__sub  { font-size: 12.5px; color: var(--tribe-text-muted); margin-top: 2px; }

/* ==========================================================================
   5. CARDS & PANELS
   ========================================================================== */

.tribe-card {
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    box-shadow: var(--tribe-shadow-card);

    /* Build 1 views wrap their content in .tribe-card__body, which is padded.
       Builds 2 and 3 put content straight into .tribe-card, which had none —
       so text sat hard against the border.

       Padding now lives on the card itself. .tribe-card__body drops to zero to
       avoid doubling it up where the older markup nests one inside the other,
       and .tribe-card--table keeps its zero so tables still reach the edges. */
    padding: 20px 22px;
}

/* Header and footer span the card's full width, so they cancel its padding
   and reapply their own. */
.tribe-card__header {
    margin: -20px -22px 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--tribe-border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--tribe-panel-header);
    border-radius: var(--tribe-radius-card) var(--tribe-radius-card) 0 0;
}

/* Zero because the card already pads. Kept as a hook so Build 1 markup that
   uses it continues to render identically. */
.tribe-card__body   { padding: 0; }
.tribe-card__footer {
    margin: 16px -22px -20px;
    padding: 12px 16px;
    border-top: 1px solid var(--tribe-border-subtle);
    background: var(--tribe-panel-header);
    border-radius: 0 0 var(--tribe-radius-card) var(--tribe-radius-card);
}

.tribe-grid { display: grid; gap: 14px; }
.tribe-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tribe-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tribe-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) {
    .tribe-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tribe-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .tribe-grid--2, .tribe-grid--3, .tribe-grid--4 { grid-template-columns: 1fr; }
    .tribe-sidebar { display: none; }
}

/* -- Metric tile -------------------------------------------------------- */

.tribe-metric { padding: 16px; }

.tribe-metric__label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tribe-text-muted);
    margin-bottom: 6px;
}

.tribe-metric__caption { font-size: 11.5px; color: var(--tribe-text-muted); margin-top: 4px; }

.tribe-delta { font-size: 11.5px; font-weight: 600; }
.tribe-delta--up   { color: var(--tribe-positive); }
.tribe-delta--down { color: var(--tribe-negative); }

/* ==========================================================================
   6. TABLES
   ========================================================================== */

.tribe-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.tribe-table thead th {
    text-align: left;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tribe-text-muted);
    padding: 9px 14px;
    background: var(--tribe-panel-header);
    border-bottom: 1px solid var(--tribe-border);
    white-space: nowrap;
}

.tribe-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--tribe-border-subtle);
    vertical-align: middle;
}

.tribe-table tbody tr:last-child td { border-bottom: none; }
.tribe-table tbody tr:hover { background: var(--tribe-panel-header); }

.tribe-table__num { text-align: right; }

.tribe-table__empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--tribe-text-muted);
    font-size: 13px;
}

/* ==========================================================================
   7. BADGES & PILLS
   ========================================================================== */

.tribe-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 2px 8px;
    border-radius: var(--tribe-radius-pill);
    white-space: nowrap;
}

.tribe-badge--active    { background: var(--tribe-positive-bg); color: #374151; }
.tribe-badge--trial     { background: var(--tribe-info-bg);     color: #1e40af; }
.tribe-badge--pending   { background: var(--tribe-pending-bg);  color: var(--tribe-pending-text); }
.tribe-badge--suspended { background: var(--tribe-negative-bg); color: #991b1b; }
.tribe-badge--neutral   { background: var(--tribe-border);      color: var(--tribe-text-secondary); }
.tribe-badge--accent    { background: var(--tribe-accent-soft); color: var(--tribe-accent-deep); }

/* ==========================================================================
   8. BUTTONS
   ========================================================================== */

.tribe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    padding: 8px 14px;
    border-radius: var(--tribe-radius-button);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
    white-space: nowrap;
}

.tribe-btn:hover { text-decoration: none; }
.tribe-btn:focus-visible { outline: 2px solid var(--tribe-accent); outline-offset: 2px; }
.tribe-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.tribe-btn--primary   { background: var(--tribe-accent); color: #fff; }
.tribe-btn--primary:hover { background: var(--tribe-accent-deep); color: #fff; }

.tribe-btn--secondary { background: var(--tribe-surface); color: var(--tribe-text-secondary);
                      border-color: var(--tribe-border-strong); }
.tribe-btn--secondary:hover { background: var(--tribe-panel-header); color: var(--tribe-text); }

.tribe-btn--ghost     { background: transparent; color: var(--tribe-text-tertiary); }
.tribe-btn--ghost:hover { background: var(--tribe-border-subtle); }

.tribe-btn--danger    { background: var(--tribe-negative); color: #fff; }
.tribe-btn--danger:hover { background: #b91c1c; color: #fff; }

.tribe-btn--sm { font-size: 11.5px; padding: 5px 10px; }
.tribe-btn--lg { font-size: 13.5px; padding: 11px 20px; }
.tribe-btn--block { width: 100%; }

/* ==========================================================================
   9. FORMS
   ========================================================================== */

.tribe-field { margin-bottom: 14px; }

.tribe-field__label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--tribe-text-secondary);
    margin-bottom: 5px;
}

.tribe-field__hint { font-size: 11.5px; color: var(--tribe-text-muted); margin-top: 4px; }

.tribe-field__error {
    font-size: 11.5px;
    color: var(--tribe-negative);
    margin-top: 4px;
    font-weight: 500;
}

.tribe-input, .tribe-select, .tribe-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    color: var(--tribe-text);
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border-strong);
    border-radius: var(--tribe-radius-input);
    padding: 8px 11px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.tribe-input:focus, .tribe-select:focus, .tribe-textarea:focus {
    outline: none;
    border-color: var(--tribe-accent);
    box-shadow: 0 0 0 3px var(--tribe-accent-ring);
}

.tribe-input.has-error, .tribe-select.has-error, .tribe-textarea.has-error {
    border-color: var(--tribe-negative);
}

.tribe-textarea { min-height: 84px; resize: vertical; line-height: 1.5; }

.tribe-checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.tribe-checkbox input { margin-top: 2px; accent-color: var(--tribe-accent); }

/*
 | A row of fields sits on ONE line, however many fields it holds.
 |
 | This was fixed at two columns, so any row with three or four fields — and
 | there are eighteen of them across the admin screens — silently wrapped the
 | extras onto a second line. On Add Employee that split First name and Last
 | name across two rows, which is what made the form look misaligned.
 |
 | grid-auto-flow: column lets the row take its column count from the markup
 | instead of assuming it, so a two-field row is unchanged and a three or
 | four-field row now lays out the way it reads in the template.
 */
.tribe-field-row {
    display: grid;
    gap: 12px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
}

/* Below this the columns would be too narrow to type in, so they stack. */
@media (max-width: 640px) {
    .tribe-field-row {
        grid-auto-flow: row;
        grid-auto-columns: auto;
    }
}

/* ==========================================================================
   10. ALERTS
   ========================================================================== */

.tribe-alert {
    padding: 11px 14px;
    border-radius: var(--tribe-radius-button);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.tribe-alert--success { background: var(--tribe-positive-bg); color: #374151; border-color: #d1d5db; }
.tribe-alert--danger  { background: var(--tribe-negative-bg); color: #991b1b; border-color: #fecaca; }
.tribe-alert--warning { background: var(--tribe-pending-bg);  color: var(--tribe-pending-text); border-color: #fde68a; }
.tribe-alert--info    { background: var(--tribe-info-bg);     color: #1e40af; border-color: #bfdbfe; }

/* Support-session banner - deliberately hard to ignore. */
.tribe-impersonation-banner {
    background: var(--tribe-pending-bg);
    border-bottom: 1px solid #fde68a;
    color: var(--tribe-pending-text);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   11. AVATAR
   ========================================================================== */

.tribe-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--tribe-accent-soft);
    color: var(--tribe-accent-deep);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.tribe-avatar--sm { width: 24px; height: 24px; font-size: 9.5px; }
.tribe-avatar--lg { width: 44px; height: 44px; font-size: 15px; }

.tribe-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tribe-person__name { font-weight: 600; font-size: 13px; }
.tribe-person__meta { font-size: 11.5px; color: var(--tribe-text-muted); }

/* ==========================================================================
   12. AUTH SCREENS
   ========================================================================== */

.tribe-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--tribe-canvas);
}

.tribe-auth__card {
    width: 100%;
    max-width: 396px;
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-modal);
    box-shadow: var(--tribe-shadow-raised);
    padding: 30px 30px 26px;
}

.tribe-auth__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 22px;
}

.tribe-auth__brand img { height: 30px; }

.tribe-auth__title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
    text-align: center;
    margin-bottom: 4px;
}

.tribe-auth__sub {
    font-size: 12.5px;
    color: var(--tribe-text-muted);
    text-align: center;
    margin-bottom: 22px;
}

.tribe-auth__footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--tribe-border-subtle);
    text-align: center;
    font-size: 12px;
    color: var(--tribe-text-muted);
}

/* One input per digit reads better than a single six-character box, and
   makes it obvious how many digits are expected. */
.tribe-otp {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 6px 0 4px;
}

.tribe-otp input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: 21px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    border: 1px solid var(--tribe-border-strong);
    border-radius: var(--tribe-radius-button);
    background: var(--tribe-surface);
    color: var(--tribe-text);
}

.tribe-otp input:focus {
    outline: none;
    border-color: var(--tribe-accent);
    box-shadow: 0 0 0 3px var(--tribe-accent-ring);
}

/* ==========================================================================
   13. UTILITIES
   ========================================================================== */

.tribe-stack     { display: flex; flex-direction: column; }
.tribe-row       { display: flex; align-items: center; }
.tribe-row--gap  { gap: 10px; }
.tribe-push      { margin-left: auto; }
.tribe-truncate  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tribe-mt-0 { margin-top: 0; }    .tribe-mt-1 { margin-top: 6px; }
.tribe-mt-2 { margin-top: 12px; } .tribe-mt-3 { margin-top: 18px; }
.tribe-mt-4 { margin-top: 24px; }
.tribe-mb-0 { margin-bottom: 0; } .tribe-mb-1 { margin-bottom: 6px; }
.tribe-mb-2 { margin-bottom: 12px; } .tribe-mb-3 { margin-bottom: 18px; }
.tribe-mb-4 { margin-bottom: 24px; }

.tribe-divider { height: 1px; background: var(--tribe-border-subtle); margin: 16px 0; }

.tribe-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tribe-filters .tribe-input,
.tribe-filters .tribe-select { width: auto; min-width: 150px; }

.tribe-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    padding: 12px 16px;
    font-size: 12.5px;
}

.tribe-pagination a, .tribe-pagination span {
    padding: 5px 10px;
    border-radius: var(--tribe-radius-button);
    border: 1px solid var(--tribe-border);
    color: var(--tribe-text-secondary);
}

.tribe-pagination .is-current {
    background: var(--tribe-accent);
    border-color: var(--tribe-accent);
    color: #fff;
    font-weight: 600;
}

/* Progress bar, matching the leave-tracker balance bars in the handoff. */
.tribe-bar {
    height: 6px;
    background: var(--tribe-border-subtle);
    border-radius: var(--tribe-radius-pill);
    overflow: hidden;
    display: flex;
}

.tribe-bar__fill    { height: 100%; background: var(--tribe-accent); }
.tribe-bar__pending { height: 100%; background: var(--tribe-accent); opacity: 0.32; }

@media print {
    .tribe-sidebar, .tribe-topbar, .tribe-btn { display: none !important; }
    body { background: #fff; }
}

/* ==========================================================================
   11. BUILD TWO & THREE — SHELLS
   ==========================================================================

   Part 1 of this stylesheet covered the platform console only.  Builds Two
   and Three introduced the company backend, the public site and the employee
   portal, and with them roughly 260 class names that had never been authored
   — which is why those pages rendered with correct content and no layout.

   Everything below uses the same tokens declared in section 1.  No new
   colours are invented here; where a value looks new it is derived from an
   existing token.
   ========================================================================== */

/* -- Admin shell (Build 2) ------------------------------------------------ */

.tribe-app {
    display: flex;
    min-height: 100vh;
    background: var(--tribe-canvas);
}

.tribe-app .tribe-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--tribe-sidebar-width);
    display: flex;
    flex-direction: column;
    background: var(--tribe-surface);
    border-right: 1px solid var(--tribe-border);
    overflow-y: auto;
    z-index: 20;
}

.tribe-app .tribe-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--tribe-sidebar-width);
    display: flex;
    flex-direction: column;
}

.tribe-sidebar__company {
    padding: 12px 18px 14px;
    border-bottom: 1px solid var(--tribe-border-subtle);
}

.tribe-sidebar__company-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tribe-text);
    line-height: 1.35;
    word-break: break-word;
}

.tribe-sidebar__switch,
.tribe-sidebar__logout {
    display: inline-block;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--tribe-text-muted);
    text-decoration: none;
}

.tribe-sidebar__switch:hover,
.tribe-sidebar__logout:hover { color: var(--tribe-accent); }

.tribe-sidebar__foot {
    margin-top: auto;
    padding: 14px 18px;
    border-top: 1px solid var(--tribe-border-subtle);
}

.tribe-sidebar__user {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--tribe-text-secondary);
}

.tribe-nav__heading {
    padding: 16px 18px 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tribe-text-faint);
}

.tribe-nav__label { flex: 1; }

.tribe-nav__badge {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: var(--tribe-radius-pill);
    background: var(--tribe-accent);
    color: var(--tribe-text-inverse);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.tribe-topbar__title {
    margin: 0;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--tribe-text);
}

.tribe-brandmark { display: inline-flex; align-items: center; }
.tribe-brandmark img { display: block; height: auto; }

/* -- Public site shell (Build 2) ------------------------------------------ */

.tribe-public {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--tribe-surface);
}

.tribe-public__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--tribe-border);
    background: var(--tribe-surface);
    position: sticky;
    top: 0;
    z-index: 30;
}

.tribe-public__nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.tribe-public__nav a {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tribe-text-secondary);
    text-decoration: none;
}

.tribe-public__nav a:hover { color: var(--tribe-accent); }
.tribe-public__nav .tribe-btn { color: var(--tribe-text-inverse); }

.tribe-public__main {
    flex: 1;
    width: 100%;
    max-width: var(--tribe-content-max);
    margin: 0 auto;
    padding: 40px 28px 64px;
}

.tribe-public__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 22px 28px;
    border-top: 1px solid var(--tribe-border);
    background: var(--tribe-panel-header);
    font-size: 12.5px;
    color: var(--tribe-text-muted);
}

.tribe-public__footer-links { display: flex; gap: 18px; }

.tribe-public__footer-links a {
    color: var(--tribe-text-muted);
    text-decoration: none;
}

.tribe-public__footer-links a:hover { color: var(--tribe-accent); }

/* -- Portal shell (Build 3) ----------------------------------------------- */

.tribe-portal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--tribe-canvas);
}

.tribe-portal__bar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 24px;
    height: var(--tribe-topbar-height);
    background: var(--tribe-surface);
    border-bottom: 1px solid var(--tribe-border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.tribe-portal__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tribe-portal__company {
    font-size: 13px;
    font-weight: 600;
    color: var(--tribe-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.tribe-portal__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
}

.tribe-portal__link {
    padding: 8px 12px;
    border-radius: var(--tribe-radius-button);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tribe-text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.tribe-portal__link:hover { background: var(--tribe-border-subtle); }

.tribe-portal__link.is-active {
    background: var(--tribe-accent-soft);
    color: var(--tribe-accent-deep);
    font-weight: 600;
}

.tribe-portal__user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    white-space: nowrap;
}

.tribe-portal__account { color: var(--tribe-text-secondary); text-decoration: none; font-weight: 500; }
.tribe-portal__switch,
.tribe-portal__logout { color: var(--tribe-text-muted); text-decoration: none; }
.tribe-portal__account:hover,
.tribe-portal__switch:hover,
.tribe-portal__logout:hover { color: var(--tribe-accent); }

.tribe-portal__main {
    flex: 1;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 26px 24px 56px;
}

.tribe-portal__head { margin-bottom: 20px; }
.tribe-portal__content { display: block; }

.tribe-portal__footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    border-top: 1px solid var(--tribe-border);
    font-size: 12px;
    color: var(--tribe-text-muted);
}

.tribe-portal__footer a { color: var(--tribe-text-muted); text-decoration: none; }
.tribe-portal__footer a:hover { color: var(--tribe-accent); }


/* ==========================================================================
   12. UTILITIES
   ========================================================================== */

.tribe-mt-1 { margin-top: 6px; }
.tribe-mt-3 { margin-top: 18px; }
.tribe-mb-1 { margin-bottom: 6px; }
.tribe-mb-3 { margin-bottom: 18px; }

.tribe-inline { display: inline-flex; align-items: center; gap: 8px; }

.tribe-link {
    color: var(--tribe-accent);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
}

.tribe-link:hover { text-decoration: underline; }
.tribe-link--sm { font-size: 12px; }

.tribe-mono { font-family: var(--tribe-mono); font-size: 12.5px; }
.tribe-text-faint { color: var(--tribe-text-faint); }
.tribe-negative { color: var(--tribe-negative); }
.tribe-border { border: 1px solid var(--tribe-border); }
.tribe-border-subtle { border: 1px solid var(--tribe-border-subtle); }
.tribe-accent { color: var(--tribe-accent); }
.tribe-panel-header { background: var(--tribe-panel-header); }

.tribe-optional {
    margin-left: 4px;
    font-size: 11px;
    font-weight: 400;
    color: var(--tribe-text-faint);
}

.tribe-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--tribe-text-secondary); }
.tribe-list li { margin-bottom: 8px; }
.tribe-list--tight li { margin-bottom: 4px; }
.tribe-list a { color: var(--tribe-accent); text-decoration: none; }
.tribe-list a:hover { text-decoration: underline; }

.tribe-empty {
    padding: 44px 24px;
    text-align: center;
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    color: var(--tribe-text-muted);
    font-size: 13.5px;
}

.tribe-empty p { margin: 0 0 10px; }
.tribe-empty .tribe-btn { margin-top: 6px; }

/* A gated analytics card — the module exists, this company's plan doesn't
   include it. Same shell as .tribe-empty; the plan name in .tribe-locked__badge
   is filled in per card, not hard-coded, so it reads correctly however the
   plan hierarchy changes later.

   min-height matches chartBars()'s own floor (200px) — without it, a locked
   card sits noticeably shorter than the chart card beside it in the same
   grid row, which reads as broken layout rather than an intentional state. */
.tribe-empty.tribe-locked {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.tribe-locked__icon {
    margin: 0 auto 10px;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--tribe-accent-soft);
    color: var(--tribe-accent-deep);
}
.tribe-locked__icon svg { width: 18px; height: 18px; }
.tribe-locked__badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--tribe-accent-soft);
    color: var(--tribe-accent-deep);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tribe-note {
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--tribe-panel-header);
    border: 1px solid var(--tribe-border-subtle);
    border-radius: var(--tribe-radius-card);
    font-size: 12.5px;
    color: var(--tribe-text-muted);
}

.tribe-note p { margin: 0; }

.tribe-subsection-title {
    margin: 20px 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--tribe-text-muted);
}


/* ==========================================================================
   13. FLASH MESSAGES
   ==========================================================================
   Response::flashMessage() emits .tribe-alert (section 10). Views also place
   contextual banners inline with .tribe-flash, so the two share an appearance.
   ========================================================================== */

.tribe-flash {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: var(--tribe-radius-card);
    border: 1px solid var(--tribe-border);
    background: var(--tribe-panel-header);
    font-size: 13.5px;
    color: var(--tribe-text-secondary);
}

.tribe-flash--success { background: var(--tribe-positive-bg); border-color: #d1d5db; color: #374151; }
.tribe-flash--danger  { background: var(--tribe-negative-bg); border-color: #fecaca; color: #991b1b; }
.tribe-flash--warning { background: var(--tribe-pending-bg);  border-color: #fde68a; color: var(--tribe-pending-text); }
.tribe-flash--info    { background: var(--tribe-info-bg);     border-color: #bfdbfe; color: #1e40af; }
.tribe-flash--public  { max-width: var(--tribe-content-max); margin: 16px auto 0; }
.tribe-flash a { color: inherit; font-weight: 600; }


/* ==========================================================================
   14. CARDS, TABS, ANCHORS
   ========================================================================== */

.tribe-card--table { padding: 0; overflow: hidden; }

/*
 | CARD HEADER INSIDE A TABLE CARD
 |
 | .tribe-card__header cancels the card's own padding with a negative margin so
 | it can span the full width and sit flush against the top corners. That works
 | on a normal card — but .tribe-card--table sets padding: 0, so there is nothing
 | to cancel and the negative margin drags the header 20px up and 22px out past
 | the card's edge.
 |
 | Every table card in the build was affected, which is why headers looked
 | misaligned on the payroll screens and elsewhere. Inside a table card the
 | header carries its own padding instead.
 */
.tribe-card--table > .tribe-card__header,
.tribe-card--table > .tribe-card__footer {
    margin: 0;
    padding: 14px 20px;
}

/* The same applies to any card whose body sets its own padding: the header
   should not also try to cancel padding the card is not applying. */
.tribe-card--flush > .tribe-card__header { margin: 0; padding: 14px 20px; }
.tribe-card--form  { padding: 24px 26px; }
.tribe-card--center { text-align: center; }

.tribe-page-head__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tribe-page-head--center { display: block; text-align: center; margin-bottom: 28px; }

.tribe-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--tribe-border);
    overflow-x: auto;
}

.tribe-tabs__tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tribe-text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.tribe-tabs__tab:hover { color: var(--tribe-text); }

.tribe-tabs__tab.is-active {
    color: var(--tribe-accent-deep);
    border-bottom-color: var(--tribe-accent);
    font-weight: 600;
}

.tribe-tabs__count {
    min-width: 18px;
    padding: 1px 6px;
    border-radius: var(--tribe-radius-pill);
    background: var(--tribe-border-subtle);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tribe-tabs__tab.is-active .tribe-tabs__count {
    background: var(--tribe-accent-soft);
    color: var(--tribe-accent-deep);
}

.tribe-anchornav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 10px 12px;
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    position: sticky;
    top: 8px;
    z-index: 10;
}

.tribe-anchornav a {
    padding: 5px 11px;
    border-radius: var(--tribe-radius-pill);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--tribe-text-secondary);
    text-decoration: none;
}

.tribe-anchornav a:hover { background: var(--tribe-accent-soft); color: var(--tribe-accent-deep); }

.tribe-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-button);
    background: var(--tribe-surface);
    font-size: 13px;
    color: var(--tribe-text-secondary);
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.tribe-pagination__page:hover { border-color: var(--tribe-border-strong); }

.tribe-pagination__page.is-active {
    background: var(--tribe-accent);
    border-color: var(--tribe-accent);
    color: var(--tribe-text-inverse);
    font-weight: 600;
}


/* ==========================================================================
   15. TABLES (EXTENDED)
   ========================================================================== */

.tribe-card--table .tribe-table { margin: 0; }
.tribe-table--compact th,
.tribe-table--compact td { padding: 8px 12px; font-size: 13px; }

.tribe-table thead th a { color: inherit; text-decoration: none; }
.tribe-table thead th a:hover { color: var(--tribe-accent); }

.tribe-table__primary {
    font-weight: 600;
    color: var(--tribe-text);
    text-decoration: none;
}

.tribe-table__primary:hover { color: var(--tribe-accent); }

.tribe-table__sub {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--tribe-text-muted);
}

.tribe-table__actions { text-align: right; white-space: nowrap; }

.tribe-table__total td {
    border-top: 2px solid var(--tribe-border);
    font-weight: 600;
    color: var(--tribe-text);
}

.tribe-table tr.is-current { background: var(--tribe-accent-soft); }
.tribe-table tr.is-inactive { opacity: 0.55; }
.tribe-table tr.is-overdue { background: #fffbeb; }

.tribe-num { text-align: right; font-variant-numeric: tabular-nums; }
td.tribe-num, th.tribe-num { text-align: right; }


/* ==========================================================================
   16. STATUS, PILLS, MARKS
   ========================================================================== */

.tribe-status {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--tribe-radius-pill);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--tribe-border-subtle);
    color: var(--tribe-text-secondary);
    white-space: nowrap;
}

.tribe-status--active,
.tribe-status--approved,
.tribe-status--verified,
.tribe-status--issued,
.tribe-status--fulfilled  { background: var(--tribe-positive-bg); color: #374151; }

.tribe-status--pending,
.tribe-status--probation,
.tribe-status--submitted,
.tribe-status--in_review,
.tribe-status--awaiting_info,
.tribe-status--invited    { background: var(--tribe-pending-bg); color: var(--tribe-pending-text); }

.tribe-status--rejected,
.tribe-status--terminated,
.tribe-status--void,
.tribe-status--revoked,
.tribe-status--suspended  { background: var(--tribe-negative-bg); color: #991b1b; }

.tribe-status--cancelled,
.tribe-status--retired,
.tribe-status--draft      { background: var(--tribe-border-subtle); color: var(--tribe-text-muted); }

.tribe-status--on_leave   { background: var(--tribe-info-bg); color: #1e40af; }

.tribe-pill {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: var(--tribe-radius-pill);
    background: var(--tribe-border-subtle);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--tribe-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tribe-pill--warn    { background: var(--tribe-pending-bg); color: var(--tribe-pending-text); }
.tribe-pill--pending { background: var(--tribe-accent-soft); color: var(--tribe-accent-deep); }

.tribe-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
}

.tribe-status-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
    font-weight: 600;
}

.tribe-status-mark--good    { background: var(--tribe-positive-bg); color: #374151; }
.tribe-status-mark--bad     { background: var(--tribe-negative-bg); color: #991b1b; }
.tribe-status-mark--warn    { background: var(--tribe-pending-bg);  color: var(--tribe-pending-text); }
.tribe-status-mark--pending { background: var(--tribe-accent-soft); color: var(--tribe-accent-deep); }

.tribe-status-line {
    padding: 10px 13px;
    border-radius: var(--tribe-radius-card);
    font-size: 13.5px;
    background: var(--tribe-border-subtle);
    color: var(--tribe-text-secondary);
}

.tribe-status-line--good { background: var(--tribe-positive-bg); color: #374151; }
.tribe-status-line--warn { background: var(--tribe-pending-bg);  color: var(--tribe-pending-text); }


/* ==========================================================================
   17. BUTTONS & FORMS (EXTENDED)
   ========================================================================== */

.tribe-btn--xs { padding: 3px 9px; font-size: 11.5px; }

.tribe-btn--approve {
    background: var(--tribe-positive);
    border-color: var(--tribe-positive);
    color: var(--tribe-text-inverse);
}

.tribe-btn--approve:hover { background: #047857; border-color: #047857; }

.tribe-btn--decline {
    background: var(--tribe-surface);
    border-color: var(--tribe-negative);
    color: var(--tribe-negative);
}

.tribe-btn--decline:hover { background: var(--tribe-negative-bg); }

.tribe-form { display: block; }
.tribe-form--wide { max-width: 100%; }

.tribe-form--inline {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.tribe-form--inline .tribe-field { margin-bottom: 0; }

.tribe-form__lead {
    margin: 0 0 18px;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--tribe-text-muted);
}

.tribe-form__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tribe-form__actions--center { justify-content: center; }

.tribe-field--sm { max-width: 170px; }
.tribe-input--search { min-width: 240px; }
.tribe-input--file { padding: 6px 8px; }

.tribe-input--code {
    font-family: var(--tribe-mono);
    font-size: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tribe-colour-field { display: flex; align-items: center; gap: 10px; }

.tribe-colour-swatch {
    width: 42px;
    height: 34px;
    padding: 2px;
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-input);
    background: var(--tribe-surface);
    cursor: pointer;
}

.tribe-input--colour { max-width: 130px; font-family: var(--tribe-mono); text-transform: uppercase; }

.tribe-checkbox--sm { font-size: 12.5px; }

.tribe-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 10px 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--tribe-text-secondary);
    cursor: pointer;
}

.tribe-checkbox input { margin-top: 2px; flex-shrink: 0; }


/* ==========================================================================
   18. REVIEW LISTS & DIFFS
   ========================================================================== */

.tribe-review { margin: 0; }

.tribe-review__row {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--tribe-border-subtle);
    font-size: 13.5px;
}

.tribe-review__row:last-child { border-bottom: 0; }

.tribe-review__row dt {
    color: var(--tribe-text-muted);
    font-weight: 500;
}

.tribe-review__row dd {
    margin: 0;
    color: var(--tribe-text);
    word-break: break-word;
}

.tribe-review--tight .tribe-review__row {
    grid-template-columns: 150px 1fr;
    padding: 6px 0;
    font-size: 13px;
}

.tribe-diff { margin: 0; padding: 0; list-style: none; font-size: 12px; }
.tribe-diff li { margin-bottom: 3px; }

.tribe-diff__field { color: var(--tribe-text-muted); margin-right: 6px; }
.tribe-diff__old { color: var(--tribe-negative); text-decoration: line-through; }
.tribe-diff__arrow { margin: 0 4px; color: var(--tribe-text-faint); }
.tribe-diff__new { color: var(--tribe-positive); font-weight: 500; }


/* ==========================================================================
   19. DASHBOARD COMPONENTS
   ========================================================================== */

.tribe-attention { border-left: 3px solid var(--tribe-accent); }
.tribe-attention--clear { border-left-color: var(--tribe-positive); }
.tribe-attention__row { display: flex; gap: 26px; flex-wrap: wrap; }

.tribe-attention__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.tribe-attention__count {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--tribe-accent);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.tribe-attention__item--warn .tribe-attention__count { color: var(--tribe-pending-text); }

.tribe-attention__label { font-size: 12.5px; color: var(--tribe-text-muted); }
a.tribe-attention__item:hover .tribe-attention__label { color: var(--tribe-accent); }
.tribe-attention--clear .tribe-muted { margin: 0; }

.tribe-metric__value--sm { font-size: 20px; letter-spacing: -0.2px; }

.tribe-people { list-style: none; margin: 0; padding: 0; }

.tribe-people__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--tribe-border-subtle);
    font-size: 13.5px;
}

.tribe-people__row:last-child { border-bottom: 0; }

.tribe-people__name {
    font-weight: 500;
    color: var(--tribe-text);
    text-decoration: none;
}

a.tribe-people__name:hover { color: var(--tribe-accent); }

.tribe-people__meta {
    margin-left: auto;
    font-size: 12px;
    color: var(--tribe-text-muted);
    white-space: nowrap;
}

.tribe-barlist { list-style: none; margin: 0; padding: 0; }

.tribe-barlist__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
}

.tribe-barlist__label { width: 160px; flex-shrink: 0; color: var(--tribe-text-secondary); }

.tribe-barlist__track {
    flex: 1;
    height: 8px;
    border-radius: var(--tribe-radius-pill);
    background: var(--tribe-border-subtle);
    overflow: hidden;
}

.tribe-barlist__fill {
    display: block;
    height: 100%;
    border-radius: var(--tribe-radius-pill);
    background: var(--tribe-accent);
}

.tribe-barlist__value {
    width: 42px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--tribe-text);
    font-weight: 600;
}

.tribe-timeline { list-style: none; margin: 0; padding: 0; }

.tribe-timeline__item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--tribe-border-subtle);
    font-size: 13px;
}

.tribe-timeline__item:last-child { border-bottom: 0; }
.tribe-timeline__when { color: var(--tribe-text-muted); font-variant-numeric: tabular-nums; }
.tribe-timeline__what { color: var(--tribe-text-secondary); }

.tribe-upnext { padding: 4px 0 10px; }
.tribe-upnext__dates { margin-top: 8px; font-size: 17px; font-weight: 600; color: var(--tribe-text); }
.tribe-upnext__status { font-size: 12.5px; color: var(--tribe-text-muted); }


/* ==========================================================================
   20. LEAVE BALANCES
   ==========================================================================
   --bal-bar is set inline per card from the leave type's stored colour, so a
   tenant adding a type at run time gets a correctly coloured bar with no
   stylesheet change.
   ========================================================================== */

/* Grid and flex items default to min-width:auto, so a wide child (a table,
   a long email address) refuses to shrink and pushes the whole page sideways.
   Allowing these containers to shrink is what makes the scroll containers
   below actually contain anything. */
.tribe-card,
.tribe-payslip__col,
.tribe-grid > *,
.tribe-review__row dd { min-width: 0; }

.tribe-balances {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.tribe-balance {
    padding: 14px 16px;
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    background: var(--tribe-surface);
    border-top: 3px solid var(--bal-bar, var(--tribe-accent));
}

.tribe-balance--lg { padding: 18px 20px; }

.tribe-balance__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--tribe-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tribe-balance__value {
    margin-top: 6px;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
    color: var(--tribe-text);
    font-variant-numeric: tabular-nums;
}

.tribe-balance__caption { margin-top: 4px; font-size: 12px; color: var(--tribe-text-muted); }

.tribe-balance__track {
    display: flex;
    height: 7px;
    margin-top: 12px;
    border-radius: var(--tribe-radius-pill);
    background: var(--tribe-border-subtle);
    overflow: hidden;
}

.tribe-balance__used {
    display: block;
    height: 100%;
    background: var(--bal-bar, var(--tribe-accent));
}

/* Pending days are hatched rather than solid: they are spoken for but not
   yet taken, and the design handoff is explicit that the two must not read
   as the same thing. */
.tribe-balance__pending {
    display: block;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        var(--bal-bar, var(--tribe-accent)) 0, var(--bal-bar, var(--tribe-accent)) 3px,
        transparent 3px, transparent 6px
    );
    opacity: 0.55;
}

.tribe-balance__pendingnote,
.tribe-balance__note {
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--tribe-text-muted);
}

.tribe-balance__legend {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--tribe-text-muted);
}

.tribe-balance__legend-pending { color: var(--tribe-pending-text); }


/* ==========================================================================
   21. LEAVE REQUEST QUEUE (Direction A — "Comfortable")
   ========================================================================== */

.tribe-requests { display: flex; flex-direction: column; gap: 12px; }

.tribe-request {
    display: grid;
    grid-template-columns: 1.4fr 1.1fr 0.7fr 1.3fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    box-shadow: var(--tribe-shadow-card);
}

.tribe-request__who { display: flex; align-items: center; gap: 11px; min-width: 0; }

.tribe-request__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tribe-text);
    text-decoration: none;
}

.tribe-request__name:hover { color: var(--tribe-accent); }
.tribe-request__meta { margin-top: 2px; font-size: 11.5px; color: var(--tribe-text-muted); }
.tribe-request__what { display: flex; flex-direction: column; gap: 5px; }
.tribe-request__dates { font-size: 13.5px; font-weight: 500; color: var(--tribe-text); }
.tribe-request__days { font-size: 12px; color: var(--tribe-text-muted); font-variant-numeric: tabular-nums; }
.tribe-request__balance { text-align: center; }

.tribe-request__balance-value {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--tribe-text);
    font-variant-numeric: tabular-nums;
}

.tribe-request__balance-label { font-size: 11px; color: var(--tribe-text-muted); line-height: 1.3; }
.tribe-request__reason { font-size: 12.5px; color: var(--tribe-text-secondary); line-height: 1.5; }
.tribe-request__cover { margin-top: 3px; font-size: 11.5px; color: var(--tribe-text-muted); }

.tribe-request__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
}

.tribe-decision { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tribe-decision .tribe-form { display: flex; flex-direction: column; gap: 10px; }

.tribe-impact { font-size: 13.5px; }

.tribe-impact__row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid var(--tribe-border-subtle);
    color: var(--tribe-text-secondary);
}

.tribe-impact__row--total {
    border-bottom: 0;
    border-top: 2px solid var(--tribe-border);
    font-weight: 700;
    color: var(--tribe-text);
}


/* ==========================================================================
   22. DAY GRID & PREVIEW
   ========================================================================== */

.tribe-daygrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 8px;
}

.tribe-daygrid__day {
    padding: 9px 10px;
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-button);
    background: var(--tribe-surface);
    font-size: 12px;
}

.tribe-daygrid__day--full { border-left: 3px solid var(--tribe-accent); }
.tribe-daygrid__day--half { border-left: 3px solid var(--tribe-accent); background: var(--tribe-accent-soft); }
.tribe-daygrid__day--holiday { background: var(--tribe-info-bg); border-color: #bfdbfe; }
.tribe-daygrid__day--nonworking { background: var(--tribe-border-subtle); color: var(--tribe-text-muted); }

.tribe-daygrid__date { font-weight: 600; color: var(--tribe-text-secondary); }
.tribe-daygrid__frac { margin-top: 3px; font-variant-numeric: tabular-nums; color: var(--tribe-text-muted); }

.tribe-preview {
    margin: 4px 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--tribe-border);
    border-left: 3px solid var(--tribe-accent);
    border-radius: var(--tribe-radius-card);
    background: var(--tribe-accent-soft);
}

.tribe-preview.is-invalid {
    border-left-color: var(--tribe-negative);
    background: var(--tribe-negative-bg);
}

.tribe-preview__value {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--tribe-text);
    font-variant-numeric: tabular-nums;
}

.tribe-preview__note { margin-top: 2px; font-size: 12px; color: var(--tribe-text-muted); }

.tribe-preview__errors {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 12.5px;
    color: #991b1b;
}

.tribe-preview__errors:empty { display: none; }


/* ==========================================================================
   23. CALENDAR & WORK SCHEDULE
   ========================================================================== */

.tribe-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--tribe-border);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    overflow: hidden;
}

.tribe-calendar__head {
    padding: 8px 6px;
    background: var(--tribe-panel-header);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tribe-text-muted);
    text-align: center;
}

.tribe-calendar__cell {
    min-height: 96px;
    padding: 6px;
    background: var(--tribe-surface);
}

.tribe-calendar__cell--blank { background: var(--tribe-border-subtle); }
.tribe-calendar__cell.is-weekend { background: var(--tribe-panel-header); }
.tribe-calendar__cell.is-holiday { background: var(--tribe-info-bg); }

.tribe-calendar__daynum {
    font-size: 12px;
    font-weight: 600;
    color: var(--tribe-text-muted);
    margin-bottom: 4px;
}

.tribe-calendar__holiday {
    font-size: 10.5px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 3px;
}

.tribe-calendar__entry {
    display: block;
    margin-bottom: 3px;
    padding: 2px 6px;
    border-radius: var(--tribe-radius-button);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tribe-calendar__entry.is-pending { opacity: 0.65; border: 1px dashed currentColor; }
.tribe-calendar__more { font-size: 10.5px; color: var(--tribe-text-muted); }

.tribe-weekgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }

.tribe-weekgrid__day {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-button);
    background: var(--tribe-surface);
}

.tribe-weekgrid__day.is-working { border-color: var(--tribe-accent); background: var(--tribe-accent-soft); }
.tribe-weekgrid__day.is-off { background: var(--tribe-border-subtle); }
.tribe-weekgrid__name { font-size: 11.5px; font-weight: 600; color: var(--tribe-text-muted); }
.tribe-weekgrid__hours { margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--tribe-text); }


/* ==========================================================================
   24. EMPLOYEE PROFILE & NOTES
   ========================================================================== */

.tribe-profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.tribe-profile-head__main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.tribe-profile-head__text { min-width: 0; }
.tribe-profile-head__sub { margin-top: 3px; font-size: 14px; color: var(--tribe-text-muted); }

.tribe-profile-head__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--tribe-text-muted);
}

.tribe-profile-head__meta a { color: var(--tribe-accent); text-decoration: none; }
.tribe-profile-head__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.tribe-notes { list-style: none; margin: 0; padding: 0; }

.tribe-notes__item {
    padding: 11px 13px;
    margin-bottom: 9px;
    border: 1px solid var(--tribe-border-subtle);
    border-radius: var(--tribe-radius-card);
    background: var(--tribe-panel-header);
}

.tribe-notes__item.is-internal {
    background: var(--tribe-pending-bg);
    border-color: #fde68a;
}

.tribe-notes__body { font-size: 13.5px; line-height: 1.55; color: var(--tribe-text-secondary); }
.tribe-notes__meta { margin-top: 6px; font-size: 11.5px; color: var(--tribe-text-muted); }


/* ==========================================================================
   25. ORGANISATION CHART
   ========================================================================== */

.tribe-tree-tick { margin-right: 5px; color: var(--tribe-text-faint); }

.tribe-org, .tribe-org__children { list-style: none; margin: 0; padding: 0; }
.tribe-org__children { margin-left: 26px; padding-left: 16px; border-left: 1px solid var(--tribe-border); }
.tribe-org__node { margin: 8px 0; }

.tribe-org__card {
    display: inline-block;
    min-width: 210px;
    padding: 10px 14px;
    border: 1px solid var(--tribe-border);
    border-left: 3px solid var(--tribe-accent);
    border-radius: var(--tribe-radius-card);
    background: var(--tribe-surface);
}

.tribe-org__name { font-size: 13.5px; font-weight: 600; color: var(--tribe-text); text-decoration: none; }
.tribe-org__name:hover { color: var(--tribe-accent); }
.tribe-org__role { font-size: 12px; color: var(--tribe-text-muted); }
.tribe-org__dept { font-size: 11.5px; color: var(--tribe-text-faint); }
.tribe-org__count { margin-top: 4px; font-size: 11px; color: var(--tribe-accent); font-weight: 500; }


/* ==========================================================================
   26. TILES, LETTERS & VERIFICATION
   ========================================================================== */

.tribe-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.tribe-tile {
    display: block;
    padding: 15px 16px;
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    background: var(--tribe-surface);
    text-decoration: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.tribe-tile:hover {
    border-color: var(--tribe-accent);
    box-shadow: var(--tribe-shadow-card);
}

.tribe-tile__title { font-size: 13.5px; font-weight: 600; color: var(--tribe-text); }
.tribe-tile__meta { margin-top: 4px; font-size: 11.5px; color: var(--tribe-text-muted); }

.tribe-letter-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.tribe-letter-row__title { font-size: 14px; font-weight: 600; color: var(--tribe-text); }
.tribe-letter-row__verify { text-align: right; max-width: 320px; }

.tribe-verify-code {
    font-family: var(--tribe-mono);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.09em;
    color: var(--tribe-accent-deep);
    background: var(--tribe-accent-soft);
    padding: 6px 11px;
    border-radius: var(--tribe-radius-button);
    display: inline-block;
    margin-bottom: 5px;
}

.tribe-verify { text-align: center; padding: 8px 0; }
.tribe-verify .tribe-review { margin-top: 20px; text-align: left; }
.tribe-verify__note { margin-top: 18px; font-size: 12px; line-height: 1.55; }
.tribe-verify--good .tribe-h2 { color: #374151; }
.tribe-verify--bad .tribe-h2  { color: #991b1b; }
.tribe-verify--warn .tribe-h2 { color: var(--tribe-pending-text); }

.tribe-letter {
    padding: 30px 34px;
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    background: var(--tribe-surface);
    font-size: 14px;
    line-height: 1.75;
    color: var(--tribe-text-secondary);
    white-space: pre-wrap;
}


/* ==========================================================================
   27. PAYSLIP
   ========================================================================== */

.tribe-payslip {
    max-width: 820px;
    margin: 0 auto;
    padding: 30px 34px;
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-card);
    box-shadow: var(--tribe-shadow-card);
}

.tribe-payslip__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--tribe-border);
}

.tribe-payslip__company { font-size: 17px; font-weight: 700; color: var(--tribe-text); }
.tribe-payslip__ref { text-align: right; font-size: 12.5px; font-family: var(--tribe-mono); }
.tribe-payslip__who { padding: 18px 0; border-bottom: 1px solid var(--tribe-border-subtle); }

.tribe-payslip__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
    padding: 20px 0;
}

.tribe-payslip__col .tribe-table { margin: 0; }

.tribe-payslip__net {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border-radius: var(--tribe-radius-card);
    background: var(--tribe-accent-soft);
    border: 1px solid var(--tribe-accent-ring);
}

.tribe-payslip__net-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tribe-accent-deep); }

.tribe-payslip__net-value {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--tribe-text);
    font-variant-numeric: tabular-nums;
}

.tribe-payslip__ytd { padding-top: 20px; }
.tribe-payslip__foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--tribe-border-subtle); font-size: 12px; }
.tribe-payslip__foot p { margin: 0 0 8px; line-height: 1.6; }

.tribe-payslip-summary { text-align: center; padding: 6px 0; }
.tribe-payslip-summary__period { font-size: 12.5px; color: var(--tribe-text-muted); }

.tribe-payslip-summary__net {
    margin: 6px 0 2px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--tribe-text);
    font-variant-numeric: tabular-nums;
}

.tribe-payslip-summary__caption { font-size: 12px; color: var(--tribe-text-muted); margin-bottom: 12px; }


/* ==========================================================================
   28. PUBLIC MARKETING & REGISTRATION WIZARD
   ========================================================================== */

.tribe-hero { padding: 40px 0 52px; text-align: center; }
.tribe-hero__text { max-width: 700px; margin: 0 auto; }

.tribe-hero__title {
    margin: 0 0 16px;
    font-size: 42px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -1.2px;
    color: var(--tribe-text);
}

.tribe-hero__lead { margin: 0 0 26px; font-size: 17px; line-height: 1.6; color: var(--tribe-text-muted); }
.tribe-hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.tribe-hero__note { margin-top: 14px; font-size: 12.5px; color: var(--tribe-text-faint); }

.tribe-features { padding: 20px 0 44px; }
.tribe-feature { padding: 4px 0; }

.tribe-feature__title {
    margin: 0 0 8px;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--tribe-text);
}

.tribe-feature p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--tribe-text-muted); }

.tribe-plans-strip { padding: 26px 0 12px; }
.tribe-plans-strip .tribe-h2 { margin-bottom: 20px; text-align: center; }

.tribe-plan { display: flex; flex-direction: column; text-align: center; }
.tribe-plan--full { text-align: left; }
.tribe-plan__name { font-size: 15px; font-weight: 700; color: var(--tribe-text); }
.tribe-plan__desc { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--tribe-text-muted); }

.tribe-plan__price {
    margin: 14px 0 2px;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--tribe-text);
    font-variant-numeric: tabular-nums;
}

.tribe-plan__unit { display: block; font-size: 12px; font-weight: 400; color: var(--tribe-text-muted); letter-spacing: 0; }
.tribe-plan__base { font-size: 12px; color: var(--tribe-text-muted); }
.tribe-plan__trial { margin-top: 6px; font-size: 12.5px; color: var(--tribe-accent); font-weight: 500; }

.tribe-plan__features {
    margin: 16px 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--tribe-text-secondary);
    flex: 1;
}

.tribe-plan .tribe-btn { margin-top: auto; }

.tribe-pricing-note {
    max-width: 660px;
    margin: 34px auto 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.65;
    color: var(--tribe-text-muted);
}

.tribe-wizard-shell { max-width: 720px; margin: 0 auto; }
.tribe-wizard-shell--narrow { max-width: 520px; }

.tribe-wizard {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.tribe-wizard__step {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    font-size: 12px;
    color: var(--tribe-text-faint);
}

.tribe-wizard__step:not(:last-child)::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--tribe-border);
}

.tribe-wizard__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--tribe-border-strong);
    background: var(--tribe-surface);
    font-size: 11.5px;
    font-weight: 600;
}

.tribe-wizard__step.is-current { color: var(--tribe-text); font-weight: 600; }

.tribe-wizard__step.is-current .tribe-wizard__num {
    background: var(--tribe-accent);
    border-color: var(--tribe-accent);
    color: var(--tribe-text-inverse);
}

.tribe-wizard__step.is-done { color: var(--tribe-text-muted); }

.tribe-wizard__step.is-done .tribe-wizard__num {
    background: var(--tribe-positive-bg);
    border-color: #d1d5db;
    color: #374151;
}

.tribe-wizard__label { white-space: nowrap; }


/* ==========================================================================
   29. RESPONSIVE
   ==========================================================================
   The portal in particular is opened on a phone far more often than the
   admin console is, so it collapses first and most thoroughly.
   ========================================================================== */

@media (max-width: 1100px) {
    .tribe-request { grid-template-columns: 1.4fr 1fr auto; }
    .tribe-request__balance, .tribe-request__reason { display: none; }
    .tribe-decision { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 900px) {
    .tribe-app .tribe-sidebar { position: static; width: 100%; height: auto; }
    .tribe-app { flex-direction: column; }
    .tribe-app .tribe-main { margin-left: 0; }
    .tribe-nav { display: flex; flex-wrap: wrap; gap: 2px; }
    .tribe-nav__heading { width: 100%; }
    .tribe-grid--2, .tribe-grid--3, .tribe-grid--4 { grid-template-columns: 1fr; }
    .tribe-payslip__columns { grid-template-columns: 1fr; gap: 8px; }
    .tribe-hero__title { font-size: 32px; }
}

@media (max-width: 700px) {
    .tribe-review__row,
    .tribe-review--tight .tribe-review__row,
    .tribe-timeline__item { grid-template-columns: 1fr; gap: 3px; }

    .tribe-request { grid-template-columns: 1fr; gap: 12px; }
    .tribe-request__actions { flex-direction: row; align-items: center; }

    .tribe-field-row { grid-auto-flow: row; grid-auto-columns: auto; }
    .tribe-field--sm { max-width: 100%; }
    .tribe-input--search { min-width: 0; width: 100%; }

    .tribe-portal__bar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
    .tribe-portal__nav { order: 3; width: 100%; }
    .tribe-portal__user { margin-left: auto; }
    .tribe-portal__main { padding: 18px 16px 44px; }

    .tribe-public__main { padding: 24px 16px 44px; }
    .tribe-payslip { padding: 20px 18px; }
    .tribe-calendar__cell { min-height: 64px; }
    .tribe-wizard__label { display: none; }
    .tribe-letter-row__verify { text-align: left; }

    /* Tables are the one thing that cannot sensibly reflow at this width, so
       they scroll inside their own card rather than pushing the whole page
       sideways — a horizontally scrolling document breaks every other
       fixed element on the screen. */
    .tribe-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tribe-table thead, .tribe-table tbody { display: table; width: 100%; min-width: 420px; }
    .tribe-card--table, .tribe-card { overflow-x: hidden; }

    .tribe-balances { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .tribe-balance__value { font-size: 30px; }
    .tribe-daygrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .tribe-tiles { grid-template-columns: 1fr; }
    .tribe-weekgrid { grid-template-columns: repeat(4, 1fr); }
    .tribe-anchornav { position: static; }
    .tribe-profile-head__main { gap: 12px; }

    /* The payslip is a fixed-width document by nature; on a phone it becomes
       a fluid one rather than forcing the page sideways. */
    .tribe-payslip { padding: 16px 14px; max-width: 100%; }
    .tribe-payslip__head { flex-direction: column; gap: 10px; }
    .tribe-payslip__ref { text-align: left; }
    .tribe-payslip__net { flex-direction: column; align-items: flex-start; gap: 4px; }
    .tribe-payslip__net-value { font-size: 26px; }

    /* Long values — email addresses, verification URLs — wrap instead of
       stretching their grid column. */
    .tribe-review__row dd,
    .tribe-letter-row__verify,
    .tribe-verify-code { overflow-wrap: anywhere; word-break: break-word; }
    .tribe-verify-code { font-size: 15px; letter-spacing: 0.06em; }
}

@media print {
    .tribe-portal__bar, .tribe-portal__footer, .tribe-sidebar,
    .tribe-topbar, .tribe-form__actions, .tribe-payslip__foot a { display: none !important; }
    .tribe-payslip { border: 0; box-shadow: none; max-width: 100%; }
    body { background: #fff; }
}


/* ==========================================================================
   30. LATE ADDITIONS
   ==========================================================================
   Two gaps the class-diff caught after section 29 was written.
   ========================================================================== */

/* The dashboard's "waiting on you" panel. Its children were styled but the
   block itself never was. */
.tribe-attention__row { padding-top: 4px; }

/* Pricing emits tribe-grid--N from the number of plans, so a tenant with a
   single visible plan produced tribe-grid--1, which did not exist and left the
   card full-bleed. */
.tribe-grid--1 { grid-template-columns: minmax(0, 420px); justify-content: center; }


/* ==========================================================================
   31. SELECT ELEMENTS
   ==========================================================================
   Every <select> now carries `form-select` alongside `tribe-select`, per
   Vincent's request. Bootstrap's own rule provides the caret when the theme
   is loaded; this block makes the class self-sufficient so the selects look
   the same whether or not Bootstrap is present.
   ========================================================================== */

.form-select,
select.tribe-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Room for the caret, and a little more on the left than a text input so
       the value does not sit tight against the border. */
    padding-right: 34px;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 15px 11px;

    /* Inline SVG rather than a sprite: no extra request, and it cannot go
       missing when assets are moved. */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    cursor: pointer;
}

.form-select:focus,
select.tribe-select:focus {
    border-color: var(--tribe-accent);
    box-shadow: 0 0 0 3px var(--tribe-accent-ring);
    outline: none;
}

.form-select:disabled,
select.tribe-select:disabled {
    background-color: var(--tribe-border-subtle);
    color: var(--tribe-text-faint);
    cursor: not-allowed;
}

/* A select sitting in an inline filter bar should not stretch. */
.tribe-filters .form-select { width: auto; min-width: 160px; }


/* ==========================================================================
   32. ICONS (Iconify)
   ==========================================================================
   One worked example, per Vincent's request, to copy across the rest.

   Iconify's web component renders <iconify-icon icon="set:name"> as inline
   SVG, so an icon inherits the surrounding colour through currentColor and
   scales with the font size rather than needing its own rule per usage.

   The loader is in the admin layout. Icons render nothing until it arrives,
   which is why .tribe-icon carries width and height — the space is reserved so
   text does not jump when the script lands.
   ========================================================================== */

.tribe-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.18em;
    flex-shrink: 0;
    color: inherit;
}

.tribe-icon--lg { width: 1.5em;  height: 1.5em;  vertical-align: -0.3em; }
.tribe-icon--sm { width: 0.95em; height: 0.95em; vertical-align: -0.12em; }

/* Sidebar items reserve a fixed gutter so labels line up whether or not an
   item has an icon — otherwise adding icons one at a time makes the nav
   ragged halfway through the job. */
/* .tribe-nav__item is a flex row with gap: 9px, so an extra margin here would
   double the spacing and push the label out of line with items that have no
   icon. Only the colour is set. */
.tribe-nav__item .tribe-icon {
    color: var(--tribe-text-muted);
}

.tribe-nav__item.is-active .tribe-icon { color: var(--tribe-accent); }
.tribe-btn .tribe-icon { margin-right: 6px; }


/* ==========================================================================
   33. CONFIRMATION MODAL
   ==========================================================================

   Bootstrap's markup, class names and data attributes; HR-Konnect's styling.

   Loading Bootstrap itself for one dialog would bring Reboot with it, which
   resets the base font family and size — the two things this build sets
   deliberately — along with its own .card, .table, .btn and .form-control
   rules. So the shell below matches Bootstrap exactly and only the appearance
   is ours: add Bootstrap later and the markup needs no change.
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.show { display: block; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: #111827;
    opacity: 0;
    transition: opacity 140ms ease;
}

.modal-backdrop.show { opacity: 0.45; }

/* Stops the page behind scrolling while the dialog is open. */
body.modal-open { overflow: hidden; }

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 460px;
    margin: 1.75rem auto;
    pointer-events: none;
    transform: translateY(-12px);
    transition: transform 160ms ease;
}

.modal.show .modal-dialog { transform: none; }

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background: var(--tribe-surface);
    border: 1px solid var(--tribe-border);
    border-radius: var(--tribe-radius-modal, 10px);
    box-shadow: 0 12px 40px rgba(17, 24, 39, 0.18);
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--tribe-border-subtle);
}

.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--tribe-text);
}

.modal-body {
    padding: 20px;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--tribe-text-secondary);
}

.modal-body p { margin: 0; }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--tribe-border-subtle);
    background: var(--tribe-panel-header);
    border-radius: 0 0 var(--tribe-radius-modal, 10px) var(--tribe-radius-modal, 10px);
}

.btn-close {
    padding: 0;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--tribe-radius-button);
    background: transparent;
    color: var(--tribe-text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.btn-close:hover { background: var(--tribe-border-subtle); color: var(--tribe-text); }

/* Destructive confirmations. The dialog asks for this with
   data-confirm-variant="danger". */
.tribe-btn--danger {
    background: var(--tribe-negative);
    border-color: var(--tribe-negative);
    color: var(--tribe-text-inverse);
}

.tribe-btn--danger:hover { background: #b91c1c; border-color: #b91c1c; }

@media (max-width: 560px) {
    .modal-dialog { max-width: none; margin: 12px; }
    .modal-footer { flex-direction: column-reverse; align-items: stretch; }
    .modal-footer .tribe-btn { width: 100%; }
}

/* Compact input for editing a single value in place, as on the national
   holiday list where the name is renamed inside its own table row. */
.tribe-input--sm {
    padding: 5px 9px;
    font-size: 13px;
    max-width: 260px;
}

/* Actions grouped at the end of a row, or in a line under a heading — used by
   the payroll run screen for its calculate / approve / commit buttons. */
.tribe-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.tribe-row-actions form { display: inline-flex; margin: 0; }

/* ==========================================================================
   35. INLINE EDIT ROWS AND CENTRED COLUMNS
   ========================================================================== */

/*
 | An edit row is a full-width form inside the table, revealed under the row it
 | belongs to. Tinting it and removing the row border makes it read as part of
 | that row rather than as another record in the list.
 */
.tribe-edit-row > td {
    background: var(--tribe-panel-header);
    border-top: 0;
    padding: 18px 20px 20px;
}

.tribe-edit-row .tribe-form { margin: 0; }
.tribe-edit-row .tribe-field-row { margin-bottom: 10px; }
.tribe-edit-row .tribe-field:last-child { margin-bottom: 0; }
.tribe-edit-row .tribe-row-actions { justify-content: flex-end; margin-top: 4px; }

/*
 | Counts read better centred under a centred heading. Using one class on both
 | the <th> and the <td> keeps them in step — the previous markup centred
 | neither, and right-aligning a single digit under a long word left the two
 | looking unrelated.
 */
/* Specificity is deliberate. The base heading rule is `.tribe-table thead th`
   (0,1,2), so a plain `th.tribe-table__centre` (0,1,1) loses to it no matter
   where it sits in the file — the cells centred and the headings did not. */
.tribe-table thead th.tribe-table__centre,
.tribe-table tbody td.tribe-table__centre,
.tribe-table__centre {
    text-align: center;
    white-space: nowrap;
}

/* A short note under a card header — used on the remittance report to show
   where the payee's statement should be sent. */
.tribe-card__note {
    padding: 10px 20px;
    font-size: 13px;
    color: var(--tribe-text-secondary);
    border-bottom: 1px solid var(--tribe-border-subtle);
}

/* A field whose control is a button, so it lines up with the inputs beside it
   rather than with their labels. */
.tribe-field--action { display: flex; align-items: flex-end; }

/* Right-aligned money column. .tribe-table__num already does this on most
   tables, but the band column sits beside centred counts and reads better
   with an explicit rule that matches the centring one's specificity. */
.tribe-table thead th.tribe-table__right,
.tribe-table tbody td.tribe-table__right,
.tribe-table__right {
    text-align: right;
    white-space: nowrap;
}

/* Letter verification: the QR code beside the typed code, so a recipient can
   scan or type. The SVG is sized here rather than in the generator, which
   keeps the encoder's output resolution-independent. */
.tribe-verify-block { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tribe-verify-qr { flex: 0 0 auto; width: 128px; height: 128px; }
.tribe-verify-qr svg { width: 100%; height: 100%; display: block; }

@media print {
    /* Scanning a folded, photocopied letter needs the code a little larger. */
    .tribe-verify-qr { width: 150px; height: 150px; }
}

/*
 | PUBLIC CAREERS PAGE
 |
 | Deliberately plainer than the admin screens: the reader is a candidate on a
 | phone, not an administrator at a desk, so it is one readable column with the
 | facts a candidate scans for — pay, hours, location, closing date — visible
 | without opening anything.
 */
.tribe-public-hero {
    padding: 48px 24px 28px;
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}
.tribe-public-hero__title {
    font-family: var(--tribe-font-display, inherit);
    font-size: 34px;
    line-height: 1.2;
    margin: 0 0 10px;
}
.tribe-public-hero__sub { color: var(--tribe-text-secondary); margin: 0; font-size: 16px; }

.tribe-public-section { max-width: 860px; margin: 0 auto; padding: 0 24px 56px; }

.tribe-joblist { display: flex; flex-direction: column; gap: 14px; }

.tribe-jobcard {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    background: var(--tribe-surface, #fff);
    border: 1px solid var(--tribe-border, #e6e8eb);
    border-radius: var(--tribe-radius, 10px);
    padding: 18px 20px;
}
.tribe-jobcard__main { min-width: 0; }
.tribe-jobcard__title { margin: 0 0 6px; font-size: 18px; line-height: 1.3; }
.tribe-jobcard__title a { text-decoration: none; }
.tribe-jobcard__meta { color: var(--tribe-text-secondary); font-size: 14px; }
.tribe-jobcard__salary { margin-top: 6px; font-size: 14px; font-weight: 600; }
.tribe-jobcard__side {
    flex: 0 0 auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.tribe-jobcard__closing { font-size: 13px; color: var(--tribe-text-secondary); }

.tribe-prose { line-height: 1.6; }

@media (max-width: 640px) {
    /* The side column drops under the detail rather than squeezing it. */
    .tribe-jobcard { flex-direction: column; }
    .tribe-jobcard__side { align-items: flex-start; text-align: left; }
    .tribe-public-hero { padding: 32px 20px 20px; }
    .tribe-public-hero__title { font-size: 27px; }
}

/* A read-only label/value grid, used on the public vacancy page. */
.tribe-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    margin: 0;
}
.tribe-detail-grid > div { min-width: 0; }
.tribe-detail-grid dt {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tribe-text-secondary);
    margin: 0 0 3px;
}
.tribe-detail-grid dd { margin: 0; font-size: 15px; }

@media (max-width: 640px) {
    .tribe-detail-grid { grid-template-columns: 1fr; }
}

/*
|--------------------------------------------------------------------------
| SIDEBAR — WHITE, WITH THE ACCENT RESERVED FOR "YOU ARE HERE"
|--------------------------------------------------------------------------
|
| Written as one scoped block at the end rather than by editing the dozen
| rules above, for two reasons: every colour in it is in one place if the
| shade is ever revisited, and the light-surface defaults stay intact for the
| platform console and any other surface that reuses these classes.
|
| Was a deep forest green panel with white text; reverted to a plain white
| panel with dark text, matching the rest of the app. --tribe-sidebar-hover
| (#c26342) is the one colour that survives — it is the ONLY thing in this
| sidebar that carries colour, used for hover and for the current page, so
| "where am I" has exactly one visual answer rather than competing with a
| themed panel behind it.
|
*/
/*
 | Matched as `.tribe-app .tribe-sidebar` rather than `.tribe-sidebar`.
 |
 | There is an existing `.tribe-app .tribe-sidebar` rule that sets the surface
 | background, and it is more specific than a bare class — so a plain
 | `.tribe-sidebar` here inherited the white panel however far down the file it
 | sat. The variables are declared on the same rule so they are in scope for
 | every descendant selector below.
 */
.tribe-app .tribe-sidebar,
.tribe-sidebar {
    --tribe-sidebar-bg:     #ffffff;
    --tribe-sidebar-hover:  #c26342;
    --tribe-sidebar-line:   var(--tribe-border);
    --tribe-sidebar-dim:    var(--tribe-text-muted);

    background: var(--tribe-sidebar-bg);
    border-right: 1px solid var(--tribe-border);
    color: var(--tribe-text);
}

/* Dividers on a white panel — plain neutral borders. */
.tribe-sidebar .tribe-sidebar__brand,
.tribe-sidebar .tribe-sidebar__company { border-bottom-color: var(--tribe-sidebar-line); }
.tribe-sidebar .tribe-sidebar__foot    { border-top-color:    var(--tribe-sidebar-line); }

.tribe-sidebar .tribe-sidebar__brand-text,
.tribe-sidebar .tribe-sidebar__company-name,
.tribe-sidebar .tribe-sidebar__user { color: var(--tribe-text); }

/* Section headings and secondary links: muted grey, so the hierarchy reads
   without introducing a second colour. */
/*
 | The headings carried inline `color:#333; border-bottom:1px solid #CCC` in the
 | layout, which no stylesheet rule can beat. Those were removed from the markup
 | and the divider moved here, where it can follow the panel it sits on.
 */
.tribe-sidebar .tribe-nav__group,
.tribe-sidebar .tribe-nav__heading,
.tribe-sidebar .tribe-sidebar__switch,
.tribe-sidebar .tribe-sidebar__logout { color: var(--tribe-sidebar-dim); }

.tribe-sidebar .tribe-nav__heading { border-bottom: 1px solid var(--tribe-sidebar-line); }

/* The headings wrap an <h4>, which brings its own colour and margins. */
.tribe-sidebar .tribe-nav__heading h4 {
    margin: 0;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.tribe-sidebar .tribe-nav__badge { background: var(--tribe-border-subtle); color: var(--tribe-text-secondary); }

.tribe-sidebar .tribe-sidebar__scope {
    color: var(--tribe-text);
    background: var(--tribe-border-subtle);
}

.tribe-sidebar .tribe-nav__item {
    color: var(--tribe-text);
    transition: background 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

/*
 | Hover: the same accent fill as the current-page state, one step lighter
 | in effect since it's momentary. White text over the fill either way — the
 | fill is dark enough on its own for the contrast to hold.
 */
.tribe-sidebar .tribe-nav__item:hover,
.tribe-sidebar .tribe-nav__item:focus-visible {
    background: var(--tribe-sidebar-hover);
    color: #fff;
    box-shadow: 0 2px 6px rgba(17, 24, 39, 0.16);
    text-decoration: none;
}

.tribe-sidebar .tribe-sidebar__switch:hover,
.tribe-sidebar .tribe-sidebar__logout:hover { color: var(--tribe-text); }

/* The current page is the one thing on this panel that keeps colour — filled
   with the accent, where hover is the same fill only momentary. This is the
   sole "you are here" signal in the sidebar. */
.tribe-sidebar .tribe-nav__item.is-active {
    background: var(--tribe-sidebar-hover);
    color: #fff;
    font-weight: 600;
}

.tribe-sidebar .tribe-nav__count {
    background: var(--tribe-border-subtle);
    color: var(--tribe-text-secondary);
}

.tribe-sidebar .tribe-nav__item.is-active .tribe-nav__count {
    background: rgba(0, 0, 0, 0.24);
    color: #fff;
}

/* Icons inherit, so they follow the label rather than needing their own rule. */
.tribe-sidebar .tribe-nav__item .tribe-icon { color: inherit; }

/* The scrollbar inside the nav, which would otherwise render as a pale bar
   drawn for a white panel. */
.tribe-sidebar .tribe-nav { scrollbar-width: thin; scrollbar-color: var(--tribe-sidebar-line) transparent; }
.tribe-sidebar .tribe-nav::-webkit-scrollbar { width: 8px; }
.tribe-sidebar .tribe-nav::-webkit-scrollbar-thumb {
    background: var(--tribe-sidebar-line);
    border-radius: 4px;
}

/*
 | BILLING
 |
 | The notice is the piece that matters: an overdue invoice has to be visible
 | the moment the page opens, not found by reading a table. Three tones, the
 | same three the ageing rules produce.
 */
.tribe-notice {
    border: 1px solid var(--tribe-border, #e6e8eb);
    border-left: 3px solid var(--tribe-text-faint, #9ca3af);
    border-radius: var(--tribe-radius, 10px);
    background: var(--tribe-surface, #fff);
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.5;
}
.tribe-notice--warning { border-left-color: #C8871B; background: #FFF9EF; }
.tribe-notice--danger  { border-left-color: #B4341F; background: #FEF3F1; }
.tribe-notice--neutral { border-left-color: var(--tribe-text-faint, #9ca3af); }

.tribe-badge--danger {
    background: #FDE7E3;
    color: #8E2A18;
}

/* Three headline figures above the invoice table. */
/*
 | auto-fit rather than a fixed three, so a row of four headline figures fits
 | on one line instead of leaving a single card stranded underneath.
 */
.tribe-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}
.tribe-stat {
    background: var(--tribe-surface, #fff);
    border: 1px solid var(--tribe-border, #e6e8eb);
    border-radius: var(--tribe-radius, 10px);
    padding: 14px 16px;
}
.tribe-stat__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--tribe-text-secondary);
}
.tribe-stat__value { font-size: 24px; font-weight: 600; margin-top: 4px; }

@media (max-width: 640px) {
    .tribe-stat-row { grid-template-columns: 1fr; }
}

/* A compact select, for the assignee picker inside a table cell. */
.tribe-select--sm {
    font-size: 12.5px;
    padding: 4px 24px 4px 8px;
    height: auto;
    min-height: 0;
    max-width: 180px;
}

/*
 | The onboarding actions cell.
 |
 | "Mark Done" plus a reason box and "Not Applicable" is more than fits on one
 | line in a table cell — left alone it pushed the page sideways. The controls
 | wrap and the reason box is capped instead.
 */
.tribe-checklist-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.tribe-checklist-actions .tribe-input--sm { max-width: 130px; }


/*
|--------------------------------------------------------------------------
| CHART LAYOUT
|--------------------------------------------------------------------------
|
| The charts themselves are drawn by ApexCharts, which brings its own
| stylesheet. These rules only reserve space and tidy what the library leaves
| to the host page.
|
| The hand-drawn SVG rules that used to live here are gone with the charts
| they styled — except .tribe-barlist, which the Dashboard still uses for its
| own small bars and which is kept below for that reason.
*/
.tribe-apex { width: 100%; }

/* Space held before the library measures the container. Without it the chart
   renders at zero height and the card collapses as the page settles. */
.tribe-apex:empty { display: block; }

.tribe-chart-empty { padding: 28px 4px; text-align: center; }

/* The library sets its own font stack; inherit the console's instead. */
.tribe-apex .apexcharts-text,
.tribe-apex .apexcharts-legend-text { font-family: inherit !important; }
.tribe-apex .apexcharts-legend-text { color: var(--tribe-text-secondary) !important; }

/* The download control is useful but should not shout. */
.tribe-apex .apexcharts-toolbar { opacity: .35; transition: opacity 120ms ease; }
.tribe-apex:hover .apexcharts-toolbar { opacity: 1; }

@media print {
    /* SVG prints, but the toolbar is a screen control. */
    .tribe-apex .apexcharts-toolbar { display: none !important; }
}

/* Kept: the Dashboard draws its own bars with these. */
.tribe-barlist { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }
.tribe-barlist__row {
    display: grid;
    grid-template-columns: minmax(96px, 30%) 1fr auto;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
}
.tribe-barlist__label {
    color: var(--tribe-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tribe-barlist__track {
    background: var(--tribe-canvas, #f3f4f6);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}
.tribe-barlist__fill { height: 100%; border-radius: 999px; min-width: 2px; }
.tribe-barlist__value { font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
    .tribe-barlist__row { grid-template-columns: minmax(80px, 40%) 1fr auto; font-size: 12.5px; }
}

