/**
 * AYIT Design System — Master Stylesheet
 *
 * Sovereign Hybrid Security Operating System.
 * Industrial precision. Dark enterprise security aesthetic.
 * No rounded corners. No shadows. No glossy startup vibes.
 *
 * Font stack: Michroma (display/branding), Inter (body), IBM Plex Mono (labels)
 * Accent: #FFB300 (Eagle Eye Amber) — the ONLY interactive color
 * Backgrounds: 3-tier system — bg → surface → surface2
 *
 * Apex Palette:
 *   Primary Background: #0A0A0A (Obsidian Black)
 *   Action/Highlight Accent: #FFB300 (Eagle Eye Amber)
 *   Secondary/UI Elements: #2C3E50 (Electric Slate)
 *   Primary Text: #F8F9FA (Atmospheric White)
 *
 * This file is the single source of truth for the AYIT visual language.
 */

/* ============================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================ */

:root {
    /* Backgrounds — Apex Palette layered dark surfaces */
    --bg:          #0A0A0A;   /* Obsidian Black — page background */
    --surface:     #111318;   /* Elevated surface — cards, panels */
    --surface2:    #1A1D24;   /* Hovered/nested surface */

    /* Borders — Electric Slate family */
    --border:      #2C3E50;   /* Electric Slate — all borders */

    /* Accent — Eagle Eye Amber, used sparingly for maximum impact */
    --accent:      #FFB300;
    --accent2:     #FFC940;
    --accent-dim:  rgba(255, 179, 0, 0.12);

    /* Text — three tiers */
    --text:        #F8F9FA;   /* Atmospheric White — primary text */
    --text-muted:  #8899AA;   /* Secondary text */
    --text-dim:    #4A5568;   /* Tertiary/disabled text */

    /* Gold — intelligence-led callouts */
    --gold:        #FFB300;   /* Same as accent in Apex Palette */
    --gold-dim:    rgba(255, 179, 0, 0.10);

    /* Semantic status colors (for badges/alerts only, NOT as accent) */
    --status-success:  #00C864;
    --status-warning:  #FFB300;   /* Amber-aligned warning */
    --status-danger:   #E53E3E;   /* Sophisticated danger red */
    --status-info:     #63B3ED;   /* Soft blue for info */

    /* Font stacks — direction-aware, overridden by [dir] selectors below */
    --font-serif:  'Michroma', 'Playfair Display', Georgia, sans-serif;
    --font-sans:   'Inter', 'IBM Plex Sans', Arial, sans-serif;
    --font-mono:   'IBM Plex Mono', 'Courier New', monospace;

    /* Constraints */
    --radius:      2px;
    --transition:  0.15s;
    --max-width:   960px;
}

/* RTL Hebrew — Heebo as primary sans/serif, Inter fallback */
html[dir="rtl"] {
    --font-sans:   'Heebo', 'Inter', Arial, sans-serif;
    --font-serif:  'Heebo', Georgia, serif;
    /* Mono stays IBM Plex Mono regardless of direction */
}

/* LTR English — Full AYIT font stack */
html[dir="ltr"] {
    --font-sans:   'Inter', Arial, sans-serif;
    --font-serif:  'Michroma', Georgia, sans-serif;
}


/* ============================================
   2. BASE STYLES
   ============================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}


/* ============================================
   3. BACKGROUND GRID TEXTURE
   ============================================ */

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 179, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 179, 0, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}


/* ============================================
   4. LAYOUT
   ============================================ */

.vx-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Full-width app layout (sidebar + main) */
.vx-app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.vx-app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.vx-app-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Page header */
.vx-page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 1;
}


/* ============================================
   5. SECTION STRUCTURE
   ============================================ */

section {
    padding: 5rem 0;
    border-top: 1px solid var(--border);
}

section:first-child {
    border-top: none;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-label .num {
    color: var(--text-dim);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.section-body {
    font-size: 0.975rem;
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.8;
}


/* ============================================
   6. DATA GRID (Tables / Feature Lists)
   ============================================ */

.data-grid {
    display: grid;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.data-cell {
    background: var(--surface);
    padding: 1.25rem 1.75rem;
    transition: background var(--transition);
}

.data-cell:hover {
    background: var(--surface2);
}

/* Header cells */
.data-header {
    background: var(--surface2);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    padding: 0.75rem 1.75rem;
}

/* Left accent on hover */
.cap-cell {
    position: relative;
}

.cap-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s;
}

html[dir="rtl"] .cap-cell::before {
    left: auto;
    right: 0;
}

.cap-cell:hover::before {
    opacity: 1;
}


/* ============================================
   7. BADGES
   ============================================ */

.badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius);
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
}

