/* ==============================================================================
   DNS-GUARDIAN — MONOCHROMATIC ENTERPRISE DESIGN SYSTEM
   Palette: Matte Charcoal Grayscale + Soft Orange (#e08244) & Soft Blue (#5b96d6)
   Typography: Plus Jakarta Sans (UI) + JetBrains Mono (Telemetry/Data)
   Supports: Dark & Light Themes
   ============================================================================== */

:root, [data-theme="dark"] {
    /* Grayscale Canvas & Surfaces (Matte Obsidian/Charcoal) */
    --bg-main: #111215;
    --bg-sidebar: #15171c;
    --bg-card: #1b1d23;
    --bg-card-hover: #22252c;
    --bg-elevated: #22252c;
    --bg-card-inner: #17191e;
    --bg-input: #17191e;

    /* Hairline Precision Borders */
    --border-subtle: #292d37;
    --border-hover: #373d4a;
    --border-light: #343946;
    --border-focus: #e08244;
    --border-accent: rgba(224, 130, 68, 0.3);

    /* Typography Hierarchy */
    --text-primary: #f1f3f7;
    --text-secondary: #9aa1ad;
    --text-muted: #656b78;
    --text-dim: #656b78;
    --text-white: #ffffff;

    /* Primary Accents (Dark Mode) */
    --accent-orange: #e08244;
    --accent-orange-hover: #f09254;
    --accent-orange-subtle: rgba(224, 130, 68, 0.14);
    --accent-orange-border: rgba(224, 130, 68, 0.30);
    --accent-orange-glow: rgba(224, 130, 68, 0.18);

    --soft-blue: #5b96d6;
    --soft-blue-hover: #6fa6e6;
    --soft-blue-subtle: rgba(91, 150, 214, 0.14);
    --soft-blue-border: rgba(91, 150, 214, 0.30);

    /* Semantic Status Signals */
    --status-ok: #5b96d6;
    --status-ok-subtle: rgba(91, 150, 214, 0.14);
    --status-ok-border: rgba(91, 150, 214, 0.30);

    --status-danger: #e08244;
    --status-danger-subtle: rgba(224, 130, 68, 0.14);
    --status-danger-border: rgba(224, 130, 68, 0.30);

    --status-warning: #e59866;
    --status-warning-subtle: rgba(229, 152, 102, 0.14);
    --status-warning-border: rgba(229, 152, 102, 0.30);

    /* Legacy mapping */
    --neon-green: var(--status-ok);
    --neon-red: var(--status-danger);
    --neon-amber: var(--status-warning);
    --neon-cyan: var(--soft-blue);
    --twe-primary: var(--accent-orange);

    /* Shadows: Subtle & Matte */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 16px 36px rgba(0, 0, 0, 0.55);

    --twe-shadow-xs: var(--shadow-xs);
    --twe-shadow-sm: var(--shadow-sm);
    --twe-shadow-md: var(--shadow-md);
    --twe-shadow-lg: var(--shadow-lg);

    --sidebar-width: 250px;
    --header-height: 70px;

    --chart-grid: #232731;
    --chart-axis-label: #656b78;
    --map-continent-fill: #242832;
    --map-continent-stroke: #373d4d;
    --map-continent-alt-fill: #292e3a;
    --map-continent-alt-stroke: #3a4254;
}

/* Monochromatic Light Theme (Pearl Slate & Crisp SaaS) */
[data-theme="light"] {
    --bg-main: #f4f6f9;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #f8fafc;
    --bg-card-inner: #f8fafc;
    --bg-input: #ffffff;

    --border-subtle: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-light: #cbd5e1;
    --border-focus: #c86326;
    --border-accent: rgba(200, 99, 38, 0.3);

    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-dim: #94a3b8;
    --text-white: #ffffff;

    /* Soft Accents in Light Mode */
    --accent-orange: #c86326;
    --accent-orange-hover: #b45318;
    --accent-orange-subtle: rgba(200, 99, 38, 0.10);
    --accent-orange-border: rgba(200, 99, 38, 0.25);
    --accent-orange-glow: rgba(200, 99, 38, 0.12);

    --soft-blue: #3b7ac4;
    --soft-blue-hover: #2b68b0;
    --soft-blue-subtle: rgba(59, 122, 196, 0.10);
    --soft-blue-border: rgba(59, 122, 196, 0.25);

    --status-ok: #3b7ac4;
    --status-ok-subtle: rgba(59, 122, 196, 0.10);
    --status-ok-border: rgba(59, 122, 196, 0.25);

    --status-danger: #c86326;
    --status-danger-subtle: rgba(200, 99, 38, 0.10);
    --status-danger-border: rgba(200, 99, 38, 0.25);

    --status-warning: #d97706;
    --status-warning-subtle: rgba(217, 119, 6, 0.10);
    --status-warning-border: rgba(217, 119, 6, 0.25);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 30px rgba(0, 0, 0, 0.1);

    --chart-grid: #e5e9f0;
    --chart-axis-label: #94a3b8;
    --map-continent-fill: #e2e8f0;
    --map-continent-stroke: #cbd5e1;
    --map-continent-alt-fill: #e6ebf2;
    --map-continent-alt-stroke: #94a3b8;
}

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

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mono {
    font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace !important;
    font-variant-numeric: tabular-nums;
}

