/* ========================================
   Logic Smart Homes Inspired Theme
   Minimalist Luxury Aesthetic
   ======================================== */

:root {
    /* Primary palette - warm gold accents */
    --accent-gold: #C9A962;
    --accent-gold-light: #E5D4A1;
    --accent-gold-dark: #A68B4B;

    /* Neutrals */
    --black: #1a1a1a;
    --dark-gray: #2d2d2d;
    --medium-gray: #666666;
    --light-gray: #999999;
    --border-gray: #e5e5e5;
    --bg-light: #fafafa;
    --white: #ffffff;

    /* Status colors - muted, sophisticated */
    --status-healthy: #7CB87C;
    --status-warning: #D4A84B;
    --status-critical: #C45C5C;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 60px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Shadows - subtle */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

/* Dark Mode Theme Override */
body.dark-mode {
    --black: #e8e8e8;
    --dark-gray: #d0d0d0;
    --medium-gray: #aaaaaa;
    --light-gray: #888888;
    --border-gray: #333333;
    --bg-light: #1e1e1e;
    --white: #141414;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
}

body.dark-mode .bottom-nav {
    background: #1a1a1a;
    border-top-color: #333;
}

body.dark-mode .store-card,
body.dark-mode .system-card,
body.dark-mode .unit-card {
    background: #1e1e1e;
}

body.dark-mode .login-box {
    background: #1e1e1e;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #2a2a2a;
    color: #e8e8e8;
    border-color: #444;
}

body.dark-mode .reports-table th {
    background: #2a2a2a;
}

body.dark-mode .reports-table td {
    border-color: #333;
}

body.dark-mode #loading-screen {
    background: #141414;
}

body.dark-mode #loading-screen .loading-text {
    color: #aaa;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.dark-mode-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-gray);
    border-radius: 12px;
    transition: background 0.3s ease;
}

.dark-mode-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

body.dark-mode .dark-mode-switch {
    background: var(--accent-gold);
}

body.dark-mode .dark-mode-switch::after {
    transform: translateX(20px);
}

.dark-mode-label {
    font-size: 13px;
    color: var(--medium-gray);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--white);
    min-height: 100vh;
    color: var(--black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg);
}

/* Header */
.header {
    text-align: center;
    padding: var(--space-xl) 0;
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-gray);
}

.header h1 {
    font-size: 32px;
    font-weight: 300;
    color: var(--black);
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Logo */
.logo {
    width: 400px;
    max-width: 90vw;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-box .header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.login-box .logo {
    width: auto;
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-box .header .subtitle {
    display: block;
    width: 100%;
    text-align: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: var(--medium-gray, #666);
    margin-top: 12px;
}

.header .subtitle {
    font-size: 16px;
    color: var(--medium-gray);
    margin-top: var(--space-sm);
    font-weight: 400;
    letter-spacing: 1px;
}

.header .address {
    font-size: 13px;
    color: var(--light-gray);
    margin-top: var(--space-xs);
    letter-spacing: 0.5px;
}

/* Client Name */
.header .client-name {
    font-size: 20px;
    font-weight: 400;
    color: var(--black);
    margin-top: var(--space-sm);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* User Menu */
.user-menu {
    margin-top: var(--space-md);
}

.user-menu-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.user-menu-info {
    font-size: 14px;
    color: var(--medium-gray);
    text-align: center;
}

/* Store Cards Grid */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Store Card */
.store-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-lg);
}

.store-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-gray);
    display: inline-block;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Status Indicator - Direct styles, no pseudo-elements */
.status-indicator {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto var(--space-sm);
    transition: all 0.3s ease;
}
.status-indicator::before,
.status-indicator::after {
    display: none !important;
    content: none !important;
}

/* Healthy - Green 3D gradient */
.status-indicator.healthy {
    background: linear-gradient(160deg, #9dd49d 0%, #7CB87C 40%, #5a9a5a 100%) !important;
    box-shadow: 0 4px 15px rgba(124, 184, 124, 0.4), inset 0 -4px 10px rgba(0,0,0,0.2), inset 0 4px 10px rgba(255,255,255,0.3) !important;
}

/* Alerts - Amber 3D gradient with pulse */
.status-indicator.alerts {
    background: linear-gradient(160deg, #f0d080 0%, #D4A84B 40%, #b8923a 100%) !important;
    box-shadow: 0 0 20px 5px rgba(212, 168, 75, 0.4), inset 0 -4px 10px rgba(0,0,0,0.2), inset 0 4px 10px rgba(255,255,255,0.3) !important;
    animation: glowPulseAmber 2s ease-in-out infinite !important;
}

/* Critical - Red 3D gradient with pulse */
.status-indicator.critical {
    background: linear-gradient(160deg, #e08080 0%, #C45C5C 40%, #a04545 100%) !important;
    box-shadow: 0 0 20px 5px rgba(196, 92, 92, 0.4), inset 0 -4px 10px rgba(0,0,0,0.2), inset 0 4px 10px rgba(255,255,255,0.3) !important;
    animation: glowPulseRed 1.5s ease-in-out infinite !important;
}

@keyframes glowPulseAmber {
    0%, 100% { box-shadow: 0 0 15px 3px rgba(212, 168, 75, 0.5), inset 0 -4px 10px rgba(0,0,0,0.2), inset 0 4px 10px rgba(255,255,255,0.3); }
    50% { box-shadow: 0 0 25px 8px rgba(212, 168, 75, 0.6), inset 0 -4px 10px rgba(0,0,0,0.2), inset 0 4px 10px rgba(255,255,255,0.3); }
}
@keyframes glowPulseRed {
    0%, 100% { box-shadow: 0 0 15px 3px rgba(196, 92, 92, 0.5), inset 0 -4px 10px rgba(0,0,0,0.2), inset 0 4px 10px rgba(255,255,255,0.3); }
    50% { box-shadow: 0 0 25px 8px rgba(196, 92, 92, 0.6), inset 0 -4px 10px rgba(0,0,0,0.2), inset 0 4px 10px rgba(255,255,255,0.3); }
}

.status-label {
    font-size: 12px;
    color: var(--medium-gray);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Systems Grid */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* Store Page - Systems Layout */
.systems-grid-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    max-width: 900px;
    margin: 0 auto var(--space-lg) auto;
}

.systems-grid-bottom {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.systems-grid-bottom .system-card {
    width: calc(33.333% - 17px);
    max-width: 283px;
    min-width: 250px;
}

.system-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.system-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md);
}

.system-card h3 {
    font-size: 12px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-gray);
    display: inline-block;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.system-card .status-indicator {
    width: 70px;
    height: 70px;
}

.system-card .status-indicator::after {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Environment Card (centered below) */
.environment-section {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.environment-section .system-card {
    min-width: 250px;
}

/* Units Section */
.units-section {
    margin-bottom: var(--space-lg);
}

.units-section h2 {
    font-size: 14px;
    color: var(--black);
    margin-bottom: var(--space-md);
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

/* Unit Card */
.unit-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.unit-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md);
}

.unit-card.clickable:hover {
    border-color: var(--status-critical);
}

.unit-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.unit-header h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-gray);
    flex: 1;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.unit-status {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.unit-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--border-gray);
    background: var(--bg-light);
}

.unit-status::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 50%;
}

.unit-status.healthy::before {
    border-color: var(--status-healthy);
    background: rgba(124, 184, 124, 0.08);
}

.unit-status.healthy::after {
    background: linear-gradient(145deg, #8fca8f, #6aa66a);
    box-shadow: 0 2px 6px rgba(124, 184, 124, 0.4);
}

.unit-status.alerts::before {
    border-color: var(--status-warning);
    background: rgba(212, 168, 75, 0.08);
}

.unit-status.alerts::after {
    background: linear-gradient(145deg, #e0be6a, #c4a04a);
    box-shadow: 0 2px 6px rgba(212, 168, 75, 0.4);
}

.unit-status.critical::before {
    border-color: var(--status-critical);
    background: rgba(196, 92, 92, 0.08);
}

.unit-status.critical::after {
    background: linear-gradient(145deg, #d47070, #b04a4a);
    box-shadow: 0 2px 6px rgba(196, 92, 92, 0.4);
}

.unit-data {
    font-size: 13px;
    color: var(--medium-gray);
    line-height: 1.8;
}

.unit-data p {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--bg-light);
    padding: 6px 0;
}

.unit-data p:last-child {
    border-bottom: none;
}

.unit-data .label {
    color: var(--light-gray);
    font-weight: 400;
}

.unit-data .value {
    font-weight: 500;
    color: var(--black);
}

/* Alert Badge */
.alert-badge {
    background-color: rgba(212, 168, 75, 0.15);
    color: var(--accent-gold-dark);
    padding: var(--space-xs) var(--space-sm);
    font-size: 12px;
    margin-top: var(--space-sm);
    border: 1px solid var(--accent-gold-light);
}

/* Fault Page */
.fault-page {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-lg);
}

.fault-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-gray);
}

.fault-header h2 {
    color: var(--status-critical);
    font-size: 16px;
    margin-bottom: var(--space-sm);
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.fault-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.fault-unit .unit-status {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-md);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
}

.fault-unit h3 {
    font-size: 14px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-gray);
    margin-bottom: var(--space-md);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.fault-data {
    background: var(--bg-light);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    max-width: 400px;
    width: 100%;
    border: 1px solid var(--border-gray);
}

.diagnosis-section {
    margin-bottom: var(--space-lg);
}

.diagnosis-section h3 {
    font-size: 13px;
    color: var(--black);
    margin-bottom: var(--space-sm);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.diagnosis-item {
    background: var(--white);
    border-left: 3px solid var(--status-critical);
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    border-top: 1px solid var(--border-gray);
    border-right: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
}

.diagnosis-item h4 {
    color: var(--status-critical);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.diagnosis-item ul {
    margin-left: var(--space-md);
    color: var(--medium-gray);
}

.diagnosis-item li {
    margin-bottom: 4px;
    font-size: 13px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-gray);
    background: var(--white);
    color: var(--black);
    text-decoration: none;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold-dark);
}

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

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

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

.btn-danger:hover {
    background: #a34a4a;
    border-color: #a34a4a;
}

.btn-group {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space-md);
}

/* Reports Section */
.reports-section {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-lg);
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
    flex-wrap: wrap;
}

.reports-header h2 {
    font-size: 14px;
    color: var(--black);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-gray);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
    margin: 0;
    flex: 1;
    text-align: center;
}

.reports-section h2 {
    font-size: 14px;
    color: var(--black);
    margin-bottom: var(--space-md);
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-gray);
    display: inline-block;
    width: 100%;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
}

.reports-table th,
.reports-table td {
    padding: var(--space-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
    font-size: 13px;
}

.reports-table th {
    background: var(--bg-light);
    font-weight: 500;
    color: var(--black);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 11px;
}

.reports-table tr:hover {
    background: var(--bg-light);
}

/* Navigation */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 12px;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-gray);
    transition: all 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.back-link:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold-dark);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-lg);
    max-width: 400px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    border-radius: 12px;
}

.modal h3 {
    margin-bottom: var(--space-sm);
    color: var(--black);
    font-weight: 500;
    letter-spacing: 1px;
}

.modal p {
    color: var(--medium-gray);
    margin-bottom: var(--space-md);
    font-size: 14px;
}

.modal .btn-group {
    margin-top: 0;
}

/* Success Message */
.success-message {
    background: rgba(124, 184, 124, 0.15);
    color: var(--status-healthy);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--status-healthy);
    margin-top: var(--space-md);
    text-align: center;
    font-size: 13px;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-gray);
}

.last-updated {
    font-size: 12px;
    color: var(--light-gray);
    letter-spacing: 0.5px;
}

/* Legend */
.legend {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 12px;
    color: var(--medium-gray);
    letter-spacing: 0.5px;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.legend-dot.healthy {
    background-color: var(--status-healthy);
}

.legend-dot.alerts {
    background-color: var(--status-warning);
}

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

/* Login Page */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.login-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.login-box {
    background: var(--white);
    padding: var(--space-xl);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-gray);
}

.login-box .header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: var(--space-md);
}

.login-box .header h1 {
    font-size: 24px;
}

.login-form {
    margin-top: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
    color: var(--black);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 14px var(--space-sm);
    border: 1px solid var(--border-gray);
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.form-group small {
    display: block;
    margin-top: var(--space-xs);
    color: var(--light-gray);
    font-size: 12px;
}

.error-message {
    background: rgba(196, 92, 92, 0.1);
    color: var(--status-critical);
    padding: var(--space-sm);
    border: 1px solid var(--status-critical);
    margin-bottom: var(--space-md);
    font-size: 13px;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    min-height: 44px;
    font-size: 13px;
}

/* Footer */
.site-footer {
    background: #141414;
    color: #ffffff;
    margin-top: var(--space-xl);
    position: relative;
}

.footer-accent-line {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #C9A962 50%, transparent 100%);
    opacity: 0.6;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 32px;
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.footer-tagline {
    font-size: 12px;
    color: #888;
    letter-spacing: 0.02em;
    line-height: 1.5;
    max-width: 220px;
}

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

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

.footer-nav-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    margin-bottom: 4px;
}

.footer-nav-group a {
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
    line-height: 1.6;
}

.footer-nav-group a:hover {
    color: #C9A962;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #222;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 11px;
    color: #555;
    letter-spacing: 0.02em;
}

.footer-version {
    font-size: 10px;
    color: #444;
    font-weight: 600;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

/* Error Page */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    padding: var(--space-lg);
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--status-warning);
    color: var(--white);
    font-size: 48px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.error-page h1 {
    font-size: 32px;
    font-weight: 300;
    color: var(--black);
    margin-bottom: var(--space-sm);
    letter-spacing: 2px;
}

.error-message {
    font-size: 16px;
    color: var(--medium-gray);
    margin-bottom: var(--space-sm);
}

.error-help {
    font-size: 14px;
    color: var(--light-gray);
    margin-bottom: var(--space-lg);
}

.error-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Legal Pages (Privacy, Terms) */
.legal-page {
    min-height: 100vh;
    background: var(--white);
    padding: var(--space-xl) var(--space-lg);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-page h1 {
    font-size: 28px;
    font-weight: 300;
    color: var(--black);
    margin-bottom: var(--space-xs);
    letter-spacing: 2px;
    text-align: center;
}

.legal-updated {
    text-align: center;
    color: var(--light-gray);
    font-size: 13px;
    margin-bottom: var(--space-xl);
}

.legal-page section {
    margin-bottom: var(--space-lg);
}

.legal-page h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.5px;
}

.legal-page p {
    color: var(--medium-gray);
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.legal-page ul {
    color: var(--medium-gray);
    line-height: 1.8;
    margin-left: var(--space-md);
    margin-bottom: var(--space-sm);
}

.legal-page li {
    margin-bottom: var(--space-xs);
}

.legal-page a {
    color: var(--accent-gold-dark);
}

.legal-page a:hover {
    color: var(--accent-gold);
}

/* Responsive */
@media (max-width: 768px) {
    #app {
        padding: var(--space-md);
    }

    .stores-grid,
    .systems-grid,
    .units-grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: var(--space-lg) 0;
    }

    .header h1 {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .logo {
        width: 280px;
    }

    .login-box .logo {
        width: 250px;
    }

    .client-name {
        font-size: 16px !important;
    }

    .user-menu-buttons {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .user-menu-buttons .btn {
        width: 100%;
    }

    .user-menu-info {
        font-size: 12px;
    }

    .status-bar {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .legend {
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .last-updated {
        order: -1;
    }

    .systems-grid-top,
    .systems-grid-bottom-2 {
        grid-template-columns: 1fr;
    }

    .hvac-grid,
    .lighting-grid,
    .energy-grid,
    .environment-grid,
    .suggestions-grid {
        grid-template-columns: 1fr;
    }

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

    .reports-table {
        font-size: 12px;
    }

    .reports-table th,
    .reports-table td {
        padding: var(--space-xs) var(--space-sm);
    }

    .login-box {
        margin: var(--space-md);
        padding: var(--space-lg);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 28px 20px 24px;
    }

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

    .footer-bottom {
        padding: 14px 20px;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    #app {
        padding: var(--space-sm);
    }

    .logo {
        width: 220px;
    }

    .login-box .logo {
        width: 200px;
    }

    .header {
        padding: var(--space-md) 0;
    }

    .store-card,
    .system-card {
        padding: var(--space-md);
    }

    .status-indicator {
        width: 70px;
        height: 70px;
    }

    .status-indicator::after {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .suggestions-summary {
        grid-template-columns: 1fr;
    }
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-gray);
    border-top: 3px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Store address on cards */
.store-address {
    font-size: 12px;
    color: var(--light-gray);
    margin: var(--space-xs) 0 var(--space-sm) 0;
    line-height: 1.5;
}

/* Placeholder/Coming Soon Pages */
.placeholder-section {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.coming-soon-card {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-light);
    border: 1px dashed var(--border-gray);
}

.coming-soon-card h3 {
    font-size: 14px;
    color: var(--black);
    margin-bottom: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-gray);
    display: inline-block;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.coming-soon-card p {
    color: var(--medium-gray);
    margin-bottom: var(--space-sm);
    font-size: 13px;
}

.coming-soon-card ul {
    list-style: none;
    padding: 0;
}

.coming-soon-card li {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--border-gray);
    font-size: 13px;
    color: var(--medium-gray);
}

.coming-soon-card li:last-child {
    border-bottom: none;
}

/* HVAC Page Layout */
.hvac-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    max-width: 1000px;
    margin: 0 auto;
}

.hvac-unit-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.hvac-unit-card.clickable {
    cursor: pointer;
}

.hvac-unit-card.clickable:hover {
    border-color: var(--status-critical);
    box-shadow: var(--shadow-md);
}

.hvac-unit-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--black);
    padding: var(--space-sm);
    border: 1px solid var(--border-gray);
    background: var(--white);
    margin-bottom: var(--space-md);
    width: 100%;
    text-align: center;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hvac-status-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin-bottom: var(--space-md);
    flex-shrink: 0;
    position: relative;
}

.hvac-status-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--border-gray);
    background: var(--bg-light);
}

.hvac-status-circle::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border-radius: 50%;
}

.hvac-status-circle.healthy::before {
    border-color: var(--status-healthy);
    background: rgba(124, 184, 124, 0.08);
}

.hvac-status-circle.healthy::after {
    background: linear-gradient(145deg, #8fca8f, #6aa66a);
    box-shadow: 0 2px 6px rgba(124, 184, 124, 0.4);
}

.hvac-status-circle.alerts::before {
    border-color: var(--status-warning);
    background: rgba(212, 168, 75, 0.08);
}

.hvac-status-circle.alerts::after {
    background: linear-gradient(145deg, #e0be6a, #c4a04a);
    box-shadow: 0 2px 6px rgba(212, 168, 75, 0.4);
}

.hvac-status-circle.critical::before {
    border-color: var(--status-critical);
    background: rgba(196, 92, 92, 0.08);
}

.hvac-status-circle.critical::after {
    background: linear-gradient(145deg, #d47070, #b04a4a);
    box-shadow: 0 2px 6px rgba(196, 92, 92, 0.4);
}

.hvac-data-list {
    font-size: 13px;
    color: var(--medium-gray);
    line-height: 1.8;
    text-align: left;
    width: 100%;
}

.hvac-data-list p {
    margin: 0;
    padding: 4px 0;
}

.hvac-issues {
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    font-size: 12px;
    text-align: center;
    width: 100%;
}

.hvac-issues.critical {
    background: rgba(196, 92, 92, 0.1);
    color: var(--status-critical);
    border: 1px solid var(--status-critical);
}

.hvac-issues.warning {
    background: rgba(212, 168, 75, 0.1);
    color: var(--status-warning);
    border: 1px solid var(--status-warning);
}

/* Responsive for HVAC layout */
@media (max-width: 900px) {
    .hvac-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Lighting Page Layout */
.lighting-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    max-width: 1100px;
    margin: 0 auto;
}

.lighting-zone-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.lighting-zone-card.has-fault {
    border-color: var(--status-critical);
}

.zone-name-box {
    font-size: 12px;
    font-weight: 500;
    color: var(--black);
    padding: var(--space-sm);
    border: 1px solid var(--border-gray);
    background: var(--white);
    margin-bottom: var(--space-sm);
    width: 100%;
    text-align: center;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.zone-status-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: var(--space-md);
    flex-shrink: 0;
    position: relative;
}

.zone-status-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--border-gray);
    background: var(--bg-light);
}

.zone-status-circle::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 9px;
    right: 9px;
    bottom: 9px;
    border-radius: 50%;
}

.zone-status-circle.healthy::before {
    border-color: var(--status-healthy);
    background: rgba(124, 184, 124, 0.08);
}

.zone-status-circle.healthy::after {
    background: linear-gradient(145deg, #8fca8f, #6aa66a);
    box-shadow: 0 2px 6px rgba(124, 184, 124, 0.4);
}

.zone-status-circle.alerts::before {
    border-color: var(--status-warning);
    background: rgba(212, 168, 75, 0.08);
}

.zone-status-circle.alerts::after {
    background: linear-gradient(145deg, #e0be6a, #c4a04a);
    box-shadow: 0 2px 6px rgba(212, 168, 75, 0.4);
}

.zone-status-circle.critical::before {
    border-color: var(--status-critical);
    background: rgba(196, 92, 92, 0.08);
}

.zone-status-circle.critical::after {
    background: linear-gradient(145deg, #d47070, #b04a4a);
    box-shadow: 0 2px 6px rgba(196, 92, 92, 0.4);
}

.zone-data-section {
    width: 100%;
}

.zone-data-group {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-gray);
}

.zone-data-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.zone-data-group h5 {
    font-size: 11px;
    font-weight: 500;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.zone-data-group p {
    font-size: 13px;
    color: var(--black);
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-badge {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-badge.on {
    background: rgba(124, 184, 124, 0.15);
    color: var(--status-healthy);
    border: 1px solid var(--status-healthy);
}

.status-badge.off {
    background: var(--bg-light);
    color: var(--light-gray);
    border: 1px solid var(--border-gray);
}

.status-badge.active {
    background: rgba(212, 168, 75, 0.15);
    color: var(--accent-gold-dark);
    border: 1px solid var(--accent-gold);
}

.sensor-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.sensor-indicator.active {
    background-color: var(--status-healthy);
}

.sensor-indicator.inactive {
    background-color: var(--light-gray);
}

.zone-faults {
    width: 100%;
    background: rgba(196, 92, 92, 0.1);
    padding: var(--space-sm);
    margin-top: var(--space-sm);
    border: 1px solid var(--status-critical);
}

.zone-faults h5 {
    font-size: 11px;
    font-weight: 500;
    color: var(--status-critical);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fault-item {
    font-size: 12px;
    color: var(--status-critical);
    margin: 4px 0;
    padding-left: var(--space-sm);
    position: relative;
}

.fault-item::before {
    content: '•';
    position: absolute;
    left: 0;
}

/* Responsive for Lighting layout */
@media (max-width: 900px) {
    .lighting-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Energy Page Layout */
.energy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
}

.energy-meter-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.energy-meter-card.has-fault {
    border-color: var(--status-critical);
}

.energy-meter-card.solar {
    border-color: var(--status-healthy);
    background: linear-gradient(180deg, rgba(124, 184, 124, 0.08) 0%, var(--white) 20%);
}

.meter-name-box {
    font-size: 12px;
    font-weight: 500;
    color: var(--black);
    padding: var(--space-sm);
    border: 1px solid var(--border-gray);
    background: var(--white);
    margin-bottom: var(--space-sm);
    width: 100%;
    text-align: center;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.meter-status-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: var(--space-sm);
    flex-shrink: 0;
    position: relative;
}

.meter-status-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--border-gray);
    background: var(--bg-light);
}

.meter-status-circle::after {
    content: '';
    position: absolute;
    top: 9px;
    left: 9px;
    right: 9px;
    bottom: 9px;
    border-radius: 50%;
}

.meter-status-circle.healthy::before {
    border-color: var(--status-healthy);
    background: rgba(124, 184, 124, 0.08);
}

.meter-status-circle.healthy::after {
    background: linear-gradient(145deg, #8fca8f, #6aa66a);
    box-shadow: 0 2px 6px rgba(124, 184, 124, 0.4);
}

.meter-status-circle.alerts::before {
    border-color: var(--status-warning);
    background: rgba(212, 168, 75, 0.08);
}

.meter-status-circle.alerts::after {
    background: linear-gradient(145deg, #e0be6a, #c4a04a);
    box-shadow: 0 2px 6px rgba(212, 168, 75, 0.4);
}

.meter-status-circle.critical::before {
    border-color: var(--status-critical);
    background: rgba(196, 92, 92, 0.08);
}

.meter-status-circle.critical::after {
    background: linear-gradient(145deg, #d47070, #b04a4a);
    box-shadow: 0 2px 6px rgba(196, 92, 92, 0.4);
}

.meter-power-display {
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-md);
    width: 100%;
    border: 1px solid var(--border-gray);
}

.meter-power-display.consuming {
    background: rgba(212, 168, 75, 0.1);
    border-color: var(--accent-gold-light);
}

.meter-power-display.generating {
    background: rgba(124, 184, 124, 0.1);
    border-color: var(--status-healthy);
}

.meter-power-display .power-value {
    font-size: 32px;
    font-weight: 300;
    color: var(--black);
}

.meter-power-display .power-unit {
    font-size: 16px;
    font-weight: 400;
    color: var(--medium-gray);
    margin-left: 4px;
}

.meter-power-display .power-direction {
    display: block;
    font-size: 11px;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: var(--space-xs);
}

.meter-power-display.generating .power-value {
    color: var(--status-healthy);
}

.meter-power-display.consuming .power-value {
    color: var(--accent-gold-dark);
}

.meter-data-section {
    width: 100%;
}

.meter-data-group {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-gray);
}

.meter-data-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.meter-data-group h5 {
    font-size: 11px;
    font-weight: 500;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.meter-data-group p {
    font-size: 13px;
    color: var(--black);
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.phase-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--black);
    background: var(--bg-light);
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-gray);
}

.phase-values span {
    flex: 1;
    text-align: center;
}

.meter-faults {
    width: 100%;
    background: rgba(196, 92, 92, 0.1);
    padding: var(--space-sm);
    margin-top: var(--space-sm);
    border: 1px solid var(--status-critical);
}

.meter-faults h5 {
    font-size: 11px;
    font-weight: 500;
    color: var(--status-critical);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive for Energy layout */
@media (max-width: 700px) {
    .energy-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================= */
/* Environment Page Styles */
/* ======================= */

.environment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.environment-sensor-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.environment-sensor-card.has-fault {
    border-color: var(--status-critical);
}

.sensor-name-box {
    background: var(--black);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    margin-bottom: var(--space-md);
    width: 100%;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sensor-status-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: var(--space-sm);
    position: relative;
}

.sensor-status-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--border-gray);
    background: var(--bg-light);
}

.sensor-status-circle::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 50%;
}

.sensor-status-circle.healthy::before {
    border-color: var(--status-healthy);
    background: rgba(124, 184, 124, 0.08);
}

.sensor-status-circle.healthy::after {
    background: linear-gradient(145deg, #8fca8f, #6aa66a);
    box-shadow: 0 2px 6px rgba(124, 184, 124, 0.4);
}

.sensor-status-circle.warning::before {
    border-color: var(--status-warning);
    background: rgba(212, 168, 75, 0.08);
}

.sensor-status-circle.warning::after {
    background: linear-gradient(145deg, #e0be6a, #c4a04a);
    box-shadow: 0 2px 6px rgba(212, 168, 75, 0.4);
}

.sensor-status-circle.critical::before {
    border-color: var(--status-critical);
    background: rgba(196, 92, 92, 0.08);
}

.sensor-status-circle.critical::after {
    background: linear-gradient(145deg, #d47070, #b04a4a);
    box-shadow: 0 2px 6px rgba(196, 92, 92, 0.4);
}

.sensor-comfort-display {
    text-align: center;
    padding: var(--space-sm);
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    margin-bottom: var(--space-md);
    width: 100%;
}

.sensor-comfort-display .comfort-label {
    display: block;
    font-size: 11px;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.sensor-comfort-display .comfort-value {
    font-size: 20px;
    font-weight: 500;
    color: var(--black);
}

.sensor-data-section {
    width: 100%;
}

.sensor-data-group {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-gray);
}

.sensor-data-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sensor-data-group h5 {
    font-size: 11px;
    font-weight: 500;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.sensor-data-group p {
    font-size: 13px;
    color: var(--black);
    margin: 4px 0;
    display: flex;
    justify-content: space-between;
}

.sensor-faults {
    width: 100%;
    background: rgba(196, 92, 92, 0.1);
    padding: var(--space-sm);
    margin-top: var(--space-sm);
    border: 1px solid var(--status-critical);
}

.sensor-faults h5 {
    font-size: 11px;
    font-weight: 500;
    color: var(--status-critical);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Weather Station Card */
.weather-section {
    max-width: 500px;
    margin: 0 auto;
}

.weather-station-card {
    background: var(--black);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--white);
    border: 1px solid var(--dark-gray);
}

.weather-name-box {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    padding: var(--space-sm);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    margin-bottom: var(--space-sm);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.weather-status-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-bottom: var(--space-sm);
    border: 2px solid var(--white);
}

.weather-status-circle.healthy {
    background-color: var(--status-healthy);
}

.weather-main-display {
    text-align: center;
    margin-bottom: var(--space-md);
}

.weather-temp {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.weather-temp .temp-value {
    font-size: 48px;
    font-weight: 200;
    line-height: 1;
}

.weather-temp .temp-unit {
    font-size: 20px;
    font-weight: 300;
    margin-top: 6px;
}

.weather-condition {
    font-size: 14px;
    margin-top: var(--space-sm);
    color: var(--accent-gold);
    letter-spacing: 1px;
}

.weather-data-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    width: 100%;
    background: rgba(255,255,255,0.05);
    padding: var(--space-sm);
    border: 1px solid rgba(255,255,255,0.1);
}

.weather-data-group h5 {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-xs);
}

.weather-data-group p {
    font-size: 12px;
    color: var(--white);
    margin: 4px 0;
}

/* Responsive for Environment layout */
@media (max-width: 700px) {
    .environment-grid {
        grid-template-columns: 1fr;
    }

    .weather-data-section {
        grid-template-columns: 1fr;
    }
}

/* ======================== */
/* AI Suggestions Styles    */
/* ======================== */

/* Store page - bottom row with 2 cards */
.systems-grid-bottom-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    max-width: 700px;
    margin: var(--space-lg) auto;
}

.ai-suggestions-card {
    background: var(--white);
    color: var(--black);
}

.ai-suggestions-card h3 {
    color: var(--black);
    border-color: var(--border-gray);
}

.ai-suggestions-card .status-label {
    color: var(--medium-gray);
}

/* Suggestions Summary */
.suggestions-summary {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.summary-stat {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    min-width: 100px;
}

.summary-stat .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 300;
    margin-bottom: var(--space-xs);
}

.summary-stat .stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--light-gray);
}

.summary-stat.pending .stat-value {
    color: var(--status-warning);
}

.summary-stat.approved .stat-value {
    color: var(--status-healthy);
}

.summary-stat.acknowledged .stat-value {
    color: var(--accent-gold);
}

.summary-stat.denied .stat-value {
    color: var(--light-gray);
}

/* Suggestions Grid */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* No Suggestions State */
.no-suggestions {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    grid-column: 1 / -1;
}

.no-suggestions-icon {
    width: 70px;
    height: 70px;
    background: rgba(124, 184, 124, 0.15);
    color: var(--status-healthy);
    border-radius: 50%;
    font-size: 32px;
    line-height: 70px;
    margin: 0 auto var(--space-md);
    border: 1px solid var(--status-healthy);
}

.no-suggestions h3 {
    color: var(--black);
    margin-bottom: var(--space-sm);
    font-weight: 500;
    letter-spacing: 1px;
}

.no-suggestions p {
    color: var(--medium-gray);
    font-size: 14px;
}

/* Suggestion Card */
.suggestion-card {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid var(--border-gray);
}

.suggestion-card:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-md);
}

.suggestion-card.priority-high {
    border-left-color: var(--status-critical);
}

.suggestion-card.priority-medium {
    border-left-color: var(--status-warning);
}

.suggestion-card.priority-low {
    border-left-color: var(--status-healthy);
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.suggestion-type-icon {
    font-size: 20px;
}

.suggestion-priority {
    font-size: 10px;
    font-weight: 500;
    padding: 4px 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.priority-high .suggestion-priority {
    background: rgba(196, 92, 92, 0.1);
    color: var(--status-critical);
    border: 1px solid var(--status-critical);
}

.priority-medium .suggestion-priority {
    background: rgba(212, 168, 75, 0.1);
    color: var(--status-warning);
    border: 1px solid var(--status-warning);
}

.priority-low .suggestion-priority {
    background: rgba(124, 184, 124, 0.1);
    color: var(--status-healthy);
    border: 1px solid var(--status-healthy);
}

.suggestion-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: var(--space-sm);
}

.suggestion-description {
    font-size: 13px;
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.suggestion-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    margin-bottom: var(--space-sm);
}

.change-current {
    font-weight: 500;
    color: var(--medium-gray);
    font-size: 13px;
}

.change-arrow {
    color: var(--accent-gold);
    font-size: 16px;
}

.change-suggested {
    font-weight: 600;
    color: var(--accent-gold-dark);
    font-size: 13px;
}

.suggestion-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.suggestion-savings {
    color: var(--status-healthy);
    font-weight: 500;
}

.suggestion-confidence {
    color: var(--light-gray);
}

/* Suggestion Detail Page */
.suggestion-detail {
    background: var(--white);
    border: 1px solid var(--border-gray);
    padding: var(--space-lg);
    max-width: 700px;
    margin: 0 auto var(--space-lg);
}

.suggestion-detail-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-gray);
}

