/**
 * aquarium_theme.css — High-Contrast Self-Contained Styles for Smart Aquarium Kit
 * Innovation Edge Solutions (combined_web_v7)
 * Guarantees visual contrast and prevents PurgeCSS missing utility issues.
 */

/* ==========================================================================
   Cyan Color Palette Utilities
   ========================================================================== */
.bg-cyan-50   { background-color: #ecfeff !important; }
.bg-cyan-100  { background-color: #cffafe !important; }
.bg-cyan-200  { background-color: #a5f3fc !important; }
.bg-cyan-500  { background-color: #06b6d4 !important; }
.bg-cyan-600  { background-color: #0891b2 !important; }
.bg-cyan-700  { background-color: #0e7490 !important; }
.bg-cyan-800  { background-color: #155e75 !important; }
.bg-cyan-900  { background-color: #164e63 !important; }
.bg-cyan-950  { background-color: #083344 !important; }

.hover\:bg-cyan-700:hover { background-color: #0e7490 !important; }
.hover\:bg-cyan-800:hover { background-color: #155e75 !important; }

.text-cyan-500 { color: #06b6d4 !important; }
.text-cyan-600 { color: #0891b2 !important; }
.text-cyan-700 { color: #0e7490 !important; }
.text-cyan-800 { color: #155e75 !important; }
.text-cyan-900 { color: #164e63 !important; }
.text-cyan-950 { color: #083344 !important; }

.border-cyan-200 { border-color: #a5f3fc !important; }
.border-cyan-300 { border-color: #67e8f9 !important; }
.border-cyan-500 { border-color: #06b6d4 !important; }
.border-cyan-600 { border-color: #0891b2 !important; }

/* Alpha / Opacity Backgrounds */
.bg-cyan-50\/50 { background-color: rgba(236, 254, 255, 0.5) !important; }
.bg-cyan-50\/70 { background-color: rgba(236, 254, 255, 0.7) !important; }
.bg-black\/20   { background-color: rgba(0, 0, 0, 0.2) !important; }
.bg-white\/10   { background-color: rgba(255, 255, 255, 0.1) !important; }
.bg-white\/20   { background-color: rgba(255, 255, 255, 0.2) !important; }

/* Gradient Utilities */
.bg-gradient-to-r.from-cyan-600.to-teal-600 {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%) !important;
}
.bg-gradient-to-r.from-cyan-600.to-blue-600 {
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%) !important;
}
.hover\:from-cyan-700:hover {
    background: linear-gradient(135deg, #0e7490 0%, #0f766e 100%) !important;
}

/* Purple Admin Utilities */
.bg-purple-700 { background-color: #7e22ce !important; }
.hover\:bg-purple-800:hover { background-color: #6b21a8 !important; }

/* ==========================================================================
   Primary Interactive Components
   ========================================================================== */

/* Feed Now Button */
#btn-feed-now,
.btn-feed-primary {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    border-radius: 16px !important;
    padding: 14px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.4) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.01em !important;
}
#btn-feed-now:hover,
.btn-feed-primary:hover {
    background: linear-gradient(135deg, #0e7490 0%, #0f766e 100%) !important;
    box-shadow: 0 6px 18px rgba(8, 145, 178, 0.5) !important;
    transform: translateY(-1px) !important;
}
#btn-feed-now:active,
.btn-feed-primary:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.3) !important;
}
#btn-feed-now span,
.btn-feed-primary span {
    color: #ffffff !important;
    font-weight: 800 !important;
}

/* Add Schedule Button */
.btn-add-schedule {
    background: #0891b2 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
}
.btn-add-schedule:hover {
    background: #0e7490 !important;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.45) !important;
    transform: translateY(-1px) !important;
}
.btn-add-schedule span {
    color: #ffffff !important;
}

/* Save Schedule Button */
.btn-save-schedule {
    background: #0891b2 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    padding: 8px 18px !important;
    border-radius: 12px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.35) !important;
    transition: all 0.2s ease !important;
}
.btn-save-schedule:hover {
    background: #0e7490 !important;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.45) !important;
}

/* Food Selection Tabs */
.food-tab-active {
    border: 2px solid #0891b2 !important;
    background: #ecfeff !important;
    color: #164e63 !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.15) !important;
    cursor: pointer !important;
}
.food-tab-inactive {
    border: 2px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #475569 !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}
.food-tab-inactive:hover {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

/* Stepper Buttons */
.feed-stepper-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease !important;
}
.feed-stepper-btn:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

/* Height Utility */
.h-60 { height: 15rem !important; }

/* ==========================================================================
   Tactile Animated Toggle Switches (PurgeCSS Immune)
   ========================================================================== */
.aqua-switch {
    position: relative;
    display: inline-block;
    width: 62px;
    height: 34px;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}
.aqua-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.aqua-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    border: 2px solid #94a3b8;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}
.aqua-switch-slider::before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.aqua-switch:hover .aqua-switch-slider {
    border-color: #64748b;
}

/* Vacation Mode Active: Warm Amber Gold with Glow */
.aqua-switch input:checked + .aqua-switch-slider.vacation {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border-color: #b45309 !important;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45) !important;
}
.aqua-switch input:checked + .aqua-switch-slider.vacation::before {
    transform: translateX(28px);
    background-color: #fffbeb;
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.4);
}

/* Cyan Active (For General Relays & Schedulers) */
.aqua-switch input:checked + .aqua-switch-slider.cyan {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    border-color: #155e75 !important;
    box-shadow: 0 0 12px rgba(8, 145, 178, 0.4) !important;
}
.aqua-switch input:checked + .aqua-switch-slider.cyan::before {
    transform: translateX(28px);
    background-color: #ffffff;
}

/* Compact Table Switch (for Schedules Table) */
.aqua-switch-sm {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
}
.aqua-switch-sm input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.aqua-switch-slider-sm {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    border: 1.5px solid #94a3b8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
}
.aqua-switch-slider-sm::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    top: 2.5px;
    background-color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.aqua-switch-sm input:checked + .aqua-switch-slider-sm {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    border-color: #0e7490 !important;
}
.aqua-switch-sm input:checked + .aqua-switch-slider-sm::before {
    transform: translateX(20px);
}

/* ==========================================================================
   Mobile PWA Action Dock & App Shell Optimizations
   ========================================================================== */
.pwa-install-banner {
    background: linear-gradient(135deg, #0f172a 0%, #083344 100%);
    border: 1px solid #164e63;
    border-radius: 18px;
    padding: 12px 18px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-pwa-install {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 12px !important;
    padding: 8px 16px !important;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4) !important;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Scrollbar Utility for Smooth Horizontal Swiping on Mobile */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Touch targets & tap highlight elimination */
button, a, input, select {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    .aquarium-mobile-content {
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 8px)) !important; /* clearance for floating mobile dock */
    }
    .mobile-pwa-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        min-height: 58px;
        padding-bottom: max(6px, env(safe-area-inset-bottom, 6px));
        padding-top: 6px;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding-left: 6px;
        padding-right: 6px;
        z-index: 999;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
    }
    .mobile-dock-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: #94a3b8;
        font-size: 10px;
        font-weight: 700;
        text-decoration: none;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 6px 10px;
        min-width: 56px;
        min-height: 48px;
        border-radius: 12px;
        transition: all 0.15s ease;
        touch-action: manipulation;
    }
    .mobile-dock-btn:active {
        transform: scale(0.92);
        color: #38bdf8;
        background: rgba(255, 255, 255, 0.08);
    }
    .mobile-dock-btn span.icon {
        font-size: 19px;
        line-height: 1;
    }
    .mobile-dock-btn.highlight {
        color: #38bdf8;
    }

    /* Keep floating WhatsApp widget elevated above bottom dock and docked at right */
    .ies-floating-wa {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        right: calc(14px + env(safe-area-inset-right, 0px)) !important;
        left: auto !important;
    }
}
@media (min-width: 769px) {
    .mobile-pwa-bottom-bar {
        display: none !important;
    }
}

/* ==========================================================================
   AquaCloud Proxy Demo & Claim Banner Enhancements
   ========================================================================== */
.aqua-proxy-banner {
    background: linear-gradient(135deg, #082f49 0%, #0f172a 60%, #083344 100%) !important;
    border: 1px solid rgba(6, 182, 212, 0.4) !important;
    color: #ffffff !important;
    border-radius: 1.25rem !important;
    padding: 1.25rem 1.5rem !important;
    box-shadow: 0 10px 25px -5px rgba(8, 47, 73, 0.5) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}
@media (min-width: 768px) {
    .aqua-proxy-banner {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
}
.aqua-banner-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    background: rgba(6, 182, 212, 0.18) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    flex-shrink: 0 !important;
}
.aqua-banner-title {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    line-height: 1.3 !important;
}
.aqua-banner-badge {
    font-size: 10px !important;
    background: rgba(6, 182, 212, 0.25) !important;
    color: #67e8f9 !important;
    padding: 2px 8px !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 800 !important;
    border: 1px solid rgba(103, 232, 249, 0.4) !important;
    display: inline-block !important;
}
.aqua-banner-text {
    font-size: 0.8125rem !important;
    color: #cbd5e1 !important;
    margin-top: 4px !important;
    line-height: 1.5 !important;
}
.aqua-banner-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}
@media (min-width: 768px) {
    .aqua-banner-actions {
        width: auto !important;
    }
}
.aqua-banner-btn-primary {
    background: #06b6d4 !important;
    color: #082f49 !important;
    font-weight: 800 !important;
    font-size: 0.8rem !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.35) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    border: none !important;
    flex: 1 1 0% !important;
}
@media (min-width: 768px) {
    .aqua-banner-btn-primary {
        flex: none !important;
    }
}
.aqua-banner-btn-primary:hover {
    background: #22d3ee !important;
    color: #082f49 !important;
    transform: translateY(-1px) !important;
}
.aqua-banner-btn-secondary {
    background: #1e293b !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex: 1 1 0% !important;
}
@media (min-width: 768px) {
    .aqua-banner-btn-secondary {
        flex: none !important;
    }
}
.aqua-banner-btn-secondary:hover {
    background: #334155 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* ==========================================================================
   AQUA COMPACT UI & FIX FOR ACTION BAR & OTA CARD
   ========================================================================== */

/* Top Header Action Buttons: Absolutely NO Horizontal Scrollbar on Desktop */
.aqua-header-action-bar {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 2px 0 !important;
    overflow: visible !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .aqua-header-action-bar {
        width: auto !important;
        flex-shrink: 0 !important;
        justify-content: flex-end !important;
        overflow: visible !important;
    }
}

@media (max-width: 767px) {
    .aqua-header-action-bar {
        flex-wrap: wrap !important;
        gap: 6px !important;
        justify-content: flex-start !important;
    }
}

.aqua-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 4.5px 9px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.15s ease !important;
    flex-shrink: 0 !important;
}

.aqua-action-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12) !important;
}

.aqua-action-csv {
    background: #059669 !important;
    color: #ffffff !important;
}
.aqua-action-dark {
    background: #0f172a !important;
    color: #ffffff !important;
}
.aqua-action-cyan {
    background: #0891b2 !important;
    color: #ffffff !important;
}
.aqua-action-purple {
    background: #7e22ce !important;
    color: #ffffff !important;
}
.aqua-action-light {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}
.aqua-action-blue {
    background: #2563eb !important;
    color: #ffffff !important;
}

/* Over-The-Air (OTA) Modern Cosmic Oceanic Banner */
.aqua-ota-card {
    background: radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.22) 0%, transparent 45%),
                radial-gradient(circle at 15% 85%, rgba(139, 92, 246, 0.28) 0%, transparent 50%),
                linear-gradient(135deg, #090e29 0%, #151a48 50%, #201344 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(129, 140, 248, 0.45) !important;
    border-radius: 18px !important;
    padding: 16px 20px !important;
    box-shadow: 0 10px 30px -4px rgba(9, 14, 41, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
}

.aqua-ota-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, #38bdf8 0%, #818cf8 50%, #34d399 100%) !important;
}

@media (min-width: 768px) {
    .aqua-ota-card {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 14px 24px !important;
    }
}

.aqua-ota-left {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.aqua-ota-icon {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.4) 100%) !important;
    border: 1px solid rgba(192, 132, 252, 0.6) !important;
    box-shadow: 0 0 16px rgba(129, 140, 248, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    flex-shrink: 0 !important;
}

.aqua-ota-body {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.aqua-ota-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.aqua-ota-title {
    font-weight: 800 !important;
    font-size: 14.5px !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

.aqua-ota-badge-target {
    padding: 3px 10px !important;
    border-radius: 9999px !important;
    font-size: 11px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.6) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25) !important;
    white-space: nowrap !important;
}

.aqua-ota-installed {
    font-size: 11px !important;
    color: #c7d2fe !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    white-space: nowrap !important;
}

.aqua-ota-desc {
    font-size: 12.5px !important;
    color: #e0e7ff !important;
    margin-top: 3px !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
}

.aqua-ota-action {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}

@media (min-width: 768px) {
    .aqua-ota-action {
        width: auto !important;
        margin-left: 20px !important;
    }
}

.aqua-ota-btn-update {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 22px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%) !important;
    color: #022c22 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    width: 100% !important;
    text-decoration: none !important;
    letter-spacing: -0.01em !important;
}

@media (min-width: 768px) {
    .aqua-ota-btn-update {
        width: auto !important;
    }
}

.aqua-ota-btn-update:hover {
    background: linear-gradient(135deg, #34d399 0%, #22d3ee 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

.aqua-ota-btn-update:active {
    transform: translateY(0) scale(0.99) !important;
}

.aqua-ota-btn-upgrade {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 22px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    width: 100% !important;
    text-decoration: none !important;
    letter-spacing: -0.01em !important;
}

@media (min-width: 768px) {
    .aqua-ota-btn-upgrade {
        width: auto !important;
    }
}

.aqua-ota-btn-upgrade:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #fcd34d 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* Admin Dashboard Tabs: No Scrollbar on Desktop */
.aqua-admin-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.aqua-admin-tabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
@media (min-width: 768px) {
    .aqua-admin-tabs {
        overflow: visible !important;
        flex-wrap: wrap !important;
    }
}

/* ==========================================================================
   PREMIUM FRONTEND VISUAL ENHANCEMENTS FOR CLIENT DASHBOARD
   ========================================================================== */

/* Metric Cards: Top Accent Bars & Hover Elevation */
.aqua-metric-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 16px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.aqua-metric-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.aqua-metric-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
}

.aqua-card-temp::before   { background: linear-gradient(90deg, #0891b2, #06b6d4) !important; }
.aqua-card-air::before    { background: linear-gradient(90deg, #059669, #10b981) !important; }
.aqua-card-power::before  { background: linear-gradient(90deg, #d97706, #f59e0b) !important; }
.aqua-card-water::before  { background: linear-gradient(90deg, #0284c7, #38bdf8) !important; }
.aqua-card-light::before  { background: linear-gradient(90deg, #ca8a04, #eab308) !important; }
.aqua-card-feeder::before { background: linear-gradient(90deg, #6366f1, #818cf8) !important; }

/* Pulse Live Indicator */
.aqua-live-pulse {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background-color: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: aquaPulse 2s infinite;
}

@keyframes aquaPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Polished Dashboard Section Cards */
.aqua-section-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 20px !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.15s ease !important;
}

.aqua-section-card:hover {
    border-color: #cbd5e1 !important;
}

.aqua-section-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
}

.aqua-section-title {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    letter-spacing: -0.01em !important;
}

.aqua-badge-pill {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 2px 8px !important;
    border-radius: 9999px !important;
    border: 1px solid transparent !important;
    white-space: nowrap !important;
}

.aqua-badge-cyan {
    background: #ecfeff !important;
    color: #0e7490 !important;
    border-color: #cffafe !important;
}

.aqua-badge-emerald {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border-color: #a7f3d0 !important;
}

.aqua-badge-amber {
    background: #fffbeb !important;
    color: #b45309 !important;
    border-color: #fde68a !important;
}

.aqua-badge-indigo {
    background: #eef2ff !important;
    color: #4338ca !important;
    border-color: #c7d2fe !important;
}

/* Feed Button Tactile Ripple */
#btn-feed-now {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 3px 12px rgba(8, 145, 178, 0.35) !important;
    transition: all 0.15s ease !important;
    width: 100% !important;
}

#btn-feed-now:hover {
    background: linear-gradient(135deg, #0e7490 0%, #0f766e 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 16px rgba(8, 145, 178, 0.45) !important;
}

#btn-feed-now:active {
    transform: translateY(1px) !important;
    box-shadow: 0 2px 6px rgba(8, 145, 178, 0.3) !important;
}

/* 24-Hour Telemetry Plot Card: Premium Ambient Background & Natural Square Proportions */
.aqua-chart-card {
    background: radial-gradient(circle at 5% 5%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
                radial-gradient(circle at 95% 95%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
                linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03) !important;
    padding: 22px !important;
    position: relative !important;
    overflow: hidden !important;
}

.aqua-chart-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #0891b2 0%, #10b981 33%, #6366f1 66%, #f59e0b 100%) !important;
}

/* Plot Viewport: Reverted to Earlier Full-Width Aspect, Increased Height for Square Appearance */
.aqua-plot-viewport {
    position: relative !important;
    width: 100% !important;
    height: 460px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%) !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 16px !important;
    padding: 12px 10px 8px 10px !important;
    box-sizing: border-box !important;
}

@media (min-width: 640px) {
    .aqua-plot-viewport {
        height: 530px !important;
        padding: 16px 14px 10px 14px !important;
    }
}

/* ==========================================================================
   PROGRESSIVE WEB APP (PWA) STYLES & UNIVERSAL INSTALL CTA
   Inspired by CutMap Tools Studio & Innovation Edge Solutions PWA Standard
   ========================================================================== */

/* High-Contrast PWA Install App CTA Button (Desktop) */
.btn-install-app {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background-color: #0f172a !important;
    background-image: linear-gradient(135deg, #0f172a 0%, #083344 55%, #0e7490 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #38bdf8 !important;
    border-radius: 8px !important;
    padding: 4.5px 10px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(8, 51, 68, 0.35) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
}
.btn-install-app:hover {
    background-color: #083344 !important;
    background-image: linear-gradient(135deg, #083344 0%, #0e7490 55%, #0284c7 100%) !important;
    border-color: #7dd3fc !important;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.35) !important;
    transform: translateY(-1px) !important;
}
.btn-install-app:active {
    transform: translateY(0.5px) !important;
}
.btn-install-app .install-icon-pill {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}
.btn-install-app .install-icon-pill svg {
    width: 12px !important;
    height: 12px !important;
    stroke: #0f172a !important;
    stroke-width: 2.7 !important;
}
.btn-install-app .install-text {
    color: #ffffff !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    letter-spacing: 0.025em !important;
    white-space: nowrap !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Mobile Header Small Install Pill */
.btn-install-app-sm {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background-color: #0f172a !important;
    background-image: linear-gradient(135deg, #0f172a 0%, #083344 55%, #0e7490 100%) !important;
    color: #ffffff !important;
    border: 1.5px solid #38bdf8 !important;
    border-radius: 8px !important;
    padding: 4px 8px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3) !important;
}
.btn-install-app-sm .install-icon-pill {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.btn-install-app-sm .install-icon-pill svg {
    width: 11px !important;
    height: 11px !important;
    stroke: #0f172a !important;
    stroke-width: 2.5 !important;
}
.btn-install-app-sm .install-text {
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.025em !important;
    white-space: nowrap !important;
}

/* Viewport Specific Rules: strictly single install button per device class (CutMap Architecture) */
#mobileAquaAppBar {
    display: flex;
}
@media (min-width: 1024px) {
    #mobileAquaAppBar {
        display: none !important;
    }
}
@media (min-width: 768px) {
    .btn-install-app-sm {
        display: none !important;
    }
    .btn-install-app {
        display: inline-flex !important;
    }
}
@media (max-width: 767px) {
    .btn-install-app {
        display: none !important;
    }
    .btn-install-app-sm {
        display: inline-flex !important;
    }
}

/* PWA Offline Banner */
.pwa-offline-alert-banner {
    border-radius: 1rem !important;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #ffffff !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35) !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.pwa-offline-alert-banner.active,
.pwa-offline-alert-banner.offline-active {
    display: flex !important;
}

/* Modal Overlay & Blur */
.aqua-modal-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(15, 23, 42, 0.8) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 99999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem !important;
}
.aqua-modal-backdrop.active,
.aqua-modal-backdrop.flex-open {
    display: flex !important;
}
.aqua-modal-dialog {
    background: #ffffff !important;
    border-radius: 1.5rem !important;
    max-width: 28rem !important;
    width: 100% !important;
    padding: 1.5rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid #e2e8f0 !important;
    position: relative !important;
    text-align: left !important;
}
@media (min-width: 640px) {
    .aqua-modal-dialog {
        padding: 1.75rem !important;
    }
}