/* ==============================================================================
   LAYOUT & SIDEBAR
   ============================================================================== */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: fixed;
    height: 100vh;
    z-index: 50;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 16px;
}

.brand-icon-g {
    width: 34px;
    height: 34px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--soft-blue);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.brand-name-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-name-wrap h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.brand-tag-v {
    font-size: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    padding: 14px 10px 4px 10px;
}

.nav-section-title:first-child {
    padding-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-align: left;
    width: 100%;
    user-select: none;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--soft-blue);
    border-radius: 0 3px 3px 0;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.nav-item:hover svg {
    color: var(--text-primary);
}

.nav-item.active svg {
    color: var(--soft-blue);
}

.nav-counter {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--accent-orange-subtle);
    color: var(--accent-orange);
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid var(--accent-orange-border);
}

.sidebar-footer {
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.server-status-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg-card);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--status-ok);
    flex-shrink: 0;
}

.status-dot.pulse-green {
    box-shadow: 0 0 6px var(--status-ok);
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==============================================================================
   MAIN CONTENT & TOP BAR
   ============================================================================== */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 24px 32px;
    max-width: 1560px;
}

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

.page-title-area h1 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.page-title-area p {
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--status-ok);
    background: var(--status-ok-subtle);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid var(--status-ok-border);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--status-ok);
    animation: liveBlink 1.8s infinite;
}

@keyframes liveBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.domain-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