.suggestion-detail-header.priority-high {
    border-bottom-color: var(--status-critical);
}

.suggestion-detail-header.priority-medium {
    border-bottom-color: var(--status-warning);
}

.suggestion-detail-header.priority-low {
    border-bottom-color: var(--status-healthy);
}

.detail-type-icon {
    font-size: 28px;
}

.detail-priority {
    font-size: 11px;
    font-weight: 500;
    padding: 6px 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.priority-high .detail-priority {
    background: rgba(196, 92, 92, 0.1);
    color: var(--status-critical);
    border: 1px solid var(--status-critical);
}

.priority-medium .detail-priority {
    background: rgba(212, 168, 75, 0.1);
    color: var(--status-warning);
    border: 1px solid var(--status-warning);
}

.priority-low .detail-priority {
    background: rgba(124, 184, 124, 0.1);
    color: var(--status-healthy);
    border: 1px solid var(--status-healthy);
}

.detail-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--black);
    margin-bottom: var(--space-md);
    letter-spacing: 0.5px;
}

.detail-section {
    margin-bottom: var(--space-md);
}

.detail-section h4 {
    font-size: 11px;
    font-weight: 500;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
}

.detail-section p {
    font-size: 14px;
    color: var(--black);
    line-height: 1.6;
}

.detail-change-box {
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    padding: var(--space-md);
}

.change-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-gray);
}

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

.change-label {
    font-weight: 500;
    color: var(--medium-gray);
    font-size: 13px;
}

.change-value {
    font-weight: 500;
    color: var(--black);
    font-size: 13px;
}

.change-value.current {
    color: var(--medium-gray);
}

.change-value.suggested {
    color: var(--accent-gold-dark);
    font-weight: 600;
}

.detail-impact {
    background: rgba(201, 169, 98, 0.1);
    border: 1px solid var(--accent-gold-light);
    padding: var(--space-sm) var(--space-md);
}

.detail-impact p {
    margin: var(--space-xs) 0;
    font-size: 13px;
}

.detail-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.btn-approve {
    background: var(--status-healthy) !important;
    color: var(--white) !important;
    border-color: var(--status-healthy) !important;
    flex: 1;
    min-width: 150px;
}

.btn-approve:hover {
    background: #5a9a5a !important;
    border-color: #5a9a5a !important;
}

.btn-acknowledge {
    background: var(--accent-gold) !important;
    color: var(--white) !important;
    border-color: var(--accent-gold) !important;
    flex: 1;
    min-width: 150px;
}

.btn-acknowledge:hover {
    background: var(--accent-gold-dark) !important;
    border-color: var(--accent-gold-dark) !important;
}

.btn-deny {
    background: var(--light-gray) !important;
    color: var(--white) !important;
    border-color: var(--light-gray) !important;
    flex: 1;
    min-width: 150px;
}

.btn-deny:hover {
    background: var(--medium-gray) !important;
    border-color: var(--medium-gray) !important;
}

.detail-note {
    margin-top: var(--space-md);
    padding: var(--space-sm);
    background: rgba(212, 168, 75, 0.1);
    border: 1px solid var(--accent-gold-light);
    font-size: 13px;
    color: var(--accent-gold-dark);
}

/* Responsive for AI Suggestions */
@media (max-width: 700px) {
    .systems-grid-bottom-2 {
        grid-template-columns: 1fr;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }

    .suggestions-summary {
        gap: var(--space-sm);
    }

    .summary-stat {
        min-width: 70px;
        padding: var(--space-sm);
    }

    .detail-actions {
        flex-direction: column;
    }
}

/* ========================================
   Bottom Navigation Bar
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-gray);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 16px;
    min-height: 48px;
    min-width: 48px;
    cursor: pointer;
    text-decoration: none;
    color: var(--light-gray);
    transition: color 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item.active {
    color: var(--accent-gold);
}

.bottom-nav-item:hover {
    color: var(--accent-gold-dark);
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

.bottom-nav-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    background: var(--status-critical);
    color: white;
    font-size: 9px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Add bottom padding to app when nav is visible */
body.has-bottom-nav #app {
    padding-bottom: 80px;
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
    body.has-bottom-nav #app {
        padding-bottom: var(--space-lg);
    }
}

/* ========================================
   Real-time Clock & Header Enhancements
   ======================================== */
.header-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    gap: 2px;
}

.header-clock .clock-time {
    font-size: 15px;
    color: var(--black);
    font-weight: 500;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

.header-clock .clock-date {
    font-size: 12px;
    color: var(--light-gray);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.header-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--status-healthy);
    margin-top: 6px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--status-healthy);
    border-radius: 50%;
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ========================================
   Temperature Sparkline
   ======================================== */
.temp-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
    margin-top: 8px;
    padding: 4px 0;
}

.temp-sparkline-bar {
    flex: 1;
    min-width: 3px;
    max-width: 8px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.temp-sparkline-label {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--light-gray);
    margin-top: 2px;
}

/* ========================================
   Store Quick Stats Row
   ======================================== */
.store-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
}

.quick-stat-item {
    text-align: center;
    padding: var(--space-xs) 0;
}

.quick-stat-value {
    font-size: 24px;
    font-weight: 300;
    color: var(--black);
    line-height: 1.2;
}

.quick-stat-value.healthy { color: var(--status-healthy); }
.quick-stat-value.warning { color: var(--status-warning); }
.quick-stat-value.critical { color: var(--status-critical); }

.quick-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--light-gray);
    margin-top: 4px;
}

@media (max-width: 480px) {
    .store-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Global Search Bar
   ======================================== */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto var(--space-md) auto;
}

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

.search-input-wrapper svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--light-gray);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-primary);
    background: var(--bg-light);
    color: var(--black);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.search-input::placeholder {
    color: var(--light-gray);
}

.search-shortcut {
    position: absolute;
    right: 12px;
    padding: 3px 8px;
    background: var(--border-gray);
    border-radius: 4px;
    font-size: 11px;
    color: var(--light-gray);
    font-family: monospace;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-gray);
    transition: background 0.15s ease;
}

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

.search-result-item:hover {
    background: var(--bg-light);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-icon.store { background: rgba(201, 169, 98, 0.15); color: var(--accent-gold); }
.search-result-icon.hvac { background: rgba(33, 150, 243, 0.1); color: #2196F3; }
.search-result-icon.alert { background: rgba(196, 92, 92, 0.1); color: var(--status-critical); }
.search-result-icon.fridge { background: rgba(23, 162, 184, 0.1); color: #17a2b8; }

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-subtitle {
    font-size: 11px;
    color: var(--light-gray);
    margin-top: 2px;
}

.search-result-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.search-result-status.healthy { background: var(--status-healthy); }
.search-result-status.alerts { background: var(--status-warning); }
.search-result-status.critical { background: var(--status-critical); }

.search-no-results {
    padding: 20px;
    text-align: center;
    color: var(--light-gray);
    font-size: 13px;
}

/* ========================================
   Connection Status Indicator
   ======================================== */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    margin-top: 8px;
}

.connection-status.online {
    background: rgba(124, 184, 124, 0.15);
    color: var(--status-healthy);
}

.connection-status.offline {
    background: rgba(196, 92, 92, 0.15);
    color: var(--status-critical);
}

.connection-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ========================================
   Keyboard Shortcuts Modal
   ======================================== */
.shortcuts-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.shortcuts-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.shortcuts-modal {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.shortcuts-modal h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--black);
}

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

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

.shortcut-keys {
    display: flex;
    gap: 4px;
}

.shortcut-key {
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-family: monospace;
    color: var(--dark-gray);
}

.shortcut-desc {
    font-size: 13px;
    color: var(--medium-gray);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .bottom-nav,
    .dark-mode-toggle,
    .search-container,
    .btn-group,
    .nav-bar,
    .user-menu,
    .header-live-indicator,
    .header-clock,
    #pull-refresh-indicator,
    .quick-ack-btn {
        display: none !important;
    }

    #app {
        max-width: 100% !important;
        padding: 20px !important;
    }

    .store-card,
    .system-card,
    .unit-card,
    .settings-section-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    .reports-table {
        width: 100% !important;
        font-size: 11px;
    }

    .logo {
        width: 200px !important;
    }

    .header {
        padding: 20px 0 !important;
    }

    a {
        text-decoration: none !important;
        color: black !important;
    }
}

/* ========================================
   Page Transitions
   ======================================== */
#app {
    animation: pageIn 0.25s ease-out;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#app.page-exit {
    animation: pageOut 0.15s ease-in forwards;
}

@keyframes pageOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* ========================================
   Enhanced Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-primary);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    animation: toastIn 0.3s ease-out;
    pointer-events: auto;
    max-width: 90vw;
}

.toast-notification.toast-exit {
    animation: toastOut 0.25s ease-in forwards;
}

.toast-notification.success {
    background: #1b5e20;
    color: white;
}

.toast-notification.error {
    background: #b71c1c;
    color: white;
}

.toast-notification.warning {
    background: #e65100;
    color: white;
}

.toast-notification.info {
    background: #0d47a1;
    color: white;
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@keyframes toastIn {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(-10px) scale(0.95);
        opacity: 0;
    }
}

@media (min-width: 769px) {
    .toast-container {
        bottom: 30px;
    }
}

/* ========================================
   Maintenance Calendar
   ======================================== */
.maint-calendar {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.maint-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.maint-calendar-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
}

.maint-calendar-nav {
    display: flex;
    gap: 8px;
}

.maint-calendar-nav button {
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-gray);
}

.maint-calendar-nav button:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.maint-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.maint-calendar-day-header {
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: var(--light-gray);
    padding: 6px 0;
    text-transform: uppercase;
}

.maint-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--medium-gray);
    border-radius: 6px;
    position: relative;
    cursor: default;
}

.maint-calendar-day.today {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--black);
}

.maint-calendar-day.has-event {
    cursor: pointer;
}

.maint-calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.maint-calendar-day.has-overdue::after {
    background: var(--status-critical);
}

.maint-calendar-day.has-upcoming::after {
    background: var(--status-warning);
}

.maint-calendar-day.has-scheduled::after {
    background: var(--accent-gold);
}

.maint-calendar-day.other-month {
    color: var(--border-gray);
}

/* ========================================
   Accessibility - Focus Styles
   ======================================== */
*:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.btn:focus-visible,
.system-card:focus-visible,
.store-card:focus-visible,
.bottom-nav-item:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.2);
}

/* Skip to content link for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-gold);
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    z-index: 10000;
    transition: top 0.2s;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* ========================================
   Scroll-to-Top Button
   ======================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 900;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--accent-gold-dark);
}

@media (min-width: 769px) {
    .scroll-top-btn {
        bottom: 30px;
        right: 30px;
    }
}

/* ========================================
   Breadcrumb Navigation
   ======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    margin-bottom: var(--space-sm);
    font-size: 12px;
    color: var(--light-gray);
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: var(--accent-gold);
}

.breadcrumb-item.active {
    color: var(--black);
    font-weight: 500;
    pointer-events: none;
}

.breadcrumb-sep {
    color: var(--border-gray);
    font-size: 10px;
}

/* ========================================
   Session Timeout Warning
   ======================================== */
.timeout-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.timeout-warning.visible {
    opacity: 1;
    visibility: visible;
}

.timeout-warning-box {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.timeout-warning-box h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--black);
}

.timeout-warning-box p {
    font-size: 13px;
    color: var(--medium-gray);
    margin-bottom: 20px;
}

.timeout-countdown {
    font-size: 32px;
    font-weight: 300;
    color: var(--status-critical);
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}

.timeout-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ========================================
   Weather Forecast
   ======================================== */
.forecast-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.forecast-day {
    flex: 0 0 auto;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--bg-light);
    min-width: 60px;
}

.forecast-day-name {
    font-size: 10px;
    color: var(--light-gray);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.forecast-temp {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
}

.forecast-icon {
    font-size: 16px;
    margin: 4px 0;
}

/* ========================================
   Refresh Button
   ======================================== */
.refresh-btn {
    background: none;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    color: var(--gray);
    transition: all 0.2s ease;
}
.refresh-btn:hover {
    background: var(--bg-light);
    border-color: var(--accent);
    color: var(--accent);
}
.refresh-btn.spinning svg {
    animation: spin 0.8s linear infinite;
}
.refresh-countdown {
    font-size: 11px;
    color: var(--light-gray);
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Collapsible Sections
   ======================================== */
.collapsible-section {
    background: var(--white);
    border: 1px solid var(--border-gray);
    margin-bottom: var(--space-md);
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    animation: widgetFadeIn 0.4s ease both;
}

.collapsible-section:hover {
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--accent-gold) 30%, var(--border-gray));
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 20px;
    user-select: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid transparent;
}

.collapsible-header:hover {
    background: var(--bg-light);
}

.collapsible-header:active {
    background: color-mix(in srgb, var(--accent-gold) 5%, var(--bg-light));
}

.collapsible-header h2,
.collapsible-header h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.collapsible-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--light-gray);
    opacity: 0.6;
}

.collapsible-header:hover .collapsible-chevron {
    opacity: 1;
    color: var(--accent-gold);
}

.collapsible-chevron.collapsed {
    transform: rotate(-90deg);
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
    border-top: 1px solid var(--border-gray);
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    border-top-color: transparent;
}

@keyframes widgetFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger collapsible sections */
.collapsible-section:nth-child(2) { animation-delay: 0.05s; }
.collapsible-section:nth-child(3) { animation-delay: 0.1s; }
.collapsible-section:nth-child(4) { animation-delay: 0.15s; }
.collapsible-section:nth-child(5) { animation-delay: 0.2s; }
.collapsible-section:nth-child(6) { animation-delay: 0.25s; }
.collapsible-section:nth-child(7) { animation-delay: 0.3s; }
.collapsible-section:nth-child(8) { animation-delay: 0.35s; }

/* ========================================
   Skeleton Loading
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, #e8e8e8 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 8px;
}
.skeleton-card {
    height: 140px;
    margin-bottom: 15px;
}
.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    width: 80%;
}
.skeleton-line.short {
    width: 50%;
}
.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Swipe Hint
   ======================================== */
.swipe-hint {
    text-align: center;
    font-size: 11px;
    color: var(--light-gray);
    padding: 8px 0;
    opacity: 0.7;
}

/* ========================================
   Status Pulse Animation
   ======================================== */
.status-indicator.critical {
    animation: statusPulse 1.5s ease-in-out infinite;
}
.status-indicator.alerts {
    animation: statusPulseWarn 2s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
}
@keyframes statusPulseWarn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253, 126, 20, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(253, 126, 20, 0); }
}

/* ========================================
   Floating Action Button
   ======================================== */
.fab-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 900;
}
.fab-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(201, 169, 98, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fab-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.5);
}
.fab-toggle.open {
    transform: rotate(45deg);
}
.fab-menu {
    position: absolute;
    bottom: 62px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s ease;
}
.fab-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.fab-action {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    cursor: pointer;
    justify-content: flex-end;
}
.fab-action-label {
    background: var(--black);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.fab-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--black);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========================================
   Store Favorites (Pinned)
   ======================================== */
.pin-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--light-gray);
    padding: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}
.pin-btn:hover {
    color: var(--accent);
    transform: scale(1.2);
}
.pin-btn.pinned {
    color: var(--accent);
}
.store-card {
    position: relative;
}

/* ========================================
   Compact List View
   ======================================== */
.stores-list {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
}
.stores-list .store-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px !important;
    text-align: left;
}
.stores-list .store-card h3 {
    margin: 0;
    font-size: 14px;
    flex: 1;
}
.stores-list .store-card .store-address,
.stores-list .store-card .alert-escalation,
.stores-list .store-card .pin-btn {
    display: none;
}
.stores-list .store-card .status-indicator {
    width: 10px;
    height: 10px;
    margin: 0;
}
.stores-list .store-card .quick-ack-btn {
    width: auto !important;
    margin-top: 0 !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
}

/* ========================================
   Offline Banner
   ======================================== */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #333;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    z-index: 9998;
    justify-content: center;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ========================================
   Sortable Table Headers
   ======================================== */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.sortable-header:hover {
    color: var(--accent-gold);
}

.sortable-header::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.3;
}

.sortable-header.asc::after {
    border-top: none;
    border-bottom: 4px solid currentColor;
    opacity: 1;
}

.sortable-header.desc::after {
    opacity: 1;
}

/* High Contrast Accessibility Mode */
body.high-contrast {
    --bg: #000000;
    --card-bg: #000000;
    --text: #ffffff;
    --text-secondary: #ffffff;
    --border: #ffffff;
    --gray: #ffffff;
}

body.high-contrast .store-card,
body.high-contrast .settings-section-card,
body.high-contrast .notification-option {
    border: 2px solid #ffffff !important;
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast .store-card h3,
body.high-contrast .store-card p,
body.high-contrast .store-card span,
body.high-contrast label,
body.high-contrast h1, body.high-contrast h2, body.high-contrast h3,
body.high-contrast p {
    color: #ffffff !important;
}

body.high-contrast .bottom-nav {
    background: #000 !important;
    border-top: 2px solid #fff !important;
}

body.high-contrast .bottom-nav .nav-item {
    color: #ccc !important;
}

body.high-contrast .bottom-nav .nav-item.active {
    color: #ffff00 !important;
}

body.high-contrast .status-indicator.healthy {
    background: #00ff00 !important;
}

body.high-contrast .status-indicator.alerts {
    background: #ffff00 !important;
}

body.high-contrast .status-indicator.critical {
    background: #ff0000 !important;
}

body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

body.high-contrast .btn-primary,
body.high-contrast button[style*="background: var(--accent)"] {
    background: #ffff00 !important;
    color: #000 !important;
    border: 2px solid #ffff00 !important;
    font-weight: 700 !important;
}

body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.high-contrast .weather-widget {
    background: #000 !important;
    border: 2px solid #fff !important;
}

body.high-contrast .toast {
    border: 2px solid #fff !important;
    font-weight: 600 !important;
}

body.high-contrast .fab-toggle {
    background: #ffff00 !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

body.high-contrast .notification-badge {
    background: #ff0000 !important;
    border: 2px solid #fff !important;
}

/* Weather Widget Animations */
.weather-anim-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 12px;
}

/* Sunny - floating light rays */
.weather-sunny .weather-anim-layer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: sunPulse 3s ease-in-out infinite;
}

.weather-sunny .weather-anim-layer::after {
    content: '';
    position: absolute;
    top: -30%;
    right: 5%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: sunPulse 4s ease-in-out infinite 1s;
}

@keyframes sunPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* Cloudy - drifting clouds */
.weather-cloudy .weather-anim-layer::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -60px;
    width: 100px;
    height: 40px;
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    animation: cloudDrift 12s linear infinite;
}

.weather-cloudy .weather-anim-layer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -80px;
    width: 70px;
    height: 30px;
    background: rgba(255,255,255,0.08);
    border-radius: 15px;
    animation: cloudDrift 18s linear infinite 4s;
}

@keyframes cloudDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* Rainy - falling drops */
.weather-rainy .weather-anim-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 10px,
        rgba(255,255,255,0.03) 10px,
        rgba(255,255,255,0.03) 12px
    );
    animation: rainFall 0.8s linear infinite;
}

.weather-rainy .weather-anim-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 14px,
        rgba(255,255,255,0.05) 14px,
        rgba(255,255,255,0.05) 16px
    );
    animation: rainFall 0.6s linear infinite 0.3s;
}

@keyframes rainFall {
    0% { transform: translateY(-20px); }
    100% { transform: translateY(20px); }
}

/* Stormy - flash effect */
.weather-stormy .weather-anim-layer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0);
    animation: lightning 6s ease-in-out infinite;
}

.weather-stormy .weather-anim-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 8px,
        rgba(255,255,255,0.04) 8px,
        rgba(255,255,255,0.04) 10px
    );
    animation: rainFall 0.5s linear infinite;
}

