/* ==========================================================================
   STORNI CLOUD // STORAGE FABRIC & POOL MANAGEMENT CONSOLE
   Aesthetic: Bespoke Datacenter Engineering & Industrial Systems Architecture
   Zero AI Clichés: No neon halos, no bubbly pills, zero emojis, pure precision.
   ========================================================================== */

:root {
    /* Engineered Neutral Dark Palette */
    --bg-canvas: #080a0f;
    --bg-surface: #0e121a;
    --bg-surface-elevated: #131824;
    --bg-surface-hover: #182030;
    --bg-surface-active: #1d2638;
    --bg-input: #0a0d14;

    /* Hairline Structural Borders */
    --border-dim: #182030;
    --border-subtle: #202b40;
    --border-medium: #2c3a55;
    --border-focus: #38bdf8;
    --border-hover: #3d4f73;

    /* High-Contrast Typography Hierarchy */
    --text-white: #ffffff;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-faint: #475569;

    /* Calibrated Functional Indicators (Subtle & Functional) */
    --accent-primary: #38bdf8;
    --accent-primary-dim: rgba(56, 189, 248, 0.08);
    --accent-primary-border: rgba(56, 189, 248, 0.25);

    --status-emerald: #10b981;
    --status-emerald-dim: rgba(16, 185, 129, 0.08);
    --status-emerald-border: rgba(16, 185, 129, 0.25);

    --status-indigo: #818cf8;
    --status-indigo-dim: rgba(129, 140, 248, 0.08);
    --status-indigo-border: rgba(129, 140, 248, 0.25);

    --status-amber: #f59e0b;
    --status-amber-dim: rgba(245, 158, 11, 0.08);
    --status-amber-border: rgba(245, 158, 11, 0.25);

    --status-rose: #f43f5e;
    --status-rose-dim: rgba(244, 63, 94, 0.08);
    --status-rose-border: rgba(244, 63, 94, 0.25);

    /* Fonts */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Architectural Tight Radii (Zero Bubbly Shapes) */
    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   1. HARDENED LOGIN PORTAL
   ========================================================================== */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-color: var(--bg-canvas);
    background-image: 
        linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 32px 32px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 36px 32px;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--border-dim);
}

.login-header {
    text-align: left;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 20px;
}

.login-emblem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    margin-bottom: 14px;
}

.login-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.login-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.login-hardware-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.input-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-text {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    padding: 10px 38px 10px 12px;
    color: var(--text-white);
    font-family: var(--font-mono);
    font-size: 13px;
    transition: border-color 0.15s ease;
}

.input-text:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #0d111a;
}

.btn-toggle-pwd {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.15s ease;
}

.btn-toggle-pwd:hover {
    color: var(--text-white);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    border: 1px solid transparent;
    user-select: none;
    line-height: 1;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: #1e293b;
    border-color: #334155;
    color: var(--text-white);
}

.btn-primary:hover {
    background: #2b3952;
    border-color: #475569;
}

.btn-primary:active {
    background: #182233;
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    border-color: var(--border-medium);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-hover);
    color: var(--text-white);
}

.btn-secondary:active {
    background: var(--bg-surface);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: var(--radius-xs);
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--text-white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-error-alert {
    background: var(--status-rose-dim);
    border: 1px solid var(--status-rose-border);
    color: #fca5a5;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-family: var(--font-mono);
    margin-top: 14px;
}

.login-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-dim);
    font-family: var(--font-mono);
}

/* ==========================================================================
   2. DASHBOARD MAIN LAYOUT & HEADER
   ========================================================================== */

.app-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 24px 40px;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.brand-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    padding: 5px 10px;
    border-radius: var(--radius-xs);
}

.status-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--status-emerald);
}

.header-node-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    padding: 5px 12px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    gap: 14px;
}

/* ==========================================================================
   3. NAVIGATION TABS (INDUSTRIAL SEGMENT STRIP)
   ========================================================================== */

.nav-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0;
}

.nav-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-xs) var(--radius-xs) 0 0;
    padding: 8px 14px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font-sans);
    margin-bottom: -1px;
}

.nav-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.nav-tab-btn.active {
    background: var(--bg-surface);
    color: var(--text-white);
    border-color: var(--border-subtle) var(--border-subtle) transparent;
    border-bottom: 2px solid var(--accent-primary);
}