.theme-switch-pill {
    display: flex;
    align-items: center;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.theme-switch-pill:hover {
    border-color: var(--border-hover);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.theme-option.active-opt {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    border: 1px solid var(--border-subtle);
}

.lang-switch-pill {
    display: flex;
    align-items: center;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.lang-switch-pill:hover {
    border-color: var(--border-hover);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.lang-option.active-opt {
    background: var(--bg-card);
    color: var(--soft-blue);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    border: 1px solid var(--border-subtle);
}

.theme-icon {
    font-size: 12px;
}

.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: 6px;
}

.user-avatar-sm {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: var(--accent-orange-subtle);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange-border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-org {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.role-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.role-superadmin {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.role-admin {
    background: rgba(59, 130, 246, 0.15);
    color: var(--soft-blue);
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.role-operator {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.role-user {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 3px;
    border-radius: 3px;
    transition: color 0.15s ease;
}

.btn-logout:hover {
    color: var(--status-danger);
}

/* ==============================================================================
   METRIC STAT CARDS (KPI GRID)
   ============================================================================== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 1400px) {
    .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 950px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s ease, background 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-subtle);
}

.kpi-card.accent-blue::before {
    background: var(--soft-blue);
}

.kpi-card.accent-orange::before {
    background: var(--accent-orange);
}

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

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

.kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 2.1rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

.kpi-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.kpi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 10px;
}

/* Minimalist Tags & Chips */
.twe-chip, .badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.twe-chip-info {
    background: var(--accent-orange-subtle);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange-border);
}

.twe-chip-success {
    background: var(--status-ok-subtle);
    color: var(--status-ok);
    border: 1px solid var(--status-ok-border);
}

.twe-chip-danger {
    background: var(--status-danger-subtle);
    color: var(--status-danger);
    border: 1px solid var(--status-danger-border);
}

.twe-chip-purple {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* ==============================================================================
   DASHBOARD PANELS & CHART
   ============================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
    transition: border-color 0.15s ease;
}

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

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

.panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.chart-container {
    height: 220px;
    position: relative;
    width: 100%;
}

/* ==============================================================================
   TABLES & DATA LOGS (TERMINAL PRECISION)
   ============================================================================== */

.table-responsive, .table-container {
    overflow-x: auto;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    background: var(--bg-card);
}

.custom-table, table.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.825rem;
    text-align: left;
}

.custom-table th, table.table th {
    text-align: left;
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}

.custom-table td, table.table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.custom-table tr:hover td, table.table tr:hover td {
    background: rgba(255, 255, 255, 0.018);
    color: var(--text-primary);
}

/* Badges de Estado */
.badge-status, .table-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-allowed {
    background: var(--status-ok-subtle);
    color: var(--status-ok);
    border: 1px solid var(--status-ok-border);
}

.badge-blocked, .badge-blocked-gambling {
    background: var(--status-danger-subtle);
    color: var(--status-danger);
    border: 1px solid var(--status-danger-border);
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

/* ==============================================================================
   BUTTONS & ACTIONS
   ============================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 5px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    user-select: none;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-orange);
    color: #FFFFFF;
    border-color: var(--accent-orange);
}

.btn-primary:hover {
    background: var(--accent-orange-hover);
    border-color: var(--accent-orange-hover);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.btn-outline:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: var(--accent-orange-subtle);
}

.btn-danger {
    background: var(--status-danger-subtle);
    color: var(--status-danger);
    border-color: var(--status-danger-border);
}

.btn-danger:hover {
    background: var(--status-danger);
    color: #FFFFFF;
}

.btn-success {
    background: var(--status-ok-subtle);
    color: var(--status-ok);
    border-color: var(--status-ok-border);
}

.btn-success:hover {
    background: var(--status-ok);
    color: #FFFFFF;
}

.btn-sm {
    padding: 4px 9px;
    font-size: 0.75rem;
}

/* Action table buttons */
.btn-action-approve {
    background: var(--status-ok-subtle);
    color: var(--status-ok);
    border: 1px solid var(--status-ok-border);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-action-approve:hover {
    background: var(--status-ok);
    color: #FFFFFF;
}

.btn-action-reject {
    background: var(--status-danger-subtle);
    color: var(--status-danger);
    border: 1px solid var(--status-danger-border);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-action-reject:hover {
    background: var(--status-danger);
    color: #FFFFFF;
}

/* ==============================================================================
   FORM CONTROLS & SEARCH
   ============================================================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, select.form-select, textarea.form-textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: 5px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, select.form-select:focus, textarea.form-textarea:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 2px var(--accent-orange-subtle);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Search Box Container */
.search-box-wrap {
    position: relative;
    width: 100%;
    max-width: 380px;
}

.search-box-wrap input {
    padding-left: 34px;
}

.search-box-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ==============================================================================
   POLICIES & CATEGORIES VIEW
   ============================================================================== */

.policies-grid,
.policy-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Banner de Perfil Educativo Córdoba (Directiva SITyC 2026) */
.cordoba-profile-banner {
    background: var(--bg-card);
    border: 1px solid var(--accent-orange-border);
    border-left: 4px solid var(--accent-orange);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.badge-cordoba {
    background: var(--accent-orange-subtle);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange-border);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

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

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

.policy-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.policy-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.policy-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.policy-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 16px;
}

.policy-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.policy-meta strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Switch Toggles (Safety Orange when active) */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    transition: .2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
}

input:checked + .slider::before {
    transform: translateX(20px);
    background-color: #FFFFFF;
}

/* ==============================================================================
   TABS & EXCEPTION MANAGEMENT
   ============================================================================== */

.tab-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 7px 14px;
    border-radius: 5px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.tab-btn.active {
    background: var(--accent-orange-subtle);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange-border);
}

/* ==============================================================================
   CUSTOM MODALS & SCHEDULE SCHEDULER DIALOG
   ============================================================================== */

.modal-backdrop-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 11, 13, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.schedule-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    box-sizing: border-box;
    position: relative;
    animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.schedule-category-block {
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 16px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.schedule-category-block:hover {
    border-color: var(--border-hover);
}

.schedule-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.schedule-option-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.schedule-option-label:hover {
    background: var(--bg-card-hover);
}

.schedule-option-label input[type="radio"] {
    accent-color: var(--accent-orange);
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.schedule-custom-editor {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 14px 16px;
    margin-top: 10px;
    margin-left: 30px;
    transition: all 0.2s ease;
}

.schedule-days-grid {
    display: flex;
    gap: 6px;
    margin: 8px 0 14px 0;
    flex-wrap: wrap;
}

.schedule-day-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.schedule-day-btn:hover {
    border-color: var(--accent-orange-border);
    color: var(--text-primary);
}

.schedule-day-btn.active {
    background: var(--accent-orange-subtle);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.schedule-time-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.schedule-time-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-time-input {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s ease;
    color-scheme: dark;
}

.schedule-time-input:focus {
    border-color: var(--accent-orange);
}

/* ==============================================================================
   AUTH MODAL & TOAST
   ============================================================================== */

.auth-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 11, 13, 0.88);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-modal-overlay.active {
    display: flex;
}

.auth-card,
.auth-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    width: 100%;
    max-width: 440px;
    padding: 32px 30px;
    box-shadow: var(--shadow-xl);
}

.auth-header,
.auth-brand-area {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--accent-orange-subtle);
    border: 1px solid var(--accent-orange-border);
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-area h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.auth-brand-area p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
    padding: 3px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.auth-tab {
    padding: 7px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.auth-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-auth-primary {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    background: var(--accent-orange);
    color: #FFFFFF;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    margin-top: 10px;
}

.btn-auth-primary:hover:not(:disabled) {
    background: var(--accent-orange-hover);
}

.btn-auth-primary:active:not(:disabled) {
    transform: scale(0.99);
}

.btn-auth-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-link-btn {
    background: transparent;
    border: none;
    color: var(--accent-orange);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.auth-link-btn:hover {
    color: var(--accent-orange-hover);
}

.auth-footer-help {
    display: flex;
    justify-content: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.auth-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 12px;
}

/* Global Toast Notifications */
.dg-global-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--accent-orange);
    border-radius: 6px;
    padding: 14px 18px;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    max-width: 400px;
    display: none;
}

.toast-success { border-left-color: var(--status-ok); }
.toast-error { border-left-color: var(--status-danger); }
.toast-warning { border-left-color: var(--status-warning); }
.toast-info { border-left-color: var(--accent-orange); }

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.toast-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
}

.toast-body {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==============================================================================
   MONOCHROMATIC DASHBOARD EXTENSIONS (SELECTED ENTERPRISE SPEC)
   ============================================================================== */
.kpi-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.kpi-tag {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    padding: 1px 7px;
    border-radius: 4px;
    font-weight: 500;
}
.tag-blue {
    background: var(--soft-blue-subtle);
    color: var(--soft-blue);
    border: 1px solid var(--soft-blue-border);
}
.tag-orange {
    background: var(--accent-orange-subtle);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange-border);
}
.tag-gray {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}
.kpi-unit {
    font-size: 12px;
    color: var(--text-muted);
}
.kpi-link-blue {
    color: var(--soft-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 11.5px;
}
.kpi-link-blue:hover {
    text-decoration: underline;
}
.kpi-link-orange {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 500;
    font-size: 11.5px;
}
.kpi-link-orange:hover {
    text-decoration: underline;
}

/* Grids for Monochromatic Layout */
.middle-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 1080px) {
    .middle-grid {
        grid-template-columns: 1fr;
    }
}

.bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) {
    .bottom-grid {
        grid-template-columns: 1fr;
    }
}

.chart-box {
    width: 100%;
    height: 240px;
    position: relative;
}
.chart-legend {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
}
.legend-bullet {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Threat Geo Map */
.map-box {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease;
}
.map-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
    text-align: center;
}
.metric-cell {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 10px 8px;
    transition: background-color 0.2s ease;
}
.metric-sparkline {
    height: 20px;
    margin-bottom: 4px;
}
.metric-lbl {
    font-size: 10.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.metric-val {
    font-size: 14px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

/* SecOps Stream / Incident Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}
.chat-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 11px;
    color: var(--text-primary);
    flex-shrink: 0;
}
.chat-content {
    flex: 1;
}
.chat-header {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    margin-bottom: 4px;
}
.chat-author {
    font-weight: 600;
    color: var(--text-primary);
}
.chat-timestamp {
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}
.chat-text {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
}
.chat-text code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--accent-orange);
    background: var(--accent-orange-subtle);
    padding: 1px 5px;
    border-radius: 3px;
}

/* Tables & Pills */
.mono-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.mono-table th {
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-card-inner);
}
.mono-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}
.mono-table tr:hover td {
    background: var(--bg-card-hover);
}

.pill {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}
.pill-orange {
    background: var(--accent-orange-subtle);
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange-border);
}
.pill-blue {
    background: var(--soft-blue-subtle);
    color: var(--soft-blue);
    border: 1px solid var(--soft-blue-border);
}
.pill-gray {
    background: var(--bg-card-inner);
    color: var(--text-dim);
    border: 1px solid var(--border-subtle);
}

.tool-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11.5px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}
.tool-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-light);
}

/* ==============================================================================
   GEO-INTELLIGENCE & MAXMIND GEOIP STYLES
   ============================================================================== */

.geo-iso-tag {
    font-size: 10px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--bg-card-inner);
    color: var(--text-dim);
    border: 1px solid var(--border-subtle);
    margin-left: 6px;
    vertical-align: middle;
}

.geo-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-card-inner);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.geo-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--soft-blue), var(--soft-blue-hover));
    border-radius: 3px;
    transition: width 0.4s ease;
}