@keyframes lightning {
    0%, 93%, 95%, 97%, 100% { background: rgba(255,255,255,0); }
    94% { background: rgba(255,255,255,0.15); }
    96% { background: rgba(255,255,255,0.08); }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }

    .bottom-nav,
    .fab-container,
    .refresh-btn,
    .refresh-countdown,
    .connection-status,
    .offline-banner,
    .swipe-hint,
    .search-container,
    .notification-bell-container,
    .btn-group,
    .toast,
    .tour-overlay,
    .shortcuts-modal-overlay,
    #loading-screen,
    .weather-anim-layer {
        display: none !important;
    }

    .store-card,
    .settings-section-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .stores-grid {
        display: block !important;
    }

    .stores-grid .store-card {
        margin-bottom: 15px;
    }

    .header {
        text-align: center;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .header .logo {
        max-width: 150px;
    }

    .weather-widget {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }

    .weather-widget * {
        color: black !important;
    }

    a {
        color: black !important;
        text-decoration: underline;
    }

    .status-indicator {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .status-indicator.healthy { background: #28a745 !important; }
    .status-indicator.alerts { background: #fd7e14 !important; }
    .status-indicator.critical { background: #dc3545 !important; }

    .heatmap-cell {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* ========================================
   Professional Widget Polish
   Cohesive design language for all widgets
   ======================================== */

/* Widget buttons - unified brand styling */
.collapsible-section button,
.collapsible-content button {
    font-family: var(--font-primary);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.collapsible-section button:hover,
.collapsible-content button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 169, 98, 0.3);
}

.collapsible-section button:active,
.collapsible-content button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Widget form inputs - refined styling */
.collapsible-section input[type="text"],
.collapsible-section input[type="date"],
.collapsible-section input[type="number"],
.collapsible-section input[type="time"],
.collapsible-section select,
.collapsible-section textarea,
.collapsible-content input[type="text"],
.collapsible-content input[type="date"],
.collapsible-content input[type="number"],
.collapsible-content input[type="time"],
.collapsible-content select,
.collapsible-content textarea {
    font-family: var(--font-primary);
    font-size: 13px;
    padding: 10px 14px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    color: var(--black);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
}

.collapsible-section input:focus,
.collapsible-section select:focus,
.collapsible-section textarea:focus,
.collapsible-content input:focus,
.collapsible-content select:focus,
.collapsible-content textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}

.collapsible-section input::placeholder,
.collapsible-content input::placeholder {
    color: var(--light-gray);
    font-weight: 300;
}

/* Widget data rows - refined spacing */
.collapsible-content > div > div[style*="border-bottom"] {
    transition: background 0.15s ease;
}

/* Progress bars within widgets - smoother */
.collapsible-content div[style*="border-radius: 3px"],
.collapsible-content div[style*="border-radius: 4px"] {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SVG animations within widgets */
.collapsible-content svg {
    transition: transform 0.2s ease;
}

/* Cards within analytics section */
.collapsible-content > div[style*="border-radius: 12px"] {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.collapsible-content > div[style*="border-radius: 12px"]:hover {
    box-shadow: var(--shadow-md);
}

/* ========================================
   Store Page Cards - Entrance Animation
   ======================================== */
.system-card {
    animation: widgetFadeIn 0.3s ease both;
}

.systems-grid-top .system-card:nth-child(1) { animation-delay: 0.05s; }
.systems-grid-top .system-card:nth-child(2) { animation-delay: 0.1s; }
.systems-grid-top .system-card:nth-child(3) { animation-delay: 0.15s; }

.systems-grid-bottom-2 .system-card { animation-delay: 0.2s; }

/* ========================================
   Enhanced Status Indicators
   Subtle pulse for critical items
   ======================================== */
.status-indicator.critical::after {
    animation: criticalPulse 2s ease-in-out infinite;
}

.unit-status.critical::after {
    animation: criticalPulse 2s ease-in-out infinite;
}

@keyframes criticalPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========================================
   Bottom Navigation - Premium Feel
   ======================================== */
.bottom-nav {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92) !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

body.dark-mode .bottom-nav {
    background: rgba(26, 26, 26, 0.92) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.bottom-nav .nav-item {
    transition: transform 0.2s ease, color 0.2s ease;
}

.bottom-nav .nav-item:active {
    transform: scale(0.92);
}

/* ========================================
   Refined Store Cards
   ======================================== */
.store-card {
    animation: widgetFadeIn 0.4s ease both;
    position: relative;
    overflow: hidden;
}

.store-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left;
}

.store-card:hover::after {
    transform: scaleX(1);
}

.stores-grid .store-card:nth-child(1) { animation-delay: 0.05s; }
.stores-grid .store-card:nth-child(2) { animation-delay: 0.1s; }
.stores-grid .store-card:nth-child(3) { animation-delay: 0.15s; }

/* ========================================
   Unit Cards - Refined Interaction
   ======================================== */
.unit-card {
    animation: widgetFadeIn 0.3s ease both;
    position: relative;
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--border-gray);
    transition: background 0.3s ease;
}

.unit-card:hover::before {
    background: var(--accent-gold);
}

.unit-card.clickable::before {
    background: var(--status-critical);
}

/* ========================================
   Page Transitions
   ======================================== */
#app {
    animation: pageFadeIn 0.3s ease;
}

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

/* ========================================
   Scrollbar Styling (WebKit)
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--light-gray);
}

/* ========================================
   Selection Styling
   ======================================== */
::selection {
    background: rgba(201, 169, 98, 0.2);
    color: var(--black);
}

/* ========================================
   Smooth Scroll
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* ========================================
   Focus Visible - Accessibility
   ======================================== */
:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* ========================================
   Reports Table - Refined
   ======================================== */
.reports-table {
    border-collapse: separate;
    border-spacing: 0;
}

.reports-table th {
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--medium-gray);
}

.reports-table tbody tr {
    transition: background 0.15s ease;
}

.reports-table tbody tr:hover {
    background: var(--bg-light);
}

/* ========================================
   Weather Widget - Glass Effect
   ======================================== */
.weather-widget {
    position: relative;
    overflow: hidden;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* ========================================
   Toast Notifications - Refined
   ======================================== */
.toast {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: toastSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* ========================================
   Dark Mode - Widget Enhancements
   ======================================== */
body.dark-mode .collapsible-section {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .collapsible-section:hover {
    border-color: color-mix(in srgb, var(--accent-gold) 40%, #333);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

body.dark-mode .collapsible-header:hover {
    background: #252525;
}

body.dark-mode .collapsible-content {
    border-top-color: #333;
}

body.dark-mode .bottom-nav {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #444;
}

body.dark-mode ::selection {
    background: rgba(201, 169, 98, 0.3);
}

/* ===== UX ENHANCEMENTS ===== */

/* Page Transitions */
#app {
    transition: opacity 0.15s ease, transform 0.15s ease;
}
#app.page-transitioning {
    opacity: 0.92;
    transform: translateY(2px);
}

/* Notification Panel Slide-in */
#notification-panel.visible {
    right: 0 !important;
}

/* Skeleton Loading Placeholders */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; width: 80%; margin-bottom: 8px; }
.skeleton-text-sm { height: 10px; width: 60%; margin-bottom: 6px; }
.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card { height: 120px; margin-bottom: 12px; }

/* Smooth interactions */
.store-card, .bottom-nav-item, [data-nav] {
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.store-card:active {
    transform: scale(0.98);
}
[data-nav]:active {
    transform: scale(0.97);
    opacity: 0.8;
}

/* Command palette search shortcut badge */
.search-shortcut {
    cursor: pointer;
    transition: background 0.15s ease;
}
.search-shortcut:hover {
    background: #e0e0e0;
}

/* Pull-to-refresh indicator */
.pull-refresh-indicator {
    position: fixed;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.3s ease;
    z-index: 9998;
}
.pull-refresh-indicator.visible {
    top: 16px;
}
.pull-refresh-indicator svg {
    animation: spin 1s linear infinite;
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.toast-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Improved focus states */
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 2px solid #C9A962;
    outline-offset: 2px;
}

/* Scroll snap for horizontal scrolling sections */
.snap-scroll {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.snap-scroll > * {
    scroll-snap-align: start;
}

/* Micro-animation for status dots */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}
.live-dot, .status-indicator.critical::before {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Notification panel backdrop */
#notification-panel::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}
#notification-panel.visible::before {
    opacity: 1;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════
   BREADCRUMB NAV BUTTONS (Back/Forward)
   ═══════════════════════════════════════════════════════ */
.breadcrumb-nav-btns {
    display: flex;
    gap: 2px;
    margin-right: 8px;
}
.breadcrumb-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark);
    transition: all 0.15s ease;
}
.breadcrumb-nav-btn:hover:not(.disabled) {
    background: var(--bg);
    border-color: var(--accent);
    color: var(--accent);
}
.breadcrumb-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.breadcrumb {
    display: flex;
    align-items: center;
}

/* ═══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 90px;
    right: 16px;
    z-index: 9998;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    max-width: 360px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    font-size: 13px;
    color: var(--dark);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-left: 3px solid var(--accent);
}
.toast.show {
    transform: translateX(0);
    opacity: 1;
}
.toast.hiding {
    transform: translateX(120%);
    opacity: 0;
}
.toast-success { border-left-color: #7CB87C; }
.toast-error { border-left-color: #C45C5C; }
.toast-warning { border-left-color: #D4A84B; }
.toast-info { border-left-color: #5B8A9A; }
.toast-icon {
    flex-shrink: 0;
}
.toast-success .toast-icon { color: #7CB87C; }
.toast-error .toast-icon { color: #C45C5C; }
.toast-warning .toast-icon { color: #D4A84B; }
.toast-info .toast-icon { color: #5B8A9A; }
.toast-message {
    flex: 1;
    font-weight: 500;
}
.toast-undo-btn {
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: var(--accent);
    white-space: nowrap;
    transition: background 0.15s;
}
.toast-undo-btn:hover {
    background: #f0ece3;
}
.toast-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 2px;
    line-height: 1;
    transition: color 0.15s;
}
.toast-close-btn:hover {
    color: var(--dark);
}
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    animation: toast-progress-shrink linear forwards;
    width: 100%;
}
@keyframes toast-progress-shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* ═══════════════════════════════════════════════════════
   DRAG-TO-REORDER WIDGETS
   ═══════════════════════════════════════════════════════ */
.drag-handle {
    cursor: grab;
    color: #ccc;
    padding: 2px 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    margin-right: 4px;
}
.drag-handle:hover {
    color: var(--accent);
}
.drag-handle:active {
    cursor: grabbing;
}
.collapsible-section.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}
.collapsible-section.drag-over {
    border-top: 2px solid var(--accent);
    margin-top: -2px;
}
.collapsible-section[draggable="true"] {
    transition: opacity 0.2s, transform 0.2s;
}

/* ═══════════════════════════════════════════════════════
   ADVANCED DATA TABLE
   ═══════════════════════════════════════════════════════ */
.data-table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin: 12px 0;
}
.data-table-title {
    padding: 14px 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}
.data-table-controls {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    align-items: center;
    flex-wrap: wrap;
}
.data-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.data-table th {
    background: var(--bg);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gray);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    user-select: none;
    position: relative;
}
.data-table th.sortable {
    cursor: pointer;
    transition: color 0.15s;
}
.data-table th.sortable:hover {
    color: var(--accent);
}
.sort-indicator {
    font-size: 8px;
    margin-left: 4px;
    opacity: 0.4;
}
.data-table th.sorted-asc .sort-indicator,
.data-table th.sorted-desc .sort-indicator {
    opacity: 1;
    color: var(--accent);
}
.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f5f5f5;
    color: var(--dark);
}
.data-table tbody tr:hover {
    background: #fafafa;
}
.data-table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--gray);
}
.data-table-page-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
.data-table-page-btns button {
    padding: 10px 16px;
    min-height: 44px;
    min-width: 44px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}
.data-table-page-btns button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}
.data-table-page-btns button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════
   LAYOUT MANAGER CHIPS
   ═══════════════════════════════════════════════════════ */
.layout-chip:hover {
    border-color: var(--accent) !important;
    background: #fdf9f0 !important;
}
.layout-chip:active {
    transform: scale(0.97);
}

/* ═══════════════════════════════════════════════════════
   DARK MODE ADAPTATIONS FOR NEW COMPONENTS
   ═══════════════════════════════════════════════════════ */
.dark-mode .toast {
    background: #2a2a2a;
    color: #e5e5e5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.dark-mode .toast-undo-btn {
    background: #333;
    border-color: #555;
    color: #C9A962;
}
.dark-mode .data-table-container {
    background: #1e1e1e;
    border-color: #333;
}
.dark-mode .data-table th {
    background: #252525;
    color: #aaa;
    border-color: #333;
}
.dark-mode .data-table td {
    color: #e0e0e0;
    border-color: #2a2a2a;
}
.dark-mode .data-table tbody tr:hover {
    background: #252525;
}
.dark-mode .data-table-pagination {
    border-color: #333;
}
.dark-mode .data-table-page-btns button {
    background: #252525;
    border-color: #444;
    color: #ccc;
}
.dark-mode .breadcrumb-nav-btn {
    background: #252525;
    border-color: #444;
    color: #ddd;
}
.dark-mode .layout-manager {
    background: #1e1e1e !important;
    border-color: #333 !important;
}
.dark-mode .layout-chip {
    background: #252525 !important;
    border-color: #444 !important;
    color: #ddd !important;
}
.dark-mode .layout-manager input {
    background: #252525;
    border-color: #444;
    color: #ddd;
}

/* Mobile responsive toast */
@media (max-width: 480px) {
    .toast-container {
        left: 16px;
        right: 16px;
        max-width: none;
        bottom: 100px;
    }
}

/* ═══════════════════════════════════════════════════════
   STICKY CONTEXTUAL HEADER
   ═══════════════════════════════════════════════════════ */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 990;
    transform: translateY(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.sticky-header.visible {
    transform: translateY(0);
    pointer-events: auto;
}
.sticky-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.sticky-header-brand {
    flex-shrink: 0;
}
.sticky-header-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}
.sticky-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
}
.sticky-stat.critical { color: #C45C5C; }
.sticky-stat.alerts { color: #D4A84B; }
.sticky-stat.healthy { color: #7CB87C; }
.sticky-stat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.sticky-stat-dot.critical { background: #C45C5C; }
.sticky-stat-dot.alerts { background: #D4A84B; }
.sticky-stat-dot.healthy { background: #7CB87C; }
.sticky-header-actions {
    display: flex;
    gap: 6px;
}
.sticky-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--dark);
    position: relative;
    transition: all 0.15s;
}
.sticky-action-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.sticky-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #C45C5C;
}

/* ═══════════════════════════════════════════════════════
   RICH TOOLTIP SYSTEM
   ═══════════════════════════════════════════════════════ */
[data-tooltip] {
    cursor: help;
    position: relative;
}
.rich-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 8px 12px;
    background: #1a1a1a;
    color: white;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 8px;
    max-width: 240px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    white-space: normal;
}
.rich-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   MULTI-SELECT STORE CARDS
   ═══════════════════════════════════════════════════════ */
.store-select-check {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.store-card.selected {
    border: 2px solid #5B8A9A !important;
    box-shadow: 0 0 0 3px rgba(91, 138, 154, 0.15);
}

/* ═══════════════════════════════════════════════════════
   ACCESSIBILITY - Reduced Motion
   ═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .toast { transition: none; }
    .sticky-header { transition: none; }
    #app.page-transitioning { opacity: 1; transform: none; }
    .collapsible-section[draggable="true"] { transition: none; }
}

/* Focus visible styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
.bottom-nav-item:focus-visible,
.sticky-action-btn:focus-visible,
.breadcrumb-nav-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Skip to content link (accessible) */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 12px 20px;
    background: var(--accent);
    color: white;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-to-content:focus {
    top: 0;
}

/* ═══════════════════════════════════════════════════════
   DARK MODE - Sticky Header & Tooltips
   ═══════════════════════════════════════════════════════ */
.dark-mode .sticky-header-inner {
    background: rgba(30, 30, 30, 0.95);
    border-color: #333;
}
.dark-mode .sticky-action-btn {
    background: #252525;
    border-color: #444;
    color: #ddd;
}
.dark-mode .rich-tooltip {
    background: #333;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.dark-mode .store-card.selected {
    border-color: #5B8A9A !important;
}

/* ═══════════════════════════════════════════════════════
   SMOOTH VALUE TRANSITIONS
   ═══════════════════════════════════════════════════════ */
.animated-value {
    display: inline-block;
    transition: color 0.3s ease;
}
.animated-value.increasing {
    color: #C45C5C;
}
.animated-value.decreasing {
    color: #7CB87C;
}

/* ═══════════════════════════════════════════════════════
   CONTEXT MENU
   ═══════════════════════════════════════════════════════ */
.context-menu {
    position: fixed;
    z-index: 9999;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    padding: 6px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease;
    border: 1px solid var(--border);
}
.context-menu.visible {
    opacity: 1;
    transform: scale(1);
}
.context-menu-header {
    padding: 8px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    font-size: 13px;
    color: var(--dark);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.1s;
    text-align: left;
}
.context-menu-item:hover {
    background: var(--bg);
}
.context-menu-item:active {
    background: #e8e4dc;
}
.context-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}

/* ═══════════════════════════════════════════════════════
   KEYBOARD FOCUSED STORE CARD
   ═══════════════════════════════════════════════════════ */
.store-card.kb-focused {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.15);
}

/* ═══════════════════════════════════════════════════════
   PWA INSTALL BANNER
   ═══════════════════════════════════════════════════════ */
.install-banner {
    position: fixed;
    bottom: 80px;
    left: 16px;
    right: 16px;
    z-index: 995;
    transform: translateY(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.install-banner.visible {
    transform: translateY(0);
}
.install-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border);
}
.install-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.install-banner-text strong {
    font-size: 13px;
    color: var(--dark);
}
.install-banner-text span {
    font-size: 11px;
    color: var(--gray);
}
.install-banner-btn {
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.install-banner-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════ */
@media print {
    body {
        background: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .bottom-nav,
    .fab-container,
    .sticky-header,
    .toast-container,
    .install-banner,
    #command-palette-overlay,
    #notification-panel,
    .context-menu,
    .search-container,
    .breadcrumb-nav-btns,
    .pin-btn,
    .refresh-btn,
    #manual-refresh-btn,
    .quick-ack-btn,
    .fab-toggle,
    .user-menu-buttons,
    #bulk-ack-btn,
    #select-mode-btn,
    #compare-stores-btn,
    .view-toggle {
        display: none !important;
    }
    .header {
        border-bottom: 2px solid #333;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
    .store-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        page-break-inside: avoid;
    }
    .stores-grid {
        display: block !important;
    }
    .stores-grid .store-card {
        margin-bottom: 12px;
    }
    .collapsible-content.collapsed {
        display: block !important;
        max-height: none !important;
    }
    .status-indicator {
        print-color-adjust: exact;
    }
    a[href]::after {
        content: none !important;
    }
    .reports-section {
        break-before: page;
    }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE - Context Menu & Install Banner
   ═══════════════════════════════════════════════════════ */
.dark-mode .context-menu {
    background: #2a2a2a;
    border-color: #444;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.dark-mode .context-menu-item {
    color: #e0e0e0;
}
.dark-mode .context-menu-item:hover {
    background: #333;
}
.dark-mode .context-menu-divider {
    background: #444;
}
.dark-mode .install-banner-content {
    background: #2a2a2a;
    border-color: #444;
}
.dark-mode .install-banner-text strong {
    color: #e0e0e0;
}
.dark-mode .install-banner-text span {
    color: #999;
}

/* ═══════════════════════════════════════════════════════
   BUTTON RIPPLE EFFECT
   ═══════════════════════════════════════════════════════ */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.25);
    transform: scale(0);
    animation: ripple-expand 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 1;
}
@keyframes ripple-expand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
.dark-mode .ripple-effect {
    background: rgba(201, 169, 98, 0.35);
}

/* ═══════════════════════════════════════════════════════
   SYNC INDICATOR
   ═══════════════════════════════════════════════════════ */
.sync-indicator {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-60px);
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2a2a2a;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}
.sync-indicator.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.sync-spinner {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
   ═══════════════════════════════════════════════════════ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE MULTI-COLUMN LAYOUT (Tablet & Desktop)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    #app {
        max-width: 900px;
        margin: 0 auto;
        padding: 0 24px;
    }
    .stores-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
    .header {
        padding: 20px 0;
    }
    .bottom-nav {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }
    .breadcrumb {
        padding: 12px 0;
    }
    .toast-container {
        bottom: 30px;
        right: 30px;
    }
    .fab-container {
        bottom: 90px;
        right: 30px;
    }
}

@media (min-width: 1024px) {
    #app {
        max-width: 1100px;
        padding: 0 40px;
    }
    .stores-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }
    .header .logo {
        margin: 0 auto;
    }
    .collapsible-section {
        margin-bottom: 20px;
    }
    .sticky-header-inner {
        max-width: 1100px;
        margin: 0 auto;
        padding: 10px 40px;
    }
}

@media (min-width: 1400px) {
    #app {
        max-width: 1320px;
    }
    .stores-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
    .sticky-header-inner {
        max-width: 1320px;
    }
}

/* Tablet landscape - two-column sections */
@media (min-width: 768px) and (max-width: 1023px) {
    .greeting-bar {
        max-width: 600px;
    }
}

/* ═══════════════════════════════════════════════════════
   DARK MODE - New Components
   ═══════════════════════════════════════════════════════ */
.dark-mode .sync-indicator {
    background: #444;
}

/* Reduced motion - disable scroll reveals */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .ripple-effect {
        animation: none;
        display: none;
    }
    .sync-spinner {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════
   FEATURE DISCOVERY / NEW BADGES
   ═══════════════════════════════════════════════════════ */
.new-badge {
    display: inline-block;
    padding: 2px 6px;
    background: linear-gradient(135deg, #E11D48, #F97316);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: badge-pulse 2s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 6px;
}
@keyframes badge-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}
.new-badge.discovered {
    animation: badge-fade 1s ease forwards;
}
@keyframes badge-fade {
    to { opacity: 0; transform: scale(0.8); }
}

/* ═══════════════════════════════════════════════════════
   SKELETON LOADERS
   ═══════════════════════════════════════════════════════ */
.skeleton-card, .skeleton-table, .skeleton-chart,
.skeleton-kpi, .skeleton-list {
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
    margin-bottom: 10px;
}
.skeleton-line.w30 { width: 30%; }
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w50 { width: 50%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w70 { width: 70%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin: 12px 0;
}
.skeleton-circle-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    margin: 0 auto 12px;
}
.skeleton-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.skeleton-cell {
    height: 10px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}
.skeleton-cell.w20 { width: 20%; }
.skeleton-cell.w30 { width: 30%; }
.skeleton-cell.w50 { width: 50%; }
.skeleton-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100px;
    padding-top: 10px;
}
.skeleton-bar {
    flex: 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px 4px 0 0;
}
.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}
.skeleton-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
.skeleton-lines {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════
   PERFORMANCE MONITOR
   ═══════════════════════════════════════════════════════ */
.perf-monitor {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 99999;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #00ff88;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}
.perf-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.perf-label {
    color: #888;
    font-size: 8px;
    text-transform: uppercase;
}
.perf-value {
    font-weight: bold;
    font-size: 11px;
}

/* ═══════════════════════════════════════════════════════
   THEME PRESET BUTTONS
   ═══════════════════════════════════════════════════════ */
.theme-preset-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.theme-preset-btn.active {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 201, 169, 98), 0.2);
}

/* Dark mode skeleton */
.dark-mode .skeleton-card,
.dark-mode .skeleton-table,
.dark-mode .skeleton-chart,
.dark-mode .skeleton-kpi,
.dark-mode .skeleton-list {
    background: #1e1e1e;
    border-color: #333;
}
.dark-mode .skeleton-line,
.dark-mode .skeleton-circle,
.dark-mode .skeleton-circle-lg,
.dark-mode .skeleton-cell,
.dark-mode .skeleton-bar,
.dark-mode .skeleton-avatar {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

/* ═══════════════════════════════════════════════════════
   ANNOTATION WIDGET
   ═══════════════════════════════════════════════════════ */
.annotation-widget {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.annotation-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 8px;
}
.annotation-list {
    margin-bottom: 8px;
}
.annotation-item {
    padding: 6px 8px;
    background: white;
    border-radius: 6px;
    margin-bottom: 4px;
    border: 1px solid #f0f0f0;
}
.annotation-text {
    font-size: 12px;
    color: var(--dark);
    margin-bottom: 3px;
}
.annotation-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    color: #999;
}
.annotation-delete {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
    margin-left: auto;
}
.annotation-delete:hover {
    color: #C45C5C;
}
.annotation-input-row {
    display: flex;
    gap: 6px;
}
.annotation-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}
.annotation-save-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent);
    transition: all 0.15s;
}
.annotation-save-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ═══════════════════════════════════════════════════════
   TIMELINE SCRUBBER
   ═══════════════════════════════════════════════════════ */
.timeline-scrubber-container {
    margin: 12px 0;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
}
.timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 10px;
}
.timeline-label {
    font-weight: 500;
}
.timeline-track {
    position: relative;
}
.timeline-range {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #e5e5e5, var(--accent));
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.timeline-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: grab;
    border: 2px solid white;
}
.timeline-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: grab;
    border: 2px solid white;
}
.timeline-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 10px;
    color: #bbb;
}

/* ═══════════════════════════════════════════════════════
   CHART TOOLTIP
   ═══════════════════════════════════════════════════════ */