.badge-live {
    background: rgba(0, 200, 100, 0.10);
    color: #00C864;
    border: 1px solid rgba(0, 200, 100, 0.20);
}

.badge-accent {
    background: rgba(255, 179, 0, 0.10);
    color: var(--accent);
    border: 1px solid rgba(255, 179, 0, 0.30);
}

.badge-gold {
    background: var(--gold-dim);
    color: var(--gold);
    border: 1px solid rgba(201, 168, 76, 0.20);
}

.badge-blue {
    background: rgba(100, 150, 255, 0.10);
    color: #6496FF;
    border: 1px solid rgba(100, 150, 255, 0.20);
}

.badge-purple {
    background: rgba(150, 100, 255, 0.10);
    color: #9664FF;
    border: 1px solid rgba(150, 100, 255, 0.20);
}

.badge-neutral {
    background: rgba(200, 200, 200, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(200, 200, 200, 0.10);
}

.badge-danger {
    background: rgba(255, 179, 0, 0.10);
    color: #FFB300;
    border: 1px solid rgba(255, 179, 0, 0.30);
}

.badge-warning {
    background: rgba(245, 166, 35, 0.10);
    color: #F5A623;
    border: 1px solid rgba(245, 166, 35, 0.20);
}

.badge-success {
    background: rgba(0, 200, 100, 0.10);
    color: #00C864;
    border: 1px solid rgba(0, 200, 100, 0.20);
}

.badge-info {
    background: rgba(100, 150, 255, 0.10);
    color: #6496FF;
    border: 1px solid rgba(100, 150, 255, 0.20);
}


/* ============================================
   8. STAT / KPI CELLS
   ============================================ */

.stat-num {
    font-family: var(--font-serif);
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.stat-cell {
    background: var(--surface);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}


/* ============================================
   9. QUOTE / CALLOUT BLOCK
   ============================================ */

.quote-block {
    border-left: 3px solid var(--accent);
    padding: 1.5rem 2rem;
    margin: 3rem 0;
    background: var(--accent-dim);
}

html[dir="rtl"] .quote-block {
    border-left: none;
    border-right: 3px solid var(--accent);
}

.quote-text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.5;
}

.quote-source {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    margin-top: 0.75rem;
}


/* ============================================
   10. DIVIDERS
   ============================================ */

.divider {
    height: 1px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    margin: 2.5rem 0;
    max-width: 120px;
}

html[dir="rtl"] .divider {
    background: linear-gradient(270deg, var(--accent) 0%, transparent 100%);
}

.divider-full {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}


/* ============================================
   11. BUTTONS
   ============================================ */

/* Base button */
.vx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1rem;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    outline: none;
    text-decoration: none;
    line-height: 1.25rem;
}

.vx-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.vx-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary button — Amber Gold bg, Obsidian Black text */
.vx-btn-primary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition);
}

.vx-btn-primary:hover:not(:disabled),
.btn-primary:hover {
    background: var(--accent2);
}

/* Secondary button — ghost with border */
.vx-btn-secondary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    border: 1px solid var(--border);
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.vx-btn-secondary:hover:not(:disabled),
.btn-secondary:hover {
    background: var(--surface2);
    border-color: var(--accent);
    color: var(--text);
}

/* Ghost button */
.vx-btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 0;
}

.vx-btn-ghost:hover:not(:disabled) {
    background: var(--surface2);
    color: var(--text);
}

/* Danger button */
.vx-btn-danger {
    background: rgba(255, 179, 0, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 179, 0, 0.30);
    border-radius: 0;
}

.vx-btn-danger:hover:not(:disabled) {
    background: rgba(255, 179, 0, 0.25);
    border-color: rgba(255, 179, 0, 0.50);
}

/* Success button */
.vx-btn-success {
    background: rgba(0, 200, 100, 0.15);
    color: #00C864;
    border: 1px solid rgba(0, 200, 100, 0.30);
    border-radius: 0;
}