.geo-tab-group {
    display: flex;
    background: var(--bg-card-inner);
    padding: 3px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    gap: 4px;
}

.geo-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.geo-tab-btn:hover {
    color: var(--text-primary);
}

.geo-tab-btn.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border-light);
}

.geo-search-input {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s ease;
    min-width: 200px;
}

.geo-search-input:focus {
    border-color: var(--soft-blue);
}

.geo-map-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: var(--shadow-md);
    pointer-events: none;
    z-index: 50;
    font-size: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    min-width: 170px;
    color: var(--text-primary);
    transition: opacity 0.15s ease;
}

/* Animaciones de Nodos en Mapa */
@keyframes markerPulseBlue {
    0% {
        r: 10;
        opacity: 0.8;
    }
    50% {
        r: 18;
        opacity: 0.2;
    }
    100% {
        r: 10;
        opacity: 0.8;
    }
}

@keyframes markerPulseOrange {
    0% {
        r: 12;
        opacity: 0.9;
    }
    50% {
        r: 22;
        opacity: 0.2;
    }
    100% {
        r: 12;
        opacity: 0.9;
    }
}

.marker-pulse-blue {
    animation: markerPulseBlue 2.4s infinite ease-in-out;
    transform-origin: center;
}

.marker-pulse-orange {
    animation: markerPulseOrange 1.8s infinite ease-in-out;
    transform-origin: center;
}

