*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial,sans-serif;
}

html,body{
    width:100%;
    min-height:100%;
    overflow-x:hidden;
    overflow-y:auto;
}

body{
    min-height:100vh;
    background:radial-gradient(circle at top,#1e40af,#0f172a 60%);
    color:white;
}

/* LANDING */
.landing-page{display:flex;flex-direction:column;justify-content:center;align-items:center;}
.landing-container{width:90%;max-width:1200px;min-height:650px;padding:40px;border-radius:28px;background:rgba(255,255,255,.08);backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.1);box-shadow:0 10px 40px rgba(0,0,0,.25);text-align:center;display:flex;flex-direction:column;justify-content:center;}
.header-section{display:flex;justify-content:center;align-items:center;gap:20px;margin-bottom:40px;}
.logo-majlis{width:120px;height:auto}
.header-title{font-size:38px;font-weight:800;text-align:left;}
.header-description{margin-top:12px;color:#cbd5e1;font-size:14px;max-width:700px;text-align:left;}
.header-subtitle{font-size:20px;color:#d1d5db;text-align:left;margin-top:5px;}
.header-right{display:flex;align-items:center;gap:15px;}
#clock{text-align:right;font-size:13px;line-height:1.5;color:#e2e8f0;font-weight:500;}
.info-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;margin-bottom:30px;}
.info-card{padding:25px;border-radius:20px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.1);text-align:left;min-height:220px;transition:.3s;}
.info-card:hover{transform:translateY(-4px);border:1px solid rgba(56,189,248,.4);box-shadow:0 0 12px rgba(56,189,248,.15);}
.card-title{font-size:18px;font-weight:bold;margin-bottom:20px;}
.card-item{margin-bottom:12px;color:#e5e7eb;}
.future-text{margin-bottom:30px;color:#d1d5db;font-size:15px;}
.access-btn{border:1px solid rgba(56,189,248,.35);padding:18px 55px;min-width:260px;border-radius:14px;cursor:pointer;font-size:15px;font-weight:bold;color:white;background:linear-gradient(135deg,#0ea5e9,#2563eb);transition:all .3s ease;}
.access-btn:hover{border-color:#38bdf8;box-shadow:0 0 10px rgba(56,189,248,.7),0 0 20px rgba(56,189,248,.4);transform:translateY(-2px);}
.footer{margin-top:20px;text-align:center;color:rgba(255,255,255,.75);}
.footer-powered{display:flex;justify-content:center;align-items:center;gap:8px;font-size:12px;margin-bottom:8px;}
.footer-logo{width:100px;height:auto}
.footer-version{font-size:12px;color:rgba(255,255,255,.65);}

/* DASHBOARD HEADER */
.dashboard-header{display:flex;justify-content:space-between;align-items:center;padding:20px 40px;background:rgba(255,255,255,.08);border-bottom:1px solid rgba(255,255,255,.1);}
.header-left{display:flex;align-items:center;gap:20px;}
.header-logo{width:90px;height:auto}
.dashboard-title{font-size:22px;font-weight:700;}
.dashboard-subtitle{font-size:13px;color:#cbd5e1;margin-top:4px;}
.header-btn{padding:10px 18px;border:none;border-radius:12px;cursor:pointer;background:linear-gradient(135deg,#2563eb,#1d4ed8);color:white;font-weight:600;transition:.3s;}
.header-btn:hover{box-shadow:0 0 12px rgba(56,189,248,.35);transform:translateY(-2px);}

/* TABS */
.tab-menu{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:20px 40px;
}
.tab-buttons{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}
.tab-btn{
    border:none;
    padding:14px 24px;
    border-radius:12px;
    cursor:pointer;
    color:white;
    background:rgba(255,255,255,.08);
    transition:.3s;
    white-space:nowrap;
}
.tab-btn:hover{background:rgba(56,189,248,.15)}
.tab-btn.active{border:1px solid #38bdf8;box-shadow:0 0 12px rgba(56,189,248,.4);}
.rulr-access-button{
    display:none;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:12px 20px;
    border-radius:12px;
    border:1px solid rgba(34,197,94,.45);
    color:#fff;
    background:linear-gradient(135deg,rgba(22,163,74,.92),rgba(21,128,61,.92));
    text-decoration:none;
    font-size:12px;
    font-weight:700;
    letter-spacing:.4px;
    white-space:nowrap;
    transition:.3s;
    flex-shrink:0;
}
.rulr-access-button:hover{
    border-color:#4ade80;
    box-shadow:0 0 14px rgba(34,197,94,.35);
    transform:translateY(-2px);
}

.dashboard-content{height:calc(100vh - 170px);padding:10px 20px;position:relative;}
.tab-content{display:none}
.active-content{display:block}

/* MAP */
.overview-map-container{position:relative;width:100%;height:calc(100vh - 230px);overflow:hidden;}
#overviewMap{width:100%;height:100%;border-radius:24px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);display:flex;justify-content:center;align-items:center;font-size:24px;font-weight:bold;}
.leaflet-container{border-radius:24px}
.leaflet-control-attribution{display:none!important}
.leaflet-top{top:90px!important}
.leaflet-top.leaflet-left{top:150px}

/* KPI */
.widget-container{position:absolute;top:20px;left:20px;right:20px;z-index:1000;display:grid;grid-template-columns:repeat(4,1fr);gap:15px;}
.widget{background:rgba(15,23,42,.85);backdrop-filter:blur(18px);border:1px solid rgba(56,189,248,.2);border-radius:18px;padding:14px;transition:.3s;cursor:pointer;}
.widget:hover{border:1px solid rgba(56,189,248,.5);box-shadow:0 0 12px rgba(56,189,248,.15);}
.widget-title{font-size:13px;font-weight:700;color:#fff;text-transform:uppercase;letter-spacing:.5px;text-shadow:0 0 6px rgba(255,255,255,.15);margin-bottom:8px;}
.widget-value{font-size:28px;font-weight:700;color:#38bdf8;}
.widget.active{border:2px solid #38bdf8;background:linear-gradient(135deg,rgba(37,99,235,.35),rgba(15,23,42,.95));box-shadow:0 0 18px rgba(56,189,248,.8),0 0 35px rgba(56,189,248,.45);transform:translateY(-3px);}
.widget.active .widget-value{color:#fff;font-size:32px;text-shadow:0 0 15px rgba(56,189,248,.8);}

/* MAP SUMMARY */
.asset-summary{position:absolute;bottom:20px;right:20px;z-index:1000;min-width:180px;font-size:12px;background:rgba(15,23,42,.85);backdrop-filter:blur(18px);border:1px solid rgba(56,189,248,.2);border-radius:18px;padding:18px;line-height:1.8;}
.summary-title{font-weight:bold;margin-bottom:10px;}
.legend-item{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.legend-dot{width:12px;height:12px;border-radius:50%;}
.weather{background:#facc15}.lighting{background:#3b82f6}.solar{background:#22c55e}.gateway{background:#f97316}
.map-title{position:absolute;bottom:20px;left:20px;z-index:1000;background:rgba(15,23,42,.85);border:1px solid rgba(56,189,248,.25);backdrop-filter:blur(15px);padding:10px 18px;border-radius:12px;font-size:14px;font-weight:700;color:#fff;letter-spacing:1px;}

/* =========================================================
   SMART LIGHTING PAGE
========================================================= */
.lighting-page{
    display:flex;
    flex-direction:column;
    height:calc(100vh - 190px);
    padding:8px 0 42px 0;
    box-sizing:border-box;
}
.lighting-main-grid{
    display:grid;
    grid-template-columns:minmax(0, 40fr) minmax(0, 60fr);
    gap:12px;
    flex:1;
    min-height:0;
    align-items:stretch;
}
.lighting-left-column{
    display:flex;
    flex-direction:column;
    gap:12px;
    min-width:0;
    min-height:0;
}
.lighting-summary-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    flex-shrink:0;
}
.lighting-summary-card{
    background:rgba(15,23,42,.88);
    border:1px solid rgba(56,189,248,.2);
    backdrop-filter:blur(16px);
    border-radius:18px;
    padding:13px 16px;
    min-height:105px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    box-sizing:border-box;
}
.lighting-summary-header{display:flex;align-items:center;gap:8px;}
.lighting-summary-icon{font-size:20px;width:28px;display:flex;align-items:center;justify-content:center;}
.lighting-summary-title{font-size:12px;font-weight:700;color:#fff;letter-spacing:.5px;}
.lighting-summary-line{width:100%;height:1px;background:rgba(255,255,255,.25);margin:8px 0;}
.lighting-summary-value{font-size:27px;font-weight:700;color:#38bdf8;line-height:1.1;}
.lighting-summary-label{margin-top:3px;font-size:11px;color:#cbd5e1;}

.lighting-distribution-card,
.lighting-map-card,
.lighting-operation-card{
    background:rgba(15,23,42,.88);
    border:1px solid rgba(56,189,248,.2);
    backdrop-filter:blur(16px);
    border-radius:18px;
    overflow:hidden;
    box-sizing:border-box;
}
.lighting-distribution-card{
    padding:14px 16px;
    display:flex;
    flex-direction:column;
    min-height:0;
    flex:1;
}
.lighting-distribution-card h3,
.lighting-map-card h3,
.lighting-operation-card h3{
    margin-bottom:10px;
    color:#38bdf8;
    font-size:15px;
    flex-shrink:0;
}
.lighting-distribution-list{
    flex:1;
    min-height:0;
    display:grid;
    grid-template-columns:1fr 1fr;
    grid-template-rows:repeat(5,1fr);
    gap:8px;
}
.lighting-location-card{
    background:rgba(255,255,255,.045);
    border:1px solid rgba(255,255,255,.08);
    border-radius:11px;
    padding:7px 10px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    cursor:pointer;
    transition:.25s;
    min-width:0;
    min-height:0;
}
.lighting-location-card:hover{
    background:rgba(37,99,235,.18);
    border-color:rgba(56,189,248,.5);
    box-shadow:0 0 12px rgba(56,189,248,.15);
    transform:translateY(-2px);
}
.lighting-location-card.active{
    background:linear-gradient(135deg,rgba(37,99,248,.35),rgba(15,23,42,.9));
    border-color:#38bdf8;
    box-shadow:0 0 14px rgba(56,189,248,.4),inset 0 0 12px rgba(56,189,248,.08);
}
.lighting-location-name{width:100%;font-size:12px;font-weight:700;color:#fff;line-height:1.25;}
.lighting-location-quantity{margin-top:3px;font-size:19px;font-weight:700;color:#38bdf8;line-height:1.1;}
.lighting-location-unit{font-size:9px;color:#94a3b8;margin-top:2px;}

.lighting-right-grid{
    display:grid;
    grid-template-rows:1fr 1fr;
    gap:12px;
    min-width:0;
    min-height:0;
}
.lighting-map-card,
.lighting-operation-card{
    padding:14px 16px;
    display:flex;
    flex-direction:column;
    min-height:0;
}
.lighting-map-container{
    position:relative;
    flex:1;
    min-height:0;
    border-radius:12px;
    overflow:hidden;
}
#lightingMap{width:100%;height:100%;min-height:0;}
.lighting-map-title{
    position:absolute;
    top:9px;
    left:9px;
    z-index:500;
    background:rgba(15,23,42,.9);
    border:1px solid rgba(56,189,248,.35);
    color:#fff;
    padding:5px 9px;
    border-radius:8px;
    font-size:10px;
    font-weight:700;
    pointer-events:none;
}
.lighting-operation-content{
    flex:1;
    min-height:0;
    display:grid;
    grid-template-columns:31% 69%;
    gap:14px;
    align-items:stretch;
}
.lighting-operation-summary{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:8px 10px;
    border-right:1px solid rgba(255,255,255,.08);
}
.operation-label{
    font-size:10px;
    color:#cbd5e1;
    letter-spacing:.6px;
    line-height:1.4;
}
.operation-window{
    margin-top:8px;
    font-size:22px;
    font-weight:700;
    color:#38bdf8;
    white-space:nowrap;
}
.operation-hours{
    margin-top:5px;
    font-size:11px;
    font-weight:700;
    color:#fff;
    letter-spacing:.6px;
}
.typical-profile{
    min-width:0;
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.typical-profile-header{
    margin-bottom:8px;
    font-size:11px;
    font-weight:700;
    color:#fff;
}
.profile-timeline{
    width:100%;
}
.profile-axis{
    display:grid;
    grid-template-columns:repeat(13,1fr);
    gap:0;
    color:#94a3b8;
    font-size:8px;
    text-align:center;
    margin-bottom:4px;
}
.typical-day-chart{
    display:grid;
    grid-template-columns:repeat(24,minmax(0,1fr));
    gap:3px;
    width:100%;
    height:24px;
    padding:0 2px;
    box-sizing:border-box;
}
.profile-cell{
    height:24px;
    min-width:0;
    border-radius:3px;
    background:rgba(56,189,248,.9);
}
.profile-cell.off{
    background:rgba(71,85,105,.28);
}
.profile-axis{
    display:grid;
    grid-template-columns:repeat(13,1fr);
    gap:0;
    margin-top:5px;
    padding:0 1px;
    color:#94a3b8;
    font-size:8px;
    text-align:center;
}
.profile-axis div{
    min-width:0;
}
.profile-legend{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    margin-top:5px;
    color:#94a3b8;
    font-size:8px;
}
.profile-legend span{
    display:flex;
    align-items:center;
    gap:4px;
}
.legend-on,.legend-off{
    display:inline-block;
    width:9px;
    height:9px;
    border-radius:2px;
}
.legend-on{background:#38bdf8;}
.legend-off{background:rgba(71,85,105,.45);}
.profile-source{
    margin-top:6px;
    color:#94a3b8;
    font-size:8px;
    line-height:1.3;
}

.weather-page{display:flex;flex-direction:column;gap:18px;height:calc(100vh - 190px);padding:10px 0 42px 0;box-sizing:border-box;}
.weather-widget-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;}
.weather-widget-grid .widget{position:relative;display:flex;align-items:center;justify-content:space-between;}
.weather-widget-grid .widget-content{flex:1;min-width:0;}
.weather-widget-grid .widget-icon{margin-left:auto;width:42px;height:42px;display:flex;align-items:center;justify-content:center;font-size:26px;flex-shrink:0;}
.weather-overview-card{background:rgba(15,23,42,.88);border:1px solid rgba(56,189,248,.2);backdrop-filter:blur(16px);border-radius:18px;padding:18px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:90px;flex-shrink:0;margin-bottom:15px;}
.weather-status-badge{display:flex;align-items:center;justify-content:center;padding:8px 18px;border-radius:30px;background:#16a34a;color:#fff;font-size:14px;font-weight:700;white-space:nowrap;}
.weather-summary-text{flex:1;font-size:18px;font-weight:600;color:#fff;margin-bottom:0;}
.weather-status{width:220px;display:flex;justify-content:flex-end;align-items:center;}
.weather-last-update{color:#cbd5e1;font-size:13px;}
.weather-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:1;min-height:0;align-items:stretch;}
.weather-info-card,.prayer-card{background:rgba(15,23,42,.88);border:1px solid rgba(56,189,248,.2);backdrop-filter:blur(16px);border-radius:18px;padding:14px 16px;overflow:hidden;display:flex;flex-direction:column;height:100%;min-height:0;align-self:stretch;box-sizing:border-box;}
.weather-info-card h3,.prayer-card h3{margin-bottom:10px;color:#38bdf8;font-size:15px;}
#weatherInfo{display:grid;grid-template-columns:1fr;gap:12px;font-size:15px;line-height:1.6;}
.weather-info-card{position:relative;justify-content:flex-start}
.weather-info-card #weatherSlide{flex:0 0 auto;min-height:0;height:auto;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;text-align:center;transform:scale(.96);transform-origin:top center;margin-top:0;}
.weather-icon{font-size:44px;margin-bottom:10px;}
.weather-title{font-size:23px;font-weight:700;color:#38bdf8;margin-bottom:12px;}
.weather-rule{font-size:15px;line-height:1.8;color:#e2e8f0;}
#weatherDots{margin-top:14px;display:flex;justify-content:center;gap:10px;}
.weather-dot{width:10px;height:10px;border-radius:50%;background:#475569;}
.weather-dot.active{background:#38bdf8;box-shadow:0 0 10px #38bdf8;}
.weather-prev,.weather-next{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;background:rgba(255,255,255,.08);color:#fff;font-size:20px;transition:.25s;user-select:none;}
.weather-prev{left:18px}.weather-next{right:18px}
.weather-prev:hover,.weather-next:hover{background:#2563eb;box-shadow:0 0 12px rgba(37,99,235,.6);}

/* SOLAR ASSETS PAGE */
.solar-page{display:flex;flex-direction:column;gap:18px;height:calc(100vh - 190px);padding:10px 0 42px 0;box-sizing:border-box;}
.solar-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;flex-shrink:0;}
.solar-summary-card{background:rgba(15,23,42,.88);border:1px solid rgba(56,189,248,.2);backdrop-filter:blur(16px);border-radius:18px;padding:18px 20px;min-height:145px;display:flex;flex-direction:column;justify-content:center;box-sizing:border-box;transition:.3s;}
.solar-summary-card:hover{border:1px solid rgba(56,189,248,.5);box-shadow:0 0 15px rgba(56,189,248,.15);transform:translateY(-2px);}
.solar-summary-header{display:flex;align-items:center;gap:10px;}
.solar-summary-icon{font-size:22px;width:30px;display:flex;align-items:center;justify-content:center;}
.solar-summary-title{font-size:14px;font-weight:700;color:#fff;letter-spacing:.5px;}
.solar-summary-line{width:100%;height:1px;background:rgba(255,255,255,.25);margin:12px 0;}
.solar-summary-value{font-size:30px;font-weight:700;color:#38bdf8;line-height:1.1;}
.solar-summary-label{margin-top:5px;font-size:12px;color:#cbd5e1;}
.solar-summary-zone{font-size:24px;font-weight:700;color:#38bdf8;line-height:1.1;}
.solar-map-status{font-size:24px;font-weight:800;color:#22c55e;line-height:1.1;text-shadow:0 0 8px rgba(34,197,94,.35);}
.solar-main-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:1;min-height:0;align-items:stretch;}
.solar-distribution-card{background:rgba(15,23,42,.88);border:1px solid rgba(56,189,248,.2);backdrop-filter:blur(16px);border-radius:18px;padding:14px 16px;overflow:hidden;display:flex;flex-direction:column;min-height:0;box-sizing:border-box;}
.solar-distribution-card h3,.solar-map-card h3{margin-bottom:12px;color:#38bdf8;font-size:15px;flex-shrink:0;}
.solar-distribution-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(4,1fr);gap:10px;}
.solar-location-card{background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:12px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;cursor:pointer;transition:.25s;min-width:0;min-height:0;}
.solar-location-card:hover{background:rgba(37,99,235,.18);border:1px solid rgba(56,189,248,.5);box-shadow:0 0 12px rgba(56,189,248,.15);transform:translateY(-2px);}
.solar-location-card.active{background:linear-gradient(135deg,rgba(37,99,248,.35),rgba(15,23,42,.9));border:1px solid #38bdf8;box-shadow:0 0 14px rgba(56,189,248,.4),inset 0 0 12px rgba(56,189,248,.08);}
.solar-location-name{width:100%;font-size:13px;font-weight:700;color:#fff;line-height:1.3;}
.solar-location-quantity{margin-top:6px;font-size:22px;font-weight:700;color:#38bdf8;line-height:1;}
.solar-location-unit{margin-top:3px;font-size:11px;color:#cbd5e1;}
.solar-map-card{background:rgba(15,23,42,.88);border:1px solid rgba(56,189,248,.2);backdrop-filter:blur(16px);border-radius:18px;padding:14px 16px;overflow:hidden;display:flex;flex-direction:column;min-height:0;box-sizing:border-box;}
.solar-map-container{position:relative;flex:1;min-height:0;overflow:hidden;border-radius:14px;}
#solarMap{width:100%;height:100%;min-height:0;border-radius:14px;background:rgba(255,255,255,.05);}
.solar-map-title{position:absolute;top:14px;left:50%;transform:translateX(-50%);z-index:1000;padding:9px 22px;border-radius:12px;background:rgba(15,23,42,.88);border:1px solid rgba(56,189,248,.35);backdrop-filter:blur(14px);color:#fff;font-size:13px;font-weight:700;letter-spacing:.8px;white-space:nowrap;box-shadow:0 4px 15px rgba(0,0,0,.2);}
.solar-map-container .leaflet-container{border-radius:14px;}

/* PRAYER */
.prayer-card{justify-content:flex-start;}
.prayer-card .prayer-layout{display:grid;grid-template-columns:1fr 1fr;gap:20px;width:100%;height:100%;min-height:0;align-items:stretch;}
.prayer-card .next-prayer-panel{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;border-right:1px solid rgba(255,255,255,.08);padding:0 20px;}
.prayer-card .next-label{color:#cbd5e1;font-size:14px;letter-spacing:1.2px;margin-bottom:10px;}
.prayer-card #nextPrayerName{font-size:30px;font-weight:700;color:#38bdf8;margin:5px 0 10px;}
.prayer-card #nextPrayerCountdown{font-size:30px;font-weight:700;color:#fff;letter-spacing:1.5px;line-height:1.2;}
.prayer-card .prayer-list-panel{width:100%;height:100%;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:14px;padding:8px 4px;box-sizing:border-box;}
.prayer-card .prayer-row{width:100%;min-height:0;padding:12px 14px;margin-bottom:8px;border-radius:12px;display:flex;justify-content:space-between;align-items:center;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.06);box-sizing:border-box;}
.prayer-card .prayer-row span{width:48%;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:13px;line-height:1.35;gap:3px;text-align:center;}
.prayer-card .prayer-row span:last-child{text-align:center;}
.prayer-card .prayer-row b{display:block;margin-top:2px;font-size:18px;font-weight:700;color:#fff;}
.prayer-card .prayer-row.active{background:rgba(37,99,235,.65);border:1px solid rgba(56,189,248,.8);box-shadow:0 0 12px rgba(56,189,248,.25);color:#fff;font-weight:700;}

/* FOOTER */
.lumilite-footer{
    position:fixed;
    bottom:8px;
    left:0;
    width:100%;
    height:20px;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:6px;
    color:rgba(203,213,225,.55);
    font-size:10px;
    font-weight:500;
    letter-spacing:.3px;
    pointer-events:none;
    z-index:9999;
}
.lumilite-footer img{height:16px;width:auto;object-fit:contain;opacity:.75;}

/* TABLET */
@media(max-width:900px){

    .dashboard-header{padding:16px 24px;}
    .header-logo{width:75px;}
    .dashboard-title{font-size:19px;}
    .dashboard-subtitle{font-size:12px;}
    .tab-menu{padding:16px 24px;gap:10px;}
    .tab-buttons{gap:8px;}
    .tab-btn{padding:12px 14px;font-size:11px;}
    .rulr-access-button{padding:11px 14px;font-size:10px;}
    .dashboard-content{height:calc(100vh - 150px);padding:8px 16px;}

    .lighting-page{gap:12px;padding:6px 0 42px;}
    .lighting-summary-grid{gap:10px;}
    .lighting-summary-card{min-height:105px;padding:12px 15px;}
    .lighting-summary-title{font-size:12px;}
    .lighting-summary-value{font-size:26px;}
    .lighting-main-grid{grid-template-columns:40% 60%;gap:10px;}
    .lighting-distribution-card,.lighting-map-card,.lighting-operation-card{padding:11px 12px;}
    .lighting-distribution-card h3,.lighting-map-card h3,.lighting-operation-card h3{font-size:13px;margin-bottom:8px;}
    .lighting-distribution-list{gap:7px;grid-auto-rows:minmax(38px,1fr);}
    .lighting-location-name{font-size:10px;}
    .lighting-location-quantity{font-size:18px;}
    .lighting-location-unit{font-size:9px;}
    .lighting-operation-content{grid-template-columns:31% 69%;gap:8px;}
    .operation-label{font-size:9px;}
    .operation-window{font-size:18px;}
    .operation-hours{font-size:10px;}
    .typical-profile-header{font-size:10px;}
    .profile-note{font-size:8px;}
    .typical-day-chart{height:52px;gap:2px;}
    .profile-axis{font-size:8px;}
    .profile-source{font-size:8px;}
    .lighting-map-title{top:9px;padding:7px 15px;font-size:10px;}

    .solar-page{gap:14px;padding:8px 0 42px;}
    .solar-summary-grid{gap:10px;}
    .solar-summary-card{min-height:125px;padding:14px;}
    .solar-summary-title{font-size:12px;}
    .solar-summary-icon{font-size:19px;width:26px;}
    .solar-summary-value{font-size:27px;}
    .solar-summary-zone{font-size:21px;}
    .solar-map-status{font-size:21px;}
    .solar-main-grid{gap:10px;}
    .solar-distribution-card,.solar-map-card{padding:12px;}
    .solar-distribution-card h3,.solar-map-card h3{font-size:14px;margin-bottom:10px;}
    .solar-distribution-grid{gap:8px;}
    .solar-location-card{padding:8px;}
    .solar-location-name{font-size:12px;}
    .solar-location-quantity{font-size:20px;}
    .solar-location-unit{font-size:10px;}
    .solar-map-title{top:10px;padding:8px 18px;font-size:12px;}

    .prayer-card .prayer-layout{grid-template-columns:1fr 1fr;gap:14px;}
    .prayer-card .next-prayer-panel{padding:0 12px;}
    .prayer-card .next-label{font-size:13px;}
    .prayer-card #nextPrayerName{font-size:27px;}
    .prayer-card #nextPrayerCountdown{font-size:27px;}
    .prayer-card .prayer-list-panel{gap:12px;padding:8px 2px;}
    .prayer-card .prayer-row{padding:11px 8px;border-radius:10px;}
    .prayer-card .prayer-row span{font-size:12px;}
    .prayer-card .prayer-row b{font-size:17px;}
}

/* Slightly tighter tablet navigation */
@media(max-width:760px){
    .tab-menu{padding:12px 16px;gap:8px;}
    .tab-buttons{gap:5px;}
    .tab-btn{padding:10px 9px;font-size:9px;}
    .rulr-access-button{padding:10px 9px;font-size:9px;}
}

/* =========================================
   MOBILE RESPONSIVE
   ========================================= */

@media (max-width: 768px){

    /* General */
    .dashboard-content{
        padding-left:12px;
        padding-right:12px;
    }

    /* Smart Lighting */
    .lighting-main-grid{
        grid-template-columns:1fr;
        gap:12px;
    }

    .lighting-right-grid{
        grid-template-rows:auto auto;
        gap:12px;
    }

    .lighting-summary-grid{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .lighting-summary-card{
        padding:14px;
    }

    .lighting-summary-value{
        font-size:28px;
    }

    /* Lighting distribution */
    .lighting-distribution-card{
        min-height:300px;
    }

    /* Map */
    .lighting-map-card{
        min-height:380px;
    }

    #lightingMap{
        min-height:320px;
    }

    /* Lighting operation */
    .lighting-operation-content{
        grid-template-columns:1fr;
        gap:18px;
    }

    .lighting-operation-card{
        min-height:300px;
    }

    /* Weather */
    .weather-widget-grid{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .weather-bottom-grid{
        grid-template-columns:1fr;
        gap:12px;
    }

    .weather-page{
        height:auto;
    }

    /* Solar */
    .solar-summary-grid{
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .solar-main-grid{
        grid-template-columns:1fr;
    }
}


/* =========================================
   SMALL PHONE
   ========================================= */

@media (max-width:480px){

    .tab-menu{
        flex-direction:column;
        align-items:stretch;
    }

    .tab-buttons{
        width:100%;
        overflow-x:auto;
    }

    .tab-btn{
        white-space:nowrap;
    }

    .rulr-access-button{
        width:100%;
        justify-content:center;
    }

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

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

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

    .weather-overview-card{
        flex-direction:column;
        align-items:flex-start;
    }

    .lighting-summary-value{
        font-size:24px;
    }

    .weather-widget-grid .widget-icon{
        width:36px;
        height:36px;
        font-size:22px;
    }
}

/* =========================================
   MOBILE VERTICAL SCROLL
   ========================================= */

@media (max-width:768px){

    html,
    body{
        height:auto;
        min-height:100%;
        overflow-x:hidden;
        overflow-y:auto;
    }

    .dashboard-content{
        height:auto;
        min-height:calc(100vh - 150px);
        overflow:visible;
    }

    .tab-content{
        height:auto;
        overflow:visible;
    }

    /* SMART LIGHTING */
    .lighting-page{
        height:auto;
        min-height:0;
        padding-bottom:50px;
    }

    .lighting-main-grid{
        height:auto;
        min-height:0;
    }

    .lighting-left-column,
    .lighting-right-grid{
        min-height:0;
        height:auto;
    }

    .lighting-distribution-card{
        min-height:300px;
    }

    .lighting-map-card{
        min-height:380px;
    }

    .lighting-operation-card{
        min-height:300px;
    }

    /* WEATHER */
    .weather-page{
        height:auto;
        min-height:0;
        padding-bottom:50px;
    }

    .weather-bottom-grid{
        height:auto;
        min-height:0;
    }

    .weather-info-card,
    .prayer-card{
        height:auto;
        min-height:350px;
    }

    /* SOLAR */
    .solar-page{
        height:auto;
        min-height:0;
        padding-bottom:50px;
    }

    .solar-main-grid{
        height:auto;
        min-height:0;
    }

    .solar-distribution-card,
    .solar-map-card{
        min-height:380px;
    }

    /* FOOTER */
    .lumilite-footer{
        position:relative;
        bottom:auto;
        margin-top:20px;
        padding-bottom:10px;
    }
}