        /* ==================== CSS Variables - Spectrum Vision White Theme ==================== */
        /* Matching React frontend design system (Alkhorayef branding) */

        /* ==================== Dark Theme Override ==================== */
        .dark-theme {
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --bg-card: #1e293b;
            --bg-muted: #334155;

            /* Gold branding maintained in dark mode — brighter variant */
            --primary: #E0C480;
            --primary-dark: #C9A961;
            --primary-light: #8B7744;
            --primary-pale: #2a2520;
            --accent-primary: #E0C480;
            --accent-success: #4ade80;
            --accent-warning: #fbbf24;
            --accent-danger: #f87171;
            --accent-info: #60a5fa;

            --success: #4ade80;
            --warning: #fbbf24;
            --danger: #f87171;
            --info: #60a5fa;

            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;

            --border-primary: #334155;
            --border-subtle: #1e293b;

            --gray-50: #334155;
            --gray-100: #1e293b;
            --gray-200: #334155;
            --gray-300: #475569;
            --gray-400: #64748b;
            --gray-500: #94a3b8;
            --gray-600: #cbd5e1;
            --gray-700: #e2e8f0;
            --gray-800: #f1f5f9;
            --gray-900: #f8fafc;

            --glow-success: 0 0 10px rgba(74, 222, 128, 0.2);
            --glow-warning: 0 0 10px rgba(251, 191, 36, 0.2);
            --glow-danger: 0 0 10px rgba(248, 113, 113, 0.2);
            --glow-primary: 0 0 10px rgba(224, 196, 128, 0.2);

            --shadow: 0 2px 8px rgba(0,0,0,0.3);
            --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
            --shadow-lg: 0 10px 20px rgba(0,0,0,0.5);
            --shadow-alkhorayef: 0 4px 6px -1px rgba(224, 196, 128, 0.15);
        }

        /* ==================== Reset & Base ==================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: var(--font-sans);
            font-size: 14px;
            line-height: 1.5;
            color: var(--text-primary);
            background: var(--bg-primary);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            font-feature-settings: "rlig" 1, "calt" 1;
        }

        /* ==================== Layout ==================== */
        .app-container {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* ==================== Top Navbar — Two-Row SpectrumNavbar ==================== */
        /* Row 1: Brand bar with logo, well selector, fleet status, user */
        /* Row 2: Navigation links with gold active state */
        .top-navbar {
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-primary);
            display: flex;
            flex-direction: column;
            position: sticky;
            top: 0;
            z-index: 200;
            box-shadow: var(--shadow);
        }

        /* Brand row */
        .navbar-brand-row {
            height: var(--navbar-height);
            display: flex;
            align-items: center;
            padding: 0 24px;
            border-bottom: 1px solid var(--border-subtle);
        }

        .navbar-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            padding-right: 24px;
            border-right: 1px solid var(--border-primary);
            margin-right: 16px;
            white-space: nowrap;
        }

        .navbar-logo .logo-icon {
            font-size: 1.5rem;
            filter: drop-shadow(0 1px 2px rgba(201, 169, 97, 0.3));
        }

        .navbar-logo .logo-text {
            font-size: 1rem;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.01em;
        }

        .navbar-logo .logo-sub {
            font-size: 0.7rem;
            color: var(--primary);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        /* Navigation row (row 2) */
        .navbar-nav-row {
            height: var(--navbar-row2-height);
            display: flex;
            align-items: center;
            padding: 0 24px;
            gap: 4px;
        }

        .navbar-nav {
            display: flex;
            align-items: center;
            flex: 1;
            gap: 6px;
        }

        .navbar-item {
            padding: 6px 16px;
            height: 32px;
            display: flex;
            align-items: center;
            color: var(--text-secondary);
            font-size: 0.8rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            cursor: pointer;
            border-radius: var(--radius);
            transition: all 0.15s ease;
            white-space: nowrap;
            position: relative;
        }

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

        .navbar-item.active {
            color: #92400e;
            background: #fffbeb;
        }

        /* Navbar Dropdown */
        .navbar-dropdown {
            position: relative;
        }

        .navbar-dropdown .dropdown-menu {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            min-width: 200px;
            background: var(--bg-card);
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            box-shadow: var(--shadow-lg);
            z-index: 300;
            padding: 6px 0;
            ring: 1px solid rgba(0, 0, 0, 0.05);
        }

        .navbar-dropdown:hover .dropdown-menu {
            display: block;
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
            text-transform: none;
            letter-spacing: 0;
        }

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

        .dropdown-item.active {
            color: var(--primary);
        }

        .dropdown-item .dd-icon {
            font-size: 1rem;
            width: 20px;
            text-align: center;
        }

        /* Navbar Right Section */
        .navbar-right {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-left: auto;
        }

        .navbar-status-badges {
            display: flex;
            gap: 8px;
            padding: 0 12px;
            border-left: 1px solid var(--border-primary);
        }

        .navbar-badge {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 0.7rem;
            font-weight: 600;
            font-family: var(--font-mono);
            padding: 3px 10px;
            border-radius: 9999px;
            text-transform: uppercase;
        }

        .navbar-badge.running {
            background: #f0fdf4;
            color: #16a34a;
        }
        .navbar-badge.offline {
            background: #f8fafc;
            color: var(--text-muted);
        }
        .navbar-badge.stopped {
            background: #fef2f2;
            color: #dc2626;
        }
        .navbar-badge.warn {
            background: #fffbeb;
            color: #d97706;
        }

        .navbar-well-select {
            padding: 6px 12px;
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            min-width: 130px;
            transition: border-color 0.15s;
        }

        .navbar-well-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.2);
        }

        .navbar-site-select {
            padding: 6px 12px;
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-size: 0.82rem;
            font-weight: 500;
            cursor: pointer;
            transition: border-color 0.15s;
        }

        .navbar-site-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.2);
        }

        .navbar-user-menu {
            position: relative;
        }

        .navbar-user-btn {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            border: none;
            cursor: pointer;
            font-weight: 700;
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .navbar-user-menu .dropdown-menu {
            right: 0;
            left: auto;
        }

        .navbar-user-menu:hover .dropdown-menu {
            display: block;
        }

        /* Separator in dropdown */
        .dropdown-separator {
            height: 1px;
            background: var(--border-primary);
            margin: 4px 0;
        }

        .navbar-lang-btns {
            display: flex;
            gap: 4px;
            padding: 6px 16px;
        }

        .navbar-lang-btn {
            width: 28px;
            height: 28px;
            border: 1px solid var(--border-primary);
            border-radius: 50%;
            background: var(--bg-tertiary);
            cursor: pointer;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .navbar-lang-btn.active {
            border-color: var(--primary);
            background: var(--primary);
        }

        /* ==================== Sidebar (hidden in new layout) ==================== */
        .sidebar {
            display: none;
        }

        /* Legacy sidebar styles kept for dark-theme compatibility */
        .dark-theme .sidebar {
            width: 260px;
            background: linear-gradient(180deg, #0a0d12 0%, var(--bg-secondary) 100%);
            color: var(--text-primary);
            display: flex;
            flex-direction: column;
            position: fixed;
            height: 100vh;
            z-index: 100;
            border-right: 1px solid var(--border-primary);
        }

        .sidebar-header {
            padding: 20px;
            border-bottom: 1px solid var(--border-primary);
        }

        .sidebar-header h1 {
            font-size: 1.25rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .sidebar-header .logo {
            font-size: 1.5rem;
        }

        .sidebar-header .subtitle {
            font-size: 0.75rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .sidebar-nav {
            flex: 1;
            padding: 15px 0;
            overflow-y: auto;
        }

        .nav-section {
            padding: 10px 20px 5px;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            font-weight: 600;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: 10px 20px;
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s;
        }

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

        .nav-item.active {
            background: var(--accent-primary);
            color: white;
            box-shadow: var(--glow-primary);
        }

        .nav-item .icon {
            width: 24px;
            margin-right: 10px;
            font-size: 1.1rem;
        }

        .nav-item .badge {
            margin-left: auto;
            background: var(--accent-danger);
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.75rem;
            font-weight: 600;
            box-shadow: var(--glow-danger);
        }

        .nav-item.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            pointer-events: none;
        }

        .nav-item .coming-soon {
            margin-left: auto;
            background: var(--bg-tertiary);
            color: var(--text-muted);
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 500;
        }

        /* ==================== Site Selector ==================== */
        .site-selector {
            padding: 12px 20px;
            border-bottom: 1px solid var(--border-primary);
        }

        .site-label {
            display: block;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            font-weight: 600;
            margin-bottom: 8px;
        }

        .site-select {
            width: 100%;
            padding: 10px 12px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            color: var(--text-primary);
            font-size: 0.85rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .site-select:hover {
            border-color: var(--accent-primary);
        }

        .site-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(201, 169, 97, 0.2);
        }

        .site-select option {
            background: var(--bg-secondary);
            color: var(--text-primary);
            padding: 10px;
        }

        /* ==================== Language Selector ==================== */
        .language-selector {
            display: flex;
            justify-content: center;
            gap: 8px;
            padding: 12px 20px;
            border-top: 1px solid var(--border-primary);
        }

        .lang-btn {
            width: 40px;
            height: 40px;
            border: 2px solid var(--border-primary);
            border-radius: 50%;
            background: var(--bg-tertiary);
            cursor: pointer;
            font-size: 1.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .lang-btn:hover {
            border-color: var(--accent-primary);
            transform: scale(1.05);
        }

        .lang-btn.active {
            border-color: var(--accent-primary);
            background: var(--accent-primary);
            box-shadow: var(--glow-primary);
        }

        /* RTL Support - Top Navbar */
        [dir="rtl"] .top-navbar {
            flex-direction: row-reverse;
        }

        [dir="rtl"] .navbar-nav {
            flex-direction: row-reverse;
        }

        [dir="rtl"] .navbar-logo {
            padding-right: 0;
            padding-left: 24px;
            border-right: none;
            border-left: 1px solid var(--border-primary);
            margin-right: 0;
            margin-left: 8px;
        }

        [dir="rtl"] .navbar-right {
            margin-left: 0;
            margin-right: auto;
            flex-direction: row-reverse;
        }

        [dir="rtl"] .navbar-status-badges {
            border-left: none;
            border-right: 1px solid var(--border-primary);
        }

        [dir="rtl"] .dropdown-menu {
            left: auto;
            right: 0;
        }

        /* RTL Support - Legacy Sidebar (dark theme) */
        [dir="rtl"] .dark-theme .sidebar {
            right: 0;
            left: auto;
            border-right: none;
            border-left: 1px solid var(--border-primary);
        }

        /* REMOVED: the RTL mirror of the same dead sidebar offset
         * (margin-right: 260px). It broke the Arabic locale in dark mode
         * exactly as the LTR rule broke the others. */

        [dir="rtl"] .nav-item .icon {
            margin-right: 0;
            margin-left: 10px;
        }

        [dir="rtl"] .nav-item .badge {
            margin-left: 0;
            margin-right: auto;
        }

        .sidebar-footer {
            padding: 15px 20px;
            border-top: 1px solid var(--border-primary);
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--accent-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }

        .user-details .name {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        .user-details .role {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        /* ==================== Main Content ==================== */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        /* REMOVED: `.dark-theme .main-content { margin-left: 260px }`.
         * This offset the page by the width of a sidebar that no longer
         * exists anywhere in src/ (no element carries class="sidebar").
         * Effect was that switching to Dark shifted the whole page 260px
         * right — on a 412px phone that left 152px of usable width, 63% of
         * the screen. The .dark-theme .sidebar rules above are likewise
         * dead, but harmless since no element matches them. */

        /* ==================== Top Header (hidden in new layout, navbar replaces it) ==================== */
        .top-header {
            display: none;
        }

        .dark-theme .top-header {
            height: 60px;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-primary);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 25px;
            position: sticky;
            top: 0;
            z-index: 50;
        }

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

        .header-actions {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .search-box {
            display: flex;
            align-items: center;
            background: var(--bg-tertiary);
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            padding: 8px 12px;
            gap: 8px;
        }

        .search-box input {
            border: none;
            background: transparent;
            outline: none;
            font-size: 0.9rem;
            width: 200px;
            color: var(--text-primary);
        }

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

        .icon-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1px solid var(--border-primary);
            background: var(--bg-tertiary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            position: relative;
            color: var(--text-secondary);
            transition: all 0.2s;
        }

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

        .notification-dot {
            position: absolute;
            top: 8px;
            right: 8px;
            width: 8px;
            height: 8px;
            background: var(--accent-danger);
            border-radius: 50%;
            box-shadow: var(--glow-danger);
        }

        /* ==================== Page Content ==================== */
        .page-content {
            flex: 1;
            padding: 25px;
            overflow-y: auto;
            background: var(--bg-primary);
            position: relative;
        }

        /* Grid pattern overlay only in dark theme */
        .dark-theme .page-content::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image:
                linear-gradient(rgba(48, 54, 61, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(48, 54, 61, 0.03) 1px, transparent 1px);
            background-size: 20px 20px;
            pointer-events: none;
            z-index: 0;
        }

        .dark-theme .page-content > * {
            position: relative;
            z-index: 1;
        }

        /* ==================== Cards — White with subtle shadow ==================== */
        .card {
            background: var(--bg-card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 24px;
            margin-bottom: 20px;
            border: 1px solid var(--border-primary);
            transition: box-shadow 0.2s ease;
        }

        .card:hover {
            box-shadow: var(--shadow-md);
        }

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

        .card-title {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .card-title .card-icon {
            color: var(--primary);
            font-size: 1rem;
        }

        /* ==================== Stat Cards ==================== */
        .stat-cards {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 20px;
        }

        .stat-card {
            background: var(--bg-card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border: 1px solid var(--border-primary);
            transition: box-shadow 0.2s ease;
        }

        .stat-card:hover {
            box-shadow: var(--shadow-md);
        }

        .stat-icon {
            width: 44px;
            height: 44px;
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
        }

        .stat-icon.success { background: #f0fdf4; }
        .stat-icon.warning { background: #fffbeb; }
        .stat-icon.danger { background: #fef2f2; }
        .stat-icon.info { background: var(--bg-tertiary); }

        .stat-content .label {
            font-size: 0.7rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 2px;
        }

        .stat-content .value {
            font-size: 1.875rem;
            font-weight: 700;
            color: var(--text-primary);
            font-family: var(--font-mono);
            line-height: 1.2;
        }

        .stat-content .trend {
            font-size: 0.75rem;
            margin-top: 4px;
            font-family: var(--font-mono);
            font-weight: 500;
        }

        .stat-content .trend.up { color: var(--accent-success); }
        .stat-content .trend.down { color: var(--accent-danger); }

        /* ==================== Grid Layouts ==================== */
        .grid-2 {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

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

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

        /* ==================== Status Badges ==================== */
        .status-badge {
            display: inline-flex;
            align-items: center;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
            gap: 5px;
        }

        .status-badge.normal {
            background: #f0fdf4;
            color: #16a34a;
        }

        .status-badge.warning {
            background: #fffbeb;
            color: #d97706;
        }

        .status-badge.critical {
            background: #fef2f2;
            color: #dc2626;
        }

        .status-badge.offline {
            background: #f8fafc;
            color: var(--text-muted);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .status-dot.normal { background: #22c55e; }
        .status-dot.warning { background: #f59e0b; }
        .status-dot.critical { background: #ef4444; }
        .status-dot.offline { background: var(--text-muted); }

        /* ==================== Tables ==================== */
        .data-table {
            width: 100%;
            border-collapse: collapse;
        }

        .data-table th {
            text-align: left;
            padding: 10px 16px;
            background: transparent;
            font-weight: 600;
            font-size: 0.75rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border-bottom: 1px solid var(--border-primary);
        }

        .data-table td {
            padding: 12px 16px;
            border-bottom: 1px solid var(--border-subtle);
            font-size: 0.875rem;
            color: var(--text-primary);
            font-family: var(--font-mono);
        }

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

        .data-table tr:hover {
            background: var(--bg-tertiary);
        }

        .data-table .well-id {
            font-weight: 600;
            color: var(--accent-primary);
            cursor: pointer;
        }

        .data-table .well-id:hover {
            text-decoration: underline;
        }

        /* ==================== Progress Bars ==================== */
        .progress-bar {
            height: 8px;
            background: var(--bg-tertiary);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-bar .fill {
            height: 100%;
            border-radius: 4px;
        }

        .progress-bar .fill.success { background: var(--accent-success); }
        .progress-bar .fill.warning { background: var(--accent-warning); }
        .progress-bar .fill.danger { background: var(--accent-danger); }

        /* ==================== Buttons ==================== */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 16px;
            border-radius: var(--radius);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            gap: 6px;
            transition: all 0.2s;
        }

        .btn-primary {
            background: var(--primary);
            color: var(--text-primary);
            font-weight: 600;
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            box-shadow: var(--shadow-alkhorayef);
        }

        .btn-secondary {
            background: var(--bg-secondary);
            color: var(--text-primary);
            border: 1px solid var(--border-primary);
        }

        .btn-secondary:hover {
            background: var(--bg-tertiary);
        }

        .btn-ghost {
            background: transparent;
            color: var(--text-secondary);
            border: none;
        }

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

        .btn-success {
            background: var(--accent-success);
            color: white;
        }

        .btn-danger {
            background: var(--accent-danger);
            color: white;
        }

        .btn-sm {
            padding: 5px 10px;
            font-size: 0.8rem;
        }

        .btn-group {
            display: flex;
            gap: 5px;
        }

        .btn-group .btn {
            border-radius: 0;
        }

        .btn-group .btn:first-child {
            border-radius: var(--radius) 0 0 var(--radius);
        }

        .btn-group .btn:last-child {
            border-radius: 0 var(--radius) var(--radius) 0;
        }

        .btn-group .btn.active {
            background: var(--primary);
            color: white;
        }

        /* ==================== Modal ==================== */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .modal-content {
            background: var(--bg-card);
            border-radius: var(--radius);
            box-shadow: var(--shadow-md);
            max-width: 90%;
            max-height: 85vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            border: 1px solid var(--border-primary);
        }

        .modal-content.history-modal {
            width: 800px;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            border-bottom: 1px solid var(--border-primary);
            background: var(--bg-tertiary);
        }

        .modal-header h3 {
            margin: 0;
            font-size: 1.1rem;
            color: var(--text-primary);
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-secondary);
            padding: 0;
            line-height: 1;
        }

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

        .modal-body {
            padding: 20px;
            overflow-y: auto;
            flex: 1;
            background: var(--bg-card);
        }

        .history-table-container {
            overflow-x: auto;
        }

        .history-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }

        .history-table th,
        .history-table td {
            padding: 10px 12px;
            text-align: left;
            border-bottom: 1px solid var(--border-primary);
        }

        .history-table th {
            background: var(--bg-tertiary);
            font-weight: 600;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        .history-table tbody tr:hover {
            background: var(--bg-tertiary);
        }

        .history-table td {
            font-family: var(--font-mono);
            color: var(--text-primary);
        }

        .no-data {
            text-align: center;
            padding: 40px 20px;
            color: var(--text-muted);
        }

        /* ==================== Form Controls ==================== */
        .form-control {
            padding: 8px 12px;
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            font-size: 0.9rem;
            outline: none;
            transition: border-color 0.2s;
            background: var(--bg-tertiary);
            color: var(--text-primary);
        }

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

        .form-control:focus {
            border-color: var(--accent-primary);
            box-shadow: var(--glow-primary);
        }

        /* Select dropdown styling */
        select.form-control {
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            padding-right: 30px;
        }

        /* ==================== Map Placeholder ==================== */
        .map-container {
            height: 300px;
            background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
            border-radius: var(--radius);
            position: relative;
            overflow: hidden;
            border: 1px solid var(--border-primary);
        }

        .map-marker {
            position: absolute;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 3px solid var(--bg-card);
            box-shadow: 0 2px 8px rgba(0,0,0,0.5);
            cursor: pointer;
            transition: transform 0.2s;
        }

        .map-marker:hover {
            transform: scale(1.2);
        }

        .map-marker.normal {
            background: var(--accent-success);
            box-shadow: var(--glow-success);
        }
        .map-marker.warning {
            background: var(--accent-warning);
            box-shadow: var(--glow-warning);
        }
        .map-marker.critical {
            background: var(--accent-danger);
            box-shadow: var(--glow-danger);
            animation: markerPulse 2s infinite;
        }
        .map-marker.offline { background: var(--text-muted); }

        @keyframes markerPulse {
            0% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.5); }
            70% { box-shadow: 0 0 0 15px rgba(248, 81, 73, 0); }
            100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0); }
        }

        .map-marker.hidden {
            display: none;
        }

        .map-marker .marker-label {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            margin-top: 4px;
            font-size: 0.65rem;
            font-weight: 600;
            color: var(--text-secondary);
            white-space: nowrap;
            text-shadow: 0 1px 2px rgba(0,0,0,0.8);
        }

        .map-background {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }

        .map-legend {
            position: absolute;
            bottom: 15px;
            left: 15px;
            background: var(--bg-card);
            padding: 10px 15px;
            border-radius: var(--radius);
            box-shadow: var(--shadow-md);
            display: flex;
            gap: 15px;
            font-size: 0.8rem;
            border: 1px solid var(--border-primary);
            color: var(--text-secondary);
        }

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

        .legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .map-legend-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 0.75rem;
        }

        .map-legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        /* ==================== Alerts List ==================== */
        .alerts-list {
            max-height: 300px;
            overflow-y: auto;
        }

        .alert-item {
            display: flex;
            align-items: flex-start;
            padding: 12px;
            border-bottom: 1px solid var(--border-subtle);
            gap: 12px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .alert-item:hover {
            background: var(--bg-tertiary);
        }

        .alert-item.selected {
            background: var(--primary-pale);
            border-left: 3px solid var(--accent-primary);
        }

        .alert-item.critical {
            border-left: 4px solid var(--accent-danger);
            box-shadow: var(--glow-danger);
        }

        .alert-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            flex-shrink: 0;
        }

        .alert-icon.critical {
            background: rgba(248, 81, 73, 0.15);
        }

        .alert-icon.warning {
            background: rgba(210, 153, 34, 0.15);
        }

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

        .alert-content .title {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .alert-content .description {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }

        .alert-content .meta {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 4px;
        }

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

        .alert-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 2px;
        }

        .alert-time {
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
            font-family: var(--font-mono);
        }

        .clickable-row {
            cursor: pointer;
            transition: background 0.2s;
        }

        .clickable-row:hover {
            background: var(--bg-tertiary);
        }

        /* Alert slide-in animation */
        @keyframes alertSlideIn {
            from {
                opacity: 0;
                transform: translateX(100%);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .alert-item.new {
            animation: alertSlideIn 0.3s ease-out;
        }

        /* ==================== Gauge Component ==================== */
        .gauge-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 15px;
        }

        .gauge {
            position: relative;
            width: 140px;
            height: 70px;
        }

        .gauge svg {
            transform: rotate(-90deg);
        }

        .gauge-bg {
            fill: none;
            stroke: var(--bg-tertiary);
            stroke-width: 12;
        }

        .gauge-fill {
            fill: none;
            stroke-width: 12;
            stroke-linecap: round;
            transition: stroke-dasharray 0.5s ease;
        }

        .gauge-fill.success { stroke: var(--accent-success); }
        .gauge-fill.warning { stroke: var(--accent-warning); }
        .gauge-fill.danger { stroke: var(--accent-danger); }

        .gauge-value {
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-primary);
            font-family: var(--font-mono);
        }

        .gauge-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 10px;
        }

        .gauge-range {
            display: flex;
            justify-content: space-between;
            width: 100%;
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 5px;
            font-family: var(--font-mono);
        }

        /* ==================== Chart Styles ==================== */
        .chart-container {
            height: 200px;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            padding: 15px;
            position: relative;
        }

        .chart-legend {
            display: flex;
            gap: 20px;
            margin-top: 15px;
            justify-content: flex-end;
            color: var(--text-secondary);
        }

        .legend-box {
            width: 12px;
            height: 12px;
            border-radius: 2px;
            display: inline-block;
            margin-right: 5px;
        }

        .trend-line-chart {
            height: 180px;
            display: flex;
            align-items: flex-end;
            gap: 2px;
            padding: 0 10px;
        }

        .trend-bar {
            flex: 1;
            background: var(--accent-primary);
            border-radius: 2px 2px 0 0;
            min-height: 4px;
            opacity: 0.8;
        }

        .trend-bar:hover {
            opacity: 1;
        }

        /* ==================== Diagnostics ==================== */
        .diagnostic-item {
            display: flex;
            align-items: center;
            padding: 12px;
            border-bottom: 1px solid var(--border-subtle);
            gap: 12px;
        }

        .diagnostic-icon {
            font-size: 1.2rem;
        }

        .diagnostic-content {
            flex: 1;
        }

        .diagnostic-content .name {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        .diagnostic-content .description {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .diagnostic-status {
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .diagnostic-status.success {
            background: rgba(63, 185, 80, 0.15);
            color: var(--accent-success);
        }

        .diagnostic-status.warning {
            background: rgba(210, 153, 34, 0.15);
            color: var(--accent-warning);
        }

        .diagnostic-status.danger {
            background: rgba(248, 81, 73, 0.15);
            color: var(--accent-danger);
        }

        /* ==================== Filter Bar ==================== */
        .filter-bar {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: var(--bg-card);
            border-radius: var(--radius);
            margin-bottom: 20px;
            flex-wrap: wrap;
            border: 1px solid var(--border-primary);
        }

        .filter-bar label {
            font-size: 0.85rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .filter-bar .form-control {
            min-width: 150px;
        }

        /* ==================== Tab Navigation ==================== */
        .tabs {
            display: flex;
            border-bottom: 1px solid var(--border-primary);
            margin-bottom: 20px;
        }

        .tab {
            padding: 12px 20px;
            cursor: pointer;
            font-weight: 500;
            color: var(--text-secondary);
            border-bottom: 2px solid transparent;
            transition: all 0.2s;
        }

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

        .tab.active {
            color: var(--accent-primary);
            border-bottom-color: var(--accent-primary);
        }

        /* ==================== Executive Dashboard ==================== */
        .exec-kpis {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 25px;
        }

        .exec-kpi {
            background: var(--bg-card);
            border-radius: var(--radius);
            padding: 25px;
            text-align: center;
            box-shadow: var(--shadow);
            border-top: 4px solid;
            border-left: 1px solid var(--border-primary);
            border-right: 1px solid var(--border-primary);
            border-bottom: 1px solid var(--border-primary);
        }

        .exec-kpi.production { border-top-color: var(--accent-success); }
        .exec-kpi.uptime { border-top-color: var(--accent-info); }
        .exec-kpi.mtbf { border-top-color: var(--accent-warning); }
        .exec-kpi.alerts { border-top-color: var(--accent-danger); }

        .exec-kpi .kpi-icon {
            font-size: 2rem;
            margin-bottom: 10px;
        }

        .exec-kpi .kpi-value {
            font-size: 2.5rem;
            font-weight: 700;
            color: var(--text-primary);
            font-family: var(--font-mono);
        }

        .exec-kpi .kpi-label {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-top: 5px;
        }

        .exec-kpi .kpi-trend {
            font-size: 0.85rem;
            margin-top: 10px;
            font-weight: 600;
            font-family: var(--font-mono);
        }

        .exec-kpi .kpi-trend.up { color: var(--accent-success); }
        .exec-kpi .kpi-trend.down { color: var(--accent-danger); }

        /* ==================== Donut Chart ==================== */
        .donut-chart {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            position: relative;
        }

        .donut-chart svg {
            width: 180px;
            height: 180px;
        }

        .donut-chart .center-text {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
        }

        .donut-chart .center-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--text-primary);
            font-family: var(--font-mono);
        }

        .donut-chart .center-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .donut-legend {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
            margin-top: 20px;
        }

        .donut-legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .donut-legend-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }

        /* ==================== Risk Matrix ==================== */
        .risk-matrix {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            padding: 20px;
        }

        .risk-cell {
            height: 80px;
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            font-weight: 700;
            color: white;
            font-family: var(--font-mono);
        }

        .risk-cell.low { background: var(--accent-success); }
        .risk-cell.medium { background: #2ea043; }
        .risk-cell.high { background: var(--accent-warning); }
        .risk-cell.critical { background: var(--accent-danger); }

        .risk-labels {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            padding: 0 20px;
            text-align: center;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        /* ==================== Production Bars ==================== */
        .production-bars {
            display: flex;
            align-items: flex-end;
            gap: 20px;
            height: 200px;
            padding: 20px;
        }

        .bar-group {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .bar-wrapper {
            display: flex;
            align-items: flex-end;
            gap: 4px;
            height: 160px;
        }

        .bar {
            width: 20px;
            border-radius: 4px 4px 0 0;
        }

        .bar.target {
            background: var(--bg-tertiary);
        }

        .bar.actual {
            background: var(--accent-success);
        }

        .bar-label {
            margin-top: 8px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        /* ==================== Issues List ==================== */
        .issues-list {
            padding: 15px;
        }

        /* ==================== Anomalies List ==================== */
        .anomaly-item {
            display: flex;
            align-items: flex-start;
            padding: 15px;
            border-bottom: 1px solid var(--border-subtle);
            gap: 12px;
        }

        .anomaly-marker {
            width: 4px;
            height: 100%;
            min-height: 40px;
            border-radius: 2px;
        }

        .anomaly-marker.high { background: var(--accent-danger); }
        .anomaly-marker.medium { background: var(--accent-warning); }
        .anomaly-marker.low { background: var(--accent-info); }

        .anomaly-content {
            flex: 1;
        }

        .anomaly-content .title {
            font-weight: 600;
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        .anomaly-content .details {
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .anomaly-badge {
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 600;
        }

        .anomaly-badge.high {
            background: rgba(248, 81, 73, 0.15);
            color: var(--accent-danger);
        }

        .anomaly-badge.medium {
            background: rgba(210, 153, 34, 0.15);
            color: var(--accent-warning);
        }

        /* ==================== Prediction Cards ==================== */
        .prediction-card {
            background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
            color: var(--text-primary);
            border-radius: var(--radius);
            padding: 20px;
            margin-bottom: 15px;
            border: 1px solid var(--border-primary);
        }

        .prediction-card .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .prediction-card .well-name {
            font-weight: 600;
            font-size: 1rem;
        }

        .prediction-card .probability {
            font-size: 0.8rem;
            padding: 4px 10px;
            border-radius: 4px;
        }

        .prediction-card .probability.high {
            background: rgba(229, 62, 62, 0.3);
            color: #feb2b2;
        }

        .prediction-card .probability.medium {
            background: rgba(214, 158, 46, 0.3);
            color: #faf089;
        }

        .prediction-card .prediction-details {
            display: flex;
            gap: 20px;
            font-size: 0.85rem;
        }

        .prediction-card .detail-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .prediction-card .detail-label {
            color: var(--text-secondary);
            font-size: 0.75rem;
        }

        .prediction-card .detail-value {
            font-weight: 600;
            font-family: var(--font-mono);
        }

        /* ==================== Param Chips ==================== */
        .param-chips {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }

        .param-chip {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 0.85rem;
            cursor: pointer;
            border: 1px solid var(--border-primary);
            background: var(--bg-card);
            color: var(--text-secondary);
            transition: all 0.2s;
        }

        .param-chip:hover {
            border-color: var(--accent-primary);
            color: var(--text-primary);
        }

        .param-chip.active {
            background: var(--accent-primary);
            color: white;
            border-color: var(--accent-primary);
        }

        /* ==================== Equipment Info ==================== */
        .equipment-card {
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            padding: 15px;
            margin-bottom: 10px;
        }

        .equipment-card .header {
            font-weight: 600;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--text-primary);
        }

        .equipment-card .specs {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            font-size: 0.85rem;
        }

        .equipment-card .spec-item {
            display: flex;
            justify-content: space-between;
        }

        .equipment-card .spec-label {
            color: var(--text-secondary);
        }

        .equipment-card .spec-value {
            font-weight: 500;
            color: var(--text-primary);
            font-family: var(--font-mono);
        }

        /* ==================== Loading Spinner ==================== */
        .loading-spinner {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            background: var(--bg-primary);
        }

        .loading-spinner::after {
            content: '';
            width: 48px;
            height: 48px;
            border: 4px solid var(--bg-tertiary);
            border-top-color: var(--accent-primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        /* ==================== Reports Page ==================== */
        .page-reports {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .report-type-cards {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        .report-type-card {
            background: var(--bg-card);
            border: 2px solid var(--border-primary);
            border-radius: var(--radius);
            padding: 20px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .report-type-card:hover {
            border-color: var(--accent-primary);
            box-shadow: var(--shadow-md);
        }

        .report-type-card.selected {
            border-color: var(--accent-primary);
            background: var(--primary-pale);
        }

        .report-type-card .report-icon {
            font-size: 2rem;
        }

        .report-type-card .report-title {
            font-weight: 600;
            font-size: 0.95rem;
            color: var(--text-primary);
        }

        .report-type-card .report-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .report-type-card .check-icon {
            margin-left: auto;
            color: var(--accent-primary);
            font-size: 1.2rem;
        }

        .report-config-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 20px;
        }

        .form-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

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

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

        .export-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .export-btn {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 15px;
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            background: var(--bg-card);
            cursor: pointer;
            transition: all 0.2s;
            color: var(--text-primary);
        }

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

        .export-btn .export-icon {
            font-size: 1.5rem;
        }

        .export-btn .export-title {
            font-weight: 600;
        }

        .export-btn .export-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .report-preview {
            margin-top: 20px;
        }

        .preview-content {
            padding: 20px;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
        }

        .preview-header {
            margin-bottom: 20px;
        }

        .preview-header h4 {
            margin-bottom: 5px;
            color: var(--text-primary);
        }

        .preview-date {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .format-badge {
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            background: var(--bg-secondary);
            color: var(--text-secondary);
        }

        .grid-2-1 {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

        /* ==================== Settings Page ==================== */
        .page-settings {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .settings-tabs {
            display: flex;
            gap: 10px;
            background: var(--bg-card);
            padding: 10px;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            border: 1px solid var(--border-primary);
        }

        .settings-tab {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            border: none;
            background: transparent;
            border-radius: var(--radius);
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            color: var(--text-secondary);
            transition: all 0.2s;
        }

        .settings-tab:hover {
            background: var(--bg-tertiary);
        }

        .settings-tab.active {
            background: var(--accent-primary);
            color: white;
        }

        .settings-tab .tab-icon {
            font-size: 1.1rem;
        }

        .settings-section {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .settings-section h4 {
            font-size: 0.9rem;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 5px;
        }

        .setting-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 0;
            border-bottom: 1px solid var(--border-subtle);
        }

        .setting-row:last-child {
            border-bottom: none;
        }

        .setting-info .setting-label {
            font-weight: 500;
            margin-bottom: 2px;
            color: var(--text-primary);
        }

        .setting-info .setting-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .setting-control {
            min-width: 200px;
        }

        .toggle-group {
            display: flex;
            border: 1px solid var(--border-primary);
            border-radius: var(--radius);
            overflow: hidden;
        }

        .toggle-btn {
            padding: 8px 16px;
            border: none;
            background: var(--bg-card);
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
            color: var(--text-secondary);
        }

        .toggle-btn.active {
            background: var(--accent-primary);
            color: white;
        }

        .threshold-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        .threshold-card {
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            padding: 20px;
        }

        .threshold-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }

        .threshold-icon {
            font-size: 1.5rem;
        }

        .threshold-label {
            font-weight: 600;
            color: var(--text-primary);
        }

        .threshold-inputs {
            display: flex;
            gap: 15px;
        }

        .threshold-input {
            flex: 1;
        }

        .threshold-input label {
            display: block;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-bottom: 5px;
        }

        .input-with-unit {
            display: flex;
            align-items: center;
        }

        .input-with-unit input {
            border-radius: var(--radius) 0 0 var(--radius);
            border-right: none;
        }

        .input-with-unit .unit {
            padding: 8px 12px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-primary);
            border-radius: 0 var(--radius) var(--radius) 0;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .profile-section {
            display: flex;
            gap: 30px;
        }

        .profile-avatar {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .avatar-large {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: var(--accent-primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            font-weight: 600;
        }

        .profile-form {
            flex: 1;
        }

        .notification-prefs {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .checkbox-row {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            color: var(--text-primary);
        }

        .checkbox-row input {
            width: 18px;
            height: 18px;
        }

        .operating-ranges {
            background: var(--bg-tertiary);
            border-radius: var(--radius);
            padding: 15px;
        }

        .range-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid var(--border-subtle);
            color: var(--text-primary);
        }

        .range-row:last-child {
            border-bottom: none;
        }

        /* ==================== Help Page ==================== */
        .page-help {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .help-quick-actions {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-bottom: 20px;
        }

        .quick-action-card {
            background: var(--bg-card);
            border-radius: var(--radius);
            padding: 25px;
            text-align: center;
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid var(--border-primary);
        }

        .quick-action-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
            border-color: var(--accent-primary);
        }

        .quick-action-card .action-icon {
            font-size: 2.5rem;
            display: block;
            margin-bottom: 15px;
        }

        .quick-action-card .action-title {
            font-weight: 600;
            font-size: 1rem;
            margin-bottom: 5px;
            color: var(--text-primary);
        }

        .quick-action-card .action-desc {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .faq-list {
            display: flex;
            flex-direction: column;
        }

        .faq-item {
            border-bottom: 1px solid var(--border-subtle);
        }

        .faq-item:last-child {
            border-bottom: none;
        }

        .faq-question {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 15px 0;
            background: none;
            border: none;
            text-align: left;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            color: var(--text-primary);
        }

        .faq-question:hover {
            color: var(--accent-primary);
        }

        .faq-icon {
            color: var(--text-muted);
            font-size: 0.8rem;
        }

        .faq-answer {
            padding: 0 0 15px 25px;
            font-size: 0.9rem;
            color: var(--text-secondary);
            line-height: 1.6;
        }

        .reference-cards {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .reference-card {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
        }

        .reference-card .ref-icon {
            font-size: 1.5rem;
        }

        .reference-card .ref-title {
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 3px;
        }

        .reference-card .ref-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .doc-links {
            display: flex;
            flex-direction: column;
        }

        .doc-link {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            text-decoration: none;
            color: inherit;
            border-bottom: 1px solid var(--border-subtle);
            transition: background 0.2s;
        }

        .doc-link:hover {
            background: var(--bg-tertiary);
        }

        .doc-link:last-child {
            border-bottom: none;
        }

        .doc-link .doc-icon {
            font-size: 1.5rem;
        }

        .doc-link .doc-info {
            flex: 1;
        }

        .doc-link .doc-title {
            font-weight: 500;
            margin-bottom: 2px;
            color: var(--text-primary);
        }

        .doc-link .doc-desc {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .doc-link .doc-arrow {
            color: var(--text-muted);
            font-size: 1.2rem;
        }

        .contact-section {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .contact-methods {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .contact-method {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 12px;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
        }

        .contact-method .contact-icon {
            font-size: 1.3rem;
        }

        .contact-method .contact-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .contact-method .contact-value {
            font-weight: 500;
            color: var(--text-primary);
        }

        .support-form h4 {
            margin-bottom: 15px;
            color: var(--text-primary);
        }

        .support-form textarea {
            resize: vertical;
            min-height: 80px;
        }

        /* ==================== Responsive ==================== */
        @media (max-width: 1400px) {
            .stat-cards { grid-template-columns: repeat(2, 1fr); }
            .exec-kpis { grid-template-columns: repeat(2, 1fr); }
        }

        @media (max-width: 1024px) {
            .sidebar {
                transform: translateX(-100%);
                transition: transform 0.3s;
            }

            .sidebar.open {
                transform: translateX(0);
            }

            .main-content {
                margin-left: 0;
            }

            .grid-2, .grid-3 {
                grid-template-columns: 1fr;
            }
        }


        /* ==================== Health Gauge Component ==================== */
        .health-gauge-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 15px;
            background: var(--bg-tertiary);
            border-radius: var(--radius);
        }

        .health-gauge-svg {
            display: block;
        }

        .health-gauge-track {
            opacity: 0.3;
        }

        .health-gauge-progress {
            transition: stroke-dashoffset 0.6s ease-out, stroke 0.3s ease;
        }

        .health-gauge-value {
            font-size: 1.5rem;
            font-weight: 700;
            fill: var(--text-primary);
            font-family: var(--font-mono);
        }

        .health-gauge-label {
            margin-top: 10px;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--text-secondary);
            text-align: center;
        }

        .health-gauge-status {
            margin-top: 6px;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .health-gauge-status.success {
            background: rgba(63, 185, 80, 0.15);
            color: var(--accent-success);
            box-shadow: var(--glow-success);
        }

        .health-gauge-status.warning {
            background: rgba(210, 153, 34, 0.15);
            color: var(--accent-warning);
            box-shadow: var(--glow-warning);
        }

        .health-gauge-status.danger {
            background: rgba(248, 81, 73, 0.15);
            color: var(--accent-danger);
            box-shadow: var(--glow-danger);
        }

        /* Compact variant for tables and lists */
        .health-gauge-compact {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .health-gauge-compact svg circle {
            transition: stroke-dashoffset 0.5s ease-out, stroke 0.3s ease;
        }

        .health-gauge-value-compact {
            font-size: 0.75rem;
            font-weight: 700;
            fill: var(--text-primary);
            font-family: var(--font-mono);
        }

        .health-gauge-compact-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        /* Mini variant for cards and inline use */
        .health-gauge-mini {
            display: inline-block;
            vertical-align: middle;
        }

        .health-gauge-mini circle {
            transition: stroke-dashoffset 0.4s ease-out, stroke 0.3s ease;
        }

        /* Dark theme support for gauge */
        .card .health-gauge-container,
        .prediction-card .health-gauge-container {
            background: var(--bg-secondary);
        }

        .prediction-card .health-gauge-value {
            fill: var(--text-primary);
        }

        .prediction-card .health-gauge-label {
            color: var(--text-secondary);
        }

        .prediction-card .health-gauge-track {
            stroke: rgba(255, 255, 255, 0.1);
        }

        /* Grid layout for multiple gauges */
        .health-gauges-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 15px;
        }

        /* Animation keyframes for gauge pulse effect on critical values */
        @keyframes gauge-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .health-gauge-status.danger {
            animation: gauge-pulse 2s ease-in-out infinite;
        }

        /* Responsive adjustments for health gauge */
        @media (max-width: 768px) {
            .health-gauge-container {
                padding: 10px;
            }

            .health-gauge-value {
                font-size: 1.2rem;
            }

            .health-gauge-label {
                font-size: 0.75rem;
            }
        }

        @media (max-width: 768px) {
            .stat-cards { grid-template-columns: 1fr; }
            .exec-kpis { grid-template-columns: 1fr; }
            .filter-bar { flex-direction: column; align-items: stretch; }
        }

        /* ==================== Navbar Responsive ==================== */
        @media (max-width: 1024px) {
            .navbar-status-badges {
                display: none;
            }
            .navbar-brand-row {
                padding: 0 16px;
            }
            .navbar-nav-row {
                padding: 0 16px;
            }
        }

        @media (max-width: 768px) {
            .navbar-brand-row {
                padding: 0 12px;
                height: 48px;
            }
            .navbar-nav-row {
                overflow-x: auto;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
                padding: 0 12px;
            }
            .navbar-nav-row::-webkit-scrollbar {
                display: none;
            }
            .navbar-nav {
                gap: 4px;
            }
            .navbar-item {
                padding: 6px 12px;
                font-size: 0.75rem;
            }
            .navbar-site-select,
            .navbar-well-select {
                max-width: 100px;
                font-size: 0.75rem;
            }
            .page-content {
                padding: 16px;
            }
        }