/* ==============================================================================
   SERVER HEALTH & HARDWARE TELEMETRY GAUGES (OPTION A)
   ============================================================================== */
.hardware-telemetry-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hardware-telemetry-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

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

.card-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.gauges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 18px 20px 14px 20px;
}

@media (max-width: 1200px) {
    .gauges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gauges-grid {
        grid-template-columns: 1fr;
    }
}

.gauge-item {
    background: var(--bg-card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 14px 12px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gauge-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-light);
}

.gauge-svg-wrap {
    width: 100%;
    max-width: 180px;
    height: 125px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gauge-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-top: 6px;
    margin-bottom: 3px;
}

.gauge-subtitle {
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    text-align: center;
}

/* Barra de estado secundario de hardware */
.hardware-status-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.14);
    border-top: 1px solid var(--border-subtle);
}

[data-theme="light"] .hardware-status-bar {
    background: rgba(0, 0, 0, 0.03);
}

@media (max-width: 900px) {
    .hardware-status-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .hardware-status-bar {
        grid-template-columns: 1fr;
    }
}

.hw-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hw-status-icon {
    font-size: 1.15rem;
    opacity: 0.9;
    flex-shrink: 0;
}

.hw-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
    min-width: 0;
    flex: 1;
}

.hw-status-label {
    color: var(--text-muted);
    font-weight: 500;
}

.hw-status-val {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hw-progress-track {
    width: 100%;
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
}

.hw-progress-fill {
    height: 100%;
    background: var(--soft-blue);
    border-radius: 2px;
    transition: width 0.6s ease;
}