.vx-btn-success:hover:not(:disabled) {
    background: rgba(0, 200, 100, 0.25);
    border-color: rgba(0, 200, 100, 0.50);
}

/* Button sizes */
.vx-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.65rem;
}

.vx-btn-lg {
    padding: 0.85rem 2rem;
    font-size: 0.8rem;
}

/* Icon button */
.vx-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition);
}

.vx-btn-icon:hover {
    background: var(--surface2);
    color: var(--text);
}

.vx-btn-icon:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* ============================================
   12. CARDS / PANELS
   ============================================ */

.vx-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    transition: border-color var(--transition);
}

.vx-card:hover {
    border-color: rgba(255, 179, 0, 0.3);
}

.vx-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.vx-card-title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}

.vx-card-body {
    padding: 1.25rem 1.75rem;
}

.vx-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--border);
}

/* Stat card */
.vx-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: border-color var(--transition);
}

.vx-stat-card:hover {
    border-color: rgba(255, 179, 0, 0.3);
}

.vx-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    flex-shrink: 0;
}

.vx-stat-icon-primary {
    background: var(--accent-dim);
    color: var(--accent);
}

.vx-stat-icon-success {
    background: rgba(0, 200, 100, 0.12);
    color: #00C864;
}

.vx-stat-icon-warning {
    background: rgba(245, 166, 35, 0.12);
    color: #F5A623;
}

.vx-stat-icon-danger {
    background: rgba(255, 179, 0, 0.12);
    color: var(--accent);
}

.vx-stat-content {
    flex: 1;
    min-width: 0;
}

.vx-stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.vx-stat-value {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}


/* ============================================
   13. FORMS
   ============================================ */

.vx-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vx-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.vx-label-required::after {
    content: ' *';
    color: var(--accent);
}

.vx-input,
.vx-select,
.vx-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    transition: border-color var(--transition);
    outline: none;
}

.vx-input::placeholder,
.vx-textarea::placeholder {
    color: var(--text-dim);
}

.vx-input:focus,
.vx-select:focus,
.vx-textarea:focus {
    border-color: var(--accent);
}

.vx-input:disabled,
.vx-select:disabled,
.vx-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vx-input-error {
    border-color: var(--accent);
}

.vx-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.vx-error-message {
    font-size: 0.75rem;
    color: var(--accent);
}

.vx-textarea {
    resize: vertical;
    min-height: 5rem;
}

.vx-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7E96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

html[dir="rtl"] .vx-select {
    background-position: left 1rem center;
    padding-right: 1rem;
    padding-left: 2.5rem;
}

/* Checkbox */
.vx-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.vx-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
    cursor: pointer;
}

.vx-checkbox-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Toggle */
.vx-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.vx-toggle input {
    display: none;
}

.vx-toggle-slider {
    position: relative;
    width: 2.5rem;
    height: 1.25rem;
    background: var(--border);
    border-radius: 9999px;
    transition: background var(--transition);
}

.vx-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1rem;
    height: 1rem;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform var(--transition), background var(--transition);
}

html[dir="rtl"] .vx-toggle-slider::after {
    left: auto;
    right: 2px;
}

.vx-toggle input:checked + .vx-toggle-slider {
    background: var(--accent);
}

.vx-toggle input:checked + .vx-toggle-slider::after {
    transform: translateX(1.25rem);
    background: #fff;
}

html[dir="rtl"] .vx-toggle input:checked + .vx-toggle-slider::after {
    transform: translateX(-1.25rem);
}

.vx-toggle input:focus-visible + .vx-toggle-slider {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.vx-toggle-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}


/* ============================================
   14. TABLES
   ============================================ */

.vx-table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
}

.vx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.vx-table thead {
    background: var(--surface2);
}

.vx-table th {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    text-align: start;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.vx-table td {
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.vx-table tbody tr {
    transition: background var(--transition);
}

.vx-table tbody tr:hover {
    background: var(--surface2);
}

.vx-table-selectable tbody tr {
    cursor: pointer;
}

.vx-table-selectable tbody tr.selected {
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
}

html[dir="rtl"] .vx-table-selectable tbody tr.selected {
    border-left: none;
    border-right: 3px solid var(--accent);
}


/* ============================================
   15. MODALS
   ============================================ */

.vx-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 2rem;
    opacity: 1;
    transition: opacity var(--transition);
}

.vx-modal-overlay.hidden {
    display: none;
}

.vx-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.vx-modal-sm { max-width: 24rem; }
.vx-modal-lg { max-width: 48rem; }
.vx-modal-xl { max-width: 64rem; }
.vx-modal-full { max-width: 90vw; }

.vx-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.vx-modal-title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}