.chart-tooltip {
    position: fixed;
    z-index: 9999;
    padding: 6px 10px;
    background: #1a1a1a;
    color: white;
    font-size: 11px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    white-space: nowrap;
}
.chart-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.chart-tip-label {
    display: block;
    font-size: 9px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chart-tip-value {
    font-weight: 700;
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════
   RTL SUPPORT (Arabic)
   ═══════════════════════════════════════════════════════ */
[dir="rtl"] .breadcrumb-sep {
    transform: scaleX(-1);
}
[dir="rtl"] .breadcrumb-nav-btns {
    margin-right: 0;
    margin-left: 8px;
}
[dir="rtl"] .annotation-delete {
    margin-left: 0;
    margin-right: auto;
}

/* ═══════════════════════════════════════════════════════
   DARK MODE - Annotations, Timeline, Chart Tooltip
   ═══════════════════════════════════════════════════════ */
.dark-mode .annotation-widget {
    background: #252525;
    border-color: #333;
}
.dark-mode .annotation-item {
    background: #1e1e1e;
    border-color: #333;
}
.dark-mode .annotation-text {
    color: #e0e0e0;
}
.dark-mode .annotation-input {
    background: #1e1e1e;
    border-color: #444;
    color: #ddd;
}
.dark-mode .annotation-save-btn {
    background: #252525;
    border-color: #444;
}
.dark-mode .timeline-scrubber-container {
    background: #1e1e1e;
    border-color: #333;
}
.dark-mode .timeline-range {
    background: linear-gradient(to right, #333, var(--accent));
}
.dark-mode .chart-tooltip {
    background: #333;
}

/* ═══════════════════════════════════════════════════════
   FOCUS MODE
   ═══════════════════════════════════════════════════════ */
.focus-mode-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #222222 50%, #2a2a2a 100%);
    padding: 20px 16px;
    color: white;
}
.focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.focus-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.focus-title h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}
.focus-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    justify-content: center;
}
.focus-stat {
    text-align: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    backdrop-filter: blur(4px);
}
.focus-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
}
.focus-stat-label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.focus-section {
    margin-bottom: 20px;
}
.focus-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.focus-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.focus-card.critical { border-left-color: #C45C5C; }
.focus-card.alerts { border-left-color: #D4A84B; }
.focus-card:hover { background: rgba(255, 255, 255, 0.1); }
.focus-card-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.focus-card-status.critical { background: #C45C5C; animation: pulse-dot 2s infinite; }
.focus-card-status.alerts { background: #D4A84B; }
.focus-card-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}
.focus-card-info span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}
.focus-card-detail {
    margin-left: auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 200px;
    text-align: right;
}
.focus-all-clear {
    text-align: center;
    padding: 40px 20px;
}
.focus-all-clear h3 {
    font-size: 20px;
    color: white;
    margin: 16px 0 8px;
}
.focus-all-clear p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════
   KIOSK MODE
   ═══════════════════════════════════════════════════════ */
.kiosk-page {
    min-height: 100vh;
    background: #0a0a0a;
    color: white;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.kiosk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}
.kiosk-time {
    text-align: right;
}
.kiosk-clock {
    font-size: 28px;
    font-weight: 200;
    letter-spacing: 2px;
}
.kiosk-date {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}
.kiosk-status-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}
.kiosk-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.kiosk-badge.critical { background: #C45C5C30; color: #C45C5C; }
.kiosk-badge.alerts { background: #D4A84B30; color: #D4A84B; }
.kiosk-badge.healthy { background: #7CB87C30; color: #7CB87C; }
.kiosk-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kiosk-stores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 800px;
}
.kiosk-store-card {
    padding: 24px;
    background: #1a1a1a;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #333;
}
.kiosk-store-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 auto 12px;
}
.kiosk-store-status.healthy { background: #7CB87C; }
.kiosk-store-status.alerts { background: #D4A84B; }
.kiosk-store-status.critical { background: #C45C5C; animation: pulse-dot 2s infinite; }
.kiosk-store-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}
.kiosk-store-detail {
    font-size: 12px;
    color: #888;
}
.kiosk-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 500px;
}
.kiosk-metric {
    text-align: center;
    padding: 30px;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #333;
}
.kiosk-metric-value {
    display: block;
    font-size: 36px;
    font-weight: 200;
    color: #C9A962;
}
.kiosk-metric-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.kiosk-alerts {
    width: 100%;
    max-width: 600px;
}
.kiosk-alert {
    padding: 14px 16px;
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 8px;
    border-left: 3px solid;
    display: flex;
    align-items: center;
    gap: 12px;
}
.kiosk-alert.critical { border-left-color: #C45C5C; }
.kiosk-alert.alerts { border-left-color: #D4A84B; }
.kiosk-alert-store {
    font-weight: 600;
    font-size: 13px;
    min-width: 120px;
}
.kiosk-alert-text {
    font-size: 12px;
    color: #aaa;
}
.kiosk-all-clear {
    text-align: center;
    font-size: 18px;
    color: #7CB87C;
    padding: 40px;
}
.kiosk-footer {
    text-align: center;
    padding-top: 20px;
}
.kiosk-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}
.kiosk-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    transition: background 0.3s;
}
.kiosk-dot.active {
    background: #C9A962;
}
.kiosk-exit-hint {
    font-size: 11px;
    color: #555;
}

/* ═══════════════════════════════════════════════════════
   ALERT GROUPS
   ═══════════════════════════════════════════════════════ */
.alert-group {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.alert-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.alert-group-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}
.alert-group-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.alert-group-item {
    padding: 6px 0 6px 32px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.alert-group-item:last-child {
    border-bottom: none;
}

/* ═══════════════════════════════════════════════════════
   PREDICTIVE ACTIONS
   ═══════════════════════════════════════════════════════ */
.predictive-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.predictive-action:hover {
    background: rgba(255, 255, 255, 0.1);
}
.predictive-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.predictive-icon.high { background: #C45C5C30; color: #C45C5C; }
.predictive-icon.medium { background: #D4A84B30; color: #D4A84B; }
.predictive-icon.low { background: #5B8A9A30; color: #5B8A9A; }
.predictive-text {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}
.predictive-reason {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 9: Split View, Voice Commands, Micro-interactions,
               Search Autocomplete, Export Wizard
   ═══════════════════════════════════════════════════════════════ */

/* --- Split View Panel --- */
.split-view-page .page-header {
    text-align: center;
    margin-bottom: 24px;
}
.split-view-container {
    display: flex;
    gap: 0;
    min-height: 60vh;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.split-panel {
    flex: 1;
    padding: 20px;
    background: #fff;
    overflow-y: auto;
    min-width: 0;
}
.split-panel.left-panel {
    border-right: none;
}
.split-divider {
    width: 8px;
    background: #f0f0f0;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    position: relative;
}
.split-divider:hover, .split-divider:active {
    background: #C9A962;
}
.split-divider-handle {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.2);
}
.split-divider:hover .split-divider-handle {
    background: #fff;
}
.split-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.split-store-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    background: #f8f8f8;
    cursor: pointer;
}
.split-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.split-status-badge.healthy { background: rgba(124, 184, 124, 0.15); color: #7CB87C; }
.split-status-badge.alerts { background: rgba(212, 168, 75, 0.15); color: #D4A84B; }
.split-status-badge.critical { background: rgba(196, 92, 92, 0.15); color: #C45C5C; }
.split-panel-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.split-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    margin-bottom: 8px;
}
.split-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.split-metric:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.split-metric-label {
    flex: 1;
    font-size: 13px;
    color: #555;
}
.split-metric-value {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}
.split-panel-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #999;
    font-size: 14px;
}

/* --- Status Dot Animations (Micro-interactions) --- */
.status-dot-animated {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7CB87C;
}
.status-dot-animated.healthy { background: #7CB87C; }
.status-dot-animated.alerts { background: #D4A84B; }
.status-dot-animated.critical { background: #C45C5C; }
.status-dot-animated.pulse-critical {
    animation: pulseCritical 1.5s ease-in-out infinite;
}
.status-dot-animated.pulse-warning {
    animation: pulseWarning 2s ease-in-out infinite;
}
@keyframes pulseCritical {
    0%, 100% { box-shadow: 0 0 0 0 rgba(196, 92, 92, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(196, 92, 92, 0); }
}
@keyframes pulseWarning {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 168, 75, 0.5); }
    50% { box-shadow: 0 0 0 5px rgba(212, 168, 75, 0); }
}

/* Micro-interaction: Card tilt handled via JS, add transition base */
.store-card, .metric-card {
    transform-style: preserve-3d;
    will-change: transform;
}

/* Progress bar animation base */
[data-progress] {
    height: 4px;
    background: linear-gradient(90deg, #C9A962, #7CB87C);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Voice Command Overlay --- */
.voice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.voice-overlay.active {
    opacity: 1;
}
.voice-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px;
    position: relative;
}
.voice-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border-radius: 50%;
    border: 2px solid rgba(201, 169, 98, 0.4);
    animation: voicePulse 1.5s ease-in-out infinite;
}
@keyframes voicePulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}
.voice-mic-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C9A962, #D4A84B);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 1;
    animation: micBounce 1s ease-in-out infinite alternate;
}
@keyframes micBounce {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}
.voice-status {
    color: white;
    font-size: 16px;
    font-weight: 500;
}
.voice-transcript {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    min-height: 20px;
    max-width: 300px;
    text-align: center;
}
.voice-transcript.final {
    color: #C9A962;
    font-weight: 500;
}
.voice-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    margin-top: 8px;
}

/* --- Search Autocomplete --- */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-height: 320px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
    margin-top: 4px;
}
.search-autocomplete.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.autocomplete-section-title {
    padding: 8px 14px 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    font-weight: 600;
}
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.autocomplete-item:hover, .autocomplete-item.selected {
    background: rgba(201, 169, 98, 0.08);
}
.autocomplete-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}
.autocomplete-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.autocomplete-label {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.autocomplete-sublabel {
    font-size: 11px;
    color: #999;
}

/* --- Export Wizard --- */
.export-wizard-page .page-header {
    text-align: center;
    margin-bottom: 32px;
}
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 0 20px;
}
.wizard-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.wizard-progress-step span {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}
.wizard-progress-step.active span {
    color: #C9A962;
    font-weight: 600;
}
.wizard-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: #f0f0f0;
    color: #999;
    transition: all 0.3s;
}
.wizard-progress-step.active .wizard-step-circle {
    background: linear-gradient(135deg, #C9A962, #D4A84B);
    color: white;
}
.wizard-progress-step.completed .wizard-step-circle {
    background: #7CB87C;
    color: white;
}
.wizard-progress-line {
    width: 40px;
    height: 2px;
    background: #e5e5e5;
    margin: 0 8px;
    margin-bottom: 20px;
}
.wizard-content {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}
.wizard-step h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
}
.wizard-options {
    display: grid;
    gap: 12px;
}
.format-options {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.wizard-option {
    position: relative;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}
.wizard-option:hover {
    border-color: rgba(201, 169, 98, 0.3);
}
.wizard-option.selected {
    border-color: #C9A962;
    background: rgba(201, 169, 98, 0.05);
}
.wizard-option input[type="radio"],
.wizard-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.wizard-option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.wizard-option-content svg {
    color: #C9A962;
}
.wizard-option-content span {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}
.wizard-option-content small {
    font-size: 11px;
    color: #888;
}
.wizard-option.compact {
    padding: 10px 16px;
    text-align: center;
}
.wizard-option.compact span {
    font-size: 13px;
    font-weight: 500;
}
.wizard-custom-dates {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}
.wizard-date-input {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}
.wizard-section {
    margin-bottom: 16px;
}
.wizard-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    margin-bottom: 10px;
}
.wizard-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wizard-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f8f8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.wizard-checkbox:hover {
    background: rgba(201, 169, 98, 0.1);
}
.wizard-checkbox input[type="checkbox"] {
    accent-color: #C9A962;
}
.wizard-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.wizard-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 8px;
}
.wizard-summary-label {
    font-size: 13px;
    color: #888;
}
.wizard-summary-value {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}
.wizard-export-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    font-size: 14px;
}
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.wizard-prev-btn, .wizard-next-btn {
    padding: 10px 20px;
    font-size: 13px;
    border-radius: 8px;
}

/* --- Dark Mode Adaptations --- */
body.dark-mode .split-view-container {
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .split-panel {
    background: #1e1e1e;
}
body.dark-mode .split-divider {
    background: #333;
}
body.dark-mode .split-store-select {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}
body.dark-mode .split-metric {
    background: rgba(255, 255, 255, 0.04);
}
body.dark-mode .split-metric-value {
    color: #e0e0e0;
}
body.dark-mode .split-section h4 {
    color: #888;
}
body.dark-mode .search-autocomplete {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
body.dark-mode .autocomplete-item:hover,
body.dark-mode .autocomplete-item.selected {
    background: rgba(201, 169, 98, 0.12);
}
body.dark-mode .autocomplete-label {
    color: #e0e0e0;
}
body.dark-mode .wizard-content {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .wizard-step h3 {
    color: #e0e0e0;
}
body.dark-mode .wizard-option {
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .wizard-option-content span {
    color: #e0e0e0;
}
body.dark-mode .wizard-checkbox {
    background: rgba(255, 255, 255, 0.04);
}
body.dark-mode .wizard-summary-row {
    background: rgba(255, 255, 255, 0.04);
}
body.dark-mode .wizard-summary-value {
    color: #e0e0e0;
}
body.dark-mode .wizard-date-input {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}
body.dark-mode .wizard-step-circle {
    background: #333;
}

/* --- Responsive Split View --- */
@media (max-width: 768px) {
    .split-view-container {
        flex-direction: column;
    }
    .split-divider {
        width: 100%;
        height: 8px;
        cursor: row-resize;
    }
    .split-divider-handle {
        width: 32px;
        height: 4px;
    }
    .split-panel {
        min-height: 40vh;
    }
    .format-options {
        grid-template-columns: 1fr;
    }
    .wizard-progress {
        transform: scale(0.85);
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 10: Activity Feed, Quick Notes, Contextual Help,
                Notification Filters, Widget Configurator
   ═══════════════════════════════════════════════════════════════ */

/* --- Activity Feed / Live Ticker --- */
.activity-feed-section {
    margin-bottom: 24px;
}
.activity-feed-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.activity-feed-section .section-header h2 {
    font-size: 16px;
    font-weight: 600;
}
.activity-feed {
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    max-height: 200px;
}
.activity-feed-track {
    animation: tickerScroll 30s linear infinite;
    padding: 8px 0;
}
.activity-feed-track:hover {
    animation-play-state: paused;
}
@keyframes tickerScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: background 0.2s;
}
.activity-item:hover {
    background: rgba(0, 0, 0, 0.02);
}
.activity-time {
    font-size: 11px;
    color: #999;
    min-width: 50px;
    font-variant-numeric: tabular-nums;
}
.activity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.activity-dot.critical { background: #C45C5C; }
.activity-dot.warning { background: #D4A84B; }
.activity-dot.info { background: #5B8A9A; }
.activity-store {
    font-weight: 600;
    color: #555;
    min-width: 100px;
}
.activity-msg {
    color: #777;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Quick Notes Widget --- */
.quick-notes-widget {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 16px;
    margin-top: 16px;
}
.quick-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.quick-notes-header h3 {
    font-size: 14px;
    font-weight: 600;
}
.notes-count {
    background: rgba(201, 169, 98, 0.15);
    color: #C9A962;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.quick-notes-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.quick-note-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    transition: border-color 0.2s;
}
.quick-note-input:focus {
    outline: none;
    border-color: #C9A962;
}
.quick-notes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quick-notes-empty {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 12px;
}
.quick-note-item {
    position: relative;
    padding: 10px 12px;
    background: #f8f8f8;
    border-radius: 8px;
    transition: background 0.2s;
}
.quick-note-item:hover {
    background: #f0f0f0;
}
.quick-note-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.quick-note-author {
    font-size: 11px;
    font-weight: 600;
    color: #C9A962;
}
.quick-note-time {
    font-size: 11px;
    color: #999;
}
.quick-note-text {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}
.quick-note-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}
.quick-note-item:hover .quick-note-delete {
    opacity: 1;
}
.quick-note-delete:hover {
    color: #C45C5C;
}

/* --- Contextual Help --- */
.help-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.15);
    color: #C9A962;
    border: none;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 4px;
    vertical-align: middle;
    transition: background 0.2s, transform 0.2s;
}
.help-tooltip-trigger:hover {
    background: rgba(201, 169, 98, 0.3);
    transform: scale(1.2);
}
.contextual-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.contextual-help-overlay.active {
    opacity: 1;
    visibility: visible;
}
.contextual-help-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
    position: relative;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    animation: helpSlideUp 0.3s ease;
}
@keyframes helpSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.contextual-help-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}
.contextual-help-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.contextual-help-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}
.contextual-help-close:hover {
    color: #333;
}

/* --- Notification Filters --- */
.notif-filters {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}
.notif-filter-select {
    flex: 1;
    min-width: 100px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    background: #f8f8f8;
    cursor: pointer;
}

/* --- Widget Configurator --- */
.widget-configurator {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 300px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}
.widget-configurator.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.widget-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.widget-config-header h3 {
    font-size: 14px;
    font-weight: 600;
}
.widget-config-list {
    padding: 8px 0;
    max-height: 320px;
    overflow-y: auto;
}
.widget-config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    transition: background 0.2s;
}
.widget-config-item:hover {
    background: rgba(0, 0, 0, 0.02);
}
.widget-config-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.widget-config-label {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
}
.widget-config-desc {
    font-size: 11px;
    color: #999;
}
.widget-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}
.widget-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.widget-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ddd;
    border-radius: 20px;
    transition: background 0.3s;
}
.widget-toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.widget-toggle input:checked + .widget-toggle-slider {
    background: #C9A962;
}
.widget-toggle input:checked + .widget-toggle-slider::before {
    transform: translateX(16px);
}

/* --- Dark Mode Adaptations (Batch 10) --- */
body.dark-mode .activity-feed {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .activity-item:hover {
    background: rgba(255, 255, 255, 0.03);
}
body.dark-mode .activity-store {
    color: #ccc;
}
body.dark-mode .activity-msg {
    color: #999;
}
body.dark-mode .quick-notes-widget {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .quick-note-input {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}
body.dark-mode .quick-note-item {
    background: rgba(255, 255, 255, 0.04);
}
body.dark-mode .quick-note-text {
    color: #ccc;
}
body.dark-mode .contextual-help-card {
    background: #2a2a2a;
}
body.dark-mode .contextual-help-card h3 {
    color: #e0e0e0;
}
body.dark-mode .contextual-help-card p {
    color: #aaa;
}
body.dark-mode .notif-filter-select {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}
body.dark-mode .widget-configurator {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .widget-config-label {
    color: #e0e0e0;
}
body.dark-mode .widget-config-header {
    border-color: rgba(255, 255, 255, 0.06);
}

/* --- Responsive (Batch 10) --- */
@media (max-width: 768px) {
    .activity-item {
        font-size: 11px;
        padding: 6px 12px;
    }
    .activity-store {
        min-width: 70px;
    }
    .notif-filters {
        flex-direction: column;
    }
    .widget-configurator {
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 11: Ambient Status Bar, Collapsible Sections,
                Reading Progress, Change Highlighting, Side Panel
   ═══════════════════════════════════════════════════════════════ */

/* --- Ambient Status Bar --- */
.ambient-status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9998;
    transition: background 0.8s ease;
}
.ambient-status-bar.healthy {
    background: linear-gradient(90deg, #7CB87C, #5B8A9A, #7CB87C);
    background-size: 200% 100%;
    animation: ambientFlow 4s ease-in-out infinite;
}
.ambient-status-bar.warning {
    background: linear-gradient(90deg, #D4A84B, #C9A962, #D4A84B);
    background-size: 200% 100%;
    animation: ambientFlow 3s ease-in-out infinite;
}
.ambient-status-bar.critical {
    background: linear-gradient(90deg, #C45C5C, #D4A84B, #C45C5C);
    background-size: 200% 100%;
    animation: ambientFlow 2s ease-in-out infinite;
}
@keyframes ambientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* --- Collapsible Sections --- */
[data-collapsible] .collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}
[data-collapsible] .collapsible-header::after {
    content: '−';
    font-size: 18px;
    font-weight: 300;
    color: #999;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}
[data-collapsible].collapsed .collapsible-header::after {
    content: '+';
}
[data-collapsible] .collapsible-content {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reading Progress Bar --- */
.reading-progress-bar {
    position: fixed;
    top: 3px; /* Below ambient status bar */
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #C9A962, #7CB87C);
    z-index: 9997;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 1px 1px 0;
}

/* --- Change Highlighting --- */
.value-changed {
    animation: valueFlash 2s ease-out;
    position: relative;
}
@keyframes valueFlash {
    0% {
        background: rgba(201, 169, 98, 0.3);
        box-shadow: 0 0 8px rgba(201, 169, 98, 0.3);
    }
    100% {
        background: transparent;
        box-shadow: none;
    }
}

/* --- Contextual Side Panel --- */
.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    z-index: 9500;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.side-panel.open {
    right: 0;
}
.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.side-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}
.side-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s;
}
.side-panel-close:hover {
    color: #333;
}
.side-panel-body {
    padding: 20px 24px;
    flex: 1;
}
.side-panel-store-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}
.side-panel-address {
    font-size: 12px;
    color: #888;
    max-width: 200px;
}
.side-panel-status-badge {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.side-panel-status-badge.healthy { background: rgba(124, 184, 124, 0.15); color: #7CB87C; }
.side-panel-status-badge.alerts { background: rgba(212, 168, 75, 0.15); color: #D4A84B; }
.side-panel-status-badge.critical { background: rgba(196, 92, 92, 0.15); color: #C45C5C; }
.side-panel-section {
    margin-bottom: 20px;
}
.side-panel-section h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    margin-bottom: 10px;
}
.side-panel-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 6px;
}
.side-panel-metric-label {
    flex: 1;
    font-size: 13px;
    color: #555;
}
.side-panel-metric-value {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}
.side-panel-nav-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    text-align: center;
}

/* --- Dark Mode Adaptations (Batch 11) --- */
body.dark-mode .ambient-status-bar {
    opacity: 0.8;
}
body.dark-mode .side-panel {
    background: #1e1e1e;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}
body.dark-mode .side-panel-header {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .side-panel-header h3 {
    color: #e0e0e0;
}
body.dark-mode .side-panel-close:hover {
    color: #e0e0e0;
}
body.dark-mode .side-panel-metric {
    background: rgba(255, 255, 255, 0.04);
}
body.dark-mode .side-panel-metric-value {
    color: #e0e0e0;
}
body.dark-mode .reading-progress-bar {
    opacity: 0.7;
}
body.dark-mode .value-changed {
    animation-name: valueFlashDark;
}
@keyframes valueFlashDark {
    0% {
        background: rgba(201, 169, 98, 0.2);
        box-shadow: 0 0 8px rgba(201, 169, 98, 0.2);
    }
    100% {
        background: transparent;
        box-shadow: none;
    }
}

/* --- Responsive (Batch 11) --- */
@media (max-width: 768px) {
    .side-panel {
        width: 100%;
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 12: Confirmation Dialogs, Tab Memory, Floating Stats,
                Breadcrumb Peek, Multi-level Undo
   ═══════════════════════════════════════════════════════════════ */

/* --- Confirmation Dialogs --- */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.2s;
}
.confirm-overlay.active {
    opacity: 1;
}
.confirm-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.2s;
}
.confirm-overlay.active .confirm-dialog {
    transform: scale(1);
}
.confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 20px;
    font-weight: 700;
}
.confirm-icon.warning {
    background: rgba(212, 168, 75, 0.15);
    color: #D4A84B;
}
.confirm-icon.danger {
    background: rgba(196, 92, 92, 0.15);
    color: #C45C5C;
}
.confirm-icon.info {
    background: rgba(91, 138, 154, 0.15);
    color: #5B8A9A;
}
.confirm-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
}
.confirm-message {
    font-size: 13px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}
.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.confirm-cancel-btn {
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 8px;
}
.confirm-ok-btn {
    padding: 10px 20px;
    border-radius: 8px;
}
.confirm-ok-btn.danger {
    background: #C45C5C;
    color: white;
}
.confirm-ok-btn.danger:hover {
    background: #b54a4a;
}

/* --- Floating Stats Dock --- */
.floating-stats-dock {
    position: fixed;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 4000;
    transition: transform 0.3s, opacity 0.3s;
}
.floating-stats-dock.collapsed {
    transform: translateY(-50%) translateX(-60px);
    opacity: 0.3;
}
.floating-stats-dock.collapsed:hover {
    opacity: 0.7;
    transform: translateY(-50%) translateX(-40px);
}
.dock-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 8px;
    border-radius: 8px;
    min-width: 40px;
}
.dock-stat.critical { background: rgba(196, 92, 92, 0.1); }
.dock-stat.warning { background: rgba(212, 168, 75, 0.1); }
.dock-stat.healthy { background: rgba(124, 184, 124, 0.1); }
.dock-stat-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}
.dock-stat.critical .dock-stat-value { color: #C45C5C; }
.dock-stat.warning .dock-stat-value { color: #D4A84B; }
.dock-stat.healthy .dock-stat-value { color: #7CB87C; }
.dock-stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-top: 2px;
}
.dock-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.dock-toggle:hover {
    color: #555;
}
.floating-stats-dock.collapsed .dock-toggle svg {
    transform: rotate(180deg);
}

/* --- Breadcrumb Peek Preview --- */
.breadcrumb-item {
    position: relative;
}
.breadcrumb-peek {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 10px 14px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 5000;
    pointer-events: none;
}
.breadcrumb-peek.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.peek-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}
.peek-stats {
    font-size: 11px;
    color: #888;
    display: flex;
    gap: 8px;
}
.peek-status {
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}
.peek-status.healthy { color: #7CB87C; }
.peek-status.alerts { color: #D4A84B; }
.peek-status.critical { color: #C45C5C; }

/* --- Floating Undo Button --- */
.floating-undo-btn {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}
.floating-undo-btn.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.floating-undo-btn:hover {
    background: #333;
}

/* --- Dark Mode Adaptations (Batch 12) --- */
body.dark-mode .confirm-dialog {
    background: #2a2a2a;
}
body.dark-mode .confirm-title {
    color: #e0e0e0;
}
body.dark-mode .confirm-message {
    color: #aaa;
}
body.dark-mode .confirm-cancel-btn {
    background: #333;
    color: #e0e0e0;
}
body.dark-mode .floating-stats-dock {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .breadcrumb-peek {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.08);
}
body.dark-mode .peek-title {
    color: #e0e0e0;
}
body.dark-mode .floating-undo-btn {
    background: #C9A962;
    color: #1a1a1a;
}

/* --- Responsive (Batch 12) --- */
@media (max-width: 768px) {
    .floating-stats-dock {
        left: auto;
        right: 8px;
        top: auto;
        bottom: 80px;
        transform: none;
        flex-direction: row;
    }
    .floating-stats-dock.collapsed {
        transform: translateX(60px);
    }
    .breadcrumb-peek {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 13: Typewriter Welcome, Spotlight Search, Scroll-to-Top,
                Metric Sparklines, Connection Quality Indicator
   ═══════════════════════════════════════════════════════════════ */

/* --- Typewriter Welcome --- */
#typewriter-welcome {
    font-size: 14px;
    color: #888;
    min-height: 20px;
    font-weight: 300;
    letter-spacing: 0.3px;
}
#typewriter-welcome::after {
    content: '|';
    animation: cursorBlink 0.8s infinite;
    color: #C9A962;
    font-weight: 300;
}
#typewriter-welcome.typed-complete::after {
    animation: cursorFade 0.5s forwards;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
@keyframes cursorFade {
    to { opacity: 0; }
}

/* --- Spotlight Search --- */
.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.2s;
}
.spotlight-overlay.active {
    opacity: 1;
}
.spotlight-container {
    width: 90%;
    max-width: 560px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.96) translateY(-8px);
    transition: transform 0.2s;
}
.spotlight-overlay.active .spotlight-container {
    transform: scale(1) translateY(0);
}
.spotlight-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.spotlight-input-wrapper svg {
    color: #999;
    flex-shrink: 0;
}
.spotlight-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    background: transparent;
    color: #1a1a1a;
}
.spotlight-input::placeholder {
    color: #bbb;
}
.spotlight-kbd {
    font-size: 10px;
    padding: 3px 6px;
    background: #f0f0f0;
    border-radius: 4px;
    color: #999;
    font-family: monospace;
}
.spotlight-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}
.spotlight-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.1s;
}
.spotlight-result:hover, .spotlight-result.selected {
    background: rgba(201, 169, 98, 0.08);
}
.spotlight-result-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}
.spotlight-result-text {
    display: flex;
    flex-direction: column;
}
.spotlight-result-label {
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}
.spotlight-result-sublabel {
    font-size: 11px;
    color: #999;
}
.spotlight-footer {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 11px;
    color: #bbb;
}

/* --- Scroll-to-Top Button --- */
.scroll-to-top-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s, background 0.2s;
    z-index: 4000;
    color: #666;
}
.scroll-to-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-to-top-btn:hover {
    background: #C9A962;
    color: white;
    border-color: #C9A962;
}

/* --- Metric Sparklines --- */
.sparkline {
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

/* --- Connection Quality Indicator --- */
.connection-quality {
    position: fixed;
    top: 8px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    font-size: 10px;
    z-index: 9996;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.conn-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}
.conn-bar {
    width: 3px;
    background: #ddd;
    border-radius: 1px;
}
.conn-bar:nth-child(1) { height: 4px; }
.conn-bar:nth-child(2) { height: 8px; }
.conn-bar:nth-child(3) { height: 12px; }
.conn-bars.good .conn-bar { background: #7CB87C; }
.conn-bars.fair .conn-bar:nth-child(1),
.conn-bars.fair .conn-bar:nth-child(2) { background: #D4A84B; }
.conn-bars.poor .conn-bar:nth-child(1) { background: #C45C5C; }
.conn-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.conn-dot.offline { background: #C45C5C; }
.conn-label {
    font-weight: 500;
    color: #888;
}
.connection-quality.good .conn-label { color: #7CB87C; }
.connection-quality.fair .conn-label { color: #D4A84B; }
.connection-quality.poor .conn-label { color: #C45C5C; }
.connection-quality.offline .conn-label { color: #C45C5C; }

/* --- Dark Mode Adaptations (Batch 13) --- */
body.dark-mode #typewriter-welcome {
    color: #999;
}
body.dark-mode .spotlight-container {
    background: #2a2a2a;
}
body.dark-mode .spotlight-input {
    color: #e0e0e0;
}
body.dark-mode .spotlight-input-wrapper {
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .spotlight-result:hover,
body.dark-mode .spotlight-result.selected {
    background: rgba(201, 169, 98, 0.12);
}
body.dark-mode .spotlight-result-label {
    color: #e0e0e0;
}
body.dark-mode .spotlight-footer {
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .spotlight-kbd {
    background: #444;
    color: #ccc;
}
body.dark-mode .scroll-to-top-btn {
    background: #2a2a2a;
    border-color: rgba(255, 255, 255, 0.08);
    color: #ccc;
}
body.dark-mode .connection-quality {
    background: rgba(30, 30, 30, 0.9);
}

/* --- Responsive (Batch 13) --- */
@media (max-width: 768px) {
    .connection-quality {
        top: 4px;
        right: 8px;
        padding: 3px 8px;
    }
    .spotlight-container {
        width: 95%;
    }
    .scroll-to-top-btn {
        bottom: 75px;
        right: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 14: Professional Polish - Gradient Borders, Stagger
                Animations, Shadow System, Hover States, Number Fx
   ═══════════════════════════════════════════════════════════════ */

/* --- Gradient Border Glow --- */
.store-card,
.metric-card,
.quick-notes-widget,
.split-panel,
.wizard-content,
.activity-feed {
    position: relative;
}
.store-card::before,
.metric-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.4s ease;
    pointer-events: none;
    z-index: 0;
}
.store-card:hover::before,
.store-card:focus-within::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.4), rgba(124, 184, 124, 0.3));
}
.store-card.status-critical:hover::before {
    background: linear-gradient(135deg, rgba(196, 92, 92, 0.4), rgba(212, 168, 75, 0.3));
}
.store-card.status-alerts:hover::before {
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.4), rgba(201, 169, 98, 0.3));
}

/* --- Stagger Page Enter Animations --- */
@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.stagger-enter {
    opacity: 0;
    transform: translateY(12px);
}
.stagger-entered {
    animation: staggerFadeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Layered Shadow System (Elevation Levels) --- */
.elevation-0 {
    box-shadow: none;
}
.elevation-1,
.store-card,
.metric-card,
.quick-notes-widget,
.activity-feed,
.wizard-content {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.03),
        0 4px 8px rgba(0, 0, 0, 0.02);
}
.elevation-2,
.store-card:hover,
.metric-card:hover {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.03),
        0 12px 24px rgba(0, 0, 0, 0.02);
}
.elevation-3,
.spotlight-container,
.confirm-dialog,
.side-panel,
.widget-configurator.visible {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.06),
        0 16px 32px rgba(0, 0, 0, 0.06),
        0 24px 48px rgba(0, 0, 0, 0.04);
}

/* --- Refined Hover States --- */
.store-card,
.metric-card,
.platform-tool-card,
.quick-action-btn,
.bottom-nav-item,
.fab-action,
.breadcrumb-item,
.autocomplete-item,
.widget-config-item,
.activity-item,
.quick-note-item {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                background 0.2s ease;
}

.store-card:hover {
    transform: translateY(-2px);
}
.metric-card:hover {
    transform: translateY(-1px);
}
.platform-tool-card:hover {
    transform: translateY(-3px) scale(1.01);
}
.quick-action-btn:hover {
    transform: translateY(-2px);
}
.fab-action:hover {
    transform: translateX(-2px);
}

/* Active/pressed states */
.store-card:active,
.metric-card:active,
.platform-tool-card:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 0.1s;
}
.btn:active,
.quick-action-btn:active {
    transform: scale(0.96);
    transition-duration: 0.1s;
}

/* Focus ring for keyboard navigation */
.store-card:focus-visible,
.metric-card:focus-visible,
.btn:focus-visible,
.fab-toggle:focus-visible {
    outline: 2px solid #C9A962;
    outline-offset: 2px;
}

/* --- Number Transitions --- */
[data-animate-number] {
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

/* --- Global Professional Refinements --- */
.page-container {
    animation: pageEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Refined button base */
.btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn-primary {
    box-shadow: 0 2px 8px rgba(201, 169, 98, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 16px rgba(201, 169, 98, 0.35);
}

/* Professional card border treatment */
.store-card,
.metric-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
}

/* Smooth status color transitions */
.store-card .status-label,
.split-status-badge,
.side-panel-status-badge {
    transition: color 0.3s ease, background 0.3s ease;
}

/* --- Dark Mode Professional Adaptations --- */
body.dark-mode .store-card,
body.dark-mode .metric-card {
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .store-card:hover::before {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.3), rgba(124, 184, 124, 0.2));
}
body.dark-mode .elevation-1,
body.dark-mode .store-card,
body.dark-mode .metric-card {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.1);
}
body.dark-mode .elevation-2,
body.dark-mode .store-card:hover,
body.dark-mode .metric-card:hover {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 12px 24px rgba(0, 0, 0, 0.1);
}
body.dark-mode .btn-primary {
    box-shadow: 0 2px 8px rgba(201, 169, 98, 0.15);
}
body.dark-mode .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(201, 169, 98, 0.25);
}

/* --- Reduced motion: disable all polish animations --- */
@media (prefers-reduced-motion: reduce) {
    .stagger-entered {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .page-container {
        animation: none;
    }
    .store-card:hover,
    .metric-card:hover,
    .platform-tool-card:hover {
        transform: none;
    }
    .store-card::before,
    .metric-card::before {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 15: Data Freshness, Tab Transitions, Store Map,
                Comparison Bars, Auto-refresh Countdown
   ═══════════════════════════════════════════════════════════════ */

/* --- Data Freshness Indicator --- */
.data-freshness {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(124, 184, 124, 0.08);
    position: absolute;
    top: 8px;
    right: 0;
}
.data-freshness.fresh { color: #7CB87C; }
.data-freshness.aging { color: #D4A84B; background: rgba(212, 168, 75, 0.08); }
.data-freshness.stale { color: #C45C5C; background: rgba(196, 92, 92, 0.08); }
.freshness-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.freshness-dot.fresh { background: #7CB87C; }
.freshness-dot.aging { background: #D4A84B; }
.freshness-dot.stale { background: #C45C5C; animation: pulseCritical 1.5s infinite; }
.freshness-label {
    font-variant-numeric: tabular-nums;
}

/* --- Smooth Tab Transitions --- */
.tab-panel-transition {
    transition: opacity 0.25s ease, transform 0.25s ease;
}
[data-tab-panel] {
    opacity: 1;
    transform: translateX(0);
}
[data-tab-panel].tab-entering {
    opacity: 0;
    transform: translateX(8px);
}
[data-tab-panel].tab-active {
    opacity: 1;
    transform: translateX(0);
}
[data-tab-panel].tab-exiting {
    opacity: 0;
    transform: translateX(-8px);
}

/* --- Interactive Store Map --- */
.store-map-page .page-header {
    text-align: center;
    margin-bottom: 24px;
}
.store-map-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}
.australia-map {
    width: 100%;
    max-width: 500px;
    height: auto;
}
.map-landmass {
    transition: fill 0.3s;
}
.map-pin {
    cursor: pointer;
}
.map-pin:hover circle:last-of-type {
    r: 3.5;
}
.store-map-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.map-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.map-legend-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.map-legend-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.map-legend-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}
.map-legend-address {
    font-size: 11px;
    color: #999;
}
.map-legend-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 8px;
}
.map-legend-status.healthy { color: #7CB87C; background: rgba(124, 184, 124, 0.1); }
.map-legend-status.alerts { color: #D4A84B; background: rgba(212, 168, 75, 0.1); }
.map-legend-status.critical { color: #C45C5C; background: rgba(196, 92, 92, 0.1); }

/* --- Metric Comparison Bars --- */
.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
}
.comparison-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.comparison-bar-label {
    min-width: 80px;
    font-size: 12px;
    color: #666;
    text-align: right;
}
.comparison-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 3px;
    overflow: hidden;
}
.comparison-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.comparison-bar-value {
    min-width: 50px;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    font-variant-numeric: tabular-nums;
}

/* --- Auto-refresh Countdown --- */
.refresh-countdown {
    position: fixed;
    bottom: 90px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 4px 10px 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    z-index: 4000;
}
.countdown-text {
    font-size: 10px;
    font-weight: 600;
    color: #999;
    font-variant-numeric: tabular-nums;
    min-width: 22px;
}

/* --- Dark Mode Adaptations (Batch 15) --- */
body.dark-mode .store-map-container {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .map-landmass {
    fill: #2a2a2a;
    stroke: #444;
}
body.dark-mode .map-pin text {
    fill: #ccc;
}
body.dark-mode .map-legend-item {
    background: #1e1e1e;
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .map-legend-name {
    color: #e0e0e0;
}
body.dark-mode .comparison-bar-track {
    background: rgba(255, 255, 255, 0.06);
}
body.dark-mode .comparison-bar-value {
    color: #e0e0e0;
}
body.dark-mode .refresh-countdown {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.06);
}
body.dark-mode .data-freshness {
    background: rgba(124, 184, 124, 0.05);
}

/* --- Responsive (Batch 15) --- */
@media (max-width: 768px) {
    .data-freshness {
        position: static;
        margin-top: 8px;
    }
    .refresh-countdown {
        bottom: 75px;
        left: 12px;
    }
    .comparison-bar-label {
        min-width: 60px;
        font-size: 11px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 16: Scroll Restoration, Tab Badge, Radial Gauges,
                Health Score, Animated Backgrounds
   ═══════════════════════════════════════════════════════════════ */

/* --- Radial Gauge Widgets --- */
.radial-gauge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.radial-gauge svg {
    position: absolute;
    top: 0;
    left: 0;
}
.gauge-fill {
    transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.gauge-center-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.gauge-value {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}
.gauge-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-top: 2px;
}

/* --- Health Score Badge --- */
.health-score-badge {
    display: inline-flex;
    align-items: center;
}

/* --- Animated Background --- */
#app.animated-bg {
    position: relative;
}
#app.animated-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 98, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(124, 184, 124, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(91, 138, 154, 0.02) 0%, transparent 50%);
    animation: ambientBg 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}
@keyframes ambientBg {
    0% {
        background:
            radial-gradient(ellipse at 20% 50%, rgba(201, 169, 98, 0.03) 0%, transparent 50%),
            radial-gradient(ellipse at 80% 20%, rgba(124, 184, 124, 0.02) 0%, transparent 50%),
            radial-gradient(ellipse at 60% 80%, rgba(91, 138, 154, 0.02) 0%, transparent 50%);
    }
    100% {
        background:
            radial-gradient(ellipse at 40% 30%, rgba(201, 169, 98, 0.03) 0%, transparent 50%),
            radial-gradient(ellipse at 70% 60%, rgba(124, 184, 124, 0.02) 0%, transparent 50%),
            radial-gradient(ellipse at 30% 70%, rgba(91, 138, 154, 0.02) 0%, transparent 50%);
    }
}

/* --- Dark Mode Adaptations (Batch 16) --- */
body.dark-mode .gauge-value {
    color: #e0e0e0;
}
body.dark-mode #app.animated-bg::before {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 98, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(124, 184, 124, 0.015) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(91, 138, 154, 0.015) 0%, transparent 50%);
}

/* --- Responsive (Batch 16) --- */
@media (max-width: 768px) {
    .radial-gauge {
        transform: scale(0.9);
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 17: Dynamic Island, Comparison Matrix, Command History,
                Fluid Typography, Expandable Cards
   ═══════════════════════════════════════════════════════════════ */

/* --- Dynamic Island Alerts --- */
.dynamic-island {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) scaleX(0.5) scaleY(0);
    z-index: 10000;
    background: #1a1a1a;
    border-radius: 28px;
    padding: 0;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                width 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                padding 0.3s ease;
    min-width: 120px;
    max-width: 380px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
}
.dynamic-island.visible {
    transform: translateX(-50%) scaleX(1) scaleY(1);
    opacity: 1;
    padding: 10px 18px;
    pointer-events: auto;
}
.island-content {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.island-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: islandPulse 2s ease-in-out infinite;
}
.island-dot.info { background: #5B8A9A; }
.island-dot.warning { background: #D4A84B; }
.island-dot.critical { background: #C45C5C; }
.island-dot.success { background: #7CB87C; }
@keyframes islandPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}
.island-text {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.01em;
}
.island-action {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    letter-spacing: 0.02em;
}
.island-action:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Store Comparison Matrix --- */
.comparison-matrix {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
    margin: 16px 0;
}
.matrix-header {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr) 0.8fr;
    background: #f8f8f8;
    border-bottom: 1px solid #eee;
    padding: 10px 16px;
    gap: 8px;
}
.matrix-col-header {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    text-align: center;
}
.matrix-corner {
    /* Empty top-left cell */
}
.matrix-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr) 0.8fr;
    padding: 12px 16px;
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s ease;
}
.matrix-row:last-child {
    border-bottom: none;
}
.matrix-row:hover {
    background: #fafafa;
}
.matrix-store-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.matrix-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}
.matrix-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.matrix-status-dot.healthy { background: #7CB87C; }
.matrix-status-dot.alerts { background: #D4A84B; }
.matrix-status-dot.critical { background: #C45C5C; }
.matrix-status-dot.unknown { background: #ccc; }
.matrix-row:hover .matrix-status-dot {
    transform: scale(1.2);
}
.matrix-score {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* --- Command History --- */
.command-history {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 8px;
    padding-top: 8px;
}
.command-history-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    padding: 4px 16px;
}
.command-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-radius: 6px;
    margin: 0 8px;
}
.command-history-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.cmd-label {
    font-size: 13px;
    color: #ccc;
}
.cmd-count {
    font-size: 11px;
    color: #666;
    font-variant-numeric: tabular-nums;
}

/* --- Fluid Typography Scale --- */
:root {
    --type-xs: clamp(0.625rem, 0.55rem + 0.25vw, 0.75rem);
    --type-sm: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
    --type-base: clamp(0.8125rem, 0.75rem + 0.25vw, 0.9375rem);
    --type-md: clamp(0.875rem, 0.8rem + 0.3vw, 1.0625rem);
    --type-lg: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
    --type-xl: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
    --type-2xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.75rem);
    --type-3xl: clamp(1.5rem, 1.3rem + 0.8vw, 2.125rem);
}
.section-title {
    font-size: var(--type-lg);
}
.card-title {
    font-size: var(--type-base);
}
.stat-value {
    font-size: var(--type-xl);
}
.stat-label {
    font-size: var(--type-xs);
}
.page-title {
    font-size: var(--type-2xl);
}
.hero-title {
    font-size: var(--type-3xl);
}

/* --- Expandable Metric Cards --- */
[data-expandable] {
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}
[data-expandable]:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
[data-expandable] .card-expand-trigger {
    position: relative;
}
[data-expandable] .card-expand-trigger::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #999;
    transition: transform 0.25s ease;
}
[data-expandable].expanded .card-expand-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}
.card-expand-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    border-top: 0 solid transparent;
}
[data-expandable].expanded .card-expand-content {
    border-top: 1px solid #f0f0f0;
    margin-top: 12px;
    padding-top: 12px;
}

/* --- Dark Mode Adaptations (Batch 17) --- */
body.dark-mode .dynamic-island {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
body.dark-mode .comparison-matrix {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .matrix-header {
    background: #252525;
    border-color: #333;
}
body.dark-mode .matrix-row {
    border-color: #2a2a2a;
}
body.dark-mode .matrix-row:hover {
    background: #252525;
}
body.dark-mode .matrix-store-name {
    color: #e0e0e0;
}
body.dark-mode .matrix-col-header {
    color: #999;
}
body.dark-mode [data-expandable]:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
body.dark-mode [data-expandable].expanded .card-expand-content {
    border-top-color: #333;
}

/* --- Responsive (Batch 17) --- */
@media (max-width: 768px) {
    .dynamic-island {
        max-width: calc(100vw - 32px);
    }
    .island-text {
        font-size: 12px;
    }
    .matrix-header,
    .matrix-row {
        grid-template-columns: 1.2fr repeat(4, 1fr) 0.8fr;
        padding: 8px 12px;
    }
    .matrix-store-name {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dynamic-island {
        transition: opacity 0.2s ease;
        transform: translateX(-50%);
    }
    .dynamic-island.visible {
        transform: translateX(-50%);
    }
    .island-dot {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 18: Skeleton Loading, Haptic Feedback, Smart Alert Grouping,
                Drag-to-Dismiss, Contextual Timestamps
   ═══════════════════════════════════════════════════════════════ */

/* --- Skeleton Loading States --- */
.skeleton-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 12px;
}
.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
    margin-bottom: 10px;
}
.skeleton-title {
    width: 60%;
    height: 16px;
}
.skeleton-subtitle {
    width: 40%;
    height: 10px;
}
.skeleton-short {
    width: 50%;
    flex: 1;
}
.skeleton-full {
    width: 100%;
    margin-bottom: 0;
}
.skeleton-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.skeleton-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Haptic Micro Feedback --- */
.haptic-press {
    animation: hapticBounce 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes hapticBounce {
    0% { transform: scale(1); }
    40% { transform: scale(0.95); }
    70% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* --- Smart Alert Grouping --- */
.alert-group {
    margin-bottom: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
}
.alert-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}
.alert-group-icon {
    font-size: 14px;
}
.alert-group-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    flex: 1;
}
.alert-group-count {
    font-size: 11px;
    font-weight: 600;
    background: #eee;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
}
.alert-group-items {
    padding: 4px 0;
}
.alert-group-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: transform 0.15s ease, opacity 0.15s ease;
    cursor: grab;
    user-select: none;
}
.alert-group-item:last-child {
    border-bottom: none;
}
.alert-group-item.critical {
    border-left: 3px solid #C45C5C;
}
.alert-group-item.alerts {
    border-left: 3px solid #D4A84B;
}
.alert-item-store {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}
.alert-item-message {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}
.no-alerts-grouped {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* --- Contextual Timestamps --- */
[data-timestamp] {
    font-variant-numeric: tabular-nums;
    cursor: help;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.15s ease;
}
[data-timestamp]:hover {
    border-bottom-color: #ccc;
}

/* --- Dark Mode Adaptations (Batch 18) --- */
body.dark-mode .skeleton-card {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .skeleton-line,
body.dark-mode .skeleton-circle {
    background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}
body.dark-mode .alert-group {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .alert-group-header {
    background: #252525;
    border-color: #333;
}
body.dark-mode .alert-group-label {
    color: #e0e0e0;
}
body.dark-mode .alert-group-count {
    background: #333;
    color: #aaa;
}
body.dark-mode .alert-group-item {
    border-bottom-color: #2a2a2a;
}
body.dark-mode .alert-item-message {
    color: #ddd;
}
body.dark-mode [data-timestamp]:hover {
    border-bottom-color: #555;
}

/* --- Responsive (Batch 18) --- */
@media (max-width: 768px) {
    .skeleton-card {
        padding: 16px;
    }
    .alert-group-header {
        padding: 10px 14px;
    }
    .alert-group-item {
        padding: 8px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-line,
    .skeleton-circle {
        animation: none;
        background: #eee;
    }
    .haptic-press {
        animation: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 19: Pulse Indicators, Status Timeline, Quick Filters,
                Inline Setpoint Editor, Smart Suggestions
   ═══════════════════════════════════════════════════════════════ */

/* --- Pulse Indicators --- */
.pulse-healthy {
    position: relative;
}
.pulse-healthy::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #7CB87C;
    transform: translate(-50%, -50%);
    animation: pulseGreen 2.5s ease-in-out infinite;
    z-index: -1;
}
.pulse-critical::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #C45C5C;
    transform: translate(-50%, -50%);
    animation: pulseCritical 1.5s ease-in-out infinite;
    z-index: -1;
}
.pulse-warning::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #D4A84B;
    transform: translate(-50%, -50%);
    animation: pulseWarning 2s ease-in-out infinite;
    z-index: -1;
}
@keyframes pulseGreen {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.3; transform: translate(-50%, -50%) scale(2.2); }
}
@keyframes pulseCritical {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.4; transform: translate(-50%, -50%) scale(2.5); }
}
@keyframes pulseWarning {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.3; transform: translate(-50%, -50%) scale(2.2); }
}

/* --- Status Timeline --- */
.status-timeline {
    padding: 12px 0;
}
.timeline-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 8px;
}
.timeline-track {
    display: flex;
    gap: 2px;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}
.timeline-segment {
    flex: 1;
    position: relative;
    border-radius: 2px;
    transition: opacity 0.2s ease;
}
.timeline-segment.healthy { background: #7CB87C; }
.timeline-segment.alerts { background: #D4A84B; }
.timeline-segment.critical { background: #C45C5C; }
.timeline-segment:hover {
    opacity: 0.7;
}
.timeline-now {
    position: absolute;
    top: -18px;
    right: 0;
    font-size: 9px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.timeline-times {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 10px;
    color: #aaa;
    font-variant-numeric: tabular-nums;
}

/* --- Quick Filter Chips --- */
.quick-filters {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    flex-wrap: wrap;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.filter-chip:hover {
    border-color: #C9A962;
    color: #333;
}
.filter-chip.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}
.filter-count {
    font-size: 10px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}
.filter-chip.active .filter-count {
    background: rgba(255, 255, 255, 0.15);
}

/* --- Inline Setpoint Editor --- */
[data-editable-setpoint] {
    cursor: text;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.15s ease;
    position: relative;
}
[data-editable-setpoint]:hover {
    background: rgba(201, 169, 98, 0.08);
}
[data-editable-setpoint]::after {
    content: '✎';
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.15s ease;
    color: #C9A962;
}
[data-editable-setpoint]:hover::after {
    opacity: 1;
}
[data-editable-setpoint].editing {
    background: rgba(201, 169, 98, 0.12);
    outline: 2px solid rgba(201, 169, 98, 0.3);
}
.inline-edit-input {
    width: 50px;
    border: none;
    background: transparent;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    font-family: inherit;
    outline: none;
    text-align: center;
    -moz-appearance: textfield;
}
.inline-edit-input::-webkit-inner-spin-button,
.inline-edit-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.inline-edit-unit {
    font-size: 11px;
    color: #999;
}

/* --- Smart Suggestions --- */
.smart-suggestions {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    margin: 16px 0;
    overflow: hidden;
}
.suggestions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.suggestions-header svg {
    color: #C9A962;
}
.suggestions-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    background: #C9A962;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
}
.suggestions-list {
    padding: 4px 0;
}
.suggestion-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s ease;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background: #fafafa;
}
.suggestion-item.high {
    border-left: 3px solid #C45C5C;
}
.suggestion-item.medium {
    border-left: 3px solid #D4A84B;
}
.suggestion-item.low {
    border-left: 3px solid #7CB87C;
}
.suggestion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.suggestion-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
}
.suggestion-store {
    font-size: 11px;
    color: #999;
}
.suggestion-message {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
}
.suggestion-action {
    font-size: 11px;
    font-weight: 600;
    color: #C9A962;
    background: none;
    border: 1px solid #C9A962;
    padding: 4px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.suggestion-action:hover {
    background: #C9A962;
    color: #ffffff;
}

/* --- Dark Mode Adaptations (Batch 19) --- */
body.dark-mode .filter-chip {
    background: #1e1e1e;
    border-color: #333;
    color: #aaa;
}
body.dark-mode .filter-chip:hover {
    border-color: #C9A962;
    color: #e0e0e0;
}
body.dark-mode .filter-chip.active {
    background: #ffffff;
    border-color: #ffffff;
    color: #1a1a1a;
}
body.dark-mode .filter-chip.active .filter-count {
    background: rgba(0, 0, 0, 0.1);
}
body.dark-mode .filter-count {
    background: rgba(255, 255, 255, 0.08);
}
body.dark-mode .smart-suggestions {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .suggestions-header {
    background: #252525;
    border-color: #333;
    color: #e0e0e0;
}
body.dark-mode .suggestion-item {
    border-bottom-color: #2a2a2a;
}
body.dark-mode .suggestion-item:hover {
    background: #252525;
}
body.dark-mode .suggestion-message {
    color: #ddd;
}
body.dark-mode .suggestion-type {
    background: #333;
    color: #aaa;
}
body.dark-mode [data-editable-setpoint]:hover {
    background: rgba(201, 169, 98, 0.1);
}
body.dark-mode .timeline-segment:hover {
    opacity: 0.8;
}

/* --- Responsive (Batch 19) --- */
@media (max-width: 768px) {
    .quick-filters {
        padding: 8px 0;
        gap: 6px;
    }
    .filter-chip {
        padding: 5px 10px;
        font-size: 11px;
    }
    .suggestion-item {
        padding: 10px 14px;
    }
    .timeline-track {
        height: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pulse-healthy::after,
    .pulse-critical::after,
    .pulse-warning::after {
        animation: none;
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 20: Glassmorphism Cards, Trend Arrows, Breadcrumb Nav,
                Focus Mode, Metric Tooltips
   ═══════════════════════════════════════════════════════════════ */

/* --- Glassmorphism Cards --- */
.glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}
.glass-card:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* --- Trend Arrows --- */
.trend-arrow {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    animation: trendFadeIn 0.4s ease;
}
.trend-arrow.up {
    color: #C45C5C;
}
.trend-arrow.down {
    color: #7CB87C;
}
.trend-arrow.flat {
    color: #999;
}
.trend-pct {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.8;
}
@keyframes trendFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Breadcrumb Navigation --- */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
    margin-bottom: 8px;
}
.breadcrumb-link {
    font-size: 12px;
    color: #888;
    text-decoration: none;
    transition: color 0.15s ease;
    cursor: pointer;
}
.breadcrumb-link:hover {
    color: #C9A962;
}
.breadcrumb-link.current {
    color: #333;
    font-weight: 500;
    pointer-events: none;
}
.breadcrumb-sep {
    font-size: 12px;
    color: #ccc;
    margin: 0 2px;
}

/* --- Focus Mode --- */
body.focus-mode #app > *:not(.focus-target) {
    opacity: 0.15;
    filter: blur(1px);
    pointer-events: none;
    transition: opacity 0.3s ease, filter 0.3s ease;
}
body.focus-mode .focus-target {
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.2), 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
}
.focus-indicator {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.focus-indicator.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.focus-exit-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.focus-exit-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* --- Metric Tooltips --- */
.metric-tooltip {
    position: fixed;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    z-index: 10001;
    pointer-events: none;
    transform: translate(-50%, -100%);
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 220px;
}
.metric-tooltip.visible {
    opacity: 1;
    transform: translate(-50%, -100%) translateY(-4px);
}
.metric-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #1a1a1a;
}

/* --- Dark Mode Adaptations (Batch 20) --- */
body.dark-mode .glass-card {
    background: rgba(30, 30, 30, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
body.dark-mode .glass-card:hover {
    background: rgba(40, 40, 40, 0.85) !important;
}
body.dark-mode .breadcrumb-link.current {
    color: #e0e0e0;
}
body.dark-mode .breadcrumb-sep {
    color: #555;
}
body.dark-mode .metric-tooltip {
    background: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
body.dark-mode .metric-tooltip::after {
    border-top-color: #333;
}
body.dark-mode body.focus-mode .focus-target {
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* --- Responsive (Batch 20) --- */
@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 6px 0;
    }
    .breadcrumb-link {
        font-size: 11px;
    }
    .trend-arrow {
        font-size: 11px;
    }
    .focus-indicator {
        bottom: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .trend-arrow {
        animation: none;
    }
    body.focus-mode #app > *:not(.focus-target) {
        transition: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 21: Keyboard Shortcuts Panel, Notification Sounds,
                Card Reordering, Status Animations, Progressive Loading
   ═══════════════════════════════════════════════════════════════ */

/* --- Keyboard Shortcuts Panel --- */
.shortcuts-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.shortcuts-panel.visible {
    opacity: 1;
    visibility: visible;
}
.shortcuts-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}
.shortcuts-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 32px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.shortcuts-panel.visible .shortcuts-content {
    transform: scale(1);
}
.shortcuts-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}
.shortcuts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.shortcut-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.shortcut-desc {
    font-size: 12px;
    color: #666;
}
.shortcuts-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 11px;
    color: #999;
}
.shortcuts-footer kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 4px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    margin: 0 2px;
    font-family: inherit;
}

/* --- Card Reordering --- */
[draggable="true"] {
    cursor: grab;
}
[draggable="true"]:active {
    cursor: grabbing;
}
.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.drag-over {
    border-color: #C9A962 !important;
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.3);
}

/* --- Status Change Animations --- */
.status-animated {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.status-animated[data-status="healthy"] { border-color: #7CB87C; }
.status-animated[data-status="alerts"] { border-color: #D4A84B; }
.status-animated[data-status="critical"] { border-color: #C45C5C; }

/* --- Progressive Loading --- */
.store-card,
.dashboard-card,
.system-card,
.unit-card {
    will-change: opacity, transform;
}

/* --- Dark Mode Adaptations (Batch 21) --- */
body.dark-mode .shortcuts-content {
    background: #1e1e1e;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
body.dark-mode .shortcuts-title {
    color: #e0e0e0;
}
body.dark-mode .shortcut-key {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}
body.dark-mode .shortcut-desc {
    color: #aaa;
}
body.dark-mode .shortcuts-footer kbd {
    background: #2a2a2a;
    border-color: #444;
    color: #ccc;
}
body.dark-mode .drag-over {
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.2);
}

/* --- Responsive (Batch 21) --- */
@media (max-width: 768px) {
    .shortcuts-content {
        padding: 20px 24px;
        width: 92%;
    }
    .shortcuts-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shortcuts-content {
        transform: none;
    }
    .dragging {
        transform: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 22: Health Heatmap, Action Ripple, Sticky Headers,
                Mini Widgets, Contextual Empty States
   ═══════════════════════════════════════════════════════════════ */

/* --- System Health Heatmap --- */
.health-heatmap {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 16px;
    margin: 16px 0;
}
.heatmap-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 4px;
}
.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.heatmap-cell.healthy { background: rgba(124, 184, 124, 0.2); }
.heatmap-cell.alerts { background: rgba(212, 168, 75, 0.25); }
.heatmap-cell.critical { background: rgba(196, 92, 92, 0.25); }
.heatmap-cell:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.heatmap-type {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
}
.heatmap-legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #888;
}
.heatmap-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}
.heatmap-dot.healthy { background: #7CB87C; }
.heatmap-dot.alerts { background: #D4A84B; }
.heatmap-dot.critical { background: #C45C5C; }

/* --- Action Confirmation Ripple --- */
.action-ripple {
    position: fixed;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    z-index: 9999;
    pointer-events: none;
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
}
.action-ripple.active {
    width: 200vmax;
    height: 200vmax;
    opacity: 0;
}

/* --- Sticky Section Headers --- */
.section-header-sticky {
    position: sticky;
    top: 56px;
    z-index: 50;
    background: #ffffff;
    padding: 10px 0;
    transition: box-shadow 0.2s ease, padding 0.2s ease;
}
.section-header-sticky.stuck {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 8px 16px;
    margin: 0 -16px;
    border-radius: 0 0 8px 8px;
}
.sticky-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
    visibility: hidden;
}

/* --- Mini Dashboard Widgets --- */
.mini-widgets {
    display: flex;
    gap: 16px;
    padding: 8px 0;
}
.mini-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.mini-widget-value {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-variant-numeric: tabular-nums;
}
.mini-widget-value.has-alerts {
    color: #C45C5C;
}
.mini-widget-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
}

/* --- Contextual Empty States --- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}
.empty-state-icon {
    margin-bottom: 16px;
    opacity: 0.5;
}
.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.empty-state-message {
    font-size: 13px;
    color: #999;
    max-width: 260px;
    line-height: 1.5;
}

/* --- Dark Mode Adaptations (Batch 22) --- */
body.dark-mode .health-heatmap {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .heatmap-title {
    color: #e0e0e0;
}
body.dark-mode .heatmap-cell.healthy { background: rgba(124, 184, 124, 0.15); }
body.dark-mode .heatmap-cell.alerts { background: rgba(212, 168, 75, 0.2); }
body.dark-mode .heatmap-cell.critical { background: rgba(196, 92, 92, 0.2); }
body.dark-mode .heatmap-type { color: #aaa; }
body.dark-mode .heatmap-legend { border-top-color: #333; }
body.dark-mode .section-header-sticky {
    background: #1a1a1a;
}
body.dark-mode .section-header-sticky.stuck {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
body.dark-mode .mini-widget-value { color: #e0e0e0; }
body.dark-mode .empty-state-title { color: #ccc; }
body.dark-mode .empty-state-message { color: #888; }

/* --- Responsive (Batch 22) --- */
@media (max-width: 768px) {
    .heatmap-grid {
        grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
        gap: 3px;
    }
    .mini-widgets {
        gap: 12px;
    }
    .mini-widget-value {
        font-size: 14px;
    }
    .empty-state {
        padding: 32px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .action-ripple {
        display: none;
    }
    .heatmap-cell:hover {
        transform: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 23: Data Density, Pinned Metrics, Session Analytics,
                Accessibility Announcer, Ambient Noise
   ═══════════════════════════════════════════════════════════════ */

/* --- Data Density Toggle --- */
.density-toggle {
    display: inline-flex;
    gap: 2px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 3px;
}
.density-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #999;
    transition: all 0.15s ease;
}
.density-btn:hover {
    color: #666;
}
.density-btn.active {
    background: #ffffff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Density modes */
[data-density="compact"] .store-card,
[data-density="compact"] .unit-card,
[data-density="compact"] .system-card {
    padding: 10px 14px;
    margin-bottom: 6px;
}
[data-density="compact"] .card-title {
    font-size: 12px;
}
[data-density="compact"] .stat-value {
    font-size: 16px;
}

[data-density="spacious"] .store-card,
[data-density="spacious"] .unit-card,
[data-density="spacious"] .system-card {
    padding: 24px;
    margin-bottom: 20px;
}
[data-density="spacious"] .card-title {
    font-size: 16px;
}
[data-density="spacious"] .stat-value {
    font-size: 24px;
}

/* --- Pinned Metrics --- */
.pinned-metrics {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.pinned-metrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.pinned-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
}
.pinned-clear {
    font-size: 11px;
    color: #C45C5C;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: inherit;
}
.pinned-clear:hover {
    text-decoration: underline;
}
.pinned-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}
.pinned-metric-card {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
    transition: transform 0.15s ease;
}
.pinned-metric-card:hover {
    transform: translateY(-1px);
}
.pinned-metric-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    font-variant-numeric: tabular-nums;
}
.pinned-unit {
    font-size: 11px;
    color: #999;
    margin-left: 1px;
}
.pinned-metric-label {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Accessibility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Dark Mode Adaptations (Batch 23) --- */
body.dark-mode .density-toggle {
    background: #2a2a2a;
}
body.dark-mode .density-btn {
    color: #888;
}
body.dark-mode .density-btn:hover {
    color: #ccc;
}
body.dark-mode .density-btn.active {
    background: #1a1a1a;
    color: #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
body.dark-mode .pinned-metrics {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .pinned-metric-card {
    background: #252525;
}
body.dark-mode .pinned-metric-value {
    color: #e0e0e0;
}

/* --- Responsive (Batch 23) --- */
@media (max-width: 768px) {
    .pinned-metrics-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }
    .pinned-metric-value {
        font-size: 15px;
    }
    .pinned-metric-card {
        padding: 8px 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 24: Color Blind Mode, Maintenance Scheduler, Live Data Pulse,
                Page Transitions, Offline Indicator
   ═══════════════════════════════════════════════════════════════ */

/* --- Color Blind Mode --- */
.colorblind-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.colorblind-btn {
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.colorblind-btn:hover {
    border-color: #C9A962;
}
.colorblind-btn.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}

/* Color blind palettes */
[data-colorblind="deuteranopia"] .pulse-healthy::after,
[data-colorblind="protanopia"] .pulse-healthy::after { background: #0072B2; }
[data-colorblind="deuteranopia"] .matrix-status-dot.healthy,
[data-colorblind="protanopia"] .matrix-status-dot.healthy { background: #0072B2; }
[data-colorblind="deuteranopia"] .heatmap-cell.healthy,
[data-colorblind="protanopia"] .heatmap-cell.healthy { background: rgba(0, 114, 178, 0.2); }
[data-colorblind="deuteranopia"] .matrix-status-dot.critical,
[data-colorblind="protanopia"] .matrix-status-dot.critical { background: #D55E00; }
[data-colorblind="deuteranopia"] .heatmap-cell.critical,
[data-colorblind="protanopia"] .heatmap-cell.critical { background: rgba(213, 94, 0, 0.25); }
[data-colorblind="tritanopia"] .matrix-status-dot.healthy { background: #009E73; }
[data-colorblind="tritanopia"] .matrix-status-dot.alerts { background: #F0E442; }
[data-colorblind="tritanopia"] .matrix-status-dot.critical { background: #CC79A7; }

/* --- Maintenance Scheduler Modal --- */
.maintenance-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.maintenance-modal.visible {
    opacity: 1;
    visibility: visible;
}
.maintenance-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}
.maintenance-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.maintenance-modal.visible .maintenance-content {
    transform: scale(1) translateY(0);
}
.maintenance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}
.maintenance-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.maintenance-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}
.maintenance-body {
    padding: 16px 20px;
}
.maintenance-unit-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.maint-store {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}
.maint-unit {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
.maint-field {
    margin-bottom: 14px;
}
.maint-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.maint-priority-btns {
    display: flex;
    gap: 6px;
}
.maint-prio-btn {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}
.maint-prio-btn:hover {
    border-color: #ccc;
}
.maint-prio-btn.active {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}
.maint-prio-btn[data-priority="emergency"].active {
    background: #C45C5C;
    border-color: #C45C5C;
}
.maint-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.maint-input:focus {
    outline: none;
    border-color: #C9A962;
}
.maint-textarea {
    min-height: 60px;
    resize: vertical;
}
.maintenance-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* --- Live Data Pulse --- */
.live-value {
    display: inline-block;
    transition: color 0.3s ease;
}
.value-pulse {
    animation: valuePulseAnim 0.6s ease;
}
@keyframes valuePulseAnim {
    0% { transform: scale(1); color: inherit; }
    30% { transform: scale(1.05); color: #C9A962; }
    100% { transform: scale(1); color: inherit; }
}

/* --- Page Transition Effects --- */
.page-enter {
    opacity: 0;
    transform: translateY(6px);
}
.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* --- Offline Indicator --- */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #333;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10001;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.offline-banner.visible {
    transform: translateY(0);
}
.offline-banner svg {
    flex-shrink: 0;
}

/* --- Dark Mode Adaptations (Batch 24) --- */
body.dark-mode .colorblind-btn {
    background: #1e1e1e;
    border-color: #333;
    color: #aaa;
}
body.dark-mode .colorblind-btn.active {
    background: #ffffff;
    color: #1a1a1a;
}
body.dark-mode .maintenance-content {
    background: #1e1e1e;
}
body.dark-mode .maintenance-header {
    border-color: #333;
}
body.dark-mode .maintenance-header h3 {
    color: #e0e0e0;
}
body.dark-mode .maintenance-close {
    background: #333;
    color: #ccc;
}
body.dark-mode .maintenance-unit-info {
    border-color: #333;
}
body.dark-mode .maint-unit {
    color: #e0e0e0;
}
body.dark-mode .maint-input {
    background: #252525;
    border-color: #444;
    color: #e0e0e0;
}
body.dark-mode .maint-prio-btn {
    background: #252525;
    border-color: #444;
    color: #ccc;
}
body.dark-mode .maintenance-footer {
    background: #252525;
    border-color: #333;
}
body.dark-mode .offline-banner {
    background: #C45C5C;
}

/* --- Responsive (Batch 24) --- */
@media (max-width: 768px) {
    .maintenance-content {
        width: 94%;
    }
    .colorblind-options {
        gap: 4px;
    }
    .colorblind-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .value-pulse {
        animation: none;
    }
    .page-enter {
        opacity: 1;
        transform: none;
    }
    .offline-banner {
        transition: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 25: Uptime Counter, Responsive Tables, Quick Actions Drawer,
                Animated Counters, Theme Presets
   ═══════════════════════════════════════════════════════════════ */

/* --- Uptime Counter --- */
.uptime-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
}
.uptime-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 4px;
}
.uptime-value {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.uptime-since {
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
}

/* --- Responsive Data Tables --- */
.responsive-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid #eee;
    margin: 12px 0;
}
.responsive-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}
.responsive-table th,
.responsive-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}
.responsive-table th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
    background: #f9f9f9;
    position: sticky;
    top: 0;
    z-index: 1;
}
.responsive-table.striped tbody tr:nth-child(even) {
    background: #fafafa;
}
.responsive-table.sticky-first .sticky-col {
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.04);
}
.responsive-table.sticky-first thead .sticky-col {
    z-index: 3;
    background: #f9f9f9;
}

/* --- Quick Actions Drawer --- */
.quick-actions-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10004;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.quick-actions-drawer.visible {
    opacity: 1;
    visibility: visible;
}
.drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}
.drawer-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    padding: 12px 20px 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    max-height: 60vh;
    overflow-y: auto;
}
.quick-actions-drawer.visible .drawer-content {
    transform: translateY(0);
}
.drawer-handle {
    width: 36px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 0 auto 16px;
}
.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.drawer-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    font-family: inherit;
}
.drawer-action-btn:hover {
    background: #f5f5f5;
}
.drawer-action-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}
.drawer-action-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* --- Theme Presets --- */
.theme-presets {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.theme-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.theme-preset-btn:hover {
    border-color: #e0e0e0;
}
.theme-preset-btn.active {
    border-color: #C9A962;
}
.theme-preview {
    width: 48px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}
.theme-preview-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.theme-preset-label {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Dark Mode Adaptations (Batch 25) --- */
body.dark-mode .uptime-counter {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .uptime-value {
    color: #e0e0e0;
}
body.dark-mode .responsive-table-wrapper {
    border-color: #333;
}
body.dark-mode .responsive-table th {
    background: #252525;
    color: #aaa;
}
body.dark-mode .responsive-table td {
    border-color: #2a2a2a;
}
body.dark-mode .responsive-table.striped tbody tr:nth-child(even) {
    background: #1e1e1e;
}
body.dark-mode .responsive-table.sticky-first .sticky-col {
    background: #1a1a1a;
}
body.dark-mode .drawer-content {
    background: #1e1e1e;
}
body.dark-mode .drawer-handle {
    background: #444;
}
body.dark-mode .drawer-action-btn:hover {
    background: #252525;
}
body.dark-mode .drawer-action-label {
    color: #e0e0e0;
}
body.dark-mode .theme-preset-btn:hover {
    border-color: #444;
}
body.dark-mode .theme-preset-label {
    color: #aaa;
}

/* --- Responsive (Batch 25) --- */
@media (max-width: 768px) {
    .theme-presets {
        gap: 8px;
    }
    .theme-preview {
        width: 40px;
        height: 30px;
    }
    .uptime-value {
        font-size: 18px;
    }
    .drawer-content {
        padding: 12px 16px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .drawer-content {
        transition: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 26: Copy-to-Clipboard, Long Press, Batch Operations,
                Scroll Shadow, Quick Glance Carousel
   ═══════════════════════════════════════════════════════════════ */

/* --- Copy-to-Clipboard --- */
[data-copyable] {
    cursor: copy;
    position: relative;
    transition: background 0.15s ease;
    border-radius: 3px;
    padding: 0 2px;
}
[data-copyable]:hover {
    background: rgba(201, 169, 98, 0.06);
}
[data-copyable]:active {
    background: rgba(201, 169, 98, 0.12);
}
.copy-confirm {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1a1a1a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}
.copy-confirm.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Batch Operations Bar --- */
.batch-bar {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a1a;
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.batch-bar.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.batch-count {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.batch-actions {
    display: flex;
    gap: 6px;
}
.batch-btn {
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: transparent;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}
.batch-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
.batch-clear {
    border-color: rgba(196, 92, 92, 0.4);
    color: #ff9999;
}

/* --- Scroll Shadow --- */
.scroll-shadow-container {
    position: relative;
    overflow-y: auto;
}
.scroll-shadow-container.shadow-top {
    box-shadow: inset 0 8px 8px -6px rgba(0, 0, 0, 0.08);
}
.scroll-shadow-container.shadow-bottom {
    box-shadow: inset 0 -8px 8px -6px rgba(0, 0, 0, 0.08);
}
.scroll-shadow-container.shadow-top.shadow-bottom {
    box-shadow:
        inset 0 8px 8px -6px rgba(0, 0, 0, 0.08),
        inset 0 -8px 8px -6px rgba(0, 0, 0, 0.08);
}

/* --- Quick Glance Carousel --- */
.quick-glance-carousel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 8px 0;
    margin: 0 -16px;
    padding-left: 16px;
    scrollbar-width: none;
}
.quick-glance-carousel::-webkit-scrollbar {
    display: none;
}
.glance-track {
    display: flex;
    gap: 10px;
    padding-right: 16px;
}
.glance-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 14px 18px;
    min-width: 160px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.glance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.glance-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-bottom: 8px;
}
.glance-status.healthy { background: #7CB87C; }
.glance-status.alerts { background: #D4A84B; }
.glance-status.critical { background: #C45C5C; }
.glance-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.glance-stats {
    display: flex;
    align-items: center;
    gap: 8px;
}
.glance-score {
    font-size: 14px;
    font-weight: 600;
    color: #7CB87C;
    font-variant-numeric: tabular-nums;
}
.glance-alerts {
    font-size: 11px;
    color: #C45C5C;
    font-weight: 500;
}

/* --- Dark Mode Adaptations (Batch 26) --- */
body.dark-mode [data-copyable]:hover {
    background: rgba(201, 169, 98, 0.08);
}
body.dark-mode .copy-confirm {
    background: #555;
}
body.dark-mode .glance-card {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .glance-name {
    color: #e0e0e0;
}
body.dark-mode .scroll-shadow-container.shadow-top {
    box-shadow: inset 0 8px 8px -6px rgba(0, 0, 0, 0.2);
}
body.dark-mode .scroll-shadow-container.shadow-bottom {
    box-shadow: inset 0 -8px 8px -6px rgba(0, 0, 0, 0.2);
}

/* --- Responsive (Batch 26) --- */
@media (max-width: 768px) {
    .glance-card {
        min-width: 140px;
        padding: 12px 14px;
    }
    .batch-bar {
        bottom: 80px;
        padding: 8px 14px;
        gap: 10px;
    }
    .batch-btn {
        padding: 4px 10px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .glance-card:hover {
        transform: none;
    }
    .batch-bar {
        transition: opacity 0.15s ease;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 27: Unit Comparison, Auto Dark Mode, Alert Legend,
                Page Bookmarks, Animated Logo
   ═══════════════════════════════════════════════════════════════ */

/* --- Unit Comparison --- */
.unit-comparison {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
    margin: 16px 0;
}
.comparison-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 16px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    gap: 12px;
}
.comp-unit-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
}
.comp-vs {
    font-size: 10px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
}
.comparison-body {
    padding: 8px 0;
}
.comp-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    padding: 8px 16px;
    align-items: center;
    border-bottom: 1px solid #f8f8f8;
}
.comp-row:last-child {
    border-bottom: none;
}
.comp-val {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.comp-val.higher {
    color: #C45C5C;
    font-weight: 600;
}
.comp-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    text-align: center;
    white-space: nowrap;
}

/* --- Alert Severity Legend --- */
.alert-legend {
    display: flex;
    gap: 16px;
    padding: 10px 16px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
    margin: 12px 0;
    flex-wrap: wrap;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-dot.healthy { background: #7CB87C; }
.legend-dot.alerts { background: #D4A84B; }
.legend-dot.critical { background: #C45C5C; }
.legend-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}
.legend-desc {
    font-size: 11px;
    color: #999;
}

/* --- Page Bookmarks --- */
.bookmarks-list {
    padding: 8px 0;
}
.bookmarks-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    padding: 4px 16px;
    margin-bottom: 4px;
}
.bookmark-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    border-radius: 6px;
    margin: 0 8px;
}
.bookmark-item:hover {
    background: rgba(201, 169, 98, 0.06);
}
.bookmark-label {
    font-size: 13px;
    color: #333;
}
.bookmark-remove {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
}
.bookmark-remove:hover {
    background: #f0f0f0;
    color: #C45C5C;
}

/* --- Animated Logo --- */
.logo-animated {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.logo-animated.logo-hover {
    transform: scale(1.05) rotate(-1deg);
}

/* --- Dark Mode Adaptations (Batch 27) --- */
body.dark-mode .unit-comparison {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .comparison-header {
    background: #252525;
    border-color: #333;
}
body.dark-mode .comp-unit-name {
    color: #e0e0e0;
}
body.dark-mode .comp-val {
    color: #ddd;
}
body.dark-mode .comp-row {
    border-color: #2a2a2a;
}
body.dark-mode .alert-legend {
    background: #252525;
    border-color: #333;
}
body.dark-mode .legend-label {
    color: #ccc;
}
body.dark-mode .bookmark-label {
    color: #e0e0e0;
}
body.dark-mode .bookmark-remove:hover {
    background: #333;
}

/* --- Responsive (Batch 27) --- */
@media (max-width: 768px) {
    .alert-legend {
        gap: 10px;
        padding: 8px 12px;
    }
    .legend-desc {
        display: none;
    }
    .comp-row {
        padding: 6px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-animated {
        transition: none;
    }
    .logo-animated.logo-hover {
        transform: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 28: Hover Preview, Export Progress, Accent Picker,
                Swipe Stores, Status Summary Bar
   ═══════════════════════════════════════════════════════════════ */

/* --- Hover Card Preview --- */
.hover-preview {
    position: fixed;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    min-width: 180px;
}
.hover-preview.visible {
    opacity: 1;
    transform: translateX(0);
}
.preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.preview-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.preview-status.healthy { background: #7CB87C; }
.preview-status.alerts { background: #D4A84B; }
.preview-status.critical { background: #C45C5C; }
.preview-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.preview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.preview-sys {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.preview-sys.healthy { background: rgba(124, 184, 124, 0.15); color: #5a9a5a; }
.preview-sys.alerts { background: rgba(212, 168, 75, 0.15); color: #b08830; }
.preview-sys.critical { background: rgba(196, 92, 92, 0.15); color: #a04040; }
.preview-hint {
    font-size: 10px;
    color: #bbb;
    font-style: italic;
}

/* --- Export Progress --- */
.export-progress {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 200px;
}
.export-progress.visible {
    opacity: 1;
    transform: translateY(0);
}
.export-progress-label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}
.export-progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}
.export-progress-fill {
    height: 100%;
    background: #C9A962;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* --- Accent Color Picker --- */
.accent-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.accent-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.accent-swatch:hover {
    transform: scale(1.15);
}
.accent-swatch.active {
    border-color: #333;
    transform: scale(1.1);
}

/* --- Status Summary Bar --- */
.status-summary-bar {
    display: flex;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin: 8px 0;
    background: #f0f0f0;
}
.summary-segment {
    height: 100%;
    transition: width 0.4s ease;
}
.summary-segment.healthy { background: #7CB87C; }
.summary-segment.alerts { background: #D4A84B; }
.summary-segment.critical { background: #C45C5C; }

/* --- Dark Mode Adaptations (Batch 28) --- */
body.dark-mode .hover-preview {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
body.dark-mode .preview-name {
    color: #e0e0e0;
}
body.dark-mode .accent-swatch.active {
    border-color: #ffffff;
}
body.dark-mode .status-summary-bar {
    background: #333;
}

/* --- Responsive (Batch 28) --- */
@media (max-width: 768px) {
    .hover-preview {
        display: none;
    }
    .export-progress {
        right: 16px;
        bottom: 80px;
        min-width: 160px;
    }
    .accent-swatch {
        width: 24px;
        height: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hover-preview {
        transition: opacity 0.15s ease;
        transform: none;
    }
    .export-progress {
        transition: opacity 0.15s ease;
        transform: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 29: Context Menu, Data Age Warning, Unit Conversion,
                Session Resume, Performance Badges
   ═══════════════════════════════════════════════════════════════ */

/* --- Custom Context Menu --- */
.context-menu {
    position: fixed;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #eee;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10005;
    min-width: 160px;
    padding: 4px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.context-menu.visible {
    opacity: 1;
    transform: scale(1);
}
.ctx-item {
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.1s ease;
}
.ctx-item:hover {
    background: #f5f5f5;
}
.ctx-divider {
    height: 1px;
    background: #eee;
    margin: 4px 8px;
}

/* --- Data Age Warning --- */
.data-age-warning {
    position: fixed;
    top: 56px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #fff3cd;
    color: #856404;
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}
.data-age-warning.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.data-age-refresh {
    background: rgba(133, 100, 4, 0.15);
    border: none;
    color: #856404;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
}
.data-age-refresh:hover {
    background: rgba(133, 100, 4, 0.25);
}

/* --- Unit Converter --- */
.unit-converter {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 14px 16px;
    margin: 12px 0;
}
.converter-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 10px;
}
.converter-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.converter-input {
    width: 70px;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #333;
    -moz-appearance: textfield;
}
.converter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
.converter-input:focus {
    outline: none;
    border-color: #C9A962;
}
.converter-select {
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    color: #333;
    background: #ffffff;
    cursor: pointer;
}
.converter-arrow {
    color: #999;
    font-size: 14px;
}
.converter-result {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-variant-numeric: tabular-nums;
}

/* --- Session Resume Banner --- */
.session-resume {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #ffffff;
    border: 1px solid #eee;
    padding: 10px 16px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #555;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}
.session-resume.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.resume-btn {
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.resume-btn:hover {
    background: #333;
}
.resume-dismiss {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
}

/* --- Performance Badges --- */
.performance-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.perf-excellent { background: rgba(124, 184, 124, 0.15); color: #5a9a5a; }
.perf-good { background: rgba(201, 169, 98, 0.15); color: #9a7e3a; }
.perf-fair { background: rgba(212, 168, 75, 0.2); color: #a07820; }
.perf-poor { background: rgba(196, 92, 92, 0.15); color: #a04040; }

/* --- Dark Mode Adaptations (Batch 29) --- */
body.dark-mode .context-menu {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
body.dark-mode .ctx-item {
    color: #e0e0e0;
}
body.dark-mode .ctx-item:hover {
    background: #252525;
}
body.dark-mode .ctx-divider {
    background: #333;
}
body.dark-mode .data-age-warning {
    background: #3d3520;
    color: #d4a84b;
}
body.dark-mode .data-age-refresh {
    background: rgba(212, 168, 75, 0.2);
    color: #d4a84b;
}
body.dark-mode .unit-converter {
    background: #1e1e1e;
    border-color: #333;
}
body.dark-mode .converter-input,
body.dark-mode .converter-select {
    background: #252525;
    border-color: #444;
    color: #e0e0e0;
}
body.dark-mode .converter-result {
    color: #e0e0e0;
}
body.dark-mode .session-resume {
    background: #1e1e1e;
    border-color: #333;
    color: #ccc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* --- Responsive (Batch 29) --- */
@media (max-width: 768px) {
    .context-menu {
        min-width: 140px;
    }
    .data-age-warning {
        top: 50px;
        font-size: 11px;
    }
    .session-resume {
        bottom: 80px;
        font-size: 11px;
        padding: 8px 12px;
    }
    .converter-input {
        width: 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .context-menu {
        transform: none;
    }
    .data-age-warning {
        transition: opacity 0.15s ease;
        transform: translateX(-50%);
    }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 30: Smart Notifications Badge
   ═══════════════════════════════════════════════════════ */
.badge-pulse {
    animation: badgePulse 1.5s ease-out;
}
@keyframes badgePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(196, 92, 92, 0.6); }
    30% { transform: scale(1.3); box-shadow: 0 0 0 6px rgba(196, 92, 92, 0); }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(196, 92, 92, 0); }
}
.badge-overflow {
    font-size: 8px !important;
    letter-spacing: -0.5px;
    padding: 2px 4px !important;
    min-width: 22px;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 30: Store Health Score
   ═══════════════════════════════════════════════════════ */
.health-score-ring {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.health-score-ring svg {
    position: absolute;
    top: 0;
    left: 0;
}
.health-score-ring .score-value {
    font-size: 11px;
    font-weight: 600;
    color: var(--black);
    z-index: 1;
}
.score-ring-progress {
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 30: Inline Sparklines
   ═══════════════════════════════════════════════════════ */
.sparkline-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.sparkline-wrapper:hover {
    opacity: 1;
}
.inline-sparkline {
    color: var(--accent-gold);
}
.metric-value .sparkline-wrapper,
.data-value .sparkline-wrapper {
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 30: Collapsible Sidebar Nav
   ═══════════════════════════════════════════════════════ */
.sidebar-nav {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: var(--white);
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08);
    padding: 8px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 180px;
    border: 1px solid var(--border-gray);
    border-left: none;
}
.sidebar-nav.collapsed {
    width: 44px;
}
.sidebar-nav.collapsed .sidebar-items span {
    display: none;
}
.sidebar-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 8px;
    align-self: center;
    transition: background 0.2s, color 0.2s;
}
.sidebar-toggle:hover {
    background: var(--bg-light);
    color: var(--black);
}
.sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--medium-gray);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-item:hover {
    background: var(--bg-light);
    color: var(--accent-gold);
}
.sidebar-item svg {
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .sidebar-nav {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 30: Data Freshness Timer
   ═══════════════════════════════════════════════════════ */
.data-freshness {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--light-gray);
    font-weight: 400;
}
.data-freshness svg {
    opacity: 0.6;
}
.freshness-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: background 0.3s ease;
}
.freshness-dot.fresh {
    background: #7CB87C;
    box-shadow: 0 0 4px rgba(124, 184, 124, 0.4);
}
.freshness-dot.recent {
    background: #D4A84B;
    box-shadow: 0 0 4px rgba(212, 168, 75, 0.4);
}
.freshness-dot.stale {
    background: #C45C5C;
    animation: stalePulse 2s ease-in-out infinite;
}
@keyframes stalePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
@media (max-width: 480px) {
    .data-freshness {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 31: Alert Priority Lanes
   ═══════════════════════════════════════════════════════ */
.priority-lanes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.priority-lane {
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-gray);
    background: var(--white);
}
.lane-critical {
    border-left: 4px solid #C45C5C;
    background: rgba(196, 92, 92, 0.03);
}
.lane-warning {
    border-left: 4px solid #D4A84B;
    background: rgba(212, 168, 75, 0.03);
}
.lane-clear {
    border-left: 4px solid #7CB87C;
    background: rgba(124, 184, 124, 0.03);
}
.lane-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}
.lane-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.lane-dot.critical { background: #C45C5C; }
.lane-dot.warning { background: #D4A84B; }
.lane-dot.healthy { background: #7CB87C; }
.lane-item {
    font-size: 12px;
    color: var(--medium-gray);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-gray);
}
.lane-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.lane-item strong {
    color: var(--black);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 31: Ambient Status Glow
   ═══════════════════════════════════════════════════════ */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9998;
    pointer-events: none;
    transition: box-shadow 1s ease, background 1s ease;
}
.ambient-glow[data-status="healthy"] {
    background: linear-gradient(90deg, transparent, rgba(124, 184, 124, 0.4), transparent);
    box-shadow: 0 0 15px rgba(124, 184, 124, 0.2);
}
.ambient-glow[data-status="alerts"] {
    background: linear-gradient(90deg, transparent, rgba(212, 168, 75, 0.5), transparent);
    box-shadow: 0 0 15px rgba(212, 168, 75, 0.3);
    animation: ambientPulse 3s ease-in-out infinite;
}
.ambient-glow[data-status="critical"] {
    background: linear-gradient(90deg, transparent, rgba(196, 92, 92, 0.6), transparent);
    box-shadow: 0 0 20px rgba(196, 92, 92, 0.4);
    animation: ambientPulse 1.5s ease-in-out infinite;
}
@keyframes ambientPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 31: Quick Stats Bar
   ═══════════════════════════════════════════════════════ */
.quick-stats-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.qstat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0 16px;
}
.qstat-val {
    font-size: 20px;
    font-weight: 600;
    color: var(--black);
}
.qstat-val.qstat-healthy { color: #7CB87C; }
.qstat-val.qstat-alert { color: #C45C5C; }
.qstat-label {
    font-size: 10px;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.qstat-divider {
    width: 1px;
    height: 28px;
    background: var(--border-gray);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 31: Gesture Navigation
   ═══════════════════════════════════════════════════════ */
.gesture-hint {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gestureSlide 0.6s ease-out forwards;
    pointer-events: none;
}
.gesture-left {
    left: 16px;
}
.gesture-right {
    right: 16px;
}
@keyframes gestureSlide {
    0% { opacity: 1; transform: translateY(-50%) scale(1); }
    100% { opacity: 0; transform: translateY(-50%) scale(0.5); }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 31: Metric Comparison Overlay
   ═══════════════════════════════════════════════════════ */
.metric-compare-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.metric-compare-overlay.visible {
    opacity: 1;
}
.compare-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.metric-compare-overlay.visible .compare-card {
    transform: translateY(0);
}
.compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.compare-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--black);
}
.compare-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-light);
    border-radius: 50%;
    font-size: 18px;
    color: var(--medium-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.compare-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
}
.compare-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.compare-store-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-gray);
}
.compare-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.compare-label {
    font-size: 10px;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.compare-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
}
.compare-val.status-healthy { color: #7CB87C; }
.compare-val.status-alerts { color: #D4A84B; }
.compare-val.status-critical { color: #C45C5C; }
.compare-divider {
    width: 1px;
    background: var(--border-gray);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 32: Live Clock Widget
   ═══════════════════════════════════════════════════════ */
.live-clock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    pointer-events: none;
}
.clock-time {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}
.clock-tz {
    font-size: 9px;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
@media (max-width: 480px) {
    .live-clock { display: none; }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 32: System Uptime Bars
   ═══════════════════════════════════════════════════════ */
.uptime-bars {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-gray);
}
.uptime-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    margin-bottom: 8px;
    font-weight: 500;
}
.uptime-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.uptime-label {
    font-size: 11px;
    color: var(--medium-gray);
    width: 60px;
    flex-shrink: 0;
}
.uptime-track {
    flex: 1;
    height: 4px;
    background: var(--border-gray);
    border-radius: 2px;
    overflow: hidden;
}
.uptime-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.uptime-pct {
    font-size: 10px;
    font-weight: 600;
    color: var(--medium-gray);
    width: 28px;
    text-align: right;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 32: Card Flip Animation
   ═══════════════════════════════════════════════════════ */
.store-card.flip-ready {
    position: relative;
    perspective: 1000px;
}
.flip-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--light-gray);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    z-index: 2;
}
.flip-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--accent-gold);
    transform: rotate(180deg);
}
.card-back-face {
    position: absolute;
    inset: 0;
    background: var(--white);
    border-radius: inherit;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    transition: opacity 0.3s ease, transform 0.5s ease;
    pointer-events: none;
    z-index: 3;
}
.store-card.flipped .card-back-face {
    opacity: 1;
    transform: rotateY(0deg);
    pointer-events: auto;
}
.store-card.flipped > *:not(.card-back-face):not(.flip-btn) {
    opacity: 0;
    transition: opacity 0.2s ease;
}
.back-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 14px;
}
.back-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.back-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-gray);
}
.back-row span:first-child {
    color: var(--medium-gray);
}
.back-row span:last-child {
    font-weight: 500;
    color: var(--black);
}
.flip-back-btn {
    margin-top: 14px;
    padding: 8px 16px;
    border: 1px solid var(--border-gray);
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    color: var(--medium-gray);
    align-self: center;
    transition: border-color 0.2s;
}
.flip-back-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 32: Smart Search
   ═══════════════════════════════════════════════════════ */
.smart-search {
    position: relative;
    margin-bottom: 16px;
    z-index: 100;
}
.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    padding: 10px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input-wrapper:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.1);
}
.search-input-wrapper svg {
    color: var(--light-gray);
    flex-shrink: 0;
}
.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--black);
    outline: none;
    font-family: inherit;
}
.search-input::placeholder {
    color: var(--light-gray);
}
.search-kbd {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    color: var(--light-gray);
    font-family: monospace;
}
.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    max-height: 280px;
    overflow-y: auto;
    display: none;
}
.search-results.visible {
    display: block;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-gray);
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover {
    background: var(--bg-light);
}
.result-type {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    background: rgba(201, 169, 98, 0.1);
    color: var(--accent-gold);
    border-radius: 4px;
    font-weight: 600;
}
.result-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
}
.result-detail {
    font-size: 11px;
    color: var(--light-gray);
    margin-left: auto;
}
.search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--light-gray);
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 32: Notification Stacking
   ═══════════════════════════════════════════════════════ */
.notif-stack {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.stack-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-gray);
}
.stack-count {
    font-size: 12px;
    color: var(--medium-gray);
    font-weight: 500;
}
.stack-toggle {
    font-size: 11px;
    color: var(--accent-gold);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.stack-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.notif-stack:not(.collapsed) .stack-items {
    max-height: 500px;
}
.notif-stack.collapsed .stack-items {
    max-height: 0;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 33: Metric Thresholds
   ═══════════════════════════════════════════════════════ */
.threshold-crit {
    color: #C45C5C !important;
    font-weight: 600;
}
.threshold-warn {
    color: #D4A84B !important;
}
.threshold-marker {
    display: inline-block;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 500;
    vertical-align: middle;
}
.threshold-marker.crit {
    background: rgba(196, 92, 92, 0.1);
    color: #C45C5C;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 33: Auto-Refresh Progress Bar
   ═══════════════════════════════════════════════════════ */
.auto-refresh-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.04);
}
.refresh-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
    transition: width 1s linear;
    border-radius: 0 2px 2px 0;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 33: Store Map View
   ═══════════════════════════════════════════════════════ */
.store-map-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-gray);
    transition: color 0.2s, border-color 0.2s;
    z-index: 10;
}
.store-map-toggle:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}
.store-map-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.store-map-overlay.visible { opacity: 1; }
.map-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.map-header h3 { font-size: 16px; font-weight: 600; margin: 0; color: var(--black); }
.map-close {
    width: 28px; height: 28px; border: none; background: var(--bg-light);
    border-radius: 50%; font-size: 18px; color: var(--medium-gray); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.map-canvas {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
}
.map-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    opacity: 0.8;
}
.map-bg::after {
    content: '';
    position: absolute;
    inset: 20px;
    border: 2px dashed var(--border-gray);
    border-radius: 40% 60% 50% 50%;
    opacity: 0.4;
}
.map-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 2;
}
.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    animation: pinBounce 2s ease-in-out infinite;
}
.pin-label {
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--black);
    white-space: nowrap;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
}
@keyframes pinBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 33: Contextual FAB
   ═══════════════════════════════════════════════════════ */
.ctx-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
}
.fab-main {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(201, 169, 98, 0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
}
.ctx-fab.open .fab-main {
    transform: rotate(45deg);
}
.fab-main:hover {
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.5);
}
.fab-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.ctx-fab.open .fab-actions {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.fab-action {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-gray);
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: color 0.2s, border-color 0.2s;
}
.fab-action:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 33: Reading Mode
   ═══════════════════════════════════════════════════════ */
.reading-mode-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: #2a2a2a;
    color: white;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.reading-mode-banner button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}
body.reading-mode {
    font-size: 18px !important;
}
body.reading-mode .store-card {
    font-size: 16px;
}
body.reading-mode .metric-value,
body.reading-mode .data-value {
    font-size: 22px !important;
}
body.reading-mode .store-card h3 {
    font-size: 20px !important;
}
body.reading-mode .uptime-label,
body.reading-mode .qstat-label {
    font-size: 14px !important;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 34: Multi-Unit Status Grid
   ═══════════════════════════════════════════════════════ */
.multi-unit-grid {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.mug-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    font-weight: 500;
    margin-bottom: 10px;
}
.mug-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.mug-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: var(--bg-light);
    border-radius: 6px;
    cursor: default;
    transition: transform 0.15s;
}
.mug-item:hover {
    transform: scale(1.05);
}
.mug-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}
.mug-dot.status-healthy { background: #7CB87C; }
.mug-dot.status-alerts { background: #D4A84B; }
.mug-dot.status-critical { background: #C45C5C; animation: mugPulse 1.5s infinite; }
@keyframes mugPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}
.mug-name {
    font-size: 10px;
    font-weight: 500;
    color: var(--medium-gray);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 34: Quick Settings Toggles
   ═══════════════════════════════════════════════════════ */
.quick-toggles {
    position: fixed;
    bottom: 90px;
    left: 16px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.qt-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-gray);
    background: var(--white);
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.qt-btn:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}
.qt-btn[aria-pressed="true"] {
    background: var(--accent-gold);
    color: white;
    border-color: var(--accent-gold);
}
@media (max-width: 768px) {
    .quick-toggles { display: none; }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 34: Animated Page Transitions
   ═══════════════════════════════════════════════════════ */
.page-exit {
    animation: pageExit 0.15s ease-in forwards;
}
.page-enter {
    animation: pageEnter 0.3s ease-out;
}
@keyframes pageExit {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}
@keyframes pageEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
body.reduce-motion .page-exit,
body.reduce-motion .page-enter {
    animation: none;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 34: Store Card Badges
   ═══════════════════════════════════════════════════════ */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-gray);
}
.card-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--bg-light);
    color: var(--medium-gray);
}
.badge-fcu { background: rgba(91, 138, 154, 0.1); color: #5B8A9A; }
.badge-ahu { background: rgba(139, 123, 168, 0.1); color: #8B7BA8; }
.badge-fridge { background: rgba(124, 184, 124, 0.1); color: #5a9a5a; }

/* ═══════════════════════════════════════════════════════
   UX BATCH 34: Keyboard Card Navigation
   ═══════════════════════════════════════════════════════ */
.store-card.kbd-focused {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.15);
    transition: outline-color 0.2s, box-shadow 0.2s;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 35: Status Change Log
   ═══════════════════════════════════════════════════════ */
.status-changelog {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.scl-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    font-weight: 500;
    margin-bottom: 12px;
}
.scl-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.scl-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}
.scl-time {
    font-size: 11px;
    color: var(--light-gray);
    font-variant-numeric: tabular-nums;
    min-width: 45px;
}
.scl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.scl-dot.status-healthy { background: #7CB87C; }
.scl-dot.status-alerts { background: #D4A84B; }
.scl-dot.status-critical { background: #C45C5C; }
.scl-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.scl-store {
    font-size: 12px;
    font-weight: 500;
    color: var(--black);
}
.scl-status {
    font-size: 10px;
    color: var(--light-gray);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 35: Voice Readout Indicator
   ═══════════════════════════════════════════════════════ */
.voice-indicator {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #2a2a2a;
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10001;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: voiceFadeIn 0.3s ease;
}
@keyframes voiceFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 35: System Load Indicator
   ═══════════════════════════════════════════════════════ */
.system-load {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-gray);
}
.load-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.load-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    font-weight: 500;
}
.load-val {
    font-size: 11px;
    font-weight: 600;
}
.load-bar {
    height: 4px;
    background: var(--border-gray);
    border-radius: 2px;
    overflow: hidden;
}
.load-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 35: Maintenance Countdown
   ═══════════════════════════════════════════════════════ */
.maint-countdown {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 12px;
}
.maint-countdown.maint-urgent {
    border-color: rgba(196, 92, 92, 0.3);
    background: rgba(196, 92, 92, 0.03);
}
.maint-countdown.maint-soon {
    border-color: rgba(212, 168, 75, 0.3);
    background: rgba(212, 168, 75, 0.03);
}
.maint-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-gray);
}
.maint-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.maint-title {
    font-size: 11px;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.maint-days {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}
.maint-date {
    font-size: 11px;
    color: var(--light-gray);
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 35: Energy Efficiency Score
   ═══════════════════════════════════════════════════════ */
.energy-score-widget {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}
.esw-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--medium-gray);
    margin-bottom: 12px;
}
.esw-body {
    display: flex;
    align-items: center;
    gap: 16px;
}
.esw-grade {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}
.esw-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.esw-score {
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
}
.esw-bar {
    height: 6px;
    background: var(--border-gray);
    border-radius: 3px;
    overflow: hidden;
}
.esw-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}
.esw-hint {
    font-size: 11px;
    color: var(--light-gray);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 36: Interactive Data Table
   ═══════════════════════════════════════════════════════ */
.data-table-toggle {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-gray);
    transition: color 0.2s, border-color 0.2s;
    position: absolute;
    top: 10px;
    right: 50px;
    z-index: 10;
}
.data-table-toggle:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}
.data-table-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.data-table-overlay.visible { opacity: 1; }
.dt-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.dt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.dt-header h3 { font-size: 16px; font-weight: 600; margin: 0; color: var(--black); }
.dt-close { width: 28px; height: 28px; border: none; background: var(--bg-light); border-radius: 50%; font-size: 18px; color: var(--medium-gray); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dt-scroll {
    overflow: auto;
    flex: 1;
}
.dt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.dt-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--bg-light);
    color: var(--medium-gray);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 10px;
    cursor: pointer;
    user-select: none;
    position: sticky;
    top: 0;
}
.dt-table th:hover { color: var(--accent-gold); }
.dt-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-gray);
    color: var(--black);
}
.dt-status {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
}
.dt-status.status-healthy { background: rgba(124, 184, 124, 0.1); color: #7CB87C; }
.dt-status.status-alerts { background: rgba(212, 168, 75, 0.1); color: #D4A84B; }
.dt-status.status-critical { background: rgba(196, 92, 92, 0.1); color: #C45C5C; }

/* ═══════════════════════════════════════════════════════
   UX BATCH 36: Quick Notes
   ═══════════════════════════════════════════════════════ */
.quick-note-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--light-gray);
    transition: color 0.2s, background 0.2s;
    z-index: 2;
}
.quick-note-btn:hover { color: var(--accent-gold); background: rgba(201, 169, 98, 0.1); }
.quick-note-display {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(201, 169, 98, 0.06);
    border-left: 2px solid var(--accent-gold);
    border-radius: 0 6px 6px 0;
    font-size: 11px;
    color: var(--medium-gray);
    font-style: italic;
}
.quick-note-input {
    margin-top: 8px;
}
.quick-note-input textarea {
    width: 100%;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    font-family: inherit;
    resize: none;
    outline: none;
}
.quick-note-input textarea:focus { border-color: var(--accent-gold); }
.note-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}
.note-actions button {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}
.note-save { background: var(--accent-gold); color: white; }
.note-cancel { background: var(--bg-light); color: var(--medium-gray); }

/* ═══════════════════════════════════════════════════════
   UX BATCH 36: Activity Heatmap
   ═══════════════════════════════════════════════════════ */
.activity-heatmap {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.ah-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    font-weight: 500;
    margin-bottom: 10px;
}
.ah-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
    grid-auto-flow: column;
}
.ah-cell {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 2px;
    min-width: 8px;
}
.ah-cell.level-0 { background: var(--border-gray); }
.ah-cell.level-1 { background: rgba(124, 184, 124, 0.3); }
.ah-cell.level-2 { background: rgba(124, 184, 124, 0.5); }
.ah-cell.level-3 { background: rgba(124, 184, 124, 0.7); }
.ah-cell.level-4 { background: #7CB87C; }
.ah-legend {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 8px;
    justify-content: flex-end;
}
.ah-legend span {
    font-size: 9px;
    color: var(--light-gray);
    margin: 0 4px;
}
.ah-legend .ah-cell {
    width: 10px;
    height: 10px;
    aspect-ratio: auto;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 36: Alert Snooze
   ═══════════════════════════════════════════════════════ */
.snooze-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 4px;
    font-size: 10px;
    color: var(--medium-gray);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.snooze-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.snooze-btn:disabled { opacity: 0.5; cursor: default; }
.snoozed {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 36: Connection Status
   ═══════════════════════════════════════════════════════ */
.conn-status {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
}
.conn-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.conn-dot.online {
    background: #7CB87C;
    box-shadow: 0 0 4px rgba(124, 184, 124, 0.4);
}
.conn-dot.offline {
    background: #C45C5C;
    animation: connPulse 1.5s ease-in-out infinite;
}
@keyframes connPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.conn-label {
    font-size: 10px;
    color: var(--light-gray);
    font-weight: 500;
}
@media (max-width: 480px) {
    .conn-status { display: none; }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 37: Trend Predictions
   ═══════════════════════════════════════════════════════ */
.trend-prediction {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 5px 10px;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 11px;
}
.tp-label { color: var(--light-gray); }
.tp-value { font-weight: 600; color: var(--black); }
.trend-rising .tp-value { color: #D4A84B; }
.trend-rising .tp-arrow { color: #D4A84B; }
.trend-stable .tp-arrow { color: #7CB87C; }

/* ═══════════════════════════════════════════════════════
   UX BATCH 37: Notification Center
   ═══════════════════════════════════════════════════════ */
.notif-center-btn {
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: var(--medium-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}
.notif-center-btn:hover { color: var(--accent-gold); background: rgba(201, 169, 98, 0.1); }
.notif-center-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.notif-center-panel.open { right: 0; }
.nc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-gray);
}
.nc-header h3 { font-size: 16px; font-weight: 600; margin: 0; color: var(--black); }
.nc-close { width: 28px; height: 28px; border: none; background: var(--bg-light); border-radius: 50%; font-size: 18px; color: var(--medium-gray); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nc-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.nc-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-gray);
}
.nc-time { font-size: 10px; color: var(--light-gray); margin-bottom: 4px; }
.nc-event { font-size: 13px; font-weight: 500; color: var(--black); margin-bottom: 2px; }
.nc-store { font-size: 11px; color: var(--medium-gray); }
.nc-empty { text-align: center; padding: 40px; color: var(--light-gray); font-size: 13px; }

/* ═══════════════════════════════════════════════════════
   UX BATCH 37: System Dependency Tree
   ═══════════════════════════════════════════════════════ */
.dep-tree-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-gray);
    position: absolute;
    top: 10px;
    right: 90px;
    z-index: 10;
    transition: color 0.2s, border-color 0.2s;
}
.dep-tree-btn:hover { color: var(--accent-gold); border-color: var(--accent-gold); }
.dep-tree-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.dep-tree-overlay.visible { opacity: 1; }
.dep-tree-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.dep-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.dep-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.dep-close { width: 28px; height: 28px; border: none; background: var(--bg-light); border-radius: 50%; font-size: 18px; color: var(--medium-gray); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dep-content { text-align: center; }
.dep-node {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    margin: 4px;
}
.dep-root { background: var(--accent-gold); color: white; font-size: 14px; font-weight: 600; }
.dep-branches { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 20px; }
.dep-branch { text-align: center; }
.dep-store { background: var(--bg-light); color: var(--black); border: 1px solid var(--border-gray); }
.dep-store.status-healthy { border-color: #7CB87C; }
.dep-store.status-alerts { border-color: #D4A84B; }
.dep-store.status-critical { border-color: #C45C5C; }
.dep-leaves { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; }
.dep-leaf { font-size: 10px; padding: 4px 8px; background: var(--bg-light); }
.dep-leaf.status-healthy { color: #7CB87C; }
.dep-leaf.status-alerts { color: #D4A84B; }
.dep-leaf.status-critical { color: #C45C5C; }

/* ═══════════════════════════════════════════════════════
   UX BATCH 37: Quick Export Cards
   ═══════════════════════════════════════════════════════ */
.export-card-btn {
    position: absolute;
    bottom: 10px;
    right: 38px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--light-gray);
    transition: color 0.2s;
    z-index: 2;
}
.export-card-btn:hover { color: var(--accent-gold); }

/* ═══════════════════════════════════════════════════════
   UX BATCH 37: Dashboard Presets
   ═══════════════════════════════════════════════════════ */
.dash-presets {
    position: absolute;
    top: 50%;
    right: 90px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}
.dp-save, .dp-load {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-gray);
    font-size: 10px;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s;
}
.dp-save:hover, .dp-load:hover { color: var(--accent-gold); border-color: var(--accent-gold); }
@media (max-width: 600px) {
    .dash-presets { display: none; }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 38: Anomaly Detection
   ═══════════════════════════════════════════════════════ */
.anomaly-alert {
    background: rgba(212, 168, 75, 0.05);
    border: 1px solid rgba(212, 168, 75, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.anomaly-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #D4A84B;
    margin-bottom: 8px;
}
.anomaly-item {
    font-size: 12px;
    color: var(--medium-gray);
    padding: 4px 0;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 38: Split-Screen View
   ═══════════════════════════════════════════════════════ */
.split-screen-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--medium-gray);
    position: absolute;
    top: 10px;
    right: 130px;
    z-index: 10;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.split-screen-btn:hover { color: var(--accent-gold); border-color: var(--accent-gold); }
.split-screen-btn.active { background: var(--accent-gold); color: white; border-color: var(--accent-gold); }
.stores-grid.split-view {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .stores-grid.split-view { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 38: Alert Escalation
   ═══════════════════════════════════════════════════════ */
.escalation-path {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.esc-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    font-weight: 500;
    margin-bottom: 14px;
}
.esc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.esc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.esc-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-gray);
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}
.esc-step.active .esc-num {
    background: var(--accent-gold);
    color: white;
}
.esc-label {
    font-size: 10px;
    color: var(--light-gray);
}
.esc-step.active .esc-label { color: var(--black); font-weight: 500; }
.esc-connector {
    width: 30px;
    height: 2px;
    background: var(--border-gray);
    margin: 0 4px;
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 38: Smart Card Grouping
   ═══════════════════════════════════════════════════════ */
.group-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--black);
    padding: 10px 0 4px;
    margin-top: 8px;
}
.group-header:first-child { margin-top: 0; }
.group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.group-dot.status-healthy { background: #7CB87C; }
.group-dot.status-alerts { background: #D4A84B; }
.group-dot.status-critical { background: #C45C5C; }

/* ═══════════════════════════════════════════════════════
   UX BATCH 38: Health Timeline
   ═══════════════════════════════════════════════════════ */
.health-timeline {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.ht-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    font-weight: 500;
    margin-bottom: 12px;
}
.ht-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.ht-store {
    font-size: 10px;
    color: var(--medium-gray);
    width: 80px;
    flex-shrink: 0;
    text-align: right;
    font-weight: 500;
}
.ht-cells {
    display: flex;
    flex: 1;
    gap: 1px;
}
.ht-cell {
    flex: 1;
    height: 14px;
    border-radius: 2px;
    min-width: 4px;
}
.ht-healthy { background: rgba(124, 184, 124, 0.4); }
.ht-alerts { background: rgba(212, 168, 75, 0.5); }
.ht-critical { background: rgba(196, 92, 92, 0.6); }
.ht-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding-left: 90px;
    font-size: 9px;
    color: var(--light-gray);
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 39: Micro-Interactions
   ═══════════════════════════════════════════════════════ */
.micro-ripple {
    position: absolute;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.2);
    transform: translate(-50%, -50%);
    animation: microRipple 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}
@keyframes microRipple {
    from { width: 0; height: 0; opacity: 1; }
    to { width: 150px; height: 150px; opacity: 0; }
}
.store-card {
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 39: Live Activity Feed
   ═══════════════════════════════════════════════════════ */
.live-feed {
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}
.lf-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--light-gray);
    font-weight: 500;
    margin-bottom: 10px;
}
.lf-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7CB87C;
    animation: lfPulse 2s ease-in-out infinite;
}
@keyframes lfPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.lf-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 11px;
    border-bottom: 1px solid var(--border-gray);
    transition: opacity 0.3s, transform 0.3s;
}
.lf-item:last-child { border-bottom: none; }
.lf-item.lf-new {
    animation: lfSlideIn 0.3s ease-out;
}
@keyframes lfSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.lf-time {
    color: var(--light-gray);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
}
.lf-event {
    color: var(--medium-gray);
    font-weight: 400;
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 39: Compliance Badges
   ═══════════════════════════════════════════════════════ */
.compliance-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.comp-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.comp-badge.compliant {
    background: rgba(124, 184, 124, 0.1);
    color: #7CB87C;
}
.comp-badge.violation {
    background: rgba(196, 92, 92, 0.1);
    color: #C45C5C;
    animation: compPulse 2s ease-in-out infinite;
}
@keyframes compPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════════════════
   UX BATCH 39: Quick Actions Toolbar
   ═══════════════════════════════════════════════════════ */
.qa-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.qa-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 8px;
    font-size: 12px;
    color: var(--medium-gray);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    font-family: inherit;
}
.qa-btn:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
    background: rgba(201, 169, 98, 0.03);
}
.qa-btn span {
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 40: Breadcrumbs, Favorites, Filter Presets, Card Animations
   ═══════════════════════════════════════════════════════════════ */

.bms-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0 12px;
    font-size: 12px;
    color: var(--medium-gray);
}
.breadcrumb-item {
    cursor: pointer;
    transition: color 0.2s;
}
.breadcrumb-item:hover:not(.current) {
    color: var(--accent-gold);
}
.breadcrumb-item.current {
    color: var(--dark-gray);
    font-weight: 500;
    cursor: default;
}
.breadcrumb-sep {
    color: var(--border-gray);
    font-size: 11px;
}

.favorite-store-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--border-gray);
    transition: color 0.2s, transform 0.2s;
    z-index: 2;
    line-height: 1;
}
.favorite-store-btn:hover,
.favorite-store-btn.favorited {
    color: var(--accent-gold);
    transform: scale(1.2);
}

.filter-presets-bar {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    flex-wrap: wrap;
}
.filter-preset-btn {
    padding: 6px 14px;
    border: 1px solid var(--border-gray);
    background: var(--white);
    border-radius: 20px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--medium-gray);
}
.filter-preset-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.filter-preset-btn.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.store-card.card-animated {
    animation: cardSlideIn 0.3s ease both;
}
@keyframes cardSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 41: Store Notes, System Overview
   ═══════════════════════════════════════════════════════════════ */

.store-notes-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0 0;
    font-size: 11px;
}
.store-notes-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.store-notes-btn:hover {
    opacity: 1;
}
.store-note-display {
    color: var(--medium-gray);
    font-style: italic;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-overview-strip {
    display: flex;
    gap: 16px;
    padding: 14px 20px;
    background: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    margin-bottom: 16px;
    grid-column: 1 / -1;
}
.overview-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.overview-num {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark-gray);
}
.overview-stat.healthy .overview-num { color: var(--accent-sage); }
.overview-stat.alerts .overview-num { color: var(--accent-amber); }
.overview-stat.critical .overview-num { color: var(--accent-wine); }
.overview-label {
    font-size: 11px;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-silenced {
    opacity: 0.4 !important;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 42: Unit Search, Compact Mode, Refresh Countdown
   ═══════════════════════════════════════════════════════════════ */

.unit-search-input {
    width: 100%;
    max-width: 280px;
    padding: 8px 14px;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 12px;
    transition: border-color 0.2s;
    background: var(--white);
}
.unit-search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.status-filter-chip {
    padding: 5px 12px;
    border: 1px solid var(--border-gray);
    border-radius: 16px;
    font-size: 11px;
    cursor: pointer;
    background: var(--white);
    transition: all 0.2s;
    font-family: inherit;
}
.status-filter-chip.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

body.bms-compact-mode .store-card {
    padding: 12px;
}
body.bms-compact-mode .store-card h3 {
    font-size: 14px;
}
body.bms-compact-mode .system-status-grid {
    gap: 6px;
}
body.bms-compact-mode .metric-value {
    font-size: 18px;
}

.refresh-countdown {
    font-size: 11px;
    color: var(--medium-gray);
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 43: Store Compare, Floating Actions
   ═══════════════════════════════════════════════════════════════ */

.compare-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.compare-modal {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}
.compare-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.compare-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}
.compare-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--medium-gray);
}
.compare-grid {
    display: flex;
    gap: 20px;
}
.compare-col {
    flex: 1;
}
.compare-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}
.compare-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: capitalize;
}
.compare-status.status-healthy { background: rgba(124,184,124,0.1); color: var(--accent-sage); }
.compare-status.status-alerts { background: rgba(212,168,75,0.1); color: var(--accent-amber); }
.compare-status.status-critical { background: rgba(196,92,92,0.1); color: var(--accent-wine); }
.compare-sys {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border-gray);
}
.compare-divider {
    width: 1px;
    background: var(--border-gray);
}

.compare-store-btn {
    padding: 4px 8px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 10px;
    cursor: pointer;
    background: var(--white);
    transition: all 0.2s;
    font-family: inherit;
}
.compare-store-btn.selected {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.bms-floating-actions {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 8px;
}
.fab-main {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201,169,98,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(201,169,98,0.4);
}
.fab-menu {
    flex-direction: column;
    gap: 6px;
}
.fab-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-gray);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    font-family: inherit;
}
.fab-item:hover {
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   UX BATCH 44: Print Layout, Reduced Motion
   ═══════════════════════════════════════════════════════════════ */

@media print {
    .bottom-nav,
    .bms-floating-actions,
    .filter-presets-bar,
    .fab-main,
    .fab-menu,
    .favorite-store-btn,
    .store-notes-wrapper {
        display: none !important;
    }
    body.bms-printing .store-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    body.bms-printing {
        background: white;
    }
}

body.bms-reduced-motion *,
body.bms-reduced-motion *::before,
body.bms-reduced-motion *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}

.bulk-dismiss-btn {
    padding: 6px 14px;
    border: 1px solid var(--accent-wine);
    background: rgba(196,92,92,0.05);
    color: var(--accent-wine);
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.bulk-dismiss-btn:hover {
    background: rgba(196,92,92,0.1);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD SIMPLIFICATION - Clean overrides
   ═══════════════════════════════════════════════════════════════ */

/* Centered Header for Home Page */
.header.header-centered {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 24px 16px 16px !important;
    width: 100%;
    box-sizing: border-box;
}

.header.header-centered .logo {
    display: block !important;
    width: auto !important;
    max-width: 250px !important;
    height: auto !important;
    margin: 0 auto !important;
    position: static !important;
    transform: none !important;
    left: auto !important;
}

.header.header-centered .client-name {
    display: block !important;
    width: 100% !important;
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    font-size: 28px;
    font-weight: 400;
    color: var(--black, #1a1a1a);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center !important;
}

.user-info-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.user-email-display {
    font-size: 13px;
    color: var(--gray, #666);
}

.btn-logout {
    font-size: 12px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: var(--gray, #666);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-logout:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.alert-arrow {
    color: #999;
    margin-left: auto;
}

/* Store Card Layout */
.store-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    padding: 32px 40px 36px;
    background: var(--white, #fff);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 320px !important;
}

.store-card .store-name {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--black, #1a1a1a);
    letter-spacing: 0.5px;
}

.store-card .store-address {
    margin: 0;
    font-size: 13px;
    color: var(--gray, #777);
}

/* Status section container - centers the circle and label */
.store-status-section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
}

/* Big Round Status Circle with Outer Ring */
.store-status-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

/* Outer ring - thin border */
.store-status-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid;
}

.store-status-circle.status-healthy::before {
    border-color: #7CB87C;
}

.store-status-circle.status-alerts::before {
    border-color: #D4A84B;
}

.store-status-circle.status-critical::before {
    border-color: #C45C5C;
}

/* Inner solid circle - with gap from outer ring */
.store-status-circle::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
}

.store-status-circle.status-healthy::after {
    background: #7CB87C;
}

.store-status-circle.status-alerts::after {
    background: #D4A84B;
}

.store-status-circle.status-critical::after {
    background: #C45C5C;
}

/* Pulse animation */
.store-status-circle .status-pulse {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    animation: statusPulse 2.5s ease-in-out infinite;
    z-index: 1;
}

.store-status-circle.status-healthy .status-pulse {
    background: rgba(124, 184, 124, 0.6);
}

.store-status-circle.status-alerts .status-pulse {
    background: rgba(212, 168, 75, 0.6);
}

.store-status-circle.status-critical .status-pulse {
    background: rgba(196, 92, 92, 0.6);
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.store-status-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--gray, #666);
}

/* Wrapper for card + button */
.store-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-acknowledge {
    margin-top: 12px;
    padding: 8px 20px;
    background: #C9A962;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-acknowledge:hover {
    background: #d4832f;
}

/* Home Page Footer */
.home-footer {
    margin: 32px 16px 100px;
    padding: 20px;
    background: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.footer-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-gray, #e8e8e8);
}

.footer-service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.footer-service-item:hover {
    background: var(--light-gray, #f8f8f8);
}

.footer-service-item svg {
    color: var(--accent, #5B8A9A);
}

.footer-service-item span {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray, #666);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray, #888);
}

.footer-brand strong {
    color: var(--black, #1a1a1a);
    font-weight: 600;
}

.footer-version {
    font-size: 10px;
    color: var(--gray, #aaa);
    margin-left: 4px;
}

/* KPI Strip */
.kpi-strip {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 16px 12px;
    margin: 0 16px 16px;
    background: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.kpi-item {
    text-align: center;
    flex: 1;
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--black, #1a1a1a);
    line-height: 1.2;
}

.kpi-value.kpi-healthy { color: #7CB87C; }
.kpi-value.kpi-alerts { color: #D4A84B; }
.kpi-value.kpi-critical { color: #C45C5C; }

.kpi-label {
    font-size: 11px;
    color: var(--gray, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Section header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
    margin: 0;
}

.status-legend-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--gray, #666);
}

.legend-dot-inline {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
}

.legend-dot-inline.healthy { background: #7CB87C; }
.legend-dot-inline.alerts { background: #D4A84B; }
.legend-dot-inline.critical { background: #C45C5C; }

/* Simplified Store Cards */
.store-card {
    background: var(--white, #fff);
    border: 1px solid var(--border-gray, #e8e8e8);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.store-card:hover {
    border-color: var(--accent-gold, #C9A962);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

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

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

.store-health-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--black, #1a1a1a);
}

.store-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
    margin: 0 0 4px;
    text-align: left;
    border: none;
    padding: 0;
    display: block;
    letter-spacing: 0;
    text-transform: none;
}

.store-card .store-address {
    font-size: 12px;
    color: var(--gray, #888);
    margin: 0;
    text-align: left;
}

/* Stores Grid */
.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 0 16px 100px;
}

/* Store Detail Tabs */
.store-detail-tabs {
    margin: 16px 0;
}

.tab-bar {
    display: flex;
    overflow-x: auto;
    gap: 0;
    border-bottom: 1px solid var(--border-gray, #e8e8e8);
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
    display: none;
}

.store-tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray, #666);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.store-tab:hover {
    color: var(--black, #1a1a1a);
}

.store-tab.active {
    color: var(--accent, #5B8A9A);
    border-bottom-color: var(--accent, #5B8A9A);
}

.tab-content {
    padding: 16px;
}

/* Hide header extras on home page (clock, live dot, bell are removed from markup) */

/* Hide ambient glow, animated background, floating actions overlays */
.ambient-glow,
.animated-bg-canvas,
.bms-floating-actions,
.ctx-fab,
.ambient-status-bar,
.reading-progress-bar,
.dynamic-island-alert,
.glassmorphism-overlay,
.pulse-indicator-ring,
.scroll-shadow-top,
.scroll-shadow-bottom,
.live-activity-feed-overlay,
.compliance-badge-float,
.quick-actions-toolbar-float,
.ambient-sound-zone,
.alert-priority-lane,
.split-screen-divider,
.inline-sparkline-overlay,
.health-timeline-float,
.card-animation-overlay,
.store-ranking-float,
.bulk-dismiss-float,
.store-compare-float,
.quick-zoom-overlay,
.refresh-countdown-float,
.data-density-overlay,
.contextual-fab-overlay,
.dynamic-island-container {
    display: none !important;
}

/* Reduce z-index ceiling */
.fab-container { z-index: 1000; }
.bottom-nav { z-index: 1000; }
.command-palette-overlay { z-index: 2000; }
.toast-container { z-index: 3000; }

/* ===== INDUSTRY STANDARD PATTERNS ===== */

/* Active Alerts Summary (Morning Routine Pattern) */
.active-alerts-summary {
    margin: 0 16px 16px;
    padding: 16px;
    background: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid #D4A84B;
}

.active-alerts-summary.all-clear {
    border-left-color: #7CB87C;
}

.alerts-summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
    margin-bottom: 12px;
}

.alerts-summary-header svg {
    color: #D4A84B;
}

.active-alerts-summary.all-clear .alerts-summary-header svg {
    color: #7CB87C;
}

.alerts-count {
    background: #D4A84B;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.all-clear-message {
    font-size: 13px;
    color: var(--gray, #666);
    margin: 0;
}

.alerts-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

/* Colored backgrounds based on alert priority */
.alert-summary-item.alert-critical {
    background-color: #ffdddd !important;
}

.alert-summary-item.alert-warning {
    background-color: #fff3d0 !important;
}

.alert-summary-item.alert-info {
    background-color: #ddeeff !important;
}

.alert-summary-item:hover {
    background-color: #e8e8e8 !important;
}

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

.alert-priority-indicator.critical { background: #C45C5C; }
.alert-priority-indicator.warning { background: #D4A84B; }
.alert-priority-indicator.info { background: #5B8A9A; }

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

.alert-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--black, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alert-location {
    display: block;
    font-size: 11px;
    color: var(--gray, #666);
}

.view-all-alerts {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--accent, #5B8A9A);
    text-decoration: none;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid var(--border-gray, #e8e8e8);
}

/* Traffic Light Device Health Indicator */
.device-health-indicator {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.traffic-light {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: #2a2a2a;
    border-radius: 20px;
}

.traffic-light-lamp {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0.25;
    transition: opacity 0.3s, box-shadow 0.3s;
}

.traffic-light-lamp.red { background: #C45C5C; }
.traffic-light-lamp.amber { background: #D4A84B; }
.traffic-light-lamp.green { background: #7CB87C; }

.traffic-light-lamp.active {
    opacity: 1;
    box-shadow: 0 0 12px currentColor;
}

.traffic-light-lamp.red.active { box-shadow: 0 0 12px #C45C5C; }
.traffic-light-lamp.amber.active { box-shadow: 0 0 12px #D4A84B; }
.traffic-light-lamp.green.active { box-shadow: 0 0 12px #7CB87C; }

.traffic-light-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
}

/* Tab Badge */
.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: #C45C5C;
    border-radius: 9px;
}

/* Alarms Tab */
.alarms-tab-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.alarms-tab-empty h3 {
    margin: 16px 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
}

.alarms-tab-empty p {
    font-size: 14px;
    color: var(--gray, #666);
    margin: 0;
}

.alarms-summary-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-gray, #e8e8e8);
}

.alarm-summary-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray, #666);
}

.alarm-summary-stat .stat-value {
    font-weight: 700;
    font-size: 16px;
}

.alarm-summary-stat.critical .stat-value { color: #C45C5C; }
.alarm-summary-stat.warning .stat-value { color: #D4A84B; }
.alarm-summary-stat.info .stat-value { color: #5B8A9A; }

.alarm-priority-section {
    margin-bottom: 20px;
}

.alarm-priority-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid;
}

.alarm-priority-section.critical .alarm-priority-header {
    color: #C45C5C;
    border-bottom-color: #C45C5C;
}

.alarm-priority-section.warning .alarm-priority-header {
    color: #D4A84B;
    border-bottom-color: #D4A84B;
}

.alarm-priority-section.info .alarm-priority-header {
    color: #5B8A9A;
    border-bottom-color: #5B8A9A;
}

.alarm-count {
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: currentColor;
    padding: 2px 8px;
    border-radius: 10px;
}

.alarm-priority-section.critical .alarm-count { background: #C45C5C; }
.alarm-priority-section.warning .alarm-count { background: #D4A84B; }
.alarm-priority-section.info .alarm-count { background: #5B8A9A; }

.alarm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alarm-item {
    display: flex;
    align-items: stretch;
    background: var(--white, #fff);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    overflow: hidden;
}

.alarm-priority-bar {
    width: 4px;
    flex-shrink: 0;
}

.alarm-priority-bar.critical { background: #C45C5C; }
.alarm-priority-bar.warning { background: #D4A84B; }
.alarm-priority-bar.info { background: #5B8A9A; }

.alarm-content {
    flex: 1;
    padding: 12px 16px;
    min-width: 0;
}

.alarm-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--black, #1a1a1a);
    margin-bottom: 4px;
}

.alarm-message {
    font-size: 12px;
    color: var(--gray, #666);
    line-height: 1.4;
}

.alarm-ack-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: var(--light-gray, #f8f8f8);
    border: none;
    cursor: pointer;
    color: var(--gray, #666);
    transition: background 0.2s, color 0.2s;
}

.alarm-ack-btn:hover {
    background: #7CB87C;
    color: white;
}

/* AI Suggestions Tab - Dashboard Cards Design */
.ai-tab-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ai-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-section.completed {
    opacity: 0.7;
}

.ai-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.ai-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
    margin: 0;
}

.ai-count {
    font-size: 13px;
    color: var(--gray, #666);
    background: var(--border-gray, #f0f0f0);
    padding: 4px 10px;
    border-radius: 12px;
}

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

@media (min-width: 900px) {
    .ai-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ai-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    color: #7CB87C;
}

.ai-empty-state p {
    margin: 16px 0 4px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.ai-empty-sub {
    font-size: 13px;
    color: #888;
}

/* Individual AI Suggestion Card */
.ai-suggestion-card {
    background: var(--white, #fff);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--border-gray, #e8e8e8);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ai-suggestion-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.ai-suggestion-card.priority-high {
    border-left: 4px solid #C45C5C;
}

.ai-suggestion-card.priority-medium {
    border-left: 4px solid #D4A84B;
}

.ai-suggestion-card.priority-low {
    border-left: 4px solid #5B8A9A;
}

.ai-suggestion-card.approved {
    border-left: 4px solid #7CB87C;
    background: #f8fcf8;
}

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

.ai-icon {
    flex-shrink: 0;
}

.ai-icon.urgent { color: #C45C5C; }
.ai-icon.warning { color: #D4A84B; }
.ai-icon.info { color: #5B8A9A; }
.ai-icon.success { color: #7CB87C; }

.ai-priority-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ai-priority-badge.urgent {
    background: #fde8e8;
    color: #C45C5C;
}

.ai-priority-badge.warning {
    background: #fef3d8;
    color: #b8860b;
}

.ai-priority-badge.info {
    background: #e8f4f8;
    color: #4a7a8a;
}

.ai-priority-badge.success {
    background: #e8f5e8;
    color: #2d7a2d;
}

.ai-suggestion-card .ai-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
    line-height: 1.4;
    margin: 0;
}

.ai-card-bullets {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: var(--gray, #555);
    line-height: 1.6;
}

.ai-card-bullets li {
    margin-bottom: 4px;
}

.ai-card-bullets li:last-child {
    margin-bottom: 0;
}

.ai-card-savings {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #2d7a2d;
    background: #e8f5e8;
    padding: 8px 12px;
    border-radius: 8px;
}

.ai-card-savings svg {
    color: #2d7a2d;
}

.ai-card-bundle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5B8A9A;
    background: #e8f4f8;
    padding: 6px 10px;
    border-radius: 6px;
}

.ai-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-gray, #e8e8e8);
}

.btn-ai-approve, .btn-ai-deny {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ai-approve {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.btn-ai-approve:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
    transform: translateY(-1px);
}

.btn-ai-deny {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.btn-ai-deny:hover {
    background: #eee;
}

/* AI Approval Modal */
.ai-approval-modal, .ai-denial-modal {
    max-width: 420px;
}

.ai-approval-modal .modal-header,
.ai-denial-modal .modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ai-approval-modal .modal-header h3,
.ai-denial-modal .modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-desc {
    font-size: 14px;
    color: var(--gray, #666);
    margin: 0 0 12px;
    line-height: 1.5;
}

.modal-savings {
    font-size: 14px;
    color: #2d7a2d;
    background: #e8f5e8;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0 0 20px;
}

.mfa-input-group {
    margin: 20px 0;
}

.mfa-input-group label {
    display: block;
    font-size: 13px;
    color: var(--gray, #666);
    margin-bottom: 8px;
}

.mfa-input {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 8px;
    text-align: center;
    border: 2px solid var(--border-gray, #e0e0e0);
    border-radius: 10px;
    background: var(--white, #fff);
    transition: border-color 0.2s ease;
}

.mfa-input:focus {
    outline: none;
    border-color: var(--accent, #5B8A9A);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-modal-approve, .btn-modal-deny {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-modal-approve {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
}

.btn-modal-approve:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
}

.btn-modal-deny {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    color: #fff;
}

.btn-modal-deny:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
}

.btn-modal-cancel {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid var(--border-gray, #ddd);
    background: var(--white, #fff);
    color: var(--gray, #666);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-modal-cancel:hover {
    background: var(--border-gray, #f5f5f5);
}

/* AI Success Toast */
.ai-success-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
    padding: 20px 28px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.ai-success-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ai-success-icon {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-success-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-success-content strong {
    font-size: 15px;
}

.ai-success-content p {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

.ai-success-savings {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 6px;
    margin-top: 4px;
    display: inline-block;
}

/* Dark mode adjustments */
body.dark-mode .ai-suggestion-card {
    background: var(--dark-card, #2a2a2a);
    border-color: var(--dark-border, #3a3a3a);
}

body.dark-mode .ai-card-savings {
    background: rgba(45, 122, 45, 0.2);
}

body.dark-mode .ai-card-bundle {
    background: rgba(91, 138, 154, 0.2);
}

body.dark-mode .mfa-input {
    background: var(--dark-card, #2a2a2a);
    border-color: var(--dark-border, #3a3a3a);
    color: #fff;
}

/* Site Settings Tab */
.site-settings-tab {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: var(--white, #fff);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--black, #1a1a1a);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-gray, #e8e8e8);
}

.settings-section-title svg {
    color: var(--accent, #5B8A9A);
}

.settings-description {
    font-size: 13px;
    color: var(--gray, #666);
    margin: 0 0 16px 0;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray, #666);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-field input {
    padding: 10px 12px;
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.settings-field input:focus {
    outline: none;
    border-color: var(--accent, #5B8A9A);
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--light-gray, #f8f8f8);
    border-radius: 8px;
}

.user-email {
    flex: 1;
    font-size: 14px;
    color: var(--black, #1a1a1a);
}

.user-role {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--gray, #666);
    background: var(--border-gray, #e8e8e8);
    padding: 3px 8px;
    border-radius: 4px;
}

.mfa-badge {
    font-size: 11px;
    font-weight: 500;
    color: #7CB87C;
    background: rgba(124, 184, 124, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
}

.btn-icon {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--gray, #999);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.btn-icon:hover {
    background: #C45C5C;
    color: white;
}

.no-users {
    font-size: 13px;
    color: var(--gray, #999);
    font-style: italic;
    margin: 0;
    padding: 12px;
    text-align: center;
}

.add-user-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-user-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 14px;
}

.add-user-form select {
    padding: 10px 12px;
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 14px;
    background: var(--white, #fff);
}

.btn-secondary {
    padding: 10px 16px;
    background: var(--light-gray, #f0f0f0);
    color: var(--black, #1a1a1a);
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: var(--border-gray, #e0e0e0);
}

/* ===== MQTT DIAGNOSTICS TAB ===== */
.diagnostics-tab {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mqtt-connection-header,
.connection-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #D4A84B;
    border-radius: 10px;
    color: #1a1a1a;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.connection-status .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #7CB87C;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.connection-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: #444;
}

.connection-stats {
    display: flex;
    gap: 20px;
}

.connection-stats .stat {
    text-align: center;
    font-size: 11px;
    color: #444;
}

.connection-stats .stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.diagnostics-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
}

.diagnostics-panel {
    background: var(--white, #fff);
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 10px;
    overflow: hidden;
}

.diagnostics-panel .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-gray, #e0e0e0);
}

.diagnostics-panel .panel-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: var(--black, #1a1a1a);
}

.diagnostics-panel .panel-header h3 svg {
    color: var(--accent, #5B8A9A);
}

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

.btn-icon-sm {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--gray, #666);
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-icon-sm:hover {
    background: var(--border-gray, #e0e0e0);
}

.live-indicator {
    font-size: 10px;
    font-weight: 700;
    color: #7CB87C;
    background: rgba(124, 184, 124, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.log-container {
    height: 280px;
    overflow-y: auto;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    background: #1e1e1e;
    color: #d4d4d4;
}

.log-placeholder {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
}

.log-entry {
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 4px;
    border-left: 3px solid;
    background: rgba(255,255,255,0.05);
}

.log-entry.received { border-left-color: #5B8A9A; }
.log-entry.sent { border-left-color: #D4A84B; }
.log-entry.confirmed { border-left-color: #7CB87C; }

.log-time {
    color: #888;
    font-size: 10px;
    margin-right: 10px;
}

.log-topic {
    color: #9cdcfe;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.log-payload {
    margin: 6px 0 0 0;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    color: #ce9178;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 10px;
}

.log-status {
    display: inline-block;
    margin-top: 6px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 3px;
}

.log-status.pending {
    background: rgba(212, 168, 75, 0.2);
    color: #D4A84B;
}

.log-status.confirmed {
    background: rgba(124, 184, 124, 0.2);
    color: #7CB87C;
}

.log-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 8px;
}

.log-badge.success {
    background: rgba(124, 184, 124, 0.2);
    color: #7CB87C;
}

.confirm-details {
    display: flex;
    gap: 12px;
    margin: 6px 0;
    font-size: 11px;
}

.confirm-unit { color: #9cdcfe; }
.confirm-change { color: #7CB87C; }

/* Panel with Stream Control */
.panel-with-control {
    display: flex;
    flex-direction: column;
}

.panel-with-control .diagnostics-panel {
    flex: 1;
}

/* Stream Control Button */
.stream-control-wrapper {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.btn-stream-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #C45C5C;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(196, 92, 92, 0.4);
    transition: all 0.2s ease;
}

.btn-stream-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(196, 92, 92, 0.5);
}

.btn-stream-fab:active {
    transform: scale(0.95);
}

/* Paused state - green */
.btn-stream-fab.paused {
    background: #7CB87C;
    box-shadow: 0 4px 14px rgba(124, 184, 124, 0.4);
}

.btn-stream-fab.paused:hover {
    box-shadow: 0 6px 20px rgba(124, 184, 124, 0.5);
}

/* Time Filter Panel */
.time-filter-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.time-filter-panel h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #1a1a1a;
}

.filter-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Legacy Stream Controls - keeping for backwards compatibility */
.stream-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 20px;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-left: 4px solid #D4A84B !important;
    border-radius: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.stream-playback {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-stream-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-gray, #e0e0e0);
    background: var(--white, #fff);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-stream-control:hover {
    border-color: var(--accent, #5B8A9A);
    background: rgba(91, 138, 154, 0.1);
}

.btn-stream-control.active {
    border-color: #7CB87C;
    background: rgba(124, 184, 124, 0.1);
}

.btn-stream-control svg {
    width: 18px;
    height: 18px;
    color: var(--black, #1a1a1a);
}

.stream-status {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray, #666);
}

/* Time Filter */
.stream-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray, #666);
    min-width: 40px;
}

.filter-row input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 12px;
    background: var(--white, #fff);
}

.filter-row select {
    padding: 6px 8px;
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 12px;
    background: var(--white, #fff);
    min-width: 55px;
}

.time-sep {
    font-weight: 600;
    color: var(--gray, #666);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.filter-actions select {
    padding: 8px 12px;
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 12px;
    background: var(--white, #fff);
}

.btn-filter {
    padding: 8px 16px;
    background: var(--accent, #5B8A9A);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-filter:hover {
    background: #4a7a8a;
}

.btn-clear-filter {
    padding: 8px 16px;
    background: none;
    color: var(--gray, #666);
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-filter:hover {
    background: var(--border-gray, #e0e0e0);
}

/* Filter highlighting */
.log-entry.filter-hidden {
    display: none;
}

.log-entry.filter-match {
    background: rgba(212, 168, 75, 0.15);
    border-left-color: #D4A84B !important;
}

/* Filter Export Buttons */
.filter-export {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-summary,
.btn-download {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-summary {
    background: #1a1a1a;
    color: #fff;
}

.btn-summary:hover {
    background: #333;
}

.btn-download {
    background: #D4A84B;
    color: #fff;
}

.btn-download:hover {
    background: #c49a3d;
}

/* Log Summary Modal */
.log-summary-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.log-summary-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.log-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.log-summary-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.btn-close-modal {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}

.btn-close-modal:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

.log-summary-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.summary-section {
    margin-bottom: 24px;
}

.summary-section:last-child {
    margin-bottom: 0;
}

.summary-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-range {
    display: flex;
    gap: 24px;
}

.range-item {
    display: flex;
    gap: 8px;
}

.range-label {
    color: #888;
    font-size: 14px;
}

.range-value {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

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

.stat-card {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.stat-card.total {
    background: #1a1a1a;
    color: #fff;
}

.stat-card .stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.stat-card.total .stat-number {
    color: #D4A84B;
}

.stat-card .stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.stat-card.total .stat-label {
    color: #aaa;
}

.summary-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.topic-tag {
    background: #e8f4f8;
    color: #5B8A9A;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-family: monospace;
}

.topic-more {
    color: #888;
    font-size: 12px;
    padding: 6px 12px;
}

.no-data {
    color: #888;
    font-style: italic;
    font-size: 13px;
}

.summary-entries {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.summary-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8f8f8;
    border-radius: 8px;
    border-left: 3px solid #ccc;
}

.summary-entry.received {
    border-left-color: #5B8A9A;
}

.summary-entry.sent {
    border-left-color: #D4A84B;
}

.summary-entry.confirmed {
    border-left-color: #7CB87C;
}

.entry-type {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e0e0e0;
    color: #666;
}

.summary-entry.received .entry-type {
    background: rgba(91, 138, 154, 0.15);
    color: #5B8A9A;
}

.summary-entry.sent .entry-type {
    background: rgba(212, 168, 75, 0.15);
    color: #D4A84B;
}

.summary-entry.confirmed .entry-type {
    background: rgba(124, 184, 124, 0.15);
    color: #7CB87C;
}

.entry-time {
    font-size: 12px;
    color: #888;
    min-width: 70px;
}

.entry-topic {
    font-size: 12px;
    font-family: monospace;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.log-summary-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f8f8;
}

.log-summary-footer .btn-secondary {
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #666;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.log-summary-footer .btn-secondary:hover {
    background: #f0f0f0;
}

.log-summary-footer .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: #D4A84B;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.log-summary-footer .btn-primary:hover {
    background: #c49a3d;
}

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

    .summary-range {
        flex-direction: column;
        gap: 8px;
    }

    .filter-export {
        flex-direction: column;
    }
}

.test-command-panel {
    background: var(--white, #fff);
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 10px;
    padding: 20px;
}

.test-command-panel h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--black, #1a1a1a);
}

.test-command-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.test-command-form select,
.test-command-form input {
    padding: 10px 14px;
    border: 1px solid var(--border-gray, #e0e0e0);
    border-radius: 6px;
    font-size: 13px;
    background: var(--white, #fff);
}

.test-command-form select { min-width: 180px; }
.test-command-form input { width: 100px; }
.test-command-form .btn { padding: 10px 20px; }

@media (max-width: 600px) {
    .stores-grid {
        grid-template-columns: 1fr;
    }
    .kpi-strip {
        margin: 0 12px 12px;
        padding: 12px 8px;
    }
    .kpi-value {
        font-size: 20px;
    }
    .tab-bar {
        padding: 0 12px;
    }
    .store-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    .footer-services {
        grid-template-columns: repeat(2, 1fr);
    }
    .home-footer {
        margin: 24px 12px 100px;
    }
    .header.header-centered .logo {
        max-width: 350px;
    }
}

/* ═══════════════════════════════════════════════════════
   MOBILE ACCESSIBILITY - Minimum Font Sizes
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Ensure minimum readable font sizes on mobile */
    .data-table th,
    .data-table td,
    .reports-table th,
    .reports-table td,
    .activity-time,
    .activity-msg,
    .trend-prediction,
    .tp-label,
    .alert-item,
    .notification-item,
    .suggestion-card,
    .metric-label,
    .stat-label,
    .system-status-label,
    .schedule-info,
    .footer-services span {
        font-size: 13px !important;
    }

    /* Slightly larger for key interactive elements */
    .store-tab,
    .tab-bar button,
    .filter-chip,
    .btn,
    input,
    select,
    textarea {
        font-size: 14px !important;
    }

    /* Ensure labels are readable */
    label,
    .form-label,
    .input-label {
        font-size: 14px !important;
    }

    /* FAB positioning - ensure above bottom nav with safe spacing */
    .fab-container,
    .ctx-fab {
        bottom: 100px;
        right: 16px;
    }

    /* Modal adjustments for small screens */
    .modal {
        max-width: 95%;
        max-height: 80vh;
        margin: 10px;
    }
}
