body{
    margin:0;
    font-family:Segoe UI, sans-serif;
    background:#0f172a;
    color:white;
}

body.intro-lock{
    overflow:hidden;
}

.fly-intro{
    position:fixed;
    inset:0;
    z-index:1200;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    /* 4.6.0 Arches: Delicate Arch photo, framed so the arch stays visible on phones too. */
    background:linear-gradient(rgba(2,6,23,.24),rgba(2,6,23,.58)),
        url("assets/arches-background.jpg") 35% 45% / cover no-repeat #1a0d08;
    opacity:1;
    transition:opacity .55s ease, visibility .55s ease;
}

.fly-intro[hidden]{
    display:none !important;
}

.fly-intro.is-hiding{
    opacity:0;
    visibility:hidden;
}

.fly-intro-center{
    position:relative;
    z-index:5;
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    justify-items:center;
    align-content:center;
    width:min(90vw, 780px);
    text-align:center;
}

.fly-intro-tagline{
    grid-column:1;
    margin-top:30px;
    max-width:100%;
    padding:14px 28px;
    box-sizing:border-box;
    color:#fff;
    font-family:"Segoe UI Variable", "Segoe UI", sans-serif;
    font-size:clamp(22px, 3.2vw, 32px);
    font-weight:600;
    line-height:1.3;
    letter-spacing:-.015em;
    text-align:center;
    border:1px solid rgba(255,255,255,.18);
    border-radius:16px;
    background:linear-gradient(135deg,rgba(255,255,255,.12),rgba(15,23,42,.3));
    backdrop-filter:blur(18px) saturate(120%);
    -webkit-backdrop-filter:blur(18px) saturate(120%);
    box-shadow:0 8px 28px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.1);
    text-shadow:0 1px 3px rgba(0,0,0,.25);
    animation:introTaglineReveal .8s cubic-bezier(.2,.7,.2,1) both;
}

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

@media(prefers-reduced-motion:reduce){
    .fly-intro-tagline{animation:none;}
}

.fly-intro-mark{
    padding:34px 40px;
    border:1px solid rgba(148, 163, 184, 0.18);
    border-radius:28px;
    background:rgba(2, 6, 23, 0.58);
    box-shadow:0 28px 90px rgba(0,0,0,0.36);
    backdrop-filter:blur(12px);
    animation:introPulse 3s ease-in-out infinite;
}

.fly-intro-logo{
    font-size:clamp(36px, 5vw, 64px);
    margin-bottom:12px;
    text-shadow:0 16px 38px rgba(0,0,0,0.34);
}

