/**
 * AQUALINE - Industrial Monitoring System
 * Premium Dark Theme CSS
 */

/* ========================================
   CSS Variables & Design Tokens
   ======================================== */
/* ========================================
   CSS Variables & Design Tokens
   ======================================== */
:root {
    /* Shared Constants */
    --accent-primary: #3b82f6;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #06b6d4);

    --status-online: #10b981;
    --status-offline: #6b7280;
    --status-maintenance: #f59e0b;
    --status-error: #ef4444;
    --status-critical: #dc2626;

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

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Dark Theme (Default) */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.96);
    --bg-glass: rgba(30, 41, 59, 0.86);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-color: rgba(148, 163, 184, 0.22);
    --border-hover: rgba(148, 163, 184, 0.4);

    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.8);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: #cbd5e1;
    --border-hover: #94a3b8;

    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.2);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

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

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 16px 12px 8px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

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

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

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-plant {
    font-size: 0.9rem;
    padding-left: 24px;
}

.nav-empty {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 8px 16px;
    font-style: italic;
}

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-left: auto;
}

.badge-danger {
    background: var(--status-error);
    color: white;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem;
}

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

.logout-btn {
    padding: 8px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.logout-btn:hover {
    background: var(--status-error);
    color: white;
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

.header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--status-offline);
    animation: pulse 2s infinite;
}

.connection-status.connected .status-dot {
    background: var(--status-online);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

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

.content-wrapper {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

/* ========================================
   Dashboard Grid
   ======================================== */
.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card.alert-critical {
    border-color: var(--status-error);
    background: rgba(239, 68, 68, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.plants-icon {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
}

.section-icon {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-secondary);
}

.sensors-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status-online);
}

.alerts-icon {
    background: rgba(239, 68, 68, 0.2);
    color: var(--status-error);
}

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

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

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

.stat-breakdown {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.stat-breakdown span {
    font-size: 0.75rem;
}

.status-online {
    color: var(--status-online);
}

.status-offline {
    color: var(--status-offline);
}

.status-critical {
    color: var(--status-critical);
}

/* ========================================
   Dashboard Sections
   ======================================== */
.dashboard-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
}

.dashboard-section.full-width {
    grid-column: 1 / -1;
}

.complete-line-monitor-embed {
    grid-column: 1 / -1;
    min-width: 0;
}

.plant-monitor-page {
    --sidebar-width: 390px;
}

.sidebar-monitor-controls {
    margin: 0 0 12px;
}

.sidebar-monitor-controls-frame {
    display: block;
    width: 100%;
    height: 980px;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
}

.plant-monitor-shell {
    display: block;
}

.complete-line-monitor-frame,
.complete-line-monitor-controls-frame,
.complete-line-monitor-main-frame {
    display: block;
    width: 100%;
    height: 980px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
}

.complete-line-monitor-controls-frame {
    height: 980px;
}

.complete-line-monitor-main-frame {
    min-width: 0;
}

.plant-evaluation-page .main-content {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.plant-evaluation-page .content-wrapper {
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.plant-evaluation-shell,
.plant-evaluation-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.plant-evaluation-frame {
    border: 0;
    background: var(--bg-primary);
}

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

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.section-link {
    font-size: 0.85rem;
    color: var(--accent-primary);
    transition: color var(--transition-fast);
}

.section-link:hover {
    color: var(--accent-secondary);
}

/* ========================================
   Section Grid
   ======================================== */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.sensor-card-wrap {
    position: relative;
    cursor: pointer;
}

.section-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition-normal);
    display: block;
}

/* Visibility button — hidden by default, shown in customize mode */
.vis-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.vis-btn svg {
    width: 14px;
    height: 14px;
    pointer-events: none;
    flex-shrink: 0;
}

.vis-btn:hover {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--accent-primary);
}

.vis-btn.is-visible {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
}

/* Hidden sensors — not shown by default */
.sensor-hidden {
    display: none;
}

/* Show All mode — reveal hidden sensors with faded look */
.show-all .sensor-hidden {
    display: block;
    opacity: 0.4;
}

/* Customize mode — show vis buttons, reveal all cards, enable drag cursor */
.customize-mode .vis-btn {
    display: flex;
}

.customize-mode .sensor-hidden {
    display: block;
    opacity: 0.45;
}

.customize-mode .sensor-card-wrap {
    cursor: grab;
}

.customize-mode .sensor-card-wrap:active {
    cursor: grabbing;
}

/* SortableJS drag feedback */
.sortable-ghost {
    opacity: 0.3;
}

