:root{--bg:#f3f8fb;--panel:#fff;--text:#173b2c;--muted:#64748b;--blue:#0369a1;--teal:#0f766e;--border:#d9e6ed}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}.layout{display:flex;min-height:100vh}.sidebar{width:315px;background:linear-gradient(180deg,#063c5c,#0f766e);color:white;padding:22px;position:fixed;height:100vh;overflow-y:auto}.brand{display:flex;align-items:center;gap:14px;margin-bottom:22px}.brand-icon{width:56px;height:56px;border-radius:18px;background:#e0f2fe;color:#0369a1;display:flex;align-items:center;justify-content:center;font-size:29px}.brand h1{margin:0;font-size:22px}.brand p{margin:3px 0 0;color:#bae6fd;font-size:13px}.status-card{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);border-radius:18px;padding:16px;margin-bottom:20px}.ok{color:#bbf7d0;font-weight:800}.bad{color:#fecaca;font-weight:800}.project-id{color:#e0f2fe;font-weight:800;word-break:break-all}nav a{display:block;text-decoration:none;color:white;padding:12px 14px;margin:6px 0;border-radius:12px;background:rgba(255,255,255,.08)}nav a:hover{background:rgba(255,255,255,.18)}.content{margin-left:315px;padding:28px;width:calc(100% - 315px)}.hero{background:linear-gradient(135deg,#e0f2fe,#dcfce7);border:1px solid var(--border);border-radius:24px;padding:28px;margin-bottom:22px;display:flex;justify-content:space-between;gap:20px;align-items:center}.hero h2{margin-top:0;font-size:31px;color:#064e3b}.hero p{max-width:920px;color:#315243;font-size:16px}.hero-badge{background:white;color:#0369a1;border:1px solid #bae6fd;padding:14px 16px;border-radius:999px;font-weight:900;white-space:nowrap}.panel{background:var(--panel);border:1px solid var(--border);border-radius:22px;padding:22px;margin-bottom:20px;box-shadow:0 12px 30px rgba(15,23,42,.04)}.panel h2{margin-top:0;color:var(--blue)}#map{height:590px;width:100%;border-radius:20px;overflow:hidden;border:1px solid #cbd5e1}.muted{color:var(--muted)}.section-title{margin:24px 0 12px;padding:8px 12px;border-left:5px solid var(--blue);background:#e0f2fe;color:#075985;font-weight:900;border-radius:10px}.grid,.help-grid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:16px}label{display:flex;flex-direction:column;gap:7px;font-weight:800;font-size:14px;color:#2d4738;margin-bottom:14px}input,select{width:100%;border:1px solid #cbd5e1;background:#fff;border-radius:12px;padding:11px 12px;font-size:14px}button{border:0;color:white;font-weight:900;border-radius:14px;padding:14px 20px;cursor:pointer;background:linear-gradient(135deg,#0284c7,#0f766e)}button:hover{filter:brightness(.95)}.help-card{background:#f8fbfd;border:1px solid #dbe7ee;border-radius:18px;padding:16px 18px}.help-card h3{margin-top:0;color:#0f766e}.result-controls{margin-top:14px}.result-control-card{background:linear-gradient(180deg,#fff,#f8fbfd);border:1px solid #cbd5e1;border-radius:16px;padding:14px}.result-control-card h3{margin:0 0 12px;color:#0f766e}.toggle-row{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:8px 0;border-top:1px solid #eef2f7}.inline-check{display:inline-flex;flex-direction:row;align-items:center;gap:8px;margin:0;font-weight:800}.inline-check input{width:auto}.map-legend-box{margin-top:12px;background:#fff;border:1px solid #cbd5e1;border-radius:16px;padding:14px}.map-legend-box h3{margin:0 0 10px;color:#0f766e}.legend-row{display:flex;align-items:center;gap:8px;margin:6px 0;font-weight:700}.legend-row span{width:18px;height:18px;display:inline-block;border-radius:5px;border:1px solid rgba(0,0,0,.15)}.download-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.download{background:#eef8fb;border:1px solid #bae6fd;color:#0369a1;text-decoration:none;padding:10px 12px;border-radius:12px;font-weight:800}.summary-grid{display:grid;grid-template-columns:repeat(6,minmax(135px,1fr));gap:12px;margin-bottom:16px}.summary-card{background:#f8fbfd;border:1px solid #dbe7ee;border-radius:16px;padding:14px}.summary-card h3{margin:0 0 8px;color:#64748b;font-size:13px}.summary-card p{margin:0;font-size:19px;font-weight:900;color:#0369a1}.table-wrap{margin-top:18px;overflow-x:auto}.table-wrap table{width:100%;border-collapse:collapse;background:white;border-radius:12px;overflow:hidden}.table-wrap th,.table-wrap td{border:1px solid #e5e7eb;padding:8px;text-align:left;font-size:13px}.table-wrap th{background:#e0f2fe}#progressBar{width:100%;height:14px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin-bottom:14px}#progressBar div{width:0;height:100%;background:linear-gradient(90deg,#0284c7,#0f766e);transition:width .4s ease}#logBox{background:#0f172a;color:#d1fae5;border-radius:16px;padding:18px;min-height:220px;overflow:auto;white-space:pre-wrap}.info-box{background:#f0f9ff;border:1px solid #bae6fd;color:#075985;border-radius:16px;padding:14px 16px;margin:12px 0 16px;line-height:1.5}.field-hint{font-size:12px;color:#64748b;font-weight:600}@media(max-width:980px){.sidebar{position:relative;width:100%;height:auto}.layout{display:block}.content{margin-left:0;width:100%}.grid,.help-grid,.summary-grid{grid-template-columns:1fr}.hero{display:block}.hero-badge{display:inline-block;margin-top:12px}}

/* AOI visibility emphasis */
.leaflet-interactive {
    vector-effect: non-scaling-stroke;
}

.report-note-box {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 14px;
    padding: 12px;
}


/* Collapsible system status panel */
.status-collapsible {
    padding: 0;
    overflow: hidden;
}

.status-collapsible summary {
    cursor: pointer;
    list-style: none;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 900;
}

.status-collapsible summary::-webkit-details-marker {
    display: none;
}

.status-collapsible summary::after {
    content: "▾";
    font-size: 14px;
    color: #e0f2fe;
    transition: transform 0.2s ease;
}

.status-collapsible:not([open]) summary::after {
    transform: rotate(-90deg);
}

.status-body {
    padding: 0 16px 16px;
}

.status-pill {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 900;
}

.ok-pill {
    background: rgba(187, 247, 208, 0.18);
    color: #bbf7d0;
    border: 1px solid rgba(187, 247, 208, 0.45);
}

.bad-pill {
    background: rgba(254, 202, 202, 0.18);
    color: #fecaca;
    border: 1px solid rgba(254, 202, 202, 0.45);
}


/* Reservoir / AOI map label */
.aoi-name-label {
    pointer-events: none;
}

.aoi-name-label div {
    background: rgba(3, 105, 161, 0.92);
    color: #ffffff;
    border: 2px solid #facc15;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
    white-space: nowrap;
}

.leaflet-interactive {
    vector-effect: non-scaling-stroke;
}