.vx-modal-body {
    padding: 1.5rem 1.75rem;
}

.vx-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--border);
}


/* ============================================
   16. ALERTS
   ============================================ */

.vx-alert {
    border-left: 3px solid var(--border);
    padding: 1rem 1.5rem;
    background: var(--surface);
    margin-bottom: 1rem;
    border-radius: 0;
}

html[dir="rtl"] .vx-alert {
    border-left: none;
    border-right: 3px solid var(--border);
}

.vx-alert-success {
    border-left-color: #00C864;
    background: rgba(0, 200, 100, 0.06);
}
html[dir="rtl"] .vx-alert-success { border-left-color: transparent; border-right-color: #00C864; }

.vx-alert-warning {
    border-left-color: #F5A623;
    background: rgba(245, 166, 35, 0.06);
}
html[dir="rtl"] .vx-alert-warning { border-left-color: transparent; border-right-color: #F5A623; }

.vx-alert-danger {
    border-left-color: var(--accent);
    background: var(--accent-dim);
}
html[dir="rtl"] .vx-alert-danger { border-left-color: transparent; border-right-color: var(--accent); }

.vx-alert-info {
    border-left-color: #6496FF;
    background: rgba(100, 150, 255, 0.06);
}
html[dir="rtl"] .vx-alert-info { border-left-color: transparent; border-right-color: #6496FF; }

.vx-alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.vx-alert-message {
    font-size: 0.875rem;
    color: var(--text-muted);
}


/* ============================================
   17. TABS
   ============================================ */

.vx-tabs-list {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 0;
}

.vx-tab {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: color var(--transition);
}

.vx-tab:hover {
    color: var(--text-muted);
}

.vx-tab-active {
    color: var(--accent);
}

.vx-tab-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}


/* ============================================
   18. NAVIGATION
   ============================================ */

.vx-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    position: relative;
}

.vx-nav-item:hover {
    background: var(--surface2);
    color: var(--text);
}

.vx-nav-item-active {
    color: var(--accent);
    background: var(--accent-dim);
}

.vx-nav-item-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
}

html[dir="rtl"] .vx-nav-item-active::before {
    left: auto;
    right: 0;
}

/* Navigation helper classes for sidebar JS template */
.nav-item-active {
    background: var(--accent-dim);
    color: var(--text);
    border-inline-end: 2px solid var(--accent);
}

.nav-item-inactive {
    color: var(--text-muted);
}

.nav-item-inactive:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.nav-section-active {
    color: var(--accent);
}

.nav-section-inactive {
    color: var(--text-muted);
}

.nav-section-inactive:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ---- Sovereign Command Domain Headers ---- */
.nav-domain {
    position: relative;
}

.nav-domain-active {
    background: var(--accent-dim);
    border-inline-end: 3px solid var(--accent);
    box-shadow: inset -4px 0 12px -4px rgba(255, 179, 0, 0.15);
}

html[dir="rtl"] .nav-domain-active {
    box-shadow: inset 4px 0 12px -4px rgba(255, 179, 0, 0.15);
}

.nav-domain > div:first-child a:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Domain separator line between domains and regular sections */
.nav-domain + .nav-section:not(.nav-domain) {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}


/* ============================================
   19. PROGRESS BAR
   ============================================ */

.vx-progress {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 0;
    overflow: hidden;
}

.vx-progress-bar {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 0;
}

.vx-progress-success .vx-progress-bar { background: #00C864; }
.vx-progress-warning .vx-progress-bar { background: #F5A623; }
.vx-progress-danger .vx-progress-bar { background: var(--accent); }


/* ============================================
   20. DROPDOWN
   ============================================ */

.vx-dropdown {
    position: relative;
    display: inline-block;
}

.vx-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 12rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0;
    z-index: 50;
    margin-top: 0.25rem;
}

html[dir="rtl"] .vx-dropdown-content {
    right: auto;
    left: 0;
}

.vx-dropdown.open .vx-dropdown-content {
    display: block;
}

.vx-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: none;
    width: 100%;
    text-align: start;
}

.vx-dropdown-item:hover {
    background: var(--surface2);
    color: var(--text);
}