.sortable-drag {
    box-shadow: var(--shadow-lg);
}

/* Section header actions (Show All + Customize buttons) */
.section-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Customize / Show All toggle button */
.customize-toggle {
    padding: 5px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all 0.15s;
}

.customize-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.customize-toggle.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* Hidden count badge (legacy, kept for compat) */
.hidden-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    padding: 0 6px;
    margin-left: 8px;
    vertical-align: middle;
}

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

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

.section-type {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--status-offline);
}

.section-card.status-online .status-indicator {
    background: var(--status-online);
}

.section-card.status-offline .status-indicator {
    background: var(--status-offline);
}

.section-card.status-maintenance .status-indicator {
    background: var(--status-maintenance);
}

.section-card.status-error .status-indicator {
    background: var(--status-error);
    animation: pulse-error 1s infinite;
}

@keyframes pulse-error {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.section-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-plant {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.section-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.section-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.section-lastseen {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.section-sensors-list {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-sensor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 4px 0;
}

.section-sensor-item.sensor-alert {
    color: var(--status-error);
}

.sensor-name-small {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.sensor-value-small {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.section-sensor-item.sensor-alert .sensor-value-small {
    color: var(--status-error);
}

/* ========================================
   Plant Line Overview
   ======================================== */
.plant-line-overview {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.plant-line-heading {
    margin-bottom: 0;
}

.plant-line-subtitle {
    color: var(--text-secondary);
    font-size: 0.86rem;
    margin-top: 3px;
}

.plant-line-flow {
    display: flex;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

.plant-line-unit {
    min-width: 210px;
    max-width: 260px;
    flex: 1 0 210px;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--status-offline);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    overflow: hidden;
}

.plant-line-unit.status-online {
    border-left-color: var(--status-online);
}

.plant-line-unit.status-maintenance {
    border-left-color: var(--status-maintenance);
}

.plant-line-unit.status-error {
    border-left-color: var(--status-error);
}

.plant-line-unit-main {
    display: grid;
    gap: 5px;
    padding: 13px 14px 11px;
    border-bottom: 1px solid var(--border-color);
}

.plant-line-unit-main:hover .plant-line-name {
    color: var(--accent-secondary);
}

.plant-line-type {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.plant-line-name {
    color: var(--text-primary);
    font-size: 0.98rem;
    line-height: 1.25;
    transition: color var(--transition-fast);
}

.plant-line-unit-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.74rem;
}

.plant-line-status-text {
    color: var(--text-secondary);
    font-weight: 600;
}

.plant-line-sensors {
    display: grid;
    gap: 1px;
    padding: 8px;
}

.plant-line-sensor {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 30px;
    border-radius: var(--radius-sm);
    padding: 5px 7px;
    color: var(--text-secondary);
    font-size: 0.76rem;
}

.plant-line-sensor:not(.empty):hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

.plant-line-sensor.is-alert {
    color: var(--status-error);
    background: rgba(239, 68, 68, 0.08);
}

.plant-line-sensor.is-offline {
    color: var(--text-muted);
}

.plant-line-sensor.empty {
    justify-content: center;
    color: var(--text-muted);
}

.plant-line-sensor-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plant-line-sensor-value {
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

.plant-line-sensor.is-offline .plant-line-sensor-value,
.plant-line-sensor.empty .plant-line-sensor-value {
    color: var(--text-muted);
}

.plant-line-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    color: var(--accent-secondary);
    opacity: 0.75;
}

.plant-line-arrow svg {
    width: 44px;
    height: 20px;
}

.plant-performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.plant-performance-card {
    display: grid;
    gap: 4px;
    min-height: 104px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(6, 182, 212, 0.04));
    padding: 14px;
}

.plant-performance-card.state-offline {
    background: rgba(107, 114, 128, 0.1);
}

.plant-performance-card.state-empty {
    background: var(--bg-tertiary);
}

.plant-performance-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.plant-performance-value {
    color: var(--text-primary);
    font-size: 1.45rem;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.plant-performance-value small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.plant-performance-note {
    align-self: end;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

/* ========================================
   Alerts List
   ======================================== */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alerts-list.full {
    max-height: none;
}

.alert-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid transparent;
}

.alert-item.severity-info {
    border-left-color: var(--accent-primary);
}

.alert-item.severity-warning {
    border-left-color: var(--status-maintenance);
}

.alert-item.severity-critical {
    border-left-color: var(--status-error);
}

.alert-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.severity-info .alert-indicator {
    background: var(--accent-primary);
}

.severity-warning .alert-indicator {
    background: var(--status-maintenance);
}

.severity-critical .alert-indicator {
    background: var(--status-error);
    animation: pulse-error 1s infinite;
}

.alert-content {
    flex: 1;
}

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

.alert-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.alert-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.alert-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.alert-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.alert-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.severity-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.severity-info .severity-badge {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
}

.severity-warning .severity-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--status-maintenance);
}

.severity-critical .severity-badge {
    background: rgba(239, 68, 68, 0.2);
    color: var(--status-error);
}

/* ========================================
   Home — Plants Grid
   ======================================== */
.plants-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.plant-home-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.plant-home-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.plant-home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plant-home-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.plant-home-icon svg {
    width: 20px;
    height: 20px;
}

.plant-home-status {
    font-size: 0.73rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.plant-home-status.status-good {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-online);
}

.plant-home-status.status-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-maintenance);
}

.plant-home-status.status-bad {
    background: rgba(239, 68, 68, 0.15);
    color: var(--status-error);
}

.plant-home-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.plant-home-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin: 0;
}

.plant-home-location svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.plant-home-meta {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.plant-home-bar {
    margin-top: 2px;
}

.bar-track {
    height: 5px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill-animated {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

.plant-home-footer {
    font-size: 0.82rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-top: 4px;
}

/* ========================================
   Plants Grid (legacy dashboard overview)
   ======================================== */
.plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.plant-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition-normal);
    display: block;
}

.plant-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

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

.plant-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.plant-status {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.plant-status.status-good {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status-online);
}

.plant-status.status-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--status-maintenance);
}