.fly-intro-subtitle{
    color:#cbd5e1;
    font-size:15px;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.fly-service-scenes{
    position:absolute;
    inset:0;
    z-index:1;
    pointer-events:none;
}

.fly-service-card{
    --fly-accent:#3b82f6;
    --fly-tilt:0deg;
    position:absolute;
    display:grid;
    justify-items:center;
    gap:5px;
    width:182px;
    min-height:128px;
    padding:12px 14px 10px;
    overflow:hidden;
    border:1px solid color-mix(in srgb, var(--fly-accent) 42%, transparent);
    border-radius:24px;
    background:linear-gradient(145deg,rgba(15,23,42,.72),rgba(2,6,23,.5));
    box-shadow:0 22px 60px rgba(0,0,0,.28),0 0 34px color-mix(in srgb, var(--fly-accent) 14%, transparent);
    backdrop-filter:blur(10px);
    animation:flyServiceFloat 4.4s ease-in-out infinite;
}

.fly-service-card::before{
    content:"";
    position:absolute;
    inset:0 0 auto;
    height:3px;
    background:linear-gradient(90deg,transparent,var(--fly-accent),#f8fafc,transparent);
    opacity:.85;
}

.fly-service-card::after{
    content:"FLY";
    position:absolute;
    right:11px;
    top:10px;
    color:color-mix(in srgb, var(--fly-accent) 68%, white);
    font-size:9px;
    font-weight:900;
    letter-spacing:.18em;
    opacity:.54;
}

.fly-service-water{top:7%;left:4%;--fly-accent:#38bdf8;--fly-tilt:-2deg;}
.fly-service-extinguish{top:7%;right:4%;--fly-accent:#ef4444;--fly-tilt:2deg;animation-delay:-1.1s;}
.fly-service-hydrant-check{bottom:6%;left:5%;--fly-accent:#22c55e;--fly-tilt:2deg;animation-delay:-2.2s;}
.fly-service-extinguisher-check{bottom:6%;right:5%;--fly-accent:#f59e0b;--fly-tilt:-2deg;animation-delay:-3.3s;}

.fly-service-stage{
    position:relative;
    width:146px;
    height:82px;
}

.fly-service-stage img{
    position:absolute;
    z-index:2;
    left:50%;
    top:50%;
    width:72px;
    height:72px;
    object-fit:contain;
    transform:translate(-50%,-50%);
    filter:drop-shadow(0 12px 16px rgba(0,0,0,.3));
}

.fly-service-water .fly-service-stage img,
.fly-service-extinguish .fly-service-stage img{
    left:29%;
}

.fly-service-label{
    position:relative;
    z-index:3;
    color:#e2e8f0;
    font-size:12px;
    font-weight:800;
    letter-spacing:.035em;
    text-transform:uppercase;
}

.fly-water-jet{
    position:absolute;
    z-index:3;
    left:58px;
    top:24px;
    width:86px;
    height:38px;
    transform-origin:left center;
    animation:flyWaterPulse 1.15s ease-in-out infinite;
}

.fly-water-jet i{
    position:absolute;
    left:0;
    width:100%;
    height:4px;
    border-radius:999px;
    background:linear-gradient(90deg,#dbeafe,#38bdf8 58%,rgba(125,211,252,0));
    box-shadow:0 0 12px rgba(56,189,248,.6);
}

.fly-water-jet i:nth-child(1){top:5px;transform:rotate(-8deg);}
.fly-water-jet i:nth-child(2){top:17px;}
.fly-water-jet i:nth-child(3){top:29px;transform:rotate(8deg);}

.fly-water-jet::after{
    content:"";
    position:absolute;
    right:7px;
    top:16px;
    width:6px;
    height:6px;
    border-radius:50%;
    background:#bae6fd;
    box-shadow:13px -13px 0 -1px #7dd3fc,18px 11px 0 -1px #38bdf8,31px -2px 0 -2px #e0f2fe;
    animation:flyDroplets .8s linear infinite;
}

.fly-extinguisher-spray{
    position:absolute;
    z-index:4;
    left:55px;
    top:22px;
    width:78px;
    height:45px;
    transform-origin:left center;
    animation:flySprayPulse .82s ease-in-out infinite;
}

.fly-extinguisher-spray i{
    position:absolute;
    left:0;
    width:100%;
    height:22px;
    border-top:3px solid rgba(248,250,252,.92);
    border-radius:50%;
    filter:drop-shadow(0 0 7px rgba(255,255,255,.7));
}

.fly-extinguisher-spray i:nth-child(1){top:3px;transform:rotate(-9deg);}
.fly-extinguisher-spray i:nth-child(2){top:13px;}
.fly-extinguisher-spray i:nth-child(3){top:23px;transform:rotate(9deg);}

.fly-service-flame{
    position:absolute;
    z-index:1;
    right:2px;
    bottom:10px;
    width:27px;
    height:36px;
    border-radius:65% 35% 62% 38%;
    background:linear-gradient(135deg,#facc15 15%,#f97316 48%,#dc2626 82%);
    box-shadow:0 0 22px rgba(249,115,22,.65);
    transform:rotate(42deg);
    animation:flyFlameFade .82s ease-in-out infinite;
}

.fly-service-inspection img{
    width:70px;
    height:70px;
}

.fly-scan-ring{
    position:absolute;
    z-index:3;
    left:50%;
    top:50%;
    width:82px;
    height:82px;
    border:2px solid var(--fly-accent);
    border-right-color:transparent;
    border-radius:50%;
    box-shadow:0 0 20px color-mix(in srgb, var(--fly-accent) 42%, transparent),inset 0 0 12px color-mix(in srgb, var(--fly-accent) 18%, transparent);
    animation:flyInspectionScan 1.45s linear infinite;
}

.fly-scan-ring::after{
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    width:118px;
    height:2px;
    border-radius:999px;
    background:linear-gradient(90deg,transparent,var(--fly-accent),transparent);
    transform:translate(-50%,-50%);
}

.fly-check-mark{
    position:absolute;
    z-index:4;
    right:7px;
    top:5px;
    display:grid;
    place-items:center;
    width:29px;
    height:29px;
    border:2px solid rgba(255,255,255,.82);
    border-radius:50%;
    background:#16a34a;
    color:white;
    font-size:18px;
    font-weight:900;
    box-shadow:0 8px 18px rgba(22,163,74,.38);
    animation:flyCheckPulse 1.45s ease-in-out infinite;
}

.fly-intro-orbit{
    position:absolute;
    top:50%;
    z-index:2;
}

.fly-intro-orbit-left{
    left:8%;
    animation:orbitLeft 4.6s ease-in-out infinite;
}

.fly-intro-orbit-right{
    right:8%;
    animation:orbitRight 4.8s ease-in-out infinite;
}

.fly-intro-orbit-gps{
    top:23%;
    left:15%;
    animation:orbitGps 5.2s ease-in-out infinite;
}

.fly-intro-orbit-map{
    top:76%;
    right:13%;
    animation:orbitMap 5.4s ease-in-out infinite;
}

.fly-intro-chip{
    display:flex;
    align-items:center;
    gap:10px;
    padding:14px 18px;
    border-radius:999px;
    border:1px solid rgba(148,163,184,0.2);
    background:rgba(15,23,42,0.72);
    color:#f8fafc;
    font-weight:700;
    box-shadow:0 18px 40px rgba(0,0,0,0.24);
    backdrop-filter:blur(8px);
}

.fly-intro-chip-icon{
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    line-height:1;
}

.fly-intro-chip-icon img,
.fly-intro-chip-icon svg{
    display:block;
    width:36px;
    height:36px;
    object-fit:contain;
    border-radius:9px;
}

.fly-intro-chip-map{
    box-shadow:0 18px 40px rgba(14,165,233,0.24);
}

.fly-intro-chip-gps{
    box-shadow:0 18px 40px rgba(59,130,246,0.24);
}

.fly-intro-chip-water{
    box-shadow:0 18px 40px rgba(37,99,235,0.22);
}

.fly-intro-chip-fire{
    box-shadow:0 18px 40px rgba(220,38,38,0.22);
}

.fly-tornado{
    position:absolute;
    z-index:4;
    top:17%;
    left:-340px;
    width:300px;
    height:510px;
    pointer-events:none;
    animation:tornadoTravel 4.15s cubic-bezier(.18,.7,.28,1) forwards;
}

.fly-tornado-vortex{
    position:relative;
    width:100%;
    height:100%;
    animation:tornadoSway .72s ease-in-out infinite alternate;
    filter:drop-shadow(0 24px 30px rgba(0,0,0,.35));
}

.fly-tornado-ring{
    position:absolute;
    left:50%;
    display:block;
    border:3px solid rgba(148,163,184,.58);
    border-right-color:rgba(96,165,250,.92);
    border-left-color:rgba(248,113,113,.72);
    border-radius:50%;
    background:rgba(148,163,184,.08);
    box-shadow:inset 0 0 18px rgba(255,255,255,.08),0 0 18px rgba(96,165,250,.11);
    transform:translateX(-50%);
    animation:tornadoRing .62s linear infinite;
}

.fly-tornado-ring.ring-1{top:76px;width:270px;height:68px;}
.fly-tornado-ring.ring-2{top:132px;width:226px;height:60px;animation-direction:reverse;}
.fly-tornado-ring.ring-3{top:185px;width:176px;height:52px;}
.fly-tornado-ring.ring-4{top:232px;width:124px;height:44px;animation-direction:reverse;}
.fly-tornado-ring.ring-5{top:273px;width:70px;height:36px;}

.fly-tornado-icons{
    position:absolute;
    z-index:2;
    top:34px;
    left:50%;
    width:190px;
    height:160px;
    transform:translateX(-50%);
    animation:tornadoIcons 1.8s linear infinite;
}

.fly-tornado-icons img,
.fly-tornado-gps{
    position:absolute;
    display:grid;
    place-items:center;
    width:46px;
    height:46px;
    border:2px solid rgba(255,255,255,.7);
    border-radius:13px;
    background:rgba(15,23,42,.9);
    object-fit:contain;
    box-shadow:0 10px 24px rgba(0,0,0,.32);
}

.fly-tornado-icons img:nth-child(1){left:4px;top:67px;}
.fly-tornado-icons img:nth-child(2){right:2px;top:56px;}
.fly-tornado-icons img:nth-child(3){left:73px;top:0;object-fit:cover;}
.fly-tornado-gps{left:72px;bottom:0;color:#bfdbfe;font-size:11px;font-weight:900;}

.fly-tornado-dust{
    position:absolute;
    bottom:148px;
    width:12px;
    height:12px;
    border-radius:50%;
    background:rgba(203,213,225,.42);
    box-shadow:0 0 14px rgba(203,213,225,.25);
    animation:tornadoDust 1.2s ease-in-out infinite;
}

.fly-tornado-dust.dust-1{left:24px;}
.fly-tornado-dust.dust-2{right:20px;bottom:118px;animation-delay:-.4s;}
.fly-tornado-dust.dust-3{left:88px;bottom:92px;animation-delay:-.8s;}

header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:24px 36px;
    background:#050816;
    border-bottom:1px solid #1f2937;
}

.logo{
    font-size:28px;
    font-weight:800;
    letter-spacing:-0.02em;
    line-height:1;
}

.header-brand-group{
    display:flex;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
}

.dashboard-plan{
    display:flex;
    align-items:center;
    gap:10px;
    padding-left:18px;
    border-left:1px solid #334155;
}

.dashboard-plan[hidden],
.dashboard-plan button[hidden]{
    display:none;
}

.dashboard-plan strong{
    color:#cbd5e1;
    font-size:13px;
    white-space:nowrap;
}

.dashboard-plan button{
    margin:0;
    padding:8px 12px;
    border:1px solid #1d4ed8;
    border-radius:9px;
    background:linear-gradient(135deg,#0b84ff,#2563eb);
    color:#fff;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 8px 18px rgba(37,99,235,.22);
    transition:transform .18s ease,box-shadow .18s ease;
}

.dashboard-plan button:hover{
    transform:translateY(-4px) scale(1.03);
    box-shadow:0 13px 24px rgba(37,99,235,.36);
}

html[data-theme="light"] .dashboard-plan{
    border-left-color:#cbd5e1;
}

html[data-theme="light"] .dashboard-plan strong{
    color:#475569;
}

.logo .brand-hs{
    color:white;
}

.logo .brand-fly{
    color:#dc2626;
}

.logo .brand-service{
    color:#ffffff;
}

.user{
    font-size:14px;
}

.header-tools{
    display:flex;
    align-items:center;
    gap:14px;
}

.user-btn{
    display:flex;
    align-items:center;
    gap:10px;
    background:transparent;
    border:1px solid #1f2937;
    color:#ffffff;
    padding:10px 14px;
    border-radius:12px;
    cursor:pointer;
    font-size:14px;
}

.user-btn:hover{
    background:#0f172a;
}

.user-icon{
    font-size:16px;
}

.user-logo{
    width:28px;
    height:28px;
    padding:2px;
    box-sizing:border-box;
    object-fit:contain;
    border-radius:7px;
    background:#ffffff;
    box-shadow:0 0 0 1px rgba(148,163,184,.32);
}

.calendar-popover{
    width:310px;
}

.calendar-live{
    margin:-2px 0 12px;
    color:#93c5fd;
    font-size:13px;
    font-weight:700;
    line-height:1.45;
    text-transform:capitalize;
}

.calendar-month-nav{
    display:grid;
    grid-template-columns:34px 1fr 34px;
    align-items:center;
    gap:8px;
    margin-bottom:10px;
}

.calendar-month-nav strong{
    text-align:center;
    text-transform:capitalize;
}

.calendar-month-nav button{
    width:34px;
    height:32px;
    margin:0;
    padding:0;
    border:1px solid #334155;
    border-radius:8px;
    background:#172033;
    color:#e2e8f0;
    font-size:22px;
    cursor:pointer;
}

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

.calendar-weekdays{
    margin-bottom:5px;
    color:#94a3b8;
    font-size:11px;
    font-weight:800;
    text-align:center;
}

.calendar-day{
    display:grid;
    place-items:center;
    min-height:32px;
    border-radius:8px;
    color:#cbd5e1;
    font-size:12px;
}

.calendar-day.is-today{
    background:#0b84ff;
    color:#fff;
    font-weight:900;
    box-shadow:0 6px 16px rgba(11,132,255,.28);
}

.calendar-day.is-empty{
    visibility:hidden;
}

html[data-theme="light"] .calendar-live{
    color:#1d4ed8;
}

html[data-theme="light"] .calendar-month-nav button{
    border-color:#cbd5e1;
    background:#eef2f7;
    color:#172033;
}

html[data-theme="light"] .calendar-day{
    color:#334155;
}

@media (prefers-reduced-motion:reduce){
    .dashboard-plan button{transition:none;}
    .dashboard-plan button:hover{transform:none;}
}

.notify-wrap{
    position:relative;
}

.notify-btn{
    position:relative;
    width:46px;
    height:46px;
    border-radius:12px;
    border:1px solid #1f2937;
    background:transparent;
    color:#ffffff;
    cursor:pointer;
}

.notify-btn:hover{
    background:#0f172a;
}

.notify-icon{
    font-size:18px;
    line-height:1;
}

.notify-badge{
    position:absolute;
    top:4px;
    right:4px;
    min-width:18px;
    height:18px;
    padding:0 5px;
    border-radius:999px;
    background:#dc2626;
    color:#ffffff;
    font-size:11px;
    font-weight:700;
    display:flex;
    align-items:center;
    justify-content:center;
}

.notify-badge[hidden]{
    display:none !important;
}

.notify-badge-dot{
    min-width:10px;
    width:10px;
    height:10px;
    padding:0;
    top:7px;
    right:7px;
}

.notify-popover{
    position:absolute;
    top:58px;
    right:0;
    width:340px;
    background:#0f172a;
    border:1px solid #1f2937;
    border-radius:14px;
    box-shadow:0 16px 40px rgba(0,0,0,0.35);
    padding:16px;
    display:none;
    z-index:20;
}

.notify-wrap.is-open .notify-popover{
    display:block;
}

.notify-title{
    font-size:15px;
    font-weight:700;
    margin-bottom:10px;
}

.notify-empty{
    color:#94a3b8;
    font-size:13px;
}

.notify-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    max-height:320px;
    overflow:auto;
    padding-right:4px;
}

.notify-item{
    padding:10px 12px;
    border-radius:10px;
    background:#111827;
    border:1px solid #1f2937;
}

.notify-item-title{
    font-size:13px;
    font-weight:700;
    color:#ffffff;
    margin-bottom:4px;
}

.notify-item-meta{
    font-size:12px;
    color:#cbd5e1;
}

.notify-item-date{
    font-size:12px;
    color:#fca5a5;
    margin-top:4px;
}

.mailbox-item-body{
    font-size:13px;
    color:#e5e7eb;
    line-height:1.5;
    white-space:pre-line;
}

.mailbox-item-date{
    font-size:12px;
    color:#93c5fd;
    margin-top:6px;
}

.dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    gap:25px;
    padding:40px;
}

.dashboard-version{
    position:fixed;
    left:50%;
    transform:translateX(-50%);
    white-space:nowrap;
    bottom:14px;
    z-index:30;
    display:flex;
    align-items:center;
    gap:6px;
    padding:7px 10px;
    border:1px solid rgba(148,163,184,.2);
    border-radius:10px;
    background:rgba(15,23,42,.82);
    color:#94a3b8;
    box-shadow:0 8px 22px rgba(0,0,0,.16);
    backdrop-filter:blur(10px);
    font-size:11px;
    line-height:1;
}

.dashboard-version[hidden]{
    display:none;
}

.dashboard-version strong{
    color:#e2e8f0;
    font-size:12px;
}

html[data-theme="light"] .dashboard-version{
    border-color:#cbd5e1;
    background:rgba(255,255,255,.88);
    color:#64748b;
    box-shadow:0 8px 22px rgba(15,23,42,.1);
}

html[data-theme="light"] .dashboard-version strong{
    color:#172033;
}

@media (max-width:560px){
    .dashboard-version{
        bottom:10px;
    }
}

/* Short admin instruction at the top of the dashboard (not a tile, so tile ordering ignores it). */
.admin-howto{
    grid-column:1 / -1;
    padding:14px 18px;
    border:1px solid rgba(59,130,246,.35);
    border-radius:14px;
    background:rgba(30,41,59,.82);
    color:#cbd5e1;
    line-height:1.55;
    font-size:14px;
}
.admin-howto[hidden]{display:none;}
.admin-howto summary{cursor:pointer;font-weight:800;color:#e2e8f0;font-size:15px;}
.admin-howto ol{margin:10px 0 6px;padding-left:22px;}
.admin-howto li{margin:5px 0;}
.admin-howto p{margin:6px 0 0;color:#93c5fd;font-weight:700;}
html[data-theme="light"] .admin-howto{background:rgba(255,255,255,.9);color:#334155;border-color:#bfdbfe;}
html[data-theme="light"] .admin-howto summary{color:#0f172a;}
html[data-theme="light"] .admin-howto p{color:#1d4ed8;}

/* A tile that only shows information and does not open anything. */
.card.card-static,
.card.card-static:hover{
    cursor:default;
    transform:none;
}
html:not([data-theme="light"]) .card.card-static:hover{
    background:#1e293b;
}
.card.card-static h2{
    font-size:44px;
    line-height:48px;
    color:#22c55e;
}
.card.card-static.is-warning h2{color:#f59e0b;}
.card.card-static.is-bad h2{color:#ef4444;}

.card{
    background:#1e293b;
    padding:40px;
    border-radius:14px;
    text-align:center;
    cursor:pointer;
    transition:0.25s;
}

.card-link{
    color:inherit;
    text-decoration:none;
}

.card-link:focus-visible{
    outline:3px solid #60a5fa;
    outline-offset:3px;
}

.card-hs-central{
    padding:14px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:10px;
}

.card-hs-central[hidden]{
    display:none;
}

.card-hs-central > img{
    display:block;
    width:100%;
    aspect-ratio:3/2;
    object-fit:cover;
    border-radius:10px;
    pointer-events:none;
}

.card.card-hs-central > p{
    margin:0 0 4px;
    font-size:18px;
    font-weight:700;
}

.card h2{
    font-size:40px;
    margin-bottom:10px;
}

.card h2.card-image-icon{
    position:relative;
    height:48px;
    line-height:48px;
}

.card-image-icon img{
    position:absolute;
    top:50%;
    left:50%;
    width:72px;
    height:72px;
    object-fit:contain;
    transform:translate(-50%,-50%);
    pointer-events:none;
}

#ehydrant-map-card .card-image-icon::before{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    width:104px;
    height:70px;
    border-radius:50%;
    background:radial-gradient(ellipse,rgba(14,165,233,.34) 0%,rgba(14,165,233,0) 72%);
    transform:translate(-50%,-42%);
    filter:blur(9px);
    pointer-events:none;
}

#ehydrant-map-card .card-image-icon img{
    width:96px;
    height:96px;
    object-fit:cover;
    border:2px solid rgba(255,255,255,.82);
    border-radius:19px;
    box-shadow:0 2px 0 rgba(255,255,255,.7) inset,0 7px 14px rgba(15,23,42,.38);
    filter:saturate(1.15) contrast(1.04) drop-shadow(0 13px 9px rgba(2,6,23,.52));
    transform:translate(-50%,-58%) perspective(460px) rotateX(7deg) rotateY(-8deg);
    transition:transform .28s ease,filter .28s ease,box-shadow .28s ease;
}

#ehydrant-map-card:hover .card-image-icon img,
#ehydrant-map-card:focus-visible .card-image-icon img{
    box-shadow:0 2px 0 rgba(255,255,255,.84) inset,0 10px 18px rgba(15,23,42,.42);
    filter:saturate(1.2) contrast(1.06) drop-shadow(0 16px 11px rgba(2,6,23,.56));
    transform:translate(-50%,-62%) perspective(460px) rotateX(3deg) rotateY(5deg) scale(1.06);
}
.card p{
    font-size:16px;
}

.card:hover{
    background:#3b82f6;
    transform:translateY(-5px);
}

@media (max-width: 800px){
    header{
        flex-direction:column;
        align-items:flex-start;
        gap:16px;
    }

    .header-tools{
        width:100%;
        justify-content:flex-start;
        flex-wrap:wrap;
    }

    .notify-popover{
        right:auto;
        left:0;
        width:min(340px, calc(100vw - 32px));
    }
}

/* ========================= */
/* TOASTS */
/* ========================= */

.app-toast-host{
position:fixed;
top:22px;
right:22px;
display:flex;
flex-direction:column;
gap:10px;
z-index:9999;
pointer-events:none;
}

.app-toast{
min-width:260px;
max-width:min(420px, calc(100vw - 32px));
padding:14px 16px;
border-radius:14px;
border:1px solid rgba(148,163,184,0.25);
background:rgba(15,23,42,0.96);
color:#f8fafc;
box-shadow:0 18px 40px rgba(0,0,0,0.35);
backdrop-filter:blur(12px);
font-size:14px;
font-weight:600;
line-height:1.4;
opacity:0;
transform:translateY(-10px) scale(0.98);
transition:opacity .22s ease, transform .22s ease;
}

.app-toast.is-visible{
opacity:1;
transform:translateY(0) scale(1);
}

.app-toast-success{
border-color:rgba(34,197,94,0.35);
background:linear-gradient(135deg, rgba(6,95,70,0.96), rgba(15,23,42,0.96));
}

.app-toast-warning{
border-color:rgba(245,158,11,0.4);
background:linear-gradient(135deg, rgba(146,64,14,0.96), rgba(15,23,42,0.96));
}

.app-toast-error{
border-color:rgba(248,113,113,0.4);
background:linear-gradient(135deg, rgba(127,29,29,0.96), rgba(15,23,42,0.96));
}

.pwa-install-btn{
    padding:10px 14px;
    border:1px solid rgba(59,130,246,.5);
    border-radius:10px;
    background:rgba(37,99,235,.16);
    color:#dbeafe;
    font-weight:800;
    cursor:pointer;
    white-space:nowrap;
    transition:background-color .2s ease,color .2s ease,border-color .2s ease;
}

.pwa-install-btn:hover{
    background:rgba(37,99,235,.3);
}

.pwa-install-btn[hidden]{
    display:none;
}

html[data-theme="light"] .pwa-install-btn{
    border-color:#93c5fd;
    background:#eff6ff;
    color:#1d4ed8;
}

html[data-theme="light"] .pwa-install-btn:hover{
    background:#dbeafe;
}


.pwa-install-status{
    position:fixed;
    top:22px;
    left:50%;
    z-index:10000;
    width:min(560px,calc(100vw - 32px));
    padding:14px 18px;
    border:1px solid rgba(96,165,250,.55);
    border-radius:13px;
    background:rgba(15,23,42,.97);
    color:#f8fafc;
    box-shadow:0 18px 45px rgba(2,6,23,.38);
    font-size:14px;
    font-weight:700;
    line-height:1.45;
    text-align:center;
    opacity:0;
    transform:translate(-50%,-10px);
    transition:opacity .2s ease,transform .2s ease;
    pointer-events:none;
}

.pwa-install-status.is-visible{
    opacity:1;
    transform:translate(-50%,0);
}

.pwa-install-status[data-tone="success"]{
    border-color:rgba(52,211,153,.65);
}

.pwa-install-status[data-tone="warning"]{
    border-color:rgba(251,191,36,.7);
}

.pwa-install-status[hidden]{
    display:none;
}

html[data-theme="light"] .pwa-install-status{
    border-color:#93c5fd;
    background:rgba(255,255,255,.98);
    color:#0f172a;
    box-shadow:0 18px 45px rgba(15,23,42,.18);
}
.logout-btn{
    padding:10px 16px;
    border:1px solid rgba(248,113,113,.35);
    background:rgba(127,29,29,.18);
    color:#fee2e2;
    border-radius:10px;
    font-weight:700;
    cursor:pointer;
}

.logout-btn:hover{
    background:rgba(185,28,28,.3);
}

@keyframes introPulse{
    0%, 100%{ transform:translateY(0) scale(1); }
    50%{ transform:translateY(-6px) scale(1.015); }
}

@keyframes flyServiceFloat{
    0%,100%{transform:translateY(0) rotate(var(--fly-tilt));}
    50%{transform:translateY(-10px) rotate(var(--fly-tilt));}
}

@keyframes flyWaterPulse{
    0%,100%{transform:scaleX(.78);opacity:.68;}
    50%{transform:scaleX(1);opacity:1;}
}

@keyframes flyDroplets{
    from{transform:translateX(-8px);opacity:.45;}
    to{transform:translateX(12px);opacity:1;}
}

@keyframes flySprayPulse{
    0%,100%{transform:scaleX(.76);opacity:.55;}
    50%{transform:scaleX(1.04);opacity:1;}
}

@keyframes flyFlameFade{
    0%,100%{transform:rotate(42deg) scale(.92);opacity:.95;}
    50%{transform:rotate(42deg) scale(.58);opacity:.42;}
}

@keyframes flyInspectionScan{
    from{transform:translate(-50%,-50%) rotate(0deg);}
    to{transform:translate(-50%,-50%) rotate(360deg);}
}

@keyframes flyCheckPulse{
    0%,100%{transform:scale(.9);opacity:.78;}
    50%{transform:scale(1.08);opacity:1;}
}
@keyframes orbitLeft{
    0%, 100%{ transform:translateY(-54%) translateX(0) rotate(-6deg); }
    50%{ transform:translateY(-44%) translateX(28px) rotate(4deg); }
}

@keyframes orbitRight{
    0%, 100%{ transform:translateY(-42%) translateX(0) rotate(5deg); }
    50%{ transform:translateY(-56%) translateX(-26px) rotate(-4deg); }
}

@keyframes orbitGps{
    0%,100%{ transform:translateY(0) rotate(-3deg); }
    50%{ transform:translateY(-18px) translateX(16px) rotate(3deg); }
}

@keyframes orbitMap{
    0%,100%{ transform:translateY(0) rotate(3deg); }
    50%{ transform:translateY(-16px) translateX(-18px) rotate(-3deg); }
}

@keyframes tornadoTravel{
    0%{ transform:translateX(0) rotate(-4deg); opacity:0; }
    8%{ opacity:1; }
    45%{ transform:translateX(calc(48vw + 150px)) rotate(3deg); }
    92%{ opacity:1; }
    100%{ transform:translateX(calc(100vw + 720px)) rotate(-2deg); opacity:0; }
}

@keyframes tornadoSway{
    from{ translate:-10px 0; }
    to{ translate:12px -8px; }
}

@keyframes tornadoRing{
    from{ transform:translateX(-50%) rotate(0deg) scaleX(1); }
    50%{ transform:translateX(-50%) rotate(180deg) scaleX(.88); }
    to{ transform:translateX(-50%) rotate(360deg) scaleX(1); }
}

@keyframes tornadoIcons{
    from{ transform:translateX(-50%) rotate(0deg); }
    to{ transform:translateX(-50%) rotate(360deg); }
}

@keyframes tornadoDust{
    0%,100%{ transform:translate(0,0) scale(.55);opacity:.25; }
    50%{ transform:translate(22px,-34px) scale(1.25);opacity:.9; }
}

@media (prefers-reduced-motion:reduce){
    .fly-service-card,.fly-intro-orbit,.fly-intro-mark,.fly-water-jet,.fly-extinguisher-spray,.fly-service-flame,.fly-scan-ring,.fly-check-mark{animation:none!important;}
    .fly-tornado{display:none;}
}

@media (max-width: 800px){
    .fly-service-card{scale:.82;}
    .fly-service-water,.fly-service-hydrant-check{left:1%;}
    .fly-service-extinguish,.fly-service-extinguisher-check{right:1%;}
    .fly-intro-orbit-left{
        left:4%;
    }

    .fly-intro-orbit-right{
        right:4%;
    }

    .fly-intro-orbit-gps{
        left:5%;
    }

    .fly-intro-orbit-map{
        right:5%;
    }

    .fly-tornado{
        scale:.84;
        transform-origin:left center;
    }

    .fly-intro-chip{
        padding:12px 14px;
        font-size:13px;
    }

    .fly-intro-mark{
        padding:26px 22px;
    }
}

@media (max-width: 560px){
    .fly-service-card{scale:.68;}
    .fly-service-water,.fly-service-extinguish{top:4%;}
    .fly-service-hydrant-check,.fly-service-extinguisher-check{bottom:3%;}
    .fly-service-water,.fly-service-hydrant-check{left:-8%;}
    .fly-service-extinguish,.fly-service-extinguisher-check{right:-8%;}

    .fly-intro-orbit{
        display:none;
    }

    .fly-tornado{
        top:22%;
        scale:.72;
    }

    .fly-intro-subtitle{
        font-size:12px;
        letter-spacing:.06em;
    }
}

html{
    color-scheme:dark;
}

html[data-theme="light"]{
    color-scheme:light;
}

body,
header,
.card,
.notify-btn,
.user-btn,
.notify-popover,
.notify-item{
    transition:background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.theme-popover{
    width:230px;
    padding:10px;
}

.theme-popover .notify-title{
    padding:4px 6px 8px;
    margin-bottom:4px;
}

.theme-icon{
    display:inline-grid;
    place-items:center;
    font-size:22px;
    line-height:1;
}

.theme-option{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    padding:11px 12px;
    border:1px solid transparent;
    border-radius:10px;
    background:transparent;
    color:#e5e7eb;
    font:inherit;
    font-size:14px;
    text-align:left;
    cursor:pointer;
}

.theme-option:hover{
    background:#111827;
}

.theme-option.is-active{
    border-color:#2563eb;
    background:rgba(37,99,235,.14);
    color:#ffffff;
}

.theme-option-icon{
    display:grid;
    place-items:center;
    width:24px;
    height:24px;
    color:#93c5fd;
    font-weight:800;
}

html[data-theme="light"] body{
    background:#edf3f8;
    color:#172033;
}

html[data-theme="light"] header{
    background:#ffffff;
    border-bottom-color:#cbd5e1;
    box-shadow:0 8px 28px rgba(15,23,42,.07);
}

html[data-theme="light"] .logo .brand-hs,
html[data-theme="light"] .logo .brand-service{
    color:#172033;
}

html[data-theme="light"] .notify-btn,
html[data-theme="light"] .user-btn{
    border-color:#cbd5e1;
    color:#172033;
    background:#ffffff;
}

html[data-theme="light"] .notify-btn:hover,
html[data-theme="light"] .user-btn:hover{
    background:#e2e8f0;
}

html[data-theme="light"] .notify-popover{
    background:#ffffff;
    border-color:#cbd5e1;
    box-shadow:0 18px 46px rgba(15,23,42,.18);
}

html[data-theme="light"] .notify-title{
    color:#172033;
}

html[data-theme="light"] .notify-empty{
    color:#64748b;
}

html[data-theme="light"] .notify-item{
    background:#f1f5f9;
    border-color:#cbd5e1;
}

html[data-theme="light"] .notify-item-title,
html[data-theme="light"] .mailbox-item-body{
    color:#172033;
}

html[data-theme="light"] .notify-item-meta{
    color:#475569;
}

html[data-theme="light"] .mailbox-item-date{
    color:#1d4ed8;
}

html[data-theme="light"] .card{
    background:#ffffff;
    color:#172033;
    border:1px solid #dbe4ee;
    box-shadow:0 14px 32px rgba(15,23,42,.08);
}

html[data-theme="light"] .card:hover{
    background:#2563eb;
    color:#ffffff;
    border-color:#2563eb;
    box-shadow:0 18px 38px rgba(37,99,235,.22);
}

html[data-theme="light"] .theme-option{
    color:#334155;
}

html[data-theme="light"] .theme-option:hover{
    background:#f1f5f9;
}

html[data-theme="light"] .theme-option.is-active{
    border-color:#2563eb;
    background:#dbeafe;
    color:#172033;
}

html[data-theme="light"] .theme-option-icon{
    color:#1d4ed8;
}