.tab-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
}

.nav-tab-btn.active .tab-icon {
    color: var(--accent-primary);
}

.tab-counter {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-secondary);
}

.nav-tab-btn.active .tab-counter {
    color: var(--text-white);
    border-color: var(--border-medium);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==========================================================================
   4. PRIMARY STORAGE CARDS (TAB 1)
   ========================================================================== */

.storage-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.storage-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.15s ease;
}

.storage-card:hover {
    border-color: var(--border-hover);
}

.card-primary {
    border-left: 3px solid var(--status-indigo);
}

.card-secondary {
    border-left: 3px solid var(--status-emerald);
}

.card-tertiary {
    border-left: 3px solid var(--accent-primary);
}

.storage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.card-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    display: inline-block;
    margin-bottom: 6px;
    font-family: var(--font-mono);
}

.card-drive-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.card-drive-mount {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 3px;
}

.drive-icon-large {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
}

.metric-big-num {
    font-family: var(--font-mono);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.metric-unit {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.metric-big-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: var(--font-mono);
}

.storage-progress-container {
    margin-top: 16px;
}

.storage-progress-bar {
    height: 6px;
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-xs);
    overflow: hidden;
    border: 1px solid var(--border-dim);
}

.storage-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.fill-purple { background: var(--status-indigo); }
.fill-emerald { background: var(--status-emerald); }
.fill-blue { background: var(--accent-primary); }

.storage-progress-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    margin-top: 6px;
    color: var(--text-muted);
}

.storage-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border-dim);
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ==========================================================================
   5. MIGRATION ALERT BANNER
   ========================================================================== */

.migration-alert {
    background: var(--accent-primary-dim);
    border: 1px solid var(--accent-primary-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.migration-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.migration-icon {
    display: inline-flex;
    align-items: center;
    color: var(--accent-primary);
}

.migration-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
}

.migration-desc {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-top: 2px;
}

.migration-progress-box {
    min-width: 240px;
}

.migration-progress-bar {
    height: 6px;
    background: var(--bg-surface);
    border-radius: var(--radius-xs);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--border-subtle);
}

.migration-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.migration-stats {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   6. PANEL BOX & TOPOLOGY ARCHITECTURE
   ========================================================================== */

.panel-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.panel-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Storage Topology Explainer */
.storage-topology-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.topology-header {
    margin-bottom: 14px;
}

.topology-title {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.topology-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.topology-item {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.topology-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-top: 2px;
}

.topology-body strong {
    display: block;
    font-size: 12px;
    color: var(--text-white);
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.topology-body p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Cluster Segment Visual */
.cluster-storage-visual {
    margin-bottom: 12px;
}

.segment-bar {
    display: flex;
    height: 32px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
}

.segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
    transition: width 0.3s ease;
}

.seg-ssd1 {
    background: #172554;
    color: #93c5fd;
    border-right: 1px solid var(--bg-canvas);
}

.seg-ssd2 {
    background: #2e1065;
    color: #d8b4fe;
    border-right: 1px solid var(--bg-canvas);
}

.seg-raid {
    background: #022c22;
    color: #6ee7b7;
}

.segment-legend {
    display: flex;
    gap: 18px;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex-wrap: wrap;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-blue { background: var(--accent-primary); }
.dot-purple { background: var(--status-indigo); }
.dot-emerald { background: var(--status-emerald); }

/* Global Defaults Box */
.storage-defaults-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 18px;
}

.defaults-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-dim);
}

.defaults-title {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.defaults-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.defaults-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.defaults-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.defaults-label {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-weight: 600;
}

.defaults-select {
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xs);
    padding: 8px 10px;
    color: var(--text-white);
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease;
}

.defaults-select:focus {
    border-color: var(--accent-primary);
}

.defaults-hint {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* ==========================================================================
   7. HIGH-DENSITY DATA TABLES
   ========================================================================== */

.table-responsive {
    overflow-x: auto;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.data-table th {
    padding: 10px 14px;
    vertical-align: middle !important;
    text-align: left;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-dim);
    background: var(--bg-surface-elevated);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--border-dim);
    font-family: var(--font-mono);
    color: var(--text-primary);
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
}

.data-table tbody tr {
    transition: background-color 0.1s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-surface-elevated);
}

