/* ==========================================================
   AirMonitor – Gaya tampilan (css/style.css)
   Isi: variabel warna, navbar, login, hero, kartu, tabel, dll.
   Ubah warna tema cukup lewat variabel di :root.
   ========================================================== */
:root {
    --abyss: #082f49;
    --deep: #0369a1;
    --sky: #0ea5e9;
    --aqua: #22d3ee;
    --foam: #f0f9ff;
    --mist: #e0f2fe;
    --ink: #0c2a3d;
    --ok: #059669;
    --warn: #d97706;
    --bad: #e11d48
}

body {
    font-family: 'Figtree', system-ui, sans-serif;
    background: linear-gradient(180deg, var(--mist) 0, var(--foam) 340px, #fff 100%) fixed;
    color: var(--ink);
    min-height: 100vh
}

.topbar {
    background: var(--abyss);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50
}

.brand {
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 1.15rem
}

.brand .si {
    color: var(--aqua)
}

.btn:focus-visible,
.form-control:focus-visible {
    outline: 3px solid var(--aqua);
    outline-offset: 2px
}

.si {
    width: 1em;
    height: 1em;
    vertical-align: -.125em;
    flex: none
}

.chip {
    background: rgba(255, 255, 255, .12);
    color: #e0f2fe;
    border-radius: 999px;
    padding: .3rem .8rem;
    font-size: .85rem;
    font-weight: 600
}

#navActions {
    align-items: center;
    gap: 1rem
}

.dot .si {
    width: 1.2em;
    height: 1.2em
}

.login-card {
    max-width: 880px;
    margin: 5vh auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(8, 47, 73, .18);
    background: #fff;
    border: 1px solid #cfe8f7
}

.login-side {
    background: linear-gradient(160deg, var(--abyss), var(--deep));
    color: #fff;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.login-side h1 {
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1.2
}

.login-side p {
    color: #e0f2fe
}

.login-form {
    padding: 2.5rem
}

.divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.25rem 0 .9rem
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #cfe8f7
}

.hero-meta {
    color: #e0f2fe;
    font-weight: 500
}

.hero-meta b {
    color: #fff
}

@media(max-width:768px) {
    .login-card {
        grid-template-columns: 1fr
    }

    .login-side,
    .login-form {
        padding: 1.75rem
    }
}

.bell {
    position: relative;
    color: #fff;
    background: none;
    border: 0;
    font-size: 1.25rem
}

.bell .badge {
    position: absolute;
    top: -4px;
    right: -8px;
    font-size: .62rem
}

/* hero: tangki air */
.hero {
    background: linear-gradient(135deg, var(--abyss), var(--deep));
    color: #fff;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    padding: 2rem
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    max-width: 15ch;
    line-height: 1.15
}

.hero p {
    color: #e0f2fe;
    max-width: 46ch
}

.tank {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, .35);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, .06);
    flex: none
}

.tank .water {
    position: absolute;
    left: -50%;
    width: 200%;
    bottom: 0;
    height: var(--lvl, 70%);
    background: var(--aqua);
    opacity: .85;
    transition: height .8s
}

.tank .water::before,
.tank .water::after {
    content: "";
    position: absolute;
    left: 0;
    width: 200%;
    height: 24px;
    top: -12px;
    background: radial-gradient(circle at 12px 12px, transparent 11px, var(--aqua) 12px) repeat-x;
    background-size: 48px 24px;
    animation: wave 5s linear infinite
}

.tank .water::after {
    opacity: .5;
    top: -8px;
    animation-duration: 8s;
    animation-direction: reverse
}

@keyframes wave {
    to {
        transform: translateX(-48px)
    }
}

.tank .score {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 2rem;
    color: var(--abyss);
    text-shadow: 0 0 8px #fff
}

@media(prefers-reduced-motion:reduce) {

    .tank .water::before,
    .tank .water::after {
        animation: none
    }
}

.panel {
    background: #fff;
    border: 1px solid #cfe8f7;
    border-radius: 18px;
    padding: 1.25rem
}

.stat {
    border-left: 5px solid var(--sky)
}

.stat.ok {
    border-left-color: var(--ok)
}

.stat.warn {
    border-left-color: var(--warn)
}

.stat.bad {
    border-left-color: var(--bad)
}

.stat .val {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1
}

.stat .ic {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--mist);
    color: var(--deep);
    display: grid;
    place-items: center;
    font-size: 1.2rem
}

.pill {
    font-size: .75rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 999px
}

.pill.ok {
    background: #d1fae5;
    color: #065f46
}

.pill.warn {
    background: #fef3c7;
    color: #92400e
}

.pill.bad {
    background: #ffe4e6;
    color: #9f1239
}

.sec-title {
    font-weight: 800;
    font-size: 1.2rem;
    margin: 0
}

.notif {
    display: flex;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid #e6f3fb
}

.notif:last-child {
    border: 0
}

.notif .dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: none
}

.dot.bad {
    background: #ffe4e6;
    color: var(--bad)
}

.dot.warn {
    background: #fef3c7;
    color: var(--warn)
}

.dot.info {
    background: var(--mist);
    color: var(--deep)
}

.nav-pills .nav-link {
    color: var(--deep);
    font-weight: 600;
    border-radius: 12px
}

.nav-pills .nav-link.active {
    background: var(--deep)
}

.table>:not(caption)>*>* {
    padding: .7rem .75rem;
    vertical-align: middle
}

.table thead th {
    background: var(--foam);
    color: var(--deep);
    font-weight: 700;
    border-bottom: 2px solid #cfe8f7
}

.btn-aqua {
    background: var(--sky);
    color: #fff;
    border: 0;
    font-weight: 600
}

.btn-aqua:hover {
    background: var(--deep);
    color: #fff
}

.view {
    display: none
}

.view.show {
    display: block
}

footer {
    color: #5b7a8e;
    font-size: .85rem
}

/* Notifikasi belum dibaca, pilihan kolam di hero */
.notif {
    cursor: pointer
}

.notif.unread {
    background: var(--foam);
    border-radius: 12px;
    padding-left: .6rem;
    padding-right: .6rem
}

.hero .form-select {
    max-width: 230px;
    font-weight: 700;
    border-radius: 12px;
    margin-bottom: .9rem
}

.hero h1 {
    max-width: none
}