.plant-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.plant-location svg {
    width: 14px;
    height: 14px;
}

.plant-section-bar {
    height: 4px;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state.small {
    padding: 24px;
}

.empty-state.small svg {
    width: 32px;
    height: 32px;
}

.empty-state p {
    font-weight: 500;
    margin-bottom: 4px;
}

.empty-state span {
    font-size: 0.85rem;
}

/* ========================================
   Login Page
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-messages {
    margin-bottom: 8px;
}

.message {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.message-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

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

.form-group input {
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    margin-top: 8px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.login-button svg {
    width: 18px;
    height: 18px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-background {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    /* Allow clicks to pass through */
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83zM32 0l12.142 12.142-1.414 1.414L30 .828 17.272 13.556l-1.414-1.414L28 0h4zM.284 0l28 28-1.414 1.414L0 2.544v-2.26zM0 5.373l25.456 25.455-1.414 1.415L0 8.2V5.374zm0 5.656l22.627 22.627-1.414 1.414L0 13.86v-2.83zm0 5.656l19.8 19.8-1.415 1.413L0 19.514v-2.83zm0 5.657l16.97 16.97-1.414 1.415L0 25.172v-2.83zM0 28l14.142 14.142-1.414 1.414L0 30.828V28z' fill='%23ffffff' fill-opacity='1' fill-rule='evenodd'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* ========================================
   Info Cards (Section Detail)
   ======================================== */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.info-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

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

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

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-online {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status-online);
}

.status-badge.status-offline {
    background: rgba(107, 114, 128, 0.2);
    color: var(--status-offline);
}

.status-badge.status-maintenance {
    background: rgba(245, 158, 11, 0.2);
    color: var(--status-maintenance);
}

.status-badge.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--status-error);
}

/* ========================================
   Sensors Grid
   ======================================== */
.sensors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sensor-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition-normal);
}

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

.sensor-card.alert {
    border-color: var(--status-error);
    background: rgba(239, 68, 68, 0.05);
}

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

.sensor-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-secondary);
}

.alert-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--status-error);
    color: white;
    animation: pulse 1s infinite;
}