.vx-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}


/* ============================================
   21. TOOLTIP
   ============================================ */

.vx-tooltip {
    position: relative;
    display: inline-block;
}

.vx-tooltip-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
    z-index: 60;
    margin-bottom: 0.5rem;
    border-radius: 0;
}

.vx-tooltip:hover .vx-tooltip-content {
    display: block;
}


/* ============================================
   22. EMPTY STATE
   ============================================ */

.vx-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.vx-empty-icon {
    font-size: 3rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.vx-empty-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.vx-empty-message {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 20rem;
}


/* ============================================
   23. AVATAR
   ============================================ */

.vx-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    flex-shrink: 0;
    overflow: hidden;
}

.vx-avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.vx-avatar-lg { width: 3rem; height: 3rem; font-size: 1.25rem; }
.vx-avatar-xl { width: 4rem; height: 4rem; font-size: 1.5rem; }

.vx-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ============================================
   24. DIVIDER
   ============================================ */

.vx-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.vx-divider-vertical {
    width: 1px;
    height: auto;
    background: var(--border);
    margin: 0 0.75rem;
    align-self: stretch;
}


/* ============================================
   25. SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

::-webkit-scrollbar-corner {
    background: var(--bg);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg);
}

.vx-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.vx-scrollbar::-webkit-scrollbar-track { background: var(--surface); }
.vx-scrollbar::-webkit-scrollbar-thumb { background: var(--border); }
.vx-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }


/* ============================================
   26. SKELETON LOADING
   ============================================ */

.vx-skeleton {
    background: linear-gradient(
        90deg,
        var(--border) 25%,
        var(--surface2) 50%,
        var(--border) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 0;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.vx-skeleton-text { height: 0.875rem; width: 100%; }
.vx-skeleton-title { height: 1.5rem; width: 60%; }
.vx-skeleton-avatar { width: 2.5rem; height: 2.5rem; }
.vx-skeleton-card { height: 8rem; width: 100%; }


/* ============================================
   27. COVER / HERO SECTION
   ============================================ */

.cover {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 0 4rem;
    position: relative;
}

.cover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.cover-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cover-label::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--accent);
}

.cover-headline {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text);
    line-height: 1.35;
    max-width: 700px;
    margin-bottom: 1.5rem;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 40%, #8A9AB0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ============================================
   28. ENTRY ANIMATIONS (Hero only)
   ============================================ */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cover > *:nth-child(1) { animation: fadeUp 0.6s ease 0.1s both; }
.cover > *:nth-child(2) { animation: fadeUp 0.6s ease 0.2s both; }
.cover > *:nth-child(3) { animation: fadeUp 0.6s ease 0.3s both; }
.cover > *:nth-child(4) { animation: fadeUp 0.6s ease 0.4s both; }
.cover > *:nth-child(5) { animation: fadeUp 0.6s ease 0.5s both; }


/* ============================================
   29. AMBER GLOW — EPS & Grade Change (Δ)
   ============================================ */

@keyframes eps-glow {
    0%, 100% { text-shadow: 0 0 12px rgba(255,179,0,0.5), 0 0 24px rgba(255,179,0,0.25); }
    50%      { text-shadow: 0 0 20px rgba(255,179,0,0.7), 0 0 40px rgba(255,179,0,0.4), 0 0 60px rgba(255,179,0,0.15); }
}
.eps-glow-active {
    animation: eps-glow 2.5s ease-in-out infinite;
}
.amber-glow-static {
    text-shadow: 0 0 12px rgba(255,179,0,0.5), 0 0 24px rgba(255,179,0,0.25);
}

/* ============================================
   30. METADATA
   ============================================ */

.meta-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
}

.meta-value {
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* ============================================
   30. INLINE HIGHLIGHTS
   ============================================ */

.hl { color: var(--accent2); }
.hl-gold { color: var(--gold); }


/* ============================================
   31. CONFIDENTIAL WATERMARK
   ============================================ */

.confidential {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    z-index: 100;
    text-transform: uppercase;
}

html[dir="rtl"] .confidential {
    right: auto;
    left: 1.5rem;
}


/* ============================================
   32. FOCUS & ACCESSIBILITY
   ============================================ */

.vx-focus-ring:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* ============================================
   33. TEXT UTILITIES
   ============================================ */

.vx-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vx-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vx-line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