.data-table th.text-center,
.data-table td.text-center {
    text-align: center !important;
}

.input-search {
    background: var(--bg-input);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xs);
    padding: 6px 12px;
    color: var(--text-white);
    font-size: 12px;
    font-family: var(--font-mono);
    width: 260px;
    transition: border-color 0.15s ease;
}

.input-search:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Filter Segment Strip */
.filter-pills {
    display: flex;
    gap: 4px;
    margin: 14px 0 16px 0;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.filter-pill:hover {
    color: var(--text-white);
    border-color: var(--border-hover);
    background: var(--bg-surface-elevated);
}

.filter-pill.active {
    background: var(--bg-surface-active);
    border-color: var(--border-medium);
    color: var(--text-white);
    font-weight: 700;
}

/* Storage Info Banner */
.storage-info-banner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.info-banner-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   8. STATUS INDICATORS, PILLS & BADGES (CRISP GEOMETRIC ALIGNMENT)
   ========================================================================== */

/* Status Pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 68px;
    box-sizing: border-box;
}

.status-pill-online {
    background: var(--status-emerald-dim);
    border: 1px solid var(--status-emerald-border);
    color: #34d399;
}

.status-pill-offline {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.status-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
    display: inline-block;
}

.status-static-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
    flex-shrink: 0;
    display: inline-block;
}

.status-text {
    display: inline-block;
    line-height: 1;
}

/* Precision Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-blue {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
    color: #7dd3fc;
}

.badge-purple {
    background: rgba(129, 140, 248, 0.08);
    border-color: rgba(129, 140, 248, 0.25);
    color: #a5b4fc;
}

.badge-emerald {
    background: var(--status-emerald-dim);
    border-color: var(--status-emerald-border);
    color: #6ee7b7;
}

.badge-amber {
    background: var(--status-amber-dim);
    border-color: var(--status-amber-border);
    color: #fcd34d;
}

.badge-danger {
    background: var(--status-rose-dim);
    border-color: var(--status-rose-border);
    color: #fda4af;
}

.badge-cyan {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.badge-info {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
}

/* Action Button: Routing Configuration */
.btn-configure-routing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    outline: none;
}

.btn-configure-routing:hover {
    border-color: var(--accent-primary);
    background: var(--bg-surface-hover);
    color: var(--text-white);
}

.btn-configure-routing:active {
    background: var(--bg-surface);
}

/* ==========================================================================
   9. SAS HARDWARE RACK & MONITORING
   ========================================================================== */

.grid-cluster-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sas-rack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.drive-bay {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    margin-bottom: 8px;
}

.bay-num {
    color: var(--text-muted);
    font-weight: 700;
}

.status-online {
    color: var(--status-emerald);
    font-weight: 700;
}

.drive-icon {
    display: inline-flex;
    align-items: center;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.drive-model {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-white);
    font-family: var(--font-mono);
}

.drive-spec {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.drive-mirror {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-top: 4px;
}

.bay-footer {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-dim);
    color: var(--text-muted);
}

.bay-health {
    color: var(--status-emerald);
    font-weight: 700;
}

.zfs-scrub-box {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 10px 12px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.scrub-title {
    color: var(--text-secondary);
    font-weight: 700;
}

.scrub-details {
    color: var(--text-muted);
    margin-top: 2px;
}

/* Automation Sliders & Policies */
.automation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}

.threshold-card {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 14px;
}

.threshold-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.slider {
    width: 100%;
    height: 4px;
    background: var(--border-medium);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-white);
    border: 2px solid var(--border-subtle);
    cursor: pointer;
}

.threshold-hint {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
    font-family: var(--font-mono);
}

.policy-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toggle-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 12px 14px;
}

.toggle-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-track {
    width: 32px;
    height: 18px;
    background: var(--border-medium);
    border-radius: 9px;
    position: relative;
    transition: background 0.15s ease;
    flex-shrink: 0;
    margin-top: 1px;
}

.toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-white);
    transition: transform 0.15s ease;
}

.toggle-item input[type="checkbox"]:checked + .toggle-track {
    background: var(--status-emerald);
}

.toggle-item input[type="checkbox"]:checked + .toggle-track::after {
    transform: translateX(14px);
}

.toggle-text strong {
    display: block;
    font-size: 12px;
    color: var(--text-white);
}