.sensor-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.sensor-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.sensor-value .value {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.sensor-value .unit {
    font-size: 1rem;
    color: var(--text-secondary);
}

.sensor-range {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.sensor-chart {
    height: 60px;
    margin: 12px 0;
}

.sensor-updated {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================
   Alerts Page
   ======================================== */
.alerts-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.alerts-filter {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

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

/* ========================================
   Analysis Page
   ======================================== */
.analysis-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.analysis-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    align-items: flex-end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.control-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-select {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

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

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    height: 400px;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    text-align: center;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: none;
    padding: 8px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    background: var(--bg-tertiary);
    transition: all var(--transition-fast);
    margin-right: 12px;
}

.mobile-menu-toggle:hover {
    background: var(--accent-primary);
    color: white;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.mobile-overlay.active {
    opacity: 1;
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 220px;
    }

    .content-wrapper {
        padding: 20px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .plant-monitor-shell {
        grid-template-columns: 1fr;
    }

    .complete-line-monitor-controls-frame,
    .complete-line-monitor-main-frame {
        height: 820px;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Show overlay when menu is open */
    .mobile-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-overlay.active {
        pointer-events: auto;
    }

    /* Hide sidebar by default, show when .open */
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        z-index: 100;
        width: 280px;
    }

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

    /* Main content takes full width */
    .main-content {
        margin-left: 0;
    }

    /* Header adjustments */
    .main-header {
        padding: 0 16px;
        height: 60px;
    }

    .header-left {
        flex: 1;
        min-width: 0;
    }

    .page-title {
        font-size: 1.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .page-subtitle {
        font-size: 0.75rem;
        display: none;
    }

    .header-time {
        display: none;
    }

    .connection-status {
        padding: 4px 8px;
    }

    .status-text {
        display: none;
    }

    /* Content padding */
    .content-wrapper {
        padding: 16px;
    }

    .plant-evaluation-page .content-wrapper {
        padding: 0;
    }

    /* Stats grid - 2 columns on mobile */
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .stat-breakdown {
        margin-left: 0;
        align-items: center;
        flex-direction: row;
        gap: 8px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Section grid - single column */
    .section-grid {
        grid-template-columns: 1fr;
    }

    .plant-line-flow {
        flex-direction: column;
        overflow-x: visible;
        padding-right: 0;
    }

    .plant-line-unit {
        max-width: none;
        min-width: 0;
        width: 100%;
    }

    .plant-line-arrow {
        width: 100%;
        min-width: 0;
        height: 24px;
        transform: rotate(90deg);
    }

    /* Plants grid - single column */
    .plants-grid {
        grid-template-columns: 1fr;
    }

    /* Sensors grid - single column */
    .sensors-grid {
        grid-template-columns: 1fr;
    }

    /* Alerts filter - scrollable */
    .alerts-filter {
        overflow-x: auto;
        padding: 12px;
        gap: 6px;
    }

    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Analysis controls - stack vertically */
    .analysis-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        min-width: 100%;
    }

    /* Info grid - single column */
    .info-grid {
        grid-template-columns: 1fr;
    }

    /* Section header - stack on mobile */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Dashboard sections */
    .dashboard-section {
        padding: 16px;
    }

    .section-title {
        font-size: 1rem;
    }

    /* Login page adjustments */
    .login-card {
        padding: 24px 20px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    /* Prevent body scroll when mobile menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    /* Single column stats on very small screens */
    .stats-row {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: row;
        text-align: left;
    }

    .stat-breakdown {
        flex-direction: column;
        align-items: flex-end;
    }

    /* Smaller padding */
    .content-wrapper {
        padding: 12px;
    }

    .section-card,
    .sensor-card,
    .plant-card {
        padding: 16px;
    }

    /* Alert items - tighter */
    .alert-item {
        padding: 12px;
        gap: 12px;
    }

    .alert-header {
        flex-direction: column;
        gap: 4px;
    }

    .alert-meta {
        flex-wrap: wrap;
    }

    /* Sensor value smaller */
    .sensor-value .value {
        font-size: 1.5rem;
    }

    /* Nav items - larger touch targets */
    .nav-item {
        padding: 14px 16px;
    }
}

/* ========================================
   Export Select
   ======================================== */
.export-select {
    padding: 6px 28px 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-family: var(--font-family);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color var(--transition-fast);
}

.export-select:hover {
    border-color: var(--border-hover);
}

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

.export-date-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.export-date-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    min-width: 320px;
}

.export-date-input {
    display: block;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: var(--font-family);
    width: 100%;
}

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

.export-date-btn {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.85rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.export-date-btn:hover {
    opacity: 0.85;
}

.export-date-btn.cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.export-date-btn.confirm {
    background: var(--accent-primary);
    color: #fff;
}

.export-range-btn {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.export-range-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.export-range-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* ========================================
   Sensor Gauge Styles
   ======================================== */
.section-gauge {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.25rem 0 0;
}

.sensor-gauge {
    display: block;
    margin: 0 auto;
}

.sensor-gauge.is-hidden {
    display: none;
}

/* No data fallback */
.gauge-no-data-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gauge-no-data-svg {
    width: 120px;
    height: 120px;
}

.gauge-track {
    stroke: var(--bg-tertiary);
}

.gauge-no-data {
    font-size: 0.85rem;
    fill: var(--text-muted);
    font-style: italic;
}