.toggle-text span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Event Audit Stream */
.event-stream-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.stream-title {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.event-stream {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.event-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 6px;
    border-radius: var(--radius-xs);
    border-left: 2px solid var(--border-medium);
    background: var(--bg-surface-elevated);
}

.event-time {
    color: var(--text-muted);
}

.event-msg {
    color: var(--text-primary);
}

/* Chart */
.chart-container {
    padding-top: 8px;
}

.trend-chart {
    width: 100%;
    height: 180px;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ==========================================================================
   10. ARCHITECTURAL MODAL DIALOGS
   ========================================================================== */

.modal-backdrop, 
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(6, 8, 12, 0.8) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.modal-backdrop.active, 
.modal-overlay.active {
    display: flex !important;
}

.modal-box {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-medium) !important;
    border-radius: var(--radius-md) !important;
    padding: 24px !important;
    width: 100% !important;
    max-width: 620px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--border-dim) !important;
    position: relative !important;
    z-index: 1000000 !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-dim);
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

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

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.modal-close:hover {
    color: var(--text-white);
}

.modal-body {
    padding: 4px 0;
}

/* Routing Summary Header */
.routing-server-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 12px;
    margin-bottom: 18px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.summary-val {
    font-size: 12px;
    font-family: var(--font-mono);
}

/* Routing Section Titles */
.routing-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Target Selection Radio Cards */
.target-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.target-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius-xs);
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.target-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-surface-hover);
}

.target-card.selected {
    border-color: var(--border-medium);
    background: var(--bg-surface-active);
}

.card-radio {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--border-medium);
    margin-top: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.target-card.selected .card-radio {
    border-color: var(--accent-primary);
}

.target-card.selected .card-radio::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.card-info {
    flex: 1;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}

.card-title-row strong {
    font-size: 12px;
    color: var(--text-white);
    font-family: var(--font-mono);
}

.card-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
}

.routing-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--status-amber-dim);
    border: 1px solid var(--status-amber-border);
    border-radius: var(--radius-xs);
    padding: 12px 14px;
    color: #fde68a;
}

.warning-icon {
    display: inline-flex;
    align-items: center;
    color: var(--status-amber);
    flex-shrink: 0;
    margin-top: 1px;
}

.warning-text strong {
    display: block;
    font-size: 12px;
    margin-bottom: 2px;
}

.warning-text p {
    font-size: 11px;
    color: #fef3c7;
    line-height: 1.4;
}

.force-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    cursor: pointer;
    color: #fffbeb;
}

.routing-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-dim);
}

/* App Footer */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid var(--border-dim);
}

/* Utility Helpers */
.text-white { color: var(--text-white) !important; }
.text-cyan { color: var(--accent-primary) !important; }
.text-emerald { color: var(--status-emerald) !important; }
.text-purple { color: var(--status-indigo) !important; }
.text-amber { color: var(--status-amber) !important; }
.text-crimson { color: var(--status-rose) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-faint) !important; }
.text-center { text-align: center !important; }

/* ==========================================================================
   TOAST NOTIFICATION ENGINE (BESPOKE OBSERVABILITY SYSTEM)
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 440px;
    width: calc(100vw - 48px);
}

.toast {
    pointer-events: auto;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xs);
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
    animation: toastSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.toast-hiding {
    opacity: 0;
    transform: translateX(16px);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 2px;
    line-height: 1.2;
}

.toast-message {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.35;
    word-break: break-word;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    line-height: 1;
    transition: color 0.15s ease;
    align-self: flex-start;
}

.toast-close:hover {
    color: var(--text-white);
}

.toast-success {
    border-left: 3px solid var(--status-emerald);
}
.toast-success .toast-title { color: var(--status-emerald); }
.toast-success .toast-icon { color: var(--status-emerald); }

.toast-error {
    border-left: 3px solid var(--status-rose);
}
.toast-error .toast-title { color: var(--status-rose); }
.toast-error .toast-icon { color: var(--status-rose); }

.toast-warning {
    border-left: 3px solid var(--status-amber);
}
.toast-warning .toast-title { color: var(--status-amber); }
.toast-warning .toast-icon { color: var(--status-amber); }

.toast-info {
    border-left: 3px solid var(--accent-primary);
}
.toast-info .toast-title { color: var(--accent-primary); }
.toast-info .toast-icon { color: var(--accent-primary); }

