/* HydroFS — engineering dashboard styles */
:root {
  --navy: #0b2a36;
  --navy-2: #0f3b4c;
  --teal: #1fb5a8;
  --teal-d: #138a80;
  --teal-l: #e6f6f4;
  --amber: #f59e0b;
  --amber-l: #fff6e5;
  --red: #d64545;
  --red-l: #fdecec;
  --green: #16a34a;
  --ink: #102a33;
  --ink-2: #3d5560;
  --muted: #6b7f88;
  --line: #e2e9ec;
  --line-2: #eef3f5;
  --bg: #f3f6f7;
  --card: #ffffff;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 42, 51, .06), 0 1px 1px rgba(16, 42, 51, .03);
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--sans); color: var(--ink); background: var(--bg); }
a { color: var(--teal-d); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .8em; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.r { text-align: right; }
.c { text-align: center; }
.warn { color: #b45309; }
.empty { color: var(--muted); padding: 18px; text-align: center; }
.container { max-width: none; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 720px; }
.main { min-height: calc(100vh - 120px); padding-bottom: 40px; }

/* ---------- top bar ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #0a2430; }
.topbar-in { max-width: none; margin: 0 auto; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand b { font-size: 16px; letter-spacing: .02em; }
.brand small { color: #8fb3bf; font-size: 11px; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a { color: #c7dbe2; padding: 8px 12px; border-radius: 6px; font-weight: 500; }
.mainnav a:hover { background: rgba(255, 255, 255, .06); text-decoration: none; color: #fff; }
.mainnav a.on { color: #fff; background: rgba(31, 181, 168, .18); box-shadow: inset 0 -2px 0 var(--teal); }
.usermenu { display: flex; align-items: center; gap: 8px; }
.who { color: #c7dbe2; font-size: 13px; margin-right: 4px; }
.who em { font-style: normal; font-size: 11px; background: rgba(255, 255, 255, .1); padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.usermenu .btn-ghost { color: #c7dbe2; border-color: rgba(255, 255, 255, .18); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; }

/* ---------- buttons ---------- */
.btn, .btn-ghost { display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; font: 500 13px var(--sans); padding: 8px 14px; cursor: pointer; border: 1px solid transparent; line-height: 1.2; white-space: nowrap; }
.btn { background: var(--teal); color: #052a2a; border-color: var(--teal); }
.btn:hover { background: #26c7b9; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); text-decoration: none; }
.btn-ghost.light { color: #e3f1f4; border-color: rgba(255, 255, 255, .25); }
.btn-ghost.light:hover { background: rgba(255, 255, 255, .08); }
.btn-ghost.danger, .danger { color: var(--red); border-color: #f3c6c6; }
.sm { padding: 5px 10px; font-size: 12px; }
.xs { padding: 2px 7px; font-size: 12px; }
.block { display: flex; width: 100%; justify-content: center; margin-top: 10px; }
form.inline { display: inline; }

/* ---------- flash ---------- */
.flash { max-width: none; margin: 14px 24px 0; padding: 10px 14px; border-radius: 8px; border: 1px solid; font-size: 13px; }
.flash-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash-error { background: var(--red-l); border-color: #f5c2c2; color: #8b1d1d; }
.flash-warn { background: var(--amber-l); border-color: #fcd9a0; color: #7a4a00; }
.main > .flash { margin-left: 24px; margin-right: 24px; }

/* ---------- page heads ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 24px 0 16px; flex-wrap: wrap; }
.page-head.compact { margin-top: 4px; }
.page-head p { margin: 4px 0 0; max-width: 820px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--teal-d); font-weight: 600; }
.sec-title { margin: 28px 0 12px; font-size: 16px; }
.crumbs { font-size: 12px; color: var(--muted); margin: 16px 0 0; }
.crumbs a { color: inherit; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.pad { padding: 18px 20px; }
.pad-x { padding: 0 20px 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px 10px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { margin: 0; font-size: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 16px; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--teal); text-decoration: none; }
.tile b { display: block; font-size: 15px; }
.tile b em { font-style: normal; font-size: 12px; color: var(--teal-d); background: var(--teal-l); border-radius: 10px; padding: 1px 8px; margin-left: 6px; }
.tile small { color: var(--muted); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpis-7 { grid-template-columns: repeat(7, 1fr); }
.kpis-4 { grid-template-columns: repeat(4, 1fr); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--teal); }
.kpi small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi b { display: block; font-size: 24px; font-weight: 600; font-family: var(--sans); letter-spacing: -.02em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink-2); font-size: 12px; }
.kpi-src { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.kpi-src .src, .kp .src { white-space: normal; word-break: break-word; }
.kpi-warn::before { background: var(--amber); }

/* ---------- source / version badges ---------- */
.src { display: inline-flex; align-items: center; gap: 4px; font: 500 11px var(--mono); color: #0f5f73; background: #eaf4f7; border: 1px solid #d3e7ed; border-radius: 5px; padding: 1px 6px; white-space: nowrap; vertical-align: middle; }
a.src:hover { background: #d9eef4; text-decoration: none; }
.src.xs { font-size: 10px; padding: 0 5px; }
.src-missing { color: #a3530a; background: #fff3e0; border-color: #fde2b8; }
.ver { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: #eef1f3; color: #44585f; white-space: nowrap; vertical-align: middle; }
.ver-review { background: #e2f6f3; color: #0d6e66; }
.ver-prev { background: #eef0fb; color: #4048a8; }
.ver-alt { background: #fff1db; color: #925600; }
.sev { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.sev-crit { background: #7f1d1d; color: #fff; }
.sev-high { background: var(--red-l); color: #a61b1b; }
.sev-med { background: var(--amber-l); color: #8a5300; }
.sev-low { background: #eef1f3; color: #4b5d66; }
.st { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink-2); }
.st-open { border-color: #f3c6c6; color: #a61b1b; }
.st-review { border-color: #fcd9a0; color: #8a5300; }
.st-res, .st-closed { border-color: #bbe5c8; color: #166534; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 10px; background: var(--line-2); color: var(--ink-2); }
.tag-light { background: rgba(255, 255, 255, .12); color: #e5f2f5; }
.tag-ok { background: #e2f6f3; color: #0d6e66; }
.delta { font-size: 11px; color: #925600; background: var(--amber-l); padding: 1px 6px; border-radius: 8px; }
b.ctrl { color: #0d7a50; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 7px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; text-align: left; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl thead th { background: #f7fafb; color: var(--ink-2); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.tbl tbody tr:hover td { background: #fbfdfd; }
.tbl tfoot th { background: #f7fafb; border-top: 1px solid var(--line); }
.tbl .note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tbl .note.warn { color: #a3530a; }
.tbl.mini td { padding: 4px 6px; }
.pv { font-weight: 600; }
.pu { color: var(--muted); font-size: 12px; }
.row-dim td { color: var(--muted); }
.tbl.boq tr.pkg td { background: var(--navy-2); color: #fff; font-weight: 600; }
.tbl.boq tr.grp td { background: #e8f3f4; font-weight: 600; color: var(--navy-2); }
.tbl.boq tr.sub td { font-style: italic; color: var(--ink-2); background: #fafcfc; }
.tbl.boq tr.subtot td { color: var(--ink-2); font-size: 12px; border-bottom: 1px dashed var(--line); }
.tbl.boq tr.grptot td { font-weight: 600; background: #f4f9f9; }
.tbl.gantt td.g { padding: 6px 4px; }
.tbl.gantt td.g span { display: block; height: 14px; border-radius: 3px; }
.tbl.gantt td.g.on span { background: var(--teal); }
.cap { padding: 8px 12px; }

/* ---------- forms ---------- */
.form label, .filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
input:not([type]), input[type=text], input[type=url], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea { font: 13px var(--sans); color: var(--ink); background: #fff; border: 1px solid #d3dee2; border-radius: 7px; padding: 8px 10px; width: 100%; }
textarea.mono { font: 12.5px/1.5 var(--mono); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31, 181, 168, .35); border-color: var(--teal); }
.form { display: flex; flex-direction: column; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 160px; }
.form-row label.grow { flex: 2; }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 13px !important; }
label.check input { width: auto; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters label { min-width: 180px; }
.danger-zone { text-align: right; margin-bottom: 30px; }
input[type=color] { width: 48px; height: 32px; padding: 2px; border: 1px solid #d3dee2; border-radius: 6px; background: #fff; }

/* ---------- dashboard ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; margin-bottom: 24px; }
.proj-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.proj-card:hover { border-color: var(--teal); text-decoration: none; transform: translateY(-1px); }
.proj-top { display: flex; gap: 6px; margin-bottom: 8px; }
.proj-card h3 { font-size: 18px; margin: 0; }
.proj-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.proj-kpis small { display: block; color: var(--muted); font-size: 11px; }
.proj-kpis b { font-size: 17px; font-weight: 600; }
.proj-foot { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.list .list-item { display: block; padding: 10px 20px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.list a.list-item:hover { background: #fafdfd; text-decoration: none; }
.list .list-item:last-child { border-bottom: 0; }

/* ---------- project header ---------- */
.proj-head { background: linear-gradient(180deg, var(--navy-2), #0d3442); color: #fff; }
.proj-head .crumbs { color: #8fb3bf; padding-top: 14px; margin: 0; }
.proj-head .crumbs a { color: #a9c9d3; }
.proj-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 6px 0 12px; flex-wrap: wrap; }
.proj-title h1 { font-size: 26px; margin: 0; }
.proj-title p { color: #a9c9d3; margin: 2px 0 0; }
.proj-actions { display: flex; gap: 8px; align-items: center; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.tabs a { color: #b6d0d8; padding: 10px 14px; font-weight: 500; border-radius: 8px 8px 0 0; white-space: nowrap; font-size: 13.5px; }
.tabs a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.tabs a.on { background: var(--bg); color: var(--navy-2); font-weight: 600; }
.tabs a em { font-style: normal; font-size: 11px; background: var(--amber); color: #3a2200; border-radius: 9px; padding: 0 6px; margin-left: 4px; }
.tab-body { padding-top: 18px; }

/* ---------- overview ---------- */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.sticky { position: sticky; top: 72px; }
.fsnav { list-style: none; margin: 0; padding: 6px 8px 10px; counter-reset: none; }
.fsnav li a { display: flex; gap: 10px; padding: 5px 10px; border-radius: 6px; color: var(--ink); font-size: 13px; }
.fsnav li a:hover { background: var(--teal-l); text-decoration: none; }
.fsnav li a span { font: 500 12px var(--mono); color: var(--teal-d); min-width: 20px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.review-note { background: #fffaf0; border: 1px solid #f6d79a; border-left: 4px solid var(--amber); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; }
.review-note p { margin: 6px 0 0; }
.review-note ul { margin: 8px 0 0; padding-left: 18px; }
.review-note li { margin-bottom: 4px; }
.rn-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rn-badge { font: 600 11px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #8a5300; }
.prose { font-size: 14px; line-height: 1.65; color: #1d3640; }
.prose p { margin: 0 0 .9em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 20px; }
.prose li { margin-bottom: 3px; }
.prose h3 { margin-top: 1.2em; font-size: 15px; color: var(--navy-2); }
.prose h4 { margin-top: 1em; font-size: 14px; }
.prose table:not(.tbl) { border-collapse: collapse; margin: 8px 0 14px; font-size: 13px; }
.prose table:not(.tbl) td, .prose table:not(.tbl) th { border: 1px solid var(--line); padding: 5px 9px; }
.prose blockquote { margin: 0 0 1em; padding: 8px 14px; border-left: 3px solid var(--teal); background: var(--teal-l); color: #134e4a; border-radius: 0 6px 6px 0; }
.prose .tbl-wrap, .prose figure { margin: 10px 0 18px; border: 1px solid var(--line); border-radius: 8px; }
.sec-src { margin-top: 8px; }

/* ---------- sections layout ---------- */
.sec-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.sec-nav-head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 4px 10px 8px; }
.snav { list-style: none; margin: 0; padding: 0; }
.snav.d1, .snav.d2 { padding-left: 12px; display: none; }
.snav li.open > .snav, .snav li.on > .snav { display: block; }
.snav a { display: flex; gap: 8px; padding: 5px 10px; border-radius: 6px; color: var(--ink); font-size: 13px; line-height: 1.35; }
.snav a:hover { background: #fff; text-decoration: none; }
.snav li.on > a { background: #fff; color: var(--teal-d); font-weight: 600; box-shadow: inset 2px 0 0 var(--teal); }
.sc { font: 500 11.5px var(--mono); color: var(--teal-d); min-width: 30px; }
.sec-main .section-body h2 .sc { font-size: 15px; margin-right: 4px; }
.sec-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.sec-top .crumbs { margin: 0 0 4px; }
.sec-actions { display: flex; gap: 8px; align-items: center; }
.cm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cm { background: #f7fafb; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.cm p:last-child { margin-bottom: 0; }
.lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; margin: 10px 0 4px; }
.cm .lbl { margin-top: 0; }
.cm-block { border-top: 1px solid var(--line-2); padding-top: 6px; margin-top: 12px; }
.cm-interpretation { background: var(--teal-l); border: 1px solid #c9ece7; border-radius: 8px; padding: 6px 14px 10px; }
.cm-limitations { background: #fffaf0; border: 1px solid #f6e2b6; border-radius: 8px; padding: 6px 14px 10px; }
.child-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.child { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); }
.child:hover { border-color: var(--teal); text-decoration: none; }
.child small { color: var(--muted); }
.key-panel .card-head { padding-bottom: 8px; }
.kp { margin: 0; padding: 8px 16px 14px; display: grid; gap: 2px; }
.kp dt { font-size: 11px; color: var(--muted); margin-top: 8px; }
.kp dd { margin: 0; font-size: 13px; }

/* ---------- charts ---------- */
.chart-fig { margin: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-head figcaption { font-weight: 600; font-size: 13.5px; }
.chart-tools { display: flex; gap: 6px; align-items: center; }
.chart-box { position: relative; width: 100%; }
.prose .chart-fig { padding: 12px 14px; }

/* ---------- calculations ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { font: 500 12px var(--sans); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 5px 12px; cursor: pointer; color: var(--ink-2); }
.chip.on { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.calc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
.calc > header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--line-2); background: #fbfdfd; }
.calc > header h3 { margin: 2px 0 0; }
.calc-cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--teal-d); font-weight: 600; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.calc-col { padding: 8px 18px 14px; }
.calc-col + .calc-col { border-left: 1px solid var(--line-2); }
.formula { font: 500 15px var(--mono); background: var(--navy); color: #d8f3ef; padding: 10px 12px; border-radius: 7px; overflow-x: auto; }
.expr { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.calc-in { width: 120px !important; text-align: right; padding: 4px 6px !important; font: 12.5px var(--mono) !important; }
.result { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.result > div { background: #f7fafb; border-radius: 7px; padding: 8px 10px; }
.result small { display: block; color: var(--muted); font-size: 11px; }
.result b { font-size: 17px; font-variant-numeric: tabular-nums; }
.diff.ok { color: var(--green); }
.diff.mid { color: #b45309; }
.diff.bad { color: var(--red); font-size: 12px; }
.inter, .check, .interp { font-size: 13px; }
.interp { background: var(--teal-l); border-radius: 7px; padding: 8px 12px; }
.calc > footer { padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); background: #fbfdfd; }
.calc > footer p:last-child, .inter p:last-child, .check p:last-child, .interp p:last-child { margin-bottom: 0; }
.calc-meta { display: flex; gap: 14px; margin: -8px 0 16px 4px; }

/* ---------- issues ---------- */
.issue { margin-bottom: 10px; }
.issue summary { display: flex; gap: 10px; align-items: center; padding: 12px 18px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.issue summary::-webkit-details-marker { display: none; }
.issue summary .ttl { flex: 1; min-width: 240px; font-weight: 600; }
.issue summary .code { color: var(--muted); font-size: 12px; min-width: 60px; }
.issue[open] summary { border-bottom: 1px solid var(--line-2); }
.issue-body { padding: 6px 18px 14px; }
.issue-body .grid-2 { margin-bottom: 6px; }
.issue-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 10px; }
.issue:target { outline: 2px solid var(--amber); }

/* ---------- documents ---------- */
.ficon { display: inline-flex; width: 38px; height: 44px; align-items: flex-end; justify-content: center; border-radius: 4px; font: 600 10px var(--mono); padding-bottom: 6px; color: #fff; background: #64748b; }
.f-pdf { background: #d64545; } .f-xlsx, .f-xls, .f-csv { background: #16a34a; } .f-docx, .f-doc { background: #2563eb; } .f-pptx { background: #ea580c; } .f-png, .f-jpg, .f-jpeg, .f-webp { background: #7c3aed; }

/* ---------- GIS ---------- */
.gis-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; height: calc(100vh - 230px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.gis-wrap:fullscreen, .gis-wrap.pseudo-full { height: 100vh; border-radius: 0; position: fixed; inset: 0; z-index: 100; }
.gis-map { width: 100%; height: 100%; background: #dfe8ea; }
.gis-panel { border-left: 1px solid var(--line); overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; background: #fbfdfd; }
.gis-panel-head { display: flex; justify-content: space-between; align-items: center; }
.gis-tools { display: flex; gap: 4px; }
.gis-base { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.gl { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.gl-top { display: flex; align-items: center; gap: 4px; }
.gl-top label { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.gl-top .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.gl-sub { margin: 2px 0 4px 22px; }
.gl-op { width: 100%; accent-color: var(--teal); }
.gl-meta dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 8px; font-size: 11.5px; margin: 6px 0 0; }
.gl-meta dt { color: var(--muted); }
.gl-meta dd { margin: 0; word-break: break-word; }
.gis-upload { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.gis-upload .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.gpop { font: 12px var(--sans); max-width: 320px; }
.gpop-h { font-weight: 600; font-size: 13px; }
.gpop-l { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.gpop table { border-collapse: collapse; width: 100%; }
.gpop th, .gpop td { border-bottom: 1px solid #eee; padding: 2px 4px; text-align: left; vertical-align: top; }
.gpop th { color: #555; font-weight: 500; white-space: nowrap; }
.leaflet-tooltip.lf-label { background: rgba(11, 42, 54, .82); color: #fff; border: 0; box-shadow: none; font: 600 11px var(--sans); padding: 1px 6px; }
.leaflet-tooltip.lf-label::before { display: none; }
.gmap-label { text-shadow: 0 0 3px #000, 0 0 2px #000; transform: translateY(-14px); }

/* ---------- login ---------- */
.login-page { background: var(--navy); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.2fr 1fr; }
.login-side { color: #e2f1f4; padding: 8vh 7vw; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(1200px 600px at -10% 110%, rgba(31, 181, 168, .25), transparent 60%), linear-gradient(160deg, #0f3b4c, #0a2430); }
.login-side h1 { font-size: 34px; line-height: 1.15; margin: 40px 0 14px; max-width: 560px; color: #fff; }
.login-side p { color: #a9c9d3; max-width: 520px; font-size: 15px; }
.login-points { list-style: none; padding: 0; margin: 18px 0 0; color: #cfe5ea; }
.login-points li { padding: 6px 0 6px 22px; position: relative; }
.login-points li::before { content: ''; position: absolute; left: 0; top: 13px; width: 10px; height: 2px; background: var(--teal); }
.brand.big b { font-size: 22px; }
.login-card { background: #fff; margin: auto; width: min(380px, 90%); padding: 28px; border-radius: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 500; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: #fff; }
.foot-in { max-width: none; margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.pager { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .kpis-7 { grid-template-columns: repeat(4, 1fr); }
  .sec-layout { grid-template-columns: 230px minmax(0, 1fr); }
  .key-panel { display: none; }
}
@media (max-width: 960px) {
  .grid-2, .grid-3, .ov-grid, .calc-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .calc-col + .calc-col { border-left: 0; border-top: 1px solid var(--line-2); }
  .sec-layout { grid-template-columns: 1fr; }
  .sec-nav .sticky { position: static; }
  .sticky { position: static; }
  .kpis, .kpis-4 { grid-template-columns: repeat(2, 1fr); }
  .kpis-7 { grid-template-columns: repeat(2, 1fr); }
  .gis-wrap { grid-template-columns: 1fr; grid-template-rows: 60vh auto; height: auto; }
  .gis-panel { border-left: 0; border-top: 1px solid var(--line); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 40px 24px; }
  .login-side h1 { font-size: 26px; margin-top: 24px; }
  .login-card { margin: 0 auto 40px; }
}
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .topbar-in { padding: 0 16px; gap: 12px; flex-wrap: wrap; height: auto; min-height: 56px; }
  .nav-toggle { display: block; margin-left: auto; }
  .mainnav, .usermenu { display: none; width: 100%; }
  body.nav-open .mainnav, body.nav-open .usermenu { display: flex; flex-wrap: wrap; padding-bottom: 10px; }
  .brand small { display: none; }
  .proj-grid { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr; }
  .proj-title h1 { font-size: 21px; }
}

/* ---------- v2: revisions, membership, Google login ---------- */
.rev-pick label { display: flex; align-items: center; gap: 8px; color: #b6d0d8; font-size: 12px; }
.rev-pick select { width: auto; max-width: 340px; padding: 5px 8px; font-size: 12.5px; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.rev-pick select option { color: var(--ink); }
.rev-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0 12px; font-size: 13px; color: #cfe2e8; }
.rev-bar .rev-title { color: #e8f3f6; }
.rev-links { display: flex; gap: 14px; margin-left: auto; }
.rev-links a { color: #8fe3da; font-size: 12.5px; }
.rev-code { font: 600 12px var(--mono); background: var(--teal); color: #052a2a; padding: 2px 8px; border-radius: 5px; white-space: nowrap; }
.tag-warn { background: var(--amber-l); color: #8a5300; }
.proj-head .tag-ok { background: rgba(31,181,168,.25); color: #c9f5ef; }
.proj-head .tag-warn { background: rgba(245,158,11,.22); color: #ffe2ad; }
tr.row-active td { background: #f2fbf9; }
.btn-google { background: #fff; color: #1f2937; border: 1px solid #d0d7de; gap: 10px; }
.btn-google:hover { background: #f6f8fa; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { font: 12.5px var(--mono); }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell img, img.avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
img.avatar { width: 22px; height: 22px; vertical-align: middle; margin-right: 6px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd8dc; border-radius: 22px; transition: .15s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::before { transform: translateX(16px); }
fieldset.fs { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
fieldset.fs legend { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.ext-link { word-break: break-all; }
.f-link { background: #0ea5e9; }
.join-card h1 { margin-top: 4px; }
.join-card .actions { margin-top: 12px; }
@media (max-width: 720px) { .rev-links { margin-left: 0; } .rev-pick select { max-width: 220px; } }
.rev-code.st-BD { background: var(--amber); color: #3a2200; }
.rev-stage { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8fb3bf; font-weight: 600; }

/* ---------- v4: model Basic Design tertaut ---------- */
.tag-bd { background: #fff1d6; color: #7a4a00; font-weight: 600; }
.proj-head .tag-bd { background: rgba(245,158,11,.25); color: #ffe2ad; }
.bd-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: #cfe3e8; padding: 6px 0 2px; }
.bd-banner a { color: #ffd58a; }
.kpis-bd { grid-template-columns: repeat(6, 1fr); }
.kpis-bd .kpi { text-decoration: none; color: inherit; padding: 10px 12px; }
.kpis-bd .kpi:hover { border-color: var(--teal); }
.kpis-bd .kpi b { font-size: 18px; }
.kpis-bd .kpi b em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 500; }
.kpis-bd .kpi i { font-style: normal; color: var(--teal-d); }
.kpis-bd .kpi i.dn { color: #b45309; font-weight: 600; }
.bd-status { padding: 10px 14px; }
.bd-status-row { display: flex; flex-wrap: wrap; gap: 26px; }
.bd-status-row small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.bd-status-row b { font-size: 16px; }
.txt-ok { color: var(--green); } .txt-ng { color: var(--red); }
.bd-alerts { margin: 10px 0 0; padding: 8px 12px; background: var(--red-l); border-radius: 8px; list-style: none; font-size: 12.5px; }
.bd-alerts li { margin: 2px 0; }
.bd-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bd-nav a { font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink-2); }
.bd-nav a:hover { border-color: var(--teal); color: var(--teal-d); text-decoration: none; }
.bd-group { scroll-margin-top: 70px; }
.bd-tbl td { vertical-align: middle; }
.bd-tbl tr { scroll-margin-top: 80px; }
.bd-tbl tr:target td { background: #fff8e6 !important; transition: background .4s; }
.bd-tbl tr.k-input td:first-child { box-shadow: inset 3px 0 0 #3b82f6; }
.bd-tbl tr.k-formula td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.bd-tbl tr.k-engine td:first-child { box-shadow: inset 3px 0 0 #8b5cf6; }
.bd-tbl tr.k-text td:first-child { box-shadow: inset 3px 0 0 #cbd5e1; }
.bd-tbl tr.has-err td { background: #fff4f4; }
.bd-tbl .used { font-size: 11px; color: var(--muted); margin-top: 2px; }
.bd-tbl .used a { font-family: var(--mono); font-size: 10.5px; margin-right: 2px; }
.bd-tbl .err, .tbl .err { font-size: 11.5px; color: var(--red); margin-top: 2px; }
.bd-tbl .val b { font-size: 13.5px; }
.bd-tbl .fx .mono { font-size: 12px; line-height: 1.55; word-break: break-word; }
.bd-tbl .subst { font: 11px/1.4 var(--mono); color: var(--muted); margin-top: 2px; word-break: break-word; }
code.vk { font-size: 11px; background: #f1f5f9; color: #334155; }
.sym { font-style: italic; font-family: Georgia, 'Times New Roman', serif; color: var(--ink-2); margin-right: 4px; }
.kind { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding: 0 6px; border-radius: 8px; margin-left: 4px; vertical-align: middle; }
.kind-input { background: #e0ecff; color: #1d4ed8; }
.kind-formula { background: var(--teal-l); color: var(--teal-d); }
.kind-engine { background: #efe7ff; color: #6d28d9; }
.kind-text { background: #f1f5f9; color: #475569; }
.k-input-txt { color: #1d4ed8; font-weight: 600; } .k-formula-txt { color: var(--teal-d); font-weight: 600; }
a.vref { font-family: var(--mono); border-bottom: 1px dotted currentColor; }
a.vref:hover { text-decoration: none; background: #fff3d6; }
a.vref.k-input { color: #1d4ed8; } a.vref.k-engine { color: #6d28d9; } a.vref.k-formula { color: var(--teal-d); }
.eng { font-family: var(--mono); font-size: 11.5px; color: #6d28d9; background: #f5f0ff; padding: 0 5px; border-radius: 4px; }
.chk { display: inline-block; font: 600 10.5px var(--sans); padding: 1px 8px; border-radius: 9px; letter-spacing: .04em; }
.chk.ok { background: #dcfce7; color: #166534; } .chk.ng { background: var(--red-l); color: #b91c1c; }
input.bd-in { width: 130px; text-align: right; font: 13px var(--mono); padding: 4px 7px; border: 1px solid #c7d6ff; border-radius: 6px; background: #f8fbff; }
input.bd-in.bd-txt { width: 220px; text-align: left; font-family: var(--sans); border-color: var(--line); background: #fff; }
input.bd-in:focus { outline: 2px solid #93b4ff; background: #fff; }
input.bd-in.dirty { border-color: var(--amber); background: #fff8e6; }
.bd-savebar { position: sticky; bottom: 12px; z-index: 20; display: flex; gap: 12px; align-items: center; justify-content: flex-end; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); margin: 12px 0; }
.bd-savebar[hidden] { display: none; }
.bd-savebar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.bd-engine { border-top: 1px solid var(--line-2); }
.bd-engine summary { cursor: pointer; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bd-engine .tbl { font-size: 12px; }
.tbl.compact th, .tbl.compact td { padding: 4px 9px; }
.tbl .neg { color: #b91c1c; }
.tbl-scroll { max-height: 560px; overflow: auto; }
.sticky-first td:first-child, .sticky-first th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
.fx-mark { display: inline-block; font: italic 700 11px Georgia, serif; color: var(--teal-d); background: var(--teal-l); width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 50%; }
.fx-line { font: 11px/1.45 var(--mono); color: var(--ink-2); margin-top: 2px; word-break: break-word; }
td.fx-cell { background: #f3fbfa; }
.bd-help code { font-size: 11px; }
.page-head.sub-head { margin-top: 24px; border-top: 1px dashed var(--line); padding-top: 16px; }
textarea.expr-in { font: 13px/1.5 var(--mono); }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 14px; }
.spec-card .card-head { background: linear-gradient(90deg, #0f3b4c, #145a6b); color: #fff; border-radius: var(--radius) var(--radius) 0 0; }
.spec-card .card-head h3 { color: #fff; margin: 0; }
.spec-card .card-head .muted { color: #b8d3da; }
.spec-tbl td { padding: 6px 14px; }
.spec-tbl td:first-child { color: var(--ink-2); }
a.spec-val { color: var(--ink); }
a.spec-val:hover { text-decoration: none; color: var(--teal-d); }
@media (max-width: 1280px) { .kpis-bd { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 960px) { .spec-grid { grid-template-columns: 1fr; } .kpis-bd { grid-template-columns: repeat(2, 1fr); } }
@media print {
  .topbar, .proj-head .tabs, .proj-actions, .actions, .bd-banner, .foot, .rev-links, .flash { display: none !important; }
  .spec-card { break-inside: avoid; }
}

/* v4.1 — tahap dokumen & daftar revisi */
.stage-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.stage-btn { display: flex; flex-direction: column; padding: 7px 14px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: #cfe3e8; min-width: 190px; }
.stage-btn b { font-size: 13.5px; color: #fff; }
.stage-btn small { font-size: 11.5px; color: #a9c4cb; }
.stage-btn:hover { text-decoration: none; border-color: rgba(255,255,255,.4); }
.stage-btn.on.st-FS { background: var(--teal); border-color: var(--teal); }
.stage-btn.on.st-BD { background: var(--amber); border-color: var(--amber); }
.stage-btn.on b, .stage-btn.on small { color: #10252b; }
.stage-btn.add { border-style: dashed; }
.rev-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; font-size: 12.5px; }
.rs-label { color: #a9c4cb; margin-right: 2px; }
.rs-chip { font: 600 12px var(--mono); padding: 3px 9px; border-radius: 6px; background: rgba(255,255,255,.08); color: #e5f1f3; border: 1px solid transparent; }
.rs-chip:hover { text-decoration: none; border-color: rgba(255,255,255,.35); }
.rs-chip.on { background: #fff; color: var(--navy); }
.rs-chip em { font: 600 9.5px var(--sans); text-transform: uppercase; letter-spacing: .04em; padding: 0 5px; border-radius: 6px; margin-left: 3px; font-style: normal; }
.rs-chip em.a { background: #22c55e; color: #052e14; }
.rs-chip em.l { background: #94a3b8; color: #0f172a; }
.rs-all { margin-left: 6px; color: #ffd58a; }
.tag-light2 { background: #eef2f6; color: #475569; }
.rev-list .card-head h3 { display: flex; align-items: center; gap: 8px; }
.tbl tr.row-current td { background: #fffbeb; }
.subtabs { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.subtabs a { padding: 8px 14px; font-weight: 600; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a.on { color: var(--ink); border-bottom-color: var(--amber); }
.subtabs a:hover { text-decoration: none; color: var(--ink); }
@media (max-width: 720px) { .stage-btn { min-width: 0; flex: 1; } }
.rev-overview .list-item { display: flex !important; justify-content: space-between; align-items: center; gap: 10px; }
.rev-overview .list-item.row-current { background: #fffbeb; }
.kpis-5 { grid-template-columns: 1.3fr repeat(4, 1fr); }
.cost-kpis .kpi { text-decoration: none; color: inherit; border-top: 3px solid var(--kc, var(--navy)); }
.cost-kpis .kpi b { font-size: 20px; }
.cost-kpis .kpi b em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 500; }
.cost-kpis .kpi-total { background: var(--navy); color: #fff; border-color: var(--navy); }
.cost-kpis .kpi-total small, .cost-kpis .kpi-total span, .cost-kpis .kpi-total b em { color: #b8d3da; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.cost-tbl tbody { scroll-margin-top: 80px; }
.cost-tbl tr.pkg td { background: #eef4f6; font-weight: 600; }
@media (max-width: 1280px) { .kpis-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .kpis-5 { grid-template-columns: 1fr 1fr; } }
/* finmod summary */
.fm-sum { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.fm-sum th, .fm-sum td { padding: 6px 12px; border-bottom: 1px solid #fff; }
.fm-sum thead th { background: #0f2a5c; color: #fff; text-align: center; font-weight: 600; vertical-align: middle; }
.fm-sum thead th:first-child { text-align: left; }
.fm-sum thead th.cur { background: #12407a; }
.fm-sum tr.sec td { background: #b9cde4; font-weight: 700; color: #0f2a5c; }
.fm-sum tbody td { background: #f1f1f1; }
.fm-sum tbody tr.hl td { background: #fbe5d6; }
.fm-sum td.u { text-align: center; color: #44585f; white-space: nowrap; }
.fm-sum td.v { text-align: center; white-space: nowrap; }
.fm-sum td.v.cur { font-weight: 600; }
.fm-sum td.ind { padding-left: 30px; }
.fm-sum td.sub { color: #44585f; }
.kpis .kpi.kpi-total { background: var(--navy); color: #fff; border-color: var(--navy); }
.kpis .kpi.kpi-total small, .kpis .kpi.kpi-total span { color: #b8d3da; }
/* baris tabel yang dapat diklik (daftar project) */
.tbl tr.row-link { cursor: pointer; transition: background .12s; }
.tbl tr.row-link:hover td, .tbl tr.row-link:focus-visible td { background: var(--teal-l) !important; }
.tbl tr.row-link:hover td:first-child, .tbl tr.row-link:focus-visible td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.tbl tr.row-link:focus-visible { outline: none; }

/* v4.8 — tab 3D terrain */
.t3d-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 230px); min-height: 560px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.t3d-wrap:fullscreen { height: 100vh; border-radius: 0; }
.t3d-panel { border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 14px; background: #fbfdfd; display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.t3d-panel section { display: flex; flex-direction: column; gap: 8px; }
.t3d-panel h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; }
.t3d-panel label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-2); }
.t3d-panel label.check { flex-direction: row; align-items: center; gap: 6px; }
.t3d-panel select, .t3d-panel input:not([type=checkbox]):not([type=range]):not([type=file]) { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
.t3d-row { display: flex; flex-wrap: wrap; gap: 6px; }
.t3d-sub { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.t3d-bbox { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.t3d-bbox input { width: 100%; font-family: var(--mono) !important; font-size: 12px !important; }
.btn.block, .btn-ghost.block { width: 100%; justify-content: center; text-align: center; }
.t3d-progress .bar { height: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.t3d-progress .bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.t3d-progress span { font-size: 11.5px; color: var(--muted); }
.t3d-save { border: 1px solid var(--amber); background: var(--amber-l); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.t3d-main { position: relative; min-width: 0; }
.t3d-view, .t3d-map { position: absolute; inset: 0; }
.t3d-view { background: #dfe9ee; }
.t3d-view canvas { display: block; }
.t3d-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--muted); font-size: 14px; pointer-events: none; }
.t3d-hud { position: absolute; left: 12px; bottom: 12px; background: rgba(11,42,54,.82); color: #fff; font: 12px var(--mono); padding: 5px 9px; border-radius: 6px; pointer-events: none; }
.t3d-hud:empty { display: none; }
.t3d-legend { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.9); border: 1px solid var(--line); font-size: 12px; padding: 7px 10px; border-radius: 8px; max-width: 420px; pointer-events: none; }
.t3d-legend:empty { display: none; }
.t3d-full { position: absolute; right: 12px; top: 12px; background: #fff; }
.t3d-maphint { background: rgba(11,42,54,.85); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12px; }
@media (max-width: 960px) { .t3d-wrap { grid-template-columns: 1fr; grid-template-rows: auto 70vh; height: auto; } .t3d-panel { border-right: 0; border-bottom: 1px solid var(--line); } .t3d-main { min-height: 70vh; } }
.t3d-wrap [hidden] { display: none !important; }

.t3d-ramp{margin-top:6px;display:grid;grid-template-columns:1fr 1fr;gap:2px 8px;font-size:11px}
.t3d-ramp i{grid-column:1/-1;display:block;height:8px;border-radius:4px}
.t3d-ramp span:last-child{text-align:right}
.t3d-fly{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}
.t3d-fly:empty{display:none}

.t3d-view.nav-pan canvas{cursor:grab}
.t3d-view.nav-pan canvas:active{cursor:grabbing}
@media (max-width:640px){.t3d-legend{font-size:10.5px;line-height:1.35;padding:5px 8px;max-width:calc(100% - 64px);left:8px;top:8px}.t3d-full{top:8px;right:8px}.t3d-hud{font-size:10px;left:8px;bottom:56px;max-width:calc(100% - 16px)}}

/* ---------- v5.0 Geometri & dimensi desain (tab Map) ---------- */
.gd { position: relative; }
.gd-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.gd-title h2 { margin: 0 0 2px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.gd-title p { margin: 0; max-width: 720px; font-size: 13px; }
.gd-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gd-seg { display: inline-flex; background: var(--line-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.gd-seg button { border: 0; background: transparent; font: 600 13px var(--sans); color: var(--ink-2); padding: 6px 14px; border-radius: 7px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.gd-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,42,51,.12); }
.gd-count { font: 600 11px var(--mono); background: var(--teal-l); color: var(--teal-d); border-radius: 10px; padding: 1px 7px; }
.gd-geo { display: grid; grid-template-columns: minmax(330px, 400px) 1fr; gap: 12px; align-items: start; }
.gd-roles { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 150px); min-height: 560px; overflow: auto; position: sticky; top: 10px; }
.gd-roles-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.gd-group-t { font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 12px 6px; }
.gd-role { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--line-2); cursor: pointer; transition: background .15s; position: relative; }
.gd-role::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.gd-role:hover { background: #fafcfc; }
.gd-role.active { background: #f6fbfb; }
.gd-role.active::before, .gd-role.picking::before { background: var(--c); }
.gd-role.picking { background: #fffbeb; }
.gd-role.flash { animation: gdflash .9s ease; }
@keyframes gdflash { 0% { background: #fff4d6; } 100% { background: transparent; } }
.gd-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }
.st-empty .gd-ico { filter: grayscale(.6); opacity: .75; }
.gd-body { min-width: 0; }
.gd-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.gd-top b { font-size: 14px; }
.gd-sub { font-size: 11.5px; color: var(--muted); }
.gd-top .gd-chip { margin-left: auto; }
.gd-chip { font: 600 10.5px var(--sans); padding: 2px 7px; border-radius: 10px; background: var(--line-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.gd-chip.ok { background: #e8f7ee; color: #15803d; border-color: #bfe7cd; }
.gd-chip.auto { background: var(--amber-l); color: #a16207; border-color: #f6dfa8; }
.gd-meta { display: flex; flex-direction: column; gap: 1px; font-size: 12px; margin: 4px 0 6px; line-height: 1.4; }
.gd-meta b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.gd-meta span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.gd-link { display: flex; align-items: center; gap: 6px; font-size: 11.5px; background: #f3f8fb; border: 1px solid #dcebf2; border-radius: 7px; padding: 4px 7px; margin: 0 0 6px; }
.gd-link span { flex: 1; }
.gd-link em { font-style: normal; font-weight: 600; font-size: 11px; padding: 0 4px; border-radius: 4px; }
.gd-link em.up { color: #b45309; background: #fff4e0; } .gd-link em.dn { color: #1d4ed8; background: #e9f0ff; } .gd-link em.eq { color: #15803d; background: #e8f7ee; }
.gd-link.same { background: #f4fbf6; border-color: #d6eedd; }
.gd-acts { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.gd-acts .sp, .gd-banner .sp { flex: 1; }
.gd-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); font: 500 12px var(--sans); padding: 4px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.gd-btn:hover { border-color: var(--teal); color: var(--teal-d); }
.gd-btn.ghost { background: transparent; }
.gd-btn:disabled { opacity: .45; cursor: default; }
.gd-ib { border: 1px solid transparent; background: transparent; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.gd-ib:hover { background: var(--line-2); border-color: var(--line); }
.gd-ib.danger:hover { color: var(--red); background: var(--red-l); }
.gd-picklist { margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.gd-picklist input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 7px 9px; font: 13px var(--sans); outline: none; }
.gd-picklist ul { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.gd-picklist li { display: flex; gap: 8px; align-items: center; padding: 6px 9px; cursor: pointer; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.gd-picklist li:hover { background: #fffbeb; }
.gd-picklist li i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.gd-picklist li span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gd-picklist li small { color: var(--muted); font-size: 11px; }
.gd-picklist li em { font-style: normal; font: 600 10px var(--sans); color: #15803d; background: #e8f7ee; border-radius: 8px; padding: 1px 6px; }
.gd-picklist li.empty { color: var(--muted); cursor: default; }
.gd-mapwrap { position: relative; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #dfe9ee; }
.gd-map { height: calc(100vh - 150px); min-height: 560px; }
.gd-map.picking .leaflet-interactive { cursor: pointer; }
.gd-map.drawing, .gd-map.drawing .leaflet-interactive { cursor: crosshair !important; }
.gd-maperr { padding: 40px; text-align: center; color: var(--muted); }
.gd-banner { position: absolute; z-index: 1000; left: 56px; right: 12px; top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 13px; box-shadow: 0 6px 18px rgba(11,42,54,.16); }
.gd-banner kbd { font: 11px var(--mono); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; background: var(--line-2); }
.gd-live { font-variant-numeric: tabular-nums; color: var(--teal-d); margin-left: 4px; }
.gd-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.08); }
.gd-mini-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 0 4px; vertical-align: middle; }
.gd-mini-seg button { border: 0; background: #fff; font: 600 11.5px var(--sans); padding: 3px 9px; cursor: pointer; color: var(--ink-2); }
.gd-mini-seg button.on { background: var(--navy); color: #fff; }
.gd-sheet { position: absolute; z-index: 1000; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(11,42,54,.22); }
.gd-sheet-l { display: flex; gap: 8px; align-items: center; }
.gd-sheet-l small { display: block; font-size: 11px; color: var(--muted); }
.gd-sheet-m { flex: 1; min-width: 200px; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.4; }
.gd-sheet-m b { font-size: 13.5px; }
.gd-sheet-r { display: flex; gap: 6px; align-items: center; }
.gd-layers { position: absolute; z-index: 999; right: 10px; top: 60px; }
.gd-lc-btn { border: 1px solid var(--line); background: #fff; font: 600 12px var(--sans); padding: 6px 10px; border-radius: 8px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.gd-lc-list { margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; box-shadow: 0 6px 18px rgba(11,42,54,.16); max-width: 260px; max-height: 300px; overflow: auto; }
.gd-lc-list label { display: flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 0; cursor: pointer; }
.gd-lc-list i { width: 12px; height: 4px; border-radius: 2px; flex: none; }
.gd-lc-as { background: linear-gradient(90deg, #f59e0b, #22d3ee, #c2410c, #16a34a) !important; }
.gd-tip { background: rgba(11,42,54,.88); color: #fff; border: 0; font: 600 11px var(--sans); padding: 2px 7px; border-radius: 5px; box-shadow: none; }
.gd-tip::before { border-top-color: rgba(11,42,54,.88) !important; }
.gd-ftip { font-size: 12px; line-height: 1.35; }
.gd-ftip span { color: var(--muted); }
.gd-endtip { background: #fff; border: 1px solid var(--line); font: 600 10.5px var(--sans); padding: 1px 6px; border-radius: 5px; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.gd-arrow span { display: block; width: 16px; height: 16px; line-height: 16px; text-align: center; font-size: 13px; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.gd-endsq i { display: block; width: 12px; height: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.gd-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.gd-pin svg { width: 16px; height: 16px; }
.gd-toast { position: fixed; z-index: 3000; left: 50%; bottom: 22px; transform: translate(-50%, 140%); max-width: min(680px, calc(100vw - 32px)); background: var(--navy); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: transform .25s ease; }
.gd-toast { visibility: hidden; }
.gd-toast.show { transform: translate(-50%, 0); visibility: visible; }
.gd-toast.ok { border-left: 4px solid var(--teal); } .gd-toast.err { border-left: 4px solid var(--red); }
.gd-kpi { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 6px; font-variant-numeric: tabular-nums; }
.gd-kpi span { display: inline-flex; gap: 4px; align-items: baseline; }
.gd-kpi small { color: #9fc6cf; }
.gd-note { background: var(--amber-l); border: 1px solid #f6dfa8; color: #7c5a07; padding: 9px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
/* dialog import */
.gd-dlg { border: 0; border-radius: 14px; padding: 0; width: min(620px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.gd-dlg::backdrop { background: rgba(11,42,54,.45); }
.gd-dlg-in { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.gd-dlg-in header { display: flex; justify-content: space-between; align-items: center; }
.gd-dlg-in h3 { margin: 0; font-size: 16px; }
.gd-x { border: 0; background: transparent; font-size: 16px; cursor: pointer; color: var(--muted); }
.gd-dlg-target { margin: 0; background: #fffbeb; border: 1px solid #f6dfa8; padding: 6px 10px; border-radius: 7px; font-size: 13px; }
.gd-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 22px 14px; border: 2px dashed #c9d8de; border-radius: 12px; cursor: pointer; background: #fafcfd; transition: .15s; }
.gd-drop.over, .gd-drop:hover { border-color: var(--teal); background: var(--teal-l); }
.gd-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.gd-drop-ico { font-size: 24px; color: var(--teal-d); }
.gd-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gd-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.gd-form-grid select, .gd-form-grid input { font: 13px var(--sans); padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; }
.gd-form-grid small { font-weight: 400; }
.gd-dlg-in footer { display: flex; gap: 8px; align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 12px; }
.gd-dlg-in footer span { margin-right: auto; }
.gd-progress { height: 4px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.gd-progress i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.gd-ok { color: #15803d; font-weight: 600; font-size: 13px; }
.gd-warn { color: #a16207; font-size: 12px; margin-top: 4px; }
.gd-import-result { display: flex; flex-direction: column; gap: 10px; }
.gd-sug { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.gd-sug table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.gd-sug td { padding: 5px 4px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.gd-sug td i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.gd-sug td small { display: block; color: var(--muted); font-size: 11px; }
.gd-sug .btn { align-self: flex-end; }
/* kartu dimensi */
.gd-dims { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 14px; }
.gd-dim { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; scroll-margin-top: 12px; transition: box-shadow .2s, border-color .2s; }
.gd-dim.dirty { border-color: #f2c66d; box-shadow: 0 0 0 3px #fff3d6; }
.gd-dim.busy { opacity: .7; pointer-events: none; }
.gd-dim.flash { box-shadow: 0 0 0 3px var(--teal-l), 0 0 0 4px var(--teal); }
.gd-dim header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 14px; border-bottom: 1px solid var(--line-2); }
.gd-dim h3 { margin: 0; font-size: 14.5px; }
.gd-checks { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.gd-ck { font: 600 10.5px var(--sans); padding: 2px 7px; border-radius: 10px; }
.gd-ck.ok { background: #e8f7ee; color: #15803d; } .gd-ck.ng { background: var(--red-l); color: var(--red); }
.gd-dim-body { display: grid; grid-template-columns: 240px 1fr; gap: 12px; padding: 12px 14px; align-items: start; }
.gd-fig { margin: 0; background: linear-gradient(180deg, #f8fbfc, #eef4f6); border: 1px solid var(--line-2); border-radius: 9px; }
.gd-fig svg { display: block; width: 100%; height: auto; }
.gd-fig .con { fill: #c9c5bc; stroke: #8f8a80; stroke-width: 1; }
.gd-fig .con2 { fill: #ddd9d0; stroke: #8f8a80; stroke-width: 1; }
.gd-fig .wat { fill: #8ec5e8; fill-opacity: .75; stroke: #3b8ac0; stroke-width: 1; }
.gd-fig .void { fill: #fff; }
.gd-fig .gate { fill: #33424f; }
.gd-fig .gnd { stroke: #8a6d4a; stroke-width: 1.5; stroke-dasharray: 4 3; }
.gd-fig .hfl { stroke: #2563eb; stroke-width: 1; stroke-dasharray: 5 3; }
.gd-fig .flow { stroke: #1d4ed8; stroke-width: 2; fill: none; marker-end: none; }
.gd-fig .dm line { stroke: #0b2a36; stroke-width: .9; }
.gd-fig text { font: 10.5px var(--sans); fill: #0b2a36; }
.gd-fig .lbl { fill: #3d5560; font-size: 10.5px; }
.gd-fig .lbl.w { fill: #fff; font-weight: 600; }
.gd-fig .rack { stroke: #33424f; stroke-width: 2; stroke-dasharray: 2 2; }
.gd-fig .pipe { fill: #8a3f26; }
.gd-fig .steel { fill: #8a3f26; }
.gd-fig .bld { fill: #efe7d6; stroke: #8f8a80; }
.gd-fig .unit { fill: #1f6f8b; }
.gd-fig .sep { stroke: #8f8a80; stroke-dasharray: 4 3; }
.gd-fig .ln { stroke: #0b2a36; stroke-width: 1.6; fill: none; }
.gd-fig .bus { stroke: #7c3aed; stroke-width: 4; }
.gd-fig .tr { fill: none; stroke: #0b2a36; stroke-width: 1.6; }
.gd-fields { display: flex; flex-direction: column; gap: 6px; }
.gd-f { display: grid; grid-template-columns: 1fr 132px 58px; gap: 8px; align-items: center; font-size: 12.5px; }
.gd-f .l { color: var(--ink-2); line-height: 1.3; }
.gd-f .l i { font-style: italic; color: var(--muted); }
.gd-f .in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; overflow: hidden; }
.gd-f .in:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-l); }
.gd-f input { border: 0; outline: none; width: 100%; padding: 6px 8px; font: 500 13px var(--mono); text-align: right; background: transparent; font-variant-numeric: tabular-nums; }
.gd-f input.changed { background: #fff8e6; }
.gd-f input.bad { background: var(--red-l); color: var(--red); }
.gd-f input.flash { animation: gdflash 1.2s ease; }
.gd-f output { flex: 1; padding: 6px 8px; font: 500 13px var(--mono); text-align: right; color: var(--ink-2); background: var(--line-2); }
.gd-f em { font-style: normal; font-size: 11.5px; color: var(--muted); padding: 0 8px 0 2px; white-space: nowrap; }
.gd-f .fs { font-size: 10.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.gd-dlink { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 0 14px 8px; padding: 6px 9px; background: #f3f8fb; border: 1px solid #dcebf2; border-radius: 7px; }
.gd-outs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 0 14px 12px; }
.gd-outs .o { background: var(--line-2); border-radius: 7px; padding: 6px 9px; display: flex; flex-direction: column; gap: 1px; }
.gd-outs .o span { font-size: 11px; color: var(--muted); line-height: 1.25; }
.gd-outs .o b { font: 600 13px var(--mono); font-variant-numeric: tabular-nums; }
.gd-outs .o.err b { color: var(--red); }
.gd-dim footer { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--line-2); margin-top: auto; }
.gd-dirty { margin-right: auto; font-size: 12px; color: #a16207; font-weight: 600; }
.gd-dim footer .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 1100px) { .gd-dims { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .gd-geo { grid-template-columns: 1fr; }
  .gd-mapwrap { order: -1; }
  .gd-map { height: 58vh; min-height: 360px; }
  .gd-roles { position: static; max-height: none; min-height: 0; }
  .gd-banner { left: 10px; top: auto; bottom: 10px; }
  .gd-sheet { bottom: 10px; }
}
@media (max-width: 640px) {
  .gd-dim-body { grid-template-columns: 1fr; }
  .gd-f { grid-template-columns: 1fr 120px; }
  .gd-f .fs { display: none; }
  .gd-form-grid { grid-template-columns: 1fr; }
  .gd-head-actions { width: 100%; }
}

.gd-banner[hidden], .gd-sheet[hidden], .gd-pane[hidden] { display: none !important; }

/* v5.1 data proyek pada model BD */
.bd-proj { margin: 10px 0 0; padding: 10px 12px; border: 1px solid #f6dfa8; background: var(--amber-l); border-radius: 9px; }
.bd-proj b { color: #8a5a00; }
.bd-proj-list { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.bd-proj-list a { font-size: 12px; background: #fff; border: 1px solid #f2d48a; border-radius: 12px; padding: 1px 8px; color: #7c5a07; }
.proj-dot { color: #d97706; font-size: 10px; vertical-align: 1px; }
.bd-tbl tr.is-proj td { background: #fffaf0; }
.bd-tbl tr.is-proj .bd-in { border-color: #f2c66d; background: #fffdf6; }
.gd-f input.need { background: #fffaf0; box-shadow: inset 0 0 0 1px #f2c66d; }
.gd-f input.need::placeholder { color: #c08a1a; }
.gd-outs .o.pend b { color: #a16207; font-weight: 500; font-size: 12px; }
.gd-ck.pend { background: var(--line-2); color: var(--muted); }

/* ---------- Hidrologi (v5.2) ---------- */
.hy-head h2 { margin: 0 0 4px; font-size: 20px; }
.hy-head p { margin: 0 0 14px; max-width: 980px; }
.hy-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 14px; }
.hy-ds { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.hy-ds select { min-width: 260px; max-width: 420px; }
.hy-info { flex: 1 1 260px; }
.hy-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hy-dl { font-size: 12px; color: var(--muted); }
.hy-new { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.hy-new-map { position: relative; min-height: 420px; border-right: 1px solid var(--line); }
.hy-new-map #hyMap { position: absolute; inset: 0; }
.hy-map-hint { position: absolute; left: 10px; bottom: 10px; z-index: 500; background: rgba(255,255,255,.92); padding: 3px 8px; border-radius: 6px; box-shadow: var(--shadow); }
.hy-new-form { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.hy-new-form h3 { margin: 0 0 4px; font-size: 16px; }
.hy-new-form label, .hy-ctl-row label, .hy-params label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.hy-new-form p { margin: 0; }
.hy-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hy-new-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.hy-prog { position: relative; height: 26px; border-radius: 6px; background: var(--line-2); overflow: hidden; font-size: 12px; }
.hy-prog[hidden] { display: none !important; }
.hy-prog span { position: relative; z-index: 1; display: block; padding: 4px 10px; color: var(--ink); }
.hy-prog i { position: absolute; inset: 0; width: 35%; background: linear-gradient(90deg, transparent, rgba(31,181,168,.35), transparent); }
.hy-prog.run i { animation: hyprog 1.4s linear infinite; }
@keyframes hyprog { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.hy-empty { text-align: center; color: var(--muted); }
.hy-empty[hidden], .hy-new[hidden], .hy-pane[hidden] { display: none !important; }
.hy-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.hy-tabs button { background: none; border: 0; padding: 9px 14px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.hy-tabs button:hover { color: var(--ink); }
.hy-tabs button.on { color: var(--teal-d); border-bottom-color: var(--teal); }
.hy-kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.hy-kpis .kpi b { font-size: 21px; }
.hy-kpis .kpi b em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.kpi.kpi-ref::before { background: #94a3b8; }
.kpi.kpi-ref { background: #f8fafb; }
.hy-ch-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.hy-ch { position: relative; height: 300px; }
.hy-ch.tall { height: 380px; }
.hy-yr-nav { display: inline-flex; gap: 4px; }
.hy-mat { font-variant-numeric: tabular-nums; font-size: 12px; }
.hy-mat th a { font-weight: 600; }
.hy-mat td.hm, .hy-fc-tbl td.hm { color: var(--ink); }
.hm.w3 { background: #1d4ed8 !important; color: #fff !important; }
.hm.w2 { background: #93c5fd !important; }
.hm.w1 { background: #e0edff !important; }
.hm.d1 { background: #fde9c8 !important; }
.hm.d2 { background: #f59e0b !important; color: #fff !important; }
.hy-mat tr.hy-mean th, .hy-mat tr.hy-mean td { border-top: 2px solid var(--line); background: var(--line-2); font-weight: 600; }
.hy-mat tr.sel th, .hy-mat tr.sel td { outline: 1px solid var(--teal); }
.hy-cal { margin-top: 12px; max-width: 560px; }
.hy-cal-h, .hy-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.hy-cal-h span { font-size: 11px; color: var(--muted); text-align: center; font-weight: 600; }
.hy-cal-g { margin-top: 3px; }
.hy-cal-g b { position: relative; min-height: 44px; border-radius: 5px; font: 600 13px var(--sans); display: flex; align-items: flex-end; justify-content: flex-end; padding: 3px 6px; }
.hy-cal-g b small { position: absolute; left: 5px; top: 3px; font-size: 10px; font-weight: 500; opacity: .75; }
.hy-fc-tbl { font-size: 11.5px; white-space: nowrap; }
.hy-ctl { margin-bottom: 14px; }
.hy-ctl-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.hy-ctl-row label input { width: 120px; }
.hy-models { border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px 6px; margin: 0; display: flex; gap: 12px; }
.hy-models legend { font-size: 11px; color: var(--muted); padding: 0 4px; }
.hy-models label.check { flex-direction: row; align-items: center; gap: 5px; font-weight: 500; }
.hy-models label.check input { width: auto; }
.hy-params { margin-top: 10px; }
.hy-params summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--teal-d); }
#hyParams { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
#hyParams fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
#hyParams legend { font-size: 12px; font-weight: 600; padding: 0 4px; display: flex; gap: 8px; align-items: center; }
#hyParams label { font-weight: 500; font-size: 11.5px; }
.hy-apply { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.hy-apply:empty { display: none; }
.hy-apply button i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hy-warn { background: var(--amber-l); border-left: 3px solid var(--amber); padding: 8px 12px; border-radius: 6px; margin: 8px 0; }
.hy-attr { margin-top: 18px; }
.gd-toast .gd-kpi { margin-top: 6px; font-size: 12px; }
@media (max-width: 860px) {
  .hy-new { grid-template-columns: 1fr; }
  .hy-new-map { min-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hy-ch { height: 240px; }
  .hy-ch.tall { height: 290px; }
  .hy-ds select { min-width: 0; width: 100%; }
  .hy-ds { flex: 1 1 100%; flex-direction: column; align-items: stretch; }
  .hy-ctl-row label input { width: 100%; }
  .hy-ctl-row label { flex: 1 1 140px; }
  .hy-cal-g b { min-height: 36px; font-size: 11px; padding: 2px 4px; }
}
.hy-new-map { isolation: isolate; z-index: 0; }
.hy-pin i { display: block; width: 22px; height: 22px; border-radius: 50%; background: #ef4444; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(239,68,68,.45), 0 2px 6px rgba(0,0,0,.4); }

/* ---------- Catchment area / DAS (v5.3) ---------- */
.das-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: calc(100vh - 230px); min-height: 600px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.das-map-box { position: relative; isolation: isolate; z-index: 0; }
.das-map { position: absolute; inset: 0; background: #1d2b30; cursor: crosshair; }
.das-map .leaflet-interactive { cursor: crosshair; }
.das-hint { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 800; background: rgba(11, 42, 54, .86); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; pointer-events: none; white-space: nowrap; max-width: calc(100% - 120px); overflow: hidden; text-overflow: ellipsis; }
.das-busy { position: absolute; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(11, 42, 54, .35); color: #fff; font-weight: 600; font-size: 14px; }
.das-busy[hidden] { display: none !important; }
.das-busy i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; animation: dasspin .8s linear infinite; }
.das-busy span { background: rgba(11, 42, 54, .85); padding: 6px 12px; border-radius: 8px; }
@keyframes dasspin { to { transform: rotate(360deg); } }
.das-panel { border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; background: #fbfdfd; }
.das-head h2 { margin: 0 0 4px; font-size: 17px; }
.das-head p { margin: 0; }
.das-q { display: flex; flex-direction: column; gap: 8px; }
.das-q label, .das-name { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.das-q-row { display: flex; gap: 8px; }
.das-q-row select { flex: 1; min-width: 0; }
.das-q #dasWeir { align-self: flex-start; }
.das-big { background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 14px; }
.das-big small { display: block; color: #b8d3da; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.das-big > b { display: block; font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.das-big > b em { font-style: normal; font-size: 16px; color: #b8d3da; font-weight: 500; }
.das-big .muted { color: #b8d3da !important; }
.das-cmp { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; font-size: 12px; color: #dbe9ec; }
.das-cmp:empty { display: none; }
.das-cmp em { font-style: normal; font-weight: 600; padding: 0 5px; border-radius: 4px; margin-left: 4px; }
.das-cmp em.ok { background: rgba(22,163,74,.3); } .das-cmp em.warn { background: rgba(245,158,11,.35); } .das-cmp em.bad { background: rgba(214,69,69,.45); }
.das-act { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.das-dl, .das-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.das-tbl { margin-top: 10px; font-size: 12.5px; }
.das-tbl td small { display: block; color: var(--muted); font-size: 11px; }
.das-tbl td.r { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.das-tbl tr.grp th { text-align: left; background: var(--line-2); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding-top: 6px; }
.das-prof { margin-top: 12px; }
.das-ch { position: relative; height: 190px; margin-top: 6px; }
#dasNote { margin: 8px 0 0; }
.das-saved { border-top: 1px solid var(--line); padding-top: 10px; }
.das-saved-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.das-ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.das-ul li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--ink); }
.das-ul li > i { width: 10px; height: 10px; border-radius: 2px; }
.das-ul li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.das-ul li > span { font-weight: 600; font-variant-numeric: tabular-nums; }
.das-li-act { grid-column: 2 / 4; display: flex; gap: 10px; font-size: 11.5px; }
.das-li-act a.del { color: var(--red); margin-left: auto; }
.das-attr { margin: auto 0 0; font-size: 11px; }
.das-pin i { display: block; width: 18px; height: 18px; border-radius: 50%; background: #f59e0b; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.5); }
.das-outlet i { display: block; width: 16px; height: 16px; border-radius: 50%; background: #1d4ed8; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(29,78,216,.5); }
.das-weir i { display: block; width: 14px; height: 14px; transform: rotate(45deg); background: #10b981; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.das-lbl span { display: inline-block; transform: translate(-50%, -50%); white-space: nowrap; background: rgba(239,68,68,.92); color: #fff; font: 700 13px var(--sans); padding: 3px 9px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
@media (max-width: 860px) {
  .das-wrap { grid-template-columns: 1fr; grid-template-rows: 62vh auto; height: auto; }
  .das-panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .das-hint { font-size: 11px; max-width: calc(100% - 70px); }
}
@media (max-width: 700px) {
  .proj-actions { flex-wrap: wrap; max-width: 100%; }
  .proj-actions .rev-pick, .proj-actions .rev-pick label { max-width: 100%; min-width: 0; }
  .proj-actions .rev-pick select { max-width: calc(100vw - 110px); }
  .proj-title { flex-wrap: wrap; min-width: 0; }
}

/* ---------- Energi historis & proyeksi (v5.4) ---------- */
.hy-tl { margin-bottom: 16px; overflow: hidden; }
.hy-tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 20px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.hy-tl-head h3 { margin: 0 0 2px; font-size: 16px; }
.hy-tl-head p { margin: 0; max-width: 640px; }
.hy-tl-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; }
.hy-tl-ctl label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.hy-tl-ctl select { min-width: 0; }
.hy-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.hy-seg button { border: 0; background: none; padding: 7px 14px; font: 600 12.5px var(--sans); color: var(--ink-2); cursor: pointer; }
.hy-seg button + button { border-left: 1px solid var(--line); }
.hy-seg button.on { background: var(--teal); color: #fff; }
.hy-tl-body { padding: 14px 16px 6px; }
.hy-tl-body .hy-prog { margin-bottom: 10px; }
.hy-tl-v .hy-ch { margin-bottom: 14px; }
.hy-tl-tbl { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.hy-tl-tbl td small { display: block; color: var(--muted); font-size: 10.5px; }
.hy-tl-tbl tr.proj td, .hy-tl-mat tr.proj td { background-image: linear-gradient(rgba(96,165,250,.06), rgba(96,165,250,.06)); }
.hy-tl-tbl tr.proj td:first-child, .hy-tl-mat tr.proj th { color: #1d4ed8; }
.hy-tl-tbl tr.grp th, .hy-tl-mat tr.grp th { text-align: left; background: var(--line-2); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 600; white-space: normal; }
.hy-tl-tbl tfoot td { border-top: 2px solid var(--line); background: var(--line-2); font-weight: 600; }
.hy-tl-mat tr.proj td.hm { opacity: .82; }
.dlt { font-weight: 600; } .dlt.pos, b.pos { color: var(--green); } .dlt.neg, b.neg { color: var(--red); }
@media (max-width: 860px) {
  .hy-tl-head { padding: 12px; }
  .hy-tl-body { padding: 12px 10px 4px; }
  .hy-tl-ctl label { flex: 1 1 30%; }
  .hy-tl-ctl label select { width: 100%; }
}
@media (max-width: 860px) {
  .hy-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hy-kpis .kpi { padding: 9px 10px; }
  .hy-kpis .kpi b { font-size: 18px; }
  .hy-kpis .kpi span { font-size: 11px; }
}

/* ---------- Bulan pilihan, jam-jaman, ringkasan proyeksi hujan (v5.5) ---------- */
#hyMonCard, #hyHrCard { margin-top: 0; }
.hy-mon-head { align-items: center; }
.hy-mon-nav { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hy-mon-nav select, .hy-mon-nav input[type=date] { width: auto; min-width: 0; padding: 5px 8px; font-size: 13px; }
.hy-mon-nav option.fut { color: #6d28d9; }
.hy-src-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-2); margin: 2px 0 10px; }
.hy-src-legend span { display: inline-flex; align-items: center; gap: 5px; }
.hy-src-legend i, .hy-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.hy-dot + .hy-dot { margin-left: 3px; }
.hy-dclick { cursor: pointer; user-select: none; }
.hy-dclick:hover { background: var(--teal-l) !important; color: var(--teal-d); }
th.today, tr.today th { box-shadow: inset 0 -3px 0 var(--amber); }
.hy-mon-tbl th, .hy-mon-tbl td { padding-left: 5px; padding-right: 5px; }
.hy-click-hint { margin: 8px 0 0; }
.hy-hr-tbl { font-size: 11px; font-variant-numeric: tabular-nums; }
.hy-hr-tbl th, .hy-hr-tbl td { padding: 4px 4px; white-space: nowrap; }
.hy-hr-tbl td.na { color: #cbd5e1; }
.hz1 { background: #eff6ff !important; } .hz2 { background: #bfdbfe !important; } .hz3 { background: #60a5fa !important; color: #fff; } .hz4 { background: #1d4ed8 !important; color: #fff; }
.hz-k { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 11px; }
@media (max-width: 860px) {
  .hy-mon-head { flex-direction: column; align-items: stretch; }
  .hy-mon-nav select { flex: 1 1 auto; }
}

/* ---------- 3D: navigasi ala Google Earth & simulasi aliran (v5.6) ---------- */
.t3d-navhelp{position:absolute;left:12px;bottom:46px;z-index:5;max-width:calc(100% - 24px);background:rgba(11,42,54,.78);color:#e2f3f1;font-size:11.5px;padding:5px 10px;border-radius:8px;pointer-events:none;transition:opacity .4s}
.t3d-navhelp b{color:#fff;margin-right:4px}
.t3d-navhelp kbd{background:rgba(255,255,255,.18);border-radius:3px;padding:0 4px;font:600 10.5px var(--sans)}
.t3d-view.nav-pan canvas{cursor:grab}
.t3d-view.nav-pan canvas:active{cursor:grabbing}
@media (max-width:640px){.t3d-navhelp{display:none}}
.sim-row{align-items:flex-end;gap:8px}
.sim-row label{flex:1}
.sim-sum{margin-top:8px;line-height:1.55}
.sim-sum:empty{display:none}
.sim-hud{position:absolute;right:12px;top:52px;z-index:6;width:300px;max-width:calc(100% - 24px);background:rgba(11,42,54,.88);color:#e6f4f7;border-radius:10px;padding:9px 12px;font-size:12px;box-shadow:0 6px 20px rgba(0,0,0,.25);pointer-events:none}
.sim-hud .sim-h-t{font-weight:600;color:#fff;margin-bottom:5px}
.sim-hud .sim-h-t em{font-style:normal;background:#2563eb;border-radius:4px;padding:0 5px;margin-left:4px;font-size:10.5px}
.sim-hud table{width:100%;border-collapse:collapse}
.sim-hud td{padding:1.5px 0;vertical-align:top}
.sim-hud td+td{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;padding-left:8px}
.sim-hud tr.b td{font-weight:600;color:#fff;padding-top:4px}
.sim-hud small{color:#9fb8c0}
.sim-hud i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:5px}
.sim-bar{position:absolute;left:12px;right:12px;bottom:12px;z-index:6;background:rgba(11,42,54,.9);border-radius:10px;padding:8px 10px 6px;color:#fff;box-shadow:0 6px 20px rgba(0,0,0,.25)}
.sim-ctl{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.sim-ctl b{flex:1;font-size:13px;font-variant-numeric:tabular-nums}
.sim-ctl select{width:auto;padding:3px 6px;font-size:12px;background:#0f3b4c;color:#fff;border-color:#2b5868}
.sim-play,.sim-x{border:0;border-radius:6px;background:var(--teal);color:#fff;font-size:14px;width:34px;height:28px;cursor:pointer}
.sim-x{background:transparent;color:#cbd5e1;width:28px}
#simChart{display:block;width:100%;height:70px;cursor:pointer;border-radius:4px;background:rgba(255,255,255,.04)}
#simSlider{width:100%;margin:4px 0 0;accent-color:#1fb5a8}
.t3d-view.sim-on .t3d-navhelp,.t3d-view.sim-on .t3d-hud{display:none}
@media (max-width:640px){.sim-hud{top:8px;bottom:auto;right:8px;left:auto;width:210px;font-size:10.5px;padding:5px 8px}.sim-hud tr:not(.k){display:none}.sim-hud .sim-h-t{display:none}.sim-hud small{display:none}.sim-ctl b{font-size:11.5px}#simChart{height:44px}.t3d-view.sim-on .t3d-legend{display:none}.sim-bar{left:6px;right:6px;bottom:6px;padding:6px 8px 4px}}

/* ---------- Model BD: sidebar kelompok (v5.7) ---------- */
.bd-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.bd-side { position: sticky; top: 70px; align-self: start; }
.bd-side-in { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 8px 10px; max-height: calc(100vh - 86px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.bd-side-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px; font-size: 13px; }
.bd-side-q { margin: 0 4px; width: auto; font-size: 12.5px; padding: 6px 9px; }
.bd-side-nav { display: flex; flex-direction: column; gap: 1px; }
.bd-side-nav a, .bd-side-nav a:hover { text-decoration: none; }
.bd-side-nav a { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 7px; color: var(--ink-2); font-size: 12.5px; line-height: 1.3; border-left: 3px solid transparent; }
.bd-side-nav a:hover { background: var(--line-2); color: var(--ink); }
.bd-side-nav a.on { background: var(--teal-l); color: var(--teal-d); border-left-color: var(--teal); font-weight: 600; }
.bd-side-nav a.dim { opacity: .4; }
.bd-side-nav a i { font-style: normal; font: 600 11px var(--mono); color: var(--muted); background: var(--line-2); border-radius: 5px; text-align: center; padding: 2px 0; }
.bd-side-nav a.on i { background: var(--teal); color: #fff; }
.bd-side-nav a em { font-style: normal; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bd-side-nav a b { font-size: 10px; border-radius: 9px; padding: 1px 6px; font-weight: 700; }
.bd-side-nav a b.bad { background: var(--red-l); color: var(--red); }
.bd-side-nav a b.pend { background: var(--amber-l); color: #b45309; }
.bd-side-top { padding: 2px 8px 0; }
.bd-main { min-width: 0; }
.bd-main > .bd-group:first-child, .bd-main > form > .bd-group:first-of-type { margin-top: 0; }
@media (max-width: 980px) {
  .bd-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bd-side { top: 56px; z-index: 20; }
  .bd-side-in { flex-direction: row; align-items: center; max-height: none; overflow: visible; padding: 6px; border-radius: 10px; }
  .bd-side-h, .bd-side-top { display: none; }
  .bd-side-q { flex: 0 0 120px; margin: 0; }
  .bd-side-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; flex: 1; }
  .bd-side-nav::-webkit-scrollbar { display: none; }
  .bd-side-nav a { display: inline-flex; white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; padding: 5px 8px; }
  .bd-side-nav a.on { border-bottom-color: var(--teal); }
  .bd-side-nav a em { display: none; }
  .bd-side-nav a span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .bd-side-q { flex-basis: 96px; }
  .bd-group { scroll-margin-top: 120px; }
}

/* ---------- Genangan & bendung jebol di tab 3D (v5.11) ---------- */
#fbSec .sim-row label { flex: 1 1 0; min-width: 0; }
#fbSec .sim-row input, #fbSec .sim-row select { width: 100%; }
.fb-dam { margin: 8px 0 4px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #f8fafb; }
.fb-dam summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 2px 0; }
.fb-dam[open] summary { margin-bottom: 6px; }
.fb-dam .btn.block { width: 100%; margin-top: 6px; }
.fb-ch-t { display: block; font-size: 12px; margin: 10px 0 2px; }
.fb-ch { position: relative; height: 190px; }
.fb-tbl { font-size: 11px; margin-top: 10px; }
.fb-tbl th, .fb-tbl td { white-space: nowrap; padding: 3px 5px; text-align: right; }
.fb-tbl th:first-child, .fb-tbl td:first-child { text-align: left; }
.fb-tbl tr.tr td { background: #fff7ed; font-weight: 600; }
.fb-eav { font-size: 11px; margin-top: 6px; }
.fb-eav td, .fb-eav th { padding: 2px 5px; text-align: right; }
.sim-sum .warn { color: #b45309; }
.fb-hud .fb-leg { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 5px; font-size: 10.5px; color: #cfe3e8; }
.fb-hud .fb-leg i { width: 10px; height: 8px; margin-right: 3px; }
.fb-hud em.ok, .fb-hud em.br, .fb-hud em.go { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 4px; margin-left: 4px; }
.fb-hud em.ok { background: #15803d; } .fb-hud em.go { background: #c2410c; } .fb-hud em.br { background: #b91c1c; }
#fbBar .sim-ctl select { max-width: 130px; }
@media (max-width:640px){ .fb-hud .fb-leg { display: none; } .fb-ch { height: 170px; } }
#fbSlider{width:100%;margin:4px 0 0;accent-color:#ef4444}
.fb-hud{width:330px}
@media (max-width:640px){.fb-hud{width:220px}}
.fb-dleg { margin-top: 6px; font-size: 10.5px; color: #cfe3e8; }
.fb-dleg > i { display: block; width: 100% !important; height: 8px; border-radius: 2px; margin: 2px 0 1px; }
.fb-dleg div { display: flex; justify-content: space-between; } .fb-dleg b { font-weight: 500; }
.fb-xs-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.fb-xs-row .fb-ch-t { margin: 0; } .fb-xs-row select { width: auto; max-width: 55%; font-size: 12px; padding: 3px 6px; }
.fb-tbl tr[data-i] { cursor: pointer; } .fb-tbl tr.sel td { background: #fef9c3; }
.fb-plan { border: 1px solid #2b5868; border-radius: 6px; background: #0f3b4c; color: #fff; font-size: 12px; padding: 4px 8px; cursor: pointer; white-space: nowrap; }
@media (max-width:640px){ .fb-hud .fb-dleg span { display: none; } .fb-plan { padding: 3px 6px; font-size: 11px; } }
/* ---------- Halaman Projects: peta satelit + daftar (v5.14) ---------- */
.pj-hero { position: relative; height: clamp(320px, 58vh, 640px); background: #1d2b30; isolation: isolate; }
.pj-hero:fullscreen { height: 100vh; }
.pj-map { position: absolute; inset: 0; z-index: 0; }
.pj-hero-ov { position: absolute; left: 0; right: 0; top: 0; z-index: 500; display: flex; align-items: flex-start; justify-content: space-between; padding: 54px 24px 0; pointer-events: none; }
.pj-hero-ov h1 { margin: 0; color: #fff; font-size: 30px; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,.65); }
.pj-new { pointer-events: auto; background: #f6c026; color: #1f2937; font-weight: 700; padding: 9px 16px; border-radius: 7px; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.pj-new:hover { background: #ffd34d; }
.pj-mbtn { position: absolute; z-index: 500; width: 40px; height: 40px; border: 0; border-radius: 6px; background: #fff; color: #333; font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.pj-full { right: 14px; top: 10px; } .pj-fit { right: 14px; bottom: 34px; border-radius: 50%; }
.pj-pin { background: none; border: 0; } .pj-pin svg { filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); transition: transform .15s; transform-origin: 50% 100%; }
.pj-pin.hot svg { transform: scale(1.35); }
.pj-pop b { display: block; font-size: 13px; } .pj-pop small { display: block; color: #555; margin-top: 2px; } .pj-pop a { display: inline-block; margin-top: 6px; font-weight: 600; }
.pj-wrap { margin-top: 18px; position: relative; z-index: 2; max-width: none; padding: 0 24px; }
.pj-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(15,23,42,.14); padding: 14px 14px 6px; }
.pj-search { display: flex; align-items: center; gap: 8px; border: 1px solid #c7dbf3; background: #f4f8fd; border-radius: 7px; padding: 0 12px; }
.pj-search input { border: 0; background: transparent; padding: 10px 0; flex: 1; font-size: 14px; outline: none; box-shadow: none; }
.pj-head, .pj-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px 290px; gap: 12px; align-items: center; }
.pj-head { padding: 16px 16px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #475569; }
.pj-row { padding: 14px 16px; border-top: 1px solid #edf1f5; scroll-margin-top: 80px; }
.pj-row:nth-child(even) { background: #f8fafc; }
.pj-row:hover, .pj-row.on { background: #fffbea; }
.pj-name { font-weight: 700; font-size: 16px; color: #111827; text-decoration: none; letter-spacing: .01em; }
.pj-name:hover { color: var(--teal, #0f766e); }
.pj-meta { margin-top: 5px; font-size: 12.5px; color: #64748b; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.pj-co { border: 0; background: none; padding: 0; color: #64748b; font: inherit; cursor: pointer; } .pj-co:hover { color: #0369a1; text-decoration: underline; }
.pj-b { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; line-height: 1.6; }
.pj-b-type { background: #22c7e8; color: #053b48; } .pj-b-st { background: #15803d; color: #fff; } .pj-b-n { background: #e2e8f0; color: #334155; font-weight: 600; }
.pj-b-FS { background: #0f3b4c; color: #fff; } .pj-b-BD { background: #f59e0b; color: #1f2937; }
.pj-b-share { background: #0ea5e9; color: #fff; margin-left: 6px; vertical-align: 2px; }
.pj-spec { margin-top: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #334155; letter-spacing: .02em; }
.pj-spec sub { font-size: 8px; }
.pj-by { margin-top: 6px; font-size: 12px; color: #0f766e; }
.pj-num { text-align: center; } .pj-head .pj-num { text-align: center; }
.pj-num b { display: block; font-size: 19px; color: #0f172a; font-variant-numeric: tabular-nums; } .pj-num small { font-size: 11px; color: #64748b; }
.pj-act { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.pj-act form { margin: 0; }
.pj-open, .pj-dup, .pj-del { display: inline-block; font-size: 13px; padding: 6px 11px; border-radius: 5px; text-decoration: none; cursor: pointer; line-height: 1.3; font-family: inherit; white-space: nowrap; }
.pj-open { background: #f6c026; color: #1f2937; font-weight: 700; border: 1px solid #e0a800; } .pj-open:hover { background: #ffd34d; }
.pj-dup { background: #fff; color: #374151; border: 1px solid #9ca3af; } .pj-dup:hover { background: #f3f4f6; }
.pj-del { background: #fff; color: #dc2626; border: 1px solid #dc2626; } .pj-del:hover { background: #fef2f2; }
.pj-empty { padding: 24px 16px; color: #64748b; }
@media (max-width: 900px) {
  .pj-head { display: none; }
  .pj-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .pj-main, .pj-act { grid-column: 1 / -1; }
  .pj-act { justify-content: flex-start; }
  .pj-num { text-align: left; display: flex; align-items: baseline; gap: 5px; } .pj-num b { display: inline; }
  .pj-hero-ov { padding: 16px 14px 0; } .pj-hero-ov h1 { font-size: 24px; } .pj-full { top: auto; bottom: 84px; }
  .pj-new { padding: 7px 12px; font-size: 13px; }
  .pj-wrap { padding: 0 10px; }
}
/* ---------- Halaman project (workspace) — peta + tab tingkat project (v5.17) ---------- */
.ws-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #0f2f3c; color: #fff; padding: 8px 24px; border-top: 1px solid rgba(255,255,255,.08); }
.ws-bar h1 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.ws-back { color: #9fe3dc; text-decoration: none; font-size: 13px; margin-right: 6px; } .ws-back:hover { color: #fff; }
.ws-bar-r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ws-btn { font-size: 12.5px; padding: 5px 11px; border-radius: 5px; text-decoration: none; background: #e9f7f5; color: #0f3b4c; font-weight: 600; border: 1px solid #b9e3dd; }
.ws-btn.bd { background: #f6c026; border-color: #e0a800; color: #1f2937; } .ws-btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.ws-hero { position: relative; height: clamp(360px, 62vh, 720px); background: #1d2b30; isolation: isolate; }
.ws-hero:fullscreen { height: 100vh; }
.ws-map { position: absolute; inset: 0; z-index: 0; }
.ws-map.soil-picking, .soil-map.soil-picking { cursor: crosshair; }
.ws-ov { position: absolute; left: 0; top: 0; z-index: 600; width: 300px; max-height: calc(100% - 16px); overflow: auto; background: #fff; box-shadow: 4px 0 18px rgba(0,0,0,.25); border-radius: 0 0 10px 0; }
.ws-ov-h { display: flex; align-items: center; gap: 8px; background: #0f2f3c; color: #fff; padding: 10px 12px; position: sticky; top: 0; }
.ws-ov-h b { flex: 1; font-size: 14px; }
.ws-ov-ed { background: #f6c026; color: #1f2937; border-radius: 4px; padding: 1px 8px; text-decoration: none; font-weight: 700; }
.ws-ov-tg { background: none; border: 0; color: #fff; font-size: 16px; cursor: pointer; padding: 0 4px; }
.ws-ov.min .ws-ov-t { display: none; } .ws-ov.min { border-radius: 0 0 10px 0; }
.ws-ov-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ws-ov-t td { padding: 6px 12px; border-bottom: 1px solid #edf1f5; vertical-align: top; }
.ws-ov-t td:first-child { color: #64748b; width: 42%; }
.ws-legend { position: absolute; right: 12px; top: 60px; z-index: 600; background: rgba(255,255,255,.94); border-radius: 8px; padding: 7px 10px; font-size: 11.5px; box-shadow: 0 2px 10px rgba(0,0,0,.25); max-width: 260px; }
.ws-legend:empty { display: none; }
.ws-legend div { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.ws-legend i.tri, .ws-sw.tri { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid #16a34a; border-radius: 0; background: none; }
.ws-sw { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.ws-lbl { background: rgba(11,42,54,.82); color: #fff; border: 0; box-shadow: none; font-size: 10.5px; font-weight: 600; padding: 1px 5px; }
.ws-lbl::before { display: none; }
.soil-pin { background: none; border: 0; } .soil-pin svg { filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); } .soil-pin.sel svg path { fill: #f59e0b; }
/* leaflet.css dimuat setelah app.css, jadi selector perlu .leaflet-tooltip agar tidak tertimpa (sebelumnya: kotak putih + text-shadow hitam = teks blur) */
.leaflet-tooltip.soil-lbl { background: rgba(11, 42, 54, .88); border: 0; border-left: 3px solid #22c55e; border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.35); color: #fff; font: 700 11px 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .2px; text-shadow: none; padding: 1px 5px; -webkit-font-smoothing: antialiased; }
.leaflet-tooltip.soil-lbl::before { display: none; }
.ws-pop { font-size: 11.5px; border-collapse: collapse; margin-top: 4px; } .ws-pop td { padding: 1px 6px 1px 0; vertical-align: top; } .ws-pop td:first-child { color: #64748b; }
.ws-wrap { padding: 18px 24px 0; }
.ws-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(15,23,42,.12); padding: 10px 16px 14px; }
.ws-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e5e9ef; padding: 4px 0 0; overflow-x: auto; }
.ws-tabs a { padding: 10px 16px; border-radius: 8px 8px 0 0; color: #1f2937; text-decoration: none; font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.ws-tabs a em { font-style: normal; font-size: 11px; background: #e2e8f0; color: #334155; border-radius: 9px; padding: 0 6px; margin-left: 4px; }
.ws-tabs a.on { background: #0f2f3c; color: #fff; } .ws-tabs a.on em { background: #f6c026; color: #1f2937; }
.ws-tabs a:not(.on):hover { background: #f1f5f9; }
.ws-pane { padding-top: 10px; }
.ws-pane-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ws-pane-h p { margin: 4px 0; flex: 1 1 420px; }
.pj-new.sm { padding: 6px 12px; font-size: 13px; box-shadow: none; }
.ws-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ws-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: #475569; background: #f1f5f9; padding: 8px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.ws-tbl td { padding: 8px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.ws-tbl th.r, .ws-tbl td.r { text-align: right; }
.ws-tbl tbody tr:hover { background: #fffbea; }
.ws-row { cursor: pointer; } .ws-row.act { background: #fffdf2; }
.ws-rn { font-weight: 700; color: #111827; text-decoration: none; } .ws-rn:hover { color: #0f766e; }
.ws-sub { font: 10.5px 'IBM Plex Mono', monospace; color: #64748b; margin-top: 3px; }
.ws-b-act { background: #f6c026; color: #1f2937; margin-left: 6px; } .ws-b-model { background: #ede9fe; color: #5b21b6; margin-left: 4px; }
.pj-b.pj-b-n { margin-left: 4px; }
.ws-act form { display: inline; margin: 0; }
.ws-ib { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; border-radius: 5px; border: 1px solid #d1d5db; background: #fff; cursor: pointer; text-decoration: none; font-size: 14px; color: #374151; margin-left: 3px; padding: 0; }
.ws-ib:hover { background: #f3f4f6; }
.ws-ib.eye { background: #f6c026; border-color: #e0a800; }
.ws-ib.star { color: #d97706; border-color: #f6c026; } .ws-ib.star.on { background: #f6c026; color: #1f2937; cursor: default; }
.ws-ib.del { color: #dc2626; border-color: #fca5a5; } .ws-ib.del.off { opacity: .35; cursor: not-allowed; }
.ws-foot { margin: 10px 0 0; }
.soil-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.soil-file { cursor: pointer; } .soil-sel { width: auto; max-width: 280px; font-size: 13px; padding: 5px 8px; }
.soil-form { border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px; }
.soil-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 12px; }
.soil-grid label { font-size: 12px; color: #475569; display: flex; flex-direction: column; gap: 3px; }
.soil-grid label.wide { grid-column: span 5; }
.soil-grid input, .soil-grid textarea { font-size: 13px; }
.soil-btns { display: flex; gap: 8px; }
.soil-msg { margin: 4px 0; } .soil-msg.ok { color: #15803d; } .soil-msg.err { color: #b91c1c; }
.soil-sum { max-width: 320px; font-size: 12px; color: #475569; }
.soil-map { height: 360px; border-radius: 10px; margin: 6px 0 10px; isolation: isolate; z-index: 0; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.share-box { border: 1px solid #e5e9ef; border-radius: 10px; padding: 12px 14px; }
.share-box h3 { margin: 0 0 4px; font-size: 15px; }
.share-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; }
.share-row label { font-size: 12px; color: #475569; display: flex; flex-direction: column; gap: 3px; } .share-row label.check { flex-direction: row; align-items: center; }
.share-row label.grow { flex: 1 1 220px; }
.share-box .copy-row { display: flex; gap: 6px; } .share-box .copy-row input { flex: 1; font-size: 12.5px; }
@media (max-width: 900px) {
  .ws-bar { padding: 8px 14px; } .ws-bar-r { margin-left: 0; width: 100%; }
  .ws-hero { height: 70vh; }
  .ws-wrap { padding: 12px 10px 0; } .ws-card { padding: 6px 8px 10px; }
  .soil-grid { grid-template-columns: 1fr 1fr; } .soil-grid label.wide { grid-column: span 2; }
  .share-grid { grid-template-columns: 1fr; }
}
.ws-hero .pj-fit { bottom: 96px; }
@media (max-width: 900px) { .ws-hero .leaflet-control-zoom { display: none; } .ws-hero .pj-fit { bottom: 34px; } .ws-hero .pj-full { top: auto; bottom: 84px; } }
/* ---------- Header revisi ringkas (v5.18) ---------- */
.proj-head.compact .ph-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0 8px; }
.ph-back { color: #fff; text-decoration: none; font-size: 15px; } .ph-back b { font-weight: 700; } .ph-back:hover { color: #9fe3dc; text-decoration: none; }
.ph-sep { color: #6f97a4; }
.ph-pick { display: flex; align-items: center; gap: 6px; margin: 0; }
.ph-pick select { width: auto; max-width: min(460px, 70vw); background: #0f3b4c; color: #fff; border: 1px solid #2b5868; font-size: 13.5px; font-weight: 600; padding: 5px 8px; }
.ph-link { color: #f6c026; font-size: 12.5px; }
.ph-r { margin-left: auto; }
.proj-head.compact .tabs { margin-top: 2px; }
@media (max-width: 640px) { .ph-r { margin-left: 0; } .ph-back { font-size: 14px; } }
/* v5.19 — legenda 3D bisa diperkecil, tombol arah aliran */
.t3d-lg-tg { pointer-events: auto; float: right; margin: -3px -5px 0 8px; border: 0; background: rgba(15,59,76,.08); border-radius: 4px; width: 22px; height: 20px; cursor: pointer; font-size: 12px; color: #0f3b4c; }
.t3d-legend.min .t3d-lg-b { display: none; }
.t3d-legend.min { padding: 5px 8px; }
.t3d-flow { gap: 6px; flex-wrap: wrap; margin-top: 4px; }
/* ---------- Impor FS (PDF) dengan AI (v5.23) ---------- */
.ws-pane-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-wrap { padding-top: 16px; padding-bottom: 20px; display: flex; flex-direction: column; gap: 16px; }
.ai-step h2 { margin: 4px 0 6px; font-size: 18px; }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 10px 0 14px; }
.ai-grid fieldset { border: 1px solid #e5e9ef; border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-grid legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.ai-grid label { font-size: 13px; }
.ai-sub { display: flex; flex-direction: column; gap: 6px; padding-left: 22px; transition: opacity .15s; }
.ai-sub label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #475569; }
.ai-range { display: flex; gap: 10px; } .ai-range label { font-size: 12px; color: #475569; display: flex; flex-direction: column; } .ai-range input { width: 110px; }
.ai-rev-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .ai-filter input[type=search] { width: 220px; }
.ai-tbl td { vertical-align: top; } .ai-tbl tr.ai-cat td { background: #0f2f3c; color: #fff; font-weight: 700; font-size: 12px; padding: 5px 8px; }
.ai-tbl tr.chg td:nth-child(4) input { border-color: #f59e0b; background: #fffbeb; }
.ai-val { width: 100%; min-width: 140px; font-size: 13px; } .ai-unit { width: 80px; font-size: 13px; }
.ai-alt { font-size: 10.5px; color: #64748b; margin-top: 2px; }
.ai-q { font-size: 11.5px; color: #475569; max-width: 340px; }
.ai-conf { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 9px; } .ai-conf.hi { background: #dcfce7; color: #166534; } .ai-conf.md { background: #fef9c3; color: #854d0e; } .ai-conf.lo { background: #fee2e2; color: #991b1b; }
.ai-h3 { margin: 18px 0 6px; font-size: 15px; }
#aiSummary { width: 100%; }
.ai-apply { display: flex; gap: 12px; align-items: center; margin-top: 14px; flex-wrap: wrap; position: sticky; bottom: 0; background: #fff; padding: 10px 0; border-top: 1px solid #e5e9ef; }
.ok { color: #15803d; } 
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } }
/* terminal "AI scan" — latar hitam, teks hijau */
.ai-term { margin-top: 14px; background: #030806; border: 1px solid #0f3d22; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 40px rgba(0,255,90,.05); position: relative; }
.ai-term[hidden] { display: none; }
.ai-term::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); }
.ai-term-h { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: #0b1510; border-bottom: 1px solid #0f3d22; font: 600 12px 'IBM Plex Mono', monospace; color: #5cff8a; }
.ai-term-h i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f56; display: inline-block; } .ai-term-h i:nth-child(2) { background: #ffbd2e; } .ai-term-h i:nth-child(3) { background: #27c93f; margin-right: 6px; }
.ai-term-h span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-term-h button { background: transparent; border: 1px solid #ff5c5c; color: #ff7b7b; font: 700 11px 'IBM Plex Mono', monospace; border-radius: 4px; padding: 2px 8px; cursor: pointer; position: relative; z-index: 1; }
.ai-term-b { height: 340px; overflow-y: auto; padding: 8px 12px; font: 12px/1.45 'IBM Plex Mono', ui-monospace, monospace; color: #39ff7a; text-shadow: 0 0 5px rgba(57,255,122,.45); white-space: pre-wrap; word-break: break-word; }
.ai-term-b .l { animation: aiIn .18s ease-out; }
@keyframes aiIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.ai-term-b .dim { color: #1d9e4a; text-shadow: none; } .ai-term-b .ad { color: #13753a; }
.ai-term-b .hd { color: #b6ffcb; font-weight: 700; } .ai-term-b .ok { color: #5cff8a; }
.ai-term-b .hit { color: #d4ffe0; } .ai-term-b .hit b { color: #fff; } .ai-term-b .ai { color: #4fd1ff; text-shadow: 0 0 5px rgba(79,209,255,.4); }
.ai-term-b .warn, .ai-term-b .w { color: #ffd166; text-shadow: none; } .ai-term-b .err { color: #ff5c5c; text-shadow: 0 0 5px rgba(255,92,92,.4); }
.ai-term-s { padding: 7px 12px; border-top: 1px solid #0f3d22; background: #06110b; font: 12px 'IBM Plex Mono', monospace; color: #5cff8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-term-s .bar { color: #39ff7a; } .ai-term-s .bar i { font-style: normal; color: #124d26; } .ai-term-s b { color: #fff; } .ai-term-s .sp { color: #4fd1ff; } .ai-term-s .tm { color: #1d9e4a; }
.ai-term-b::-webkit-scrollbar { width: 8px; } .ai-term-b::-webkit-scrollbar-thumb { background: #124d26; border-radius: 4px; }
@media (max-width: 640px) { .ai-term-b { height: 300px; font-size: 10.5px; } .ai-term-s { font-size: 10.5px; } }
.ai-term-b .sep { height: 0; border-top: 1px dashed #145c2e; margin: 6px 0; }
.ai-term-h button[hidden] { display: none; }

/* ---------- Tanya AI (v5.27) ---------- */
.ask-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; margin: 16px 0 28px; }
.ask-chat { display: flex; flex-direction: column; padding: 16px 18px; }
.ask-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.ask-head h2 { margin: 0 0 4px; font-size: 20px; } .ask-head p { margin: 0; }
.ask-rev { font-size: 12px; background: #0d2b36; color: #fff; border-radius: 6px; padding: 2px 8px; vertical-align: middle; margin-left: 4px; }
.ask-log { flex: 1; overflow-y: auto; padding: 14px 2px; min-height: 300px; max-height: max(300px, calc(100vh - 450px)); }
.ask-empty { text-align: center; color: #475569; padding: 26px 8px; } .ask-empty[hidden] { display: none; }
.ask-bot { font-size: 40px; } .ask-empty p { margin: 6px 0 14px; }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 860px; margin: 0 auto; }
.ask-chip { border: 1px solid #99d5cf; background: #f0fbfa; color: #0f5f58; border-radius: 18px; padding: 7px 13px; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.ask-chip:hover { background: #d7f3f0; border-color: #1fb5a8; }
.ask-msg { display: flex; gap: 10px; margin: 0 0 14px; align-items: flex-start; }
.ask-msg.me { justify-content: flex-end; }
.ask-msg.me .ask-b { background: #0d2b36; color: #fff; border-radius: 14px 14px 2px 14px; max-width: 78%; }
.ask-av { flex: 0 0 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #1fb5a8, #0ea5e9); display: grid; place-items: center; font-size: 17px; }
.ask-msg.ai .ask-b { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 2px 14px 14px 14px; max-width: calc(100% - 44px); color: #1e293b; }
.ask-msg.err .ask-b { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.ask-b { padding: 10px 14px; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.ask-b p { margin: 0 0 8px; } .ask-b p:last-child { margin-bottom: 0; }
.ask-b h3, .ask-b h4, .ask-b h5, .ask-b h6 { margin: 12px 0 6px; font-size: 15px; color: #0d2b36; }
.ask-b ul, .ask-b ol { margin: 4px 0 8px; padding-left: 22px; } .ask-b li { margin: 2px 0; } .ask-b li.sub { margin-left: 18px; list-style: circle; }
.ask-b code { background: #e2e8f0; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.ask-b pre { background: #0f172a; color: #e2e8f0; padding: 10px; border-radius: 8px; overflow-x: auto; font-size: 12.5px; }
.ask-b blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid #1fb5a8; color: #475569; }
.ask-b hr { border: 0; border-top: 1px solid #e2e8f0; margin: 10px 0; }
.ask-b .tbl-wrap { margin: 6px 0 10px; overflow-x: auto; } .ask-tbl { font-size: 13px; } .ask-tbl th, .ask-tbl td { padding: 6px 9px; }
.ask-src { display: inline-block; font-size: 11.5px; background: #e6f6f4; color: #0f5f58; border: 1px solid #b6e3de; border-radius: 10px; padding: 0 7px; text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: baseline; }
.ask-src.doc { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; } .ask-src:hover { filter: brightness(.95); }
.ask-meta { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #e2e8f0; font-size: 11.5px; color: #64748b; }
.ask-meta a { color: #3730a3; } .ask-copy { border: 0; background: none; color: #0f766e; cursor: pointer; font: inherit; padding: 0; }
.ask-msg.wait .ask-b { color: #475569; font-size: 13.5px; }
.ask-dots { display: inline-flex; gap: 3px; vertical-align: middle; } .ask-dots i { width: 6px; height: 6px; border-radius: 50%; background: #1fb5a8; animation: askDot 1s infinite ease-in-out; }
.ask-dots i:nth-child(2) { animation-delay: .15s; } .ask-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes askDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ask-form { display: flex; gap: 8px; align-items: flex-end; border: 1px solid #cbd5e1; border-radius: 12px; padding: 6px 6px 6px 12px; background: #fff; }
.ask-form:focus-within { border-color: #1fb5a8; box-shadow: 0 0 0 3px rgba(31,181,168,.15); }
.ask-form textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; font-size: 15px; padding: 7px 0; min-height: 22px; max-height: 180px; background: transparent; }
.ask-form .pj-new { white-space: nowrap; }
.ask-foot { margin: 6px 2px 0; }
.ask-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 12px; }
.ask-side .ws-card { padding: 14px 16px; } .ask-side h3 { margin: 0 0 8px; font-size: 15px; }
.ask-scopes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 13.5px; }
.ask-docs { display: flex; flex-direction: column; gap: 8px; }
.ask-doc { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.ask-doc .t { line-height: 1.35; } .ask-doc .s { margin-top: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .ask-doc .ok { color: #15803d; }
.ask-doc button { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.ask-doc button:hover { border-color: #1fb5a8; } .ask-doc button:disabled { opacity: .5; cursor: default; }
.ask-pb { margin-top: 6px; position: relative; height: 18px; background: #e2e8f0; border-radius: 9px; overflow: hidden; } .ask-pb[hidden] { display: none; }
.ask-pb i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #1fb5a8, #0ea5e9); transition: width .2s; }
.ask-pb span { position: relative; font-size: 11px; padding: 0 8px; line-height: 18px; color: #0f172a; white-space: nowrap; }
.ask-pb.err { background: #fee2e2; } .ask-pb.err i { display: none; }
.ask-ixall { margin-top: 2px; }
@media (max-width: 980px) {
  .ask-wrap { grid-template-columns: 1fr; }
  .ask-side { position: static; }
  .ask-chat { min-height: 0; padding: 12px; }
  .ask-log { max-height: 62vh; min-height: 280px; }
  .ask-msg.me .ask-b { max-width: 90%; }
  .ask-head { flex-direction: column; }
}

.ask-wrap.one { grid-template-columns: 1fr; }
.ask-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ask-pop { position: relative; }
.ask-tb { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; color: #1e293b; }
.ask-tb:hover, .ask-tb[aria-expanded="true"] { border-color: #1fb5a8; background: #f0fbfa; }
.ask-tb b { color: #0f766e; } .ask-tb.warn b { color: #b45309; }
.ask-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 320px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.18); padding: 12px 14px; }
.ask-panel.wide { width: 380px; } .ask-panel[hidden] { display: none; } .ask-panel p { margin: 6px 0 8px; }
.ask-log { max-height: max(300px, calc(100vh - 400px)); }
@media (max-width: 980px) { .ask-tools { justify-content: flex-start; } .ask-panel, .ask-panel.wide { width: min(92vw, 380px); left: 0; right: auto; } .ask-pop:last-of-type .ask-panel { left: auto; right: 0; } }
/* Tanya AI — topik percakapan (v5.29) */
.ask-wrap.two { grid-template-columns: 270px minmax(0, 1fr); }
.ask-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; position: sticky; top: 12px; max-height: calc(100vh - 40px); }
.ask-new { width: 100%; justify-content: center; }
.ask-lf { display: flex; flex-direction: column; gap: 4px; } .ask-lf input[type=search] { width: 100%; padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 13px; }
.ask-convs { overflow-y: auto; flex: 1; min-height: 80px; margin: 0 -4px; padding: 0 4px; }
.ask-gh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin: 10px 4px 4px; }
.ask-cv { display: flex; gap: 7px; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: #1e293b; align-items: flex-start; }
.ask-cv:hover { background: #f1f5f9; } .ask-cv.on { background: #e6f6f4; box-shadow: inset 3px 0 0 #1fb5a8; }
.ask-cv .v { font-size: 12px; line-height: 20px; } .ask-cv .t { font-size: 13px; line-height: 1.35; min-width: 0; overflow-wrap: anywhere; }
.ask-cv small { display: block; color: #64748b; font-size: 11px; margin-top: 1px; }
.ask-legend { margin: 4px 0 0; font-size: 11px; border-top: 1px solid #e2e8f0; padding-top: 6px; }
.ask-ttl { display: flex; gap: 10px; align-items: flex-start; min-width: 0; } .ask-ttl h2 { overflow-wrap: anywhere; }
.ask-menu { display: none; }
.ask-sub { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 2px; }
.ask-vis { padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; font-size: 13px; background: #fff; }
.ask-lk { border: 0; background: none; color: #0f766e; font: inherit; font-size: 13px; cursor: pointer; padding: 2px 4px; } .ask-lk:hover { text-decoration: underline; } .ask-lk.del { color: #b91c1c; }
.ask-shared { font-size: 13px; color: #334155; background: #eef2ff; border-radius: 8px; padding: 3px 9px; }
.ask-ro { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: #334155; } .ask-ro[hidden] { display: none; }
.ask-form[hidden] { display: none; }
.ask-math { overflow-x: auto; margin: 6px 0; } .ask-b .katex { font-size: 1.05em; } .ask-tex { white-space: pre-wrap; }
@media (max-width: 980px) {
  .ask-wrap.two { grid-template-columns: 1fr; }
  .ask-menu { display: inline-block; }
  .ask-list { display: none; position: fixed; z-index: 80; left: 8px; right: 8px; top: 70px; max-height: 75vh; box-shadow: 0 20px 50px rgba(15,23,42,.3); }
  .ask-list.open { display: flex; }
}
.ask-sub .ask-vis { width: auto; max-width: 100%; flex: 0 0 auto; }
.ask-cv, .ask-cv:hover, .ask-cv:focus { text-decoration: none; }
/* ---------- Soil Investigation dari report (v5.31) ---------- */
.si-force { width: 100%; }
.si-reps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 13px; }
.si-rep { display: inline-flex; align-items: center; gap: 4px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; }
.si-rx { border: 0; background: none; color: #b91c1c; cursor: pointer; font-size: 12px; padding: 0 2px; }
.si-meta { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px 12px; margin: 8px 0 12px; }
.si-meta label { display: flex; flex-direction: column; font-size: 12.5px; color: #475569; gap: 3px; } .si-meta .wide { grid-column: 1 / -1; }
.si-meta input, .si-meta textarea { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; font-size: 13.5px; }
.si-tbl td { vertical-align: top; } .si-in { padding: 3px 5px; border: 1px solid #e2e8f0; border-radius: 5px; font: inherit; font-size: 12.5px; background: #fff; }
.si-in:focus { border-color: #1fb5a8; outline: 0; }
.si-st { font-size: 11.5px; padding: 1px 7px; border-radius: 9px; } .si-st.nw { background: #dcfce7; color: #166534; } .si-st.up { background: #e0f2fe; color: #075985; }
.si-detrow td { background: #f8fafc; }
.si-det-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; padding: 6px 0; }
.si-mini { border-collapse: collapse; font-size: 12px; margin: 4px 0 10px; width: 100%; } .si-mini th, .si-mini td { border-bottom: 1px solid #e2e8f0; padding: 3px 6px; text-align: left; vertical-align: top; } .si-mini th { color: #64748b; font-weight: 600; background: #f8fafc; }
.si-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin: 6px 0 8px; }
.si-bar .si-reps { margin: 0; flex: 1; }
.si-elev { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; } .seg button { border: 0; background: #fff; padding: 5px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: #334155; }
.seg button + button { border-left: 1px solid #cbd5e1; } .seg button.on { background: #0d2b36; color: #fff; }
.pj-dup.sm { padding: 5px 10px; font-size: 12.5px; }
.si-dz { font-size: 10.5px; background: #fef3c7; color: #92400e; border-radius: 6px; padding: 0 4px; }
.si-b { display: inline-block; font-size: 10.5px; border-radius: 6px; padding: 0 5px; margin: 1px 0; } .si-b.l { background: #fef3c7; color: #92400e; } .si-b.s { background: #ffe4e6; color: #9f1239; } .si-b.c { background: #dbeafe; color: #1e40af; } .si-b.b { background: #ede9fe; color: #5b21b6; }
#soilTbl tr.on td { background: #e6f6f4; }
.si-detail { border: 1px solid #e2e8f0; border-radius: 12px; margin: 12px 0; padding: 12px 14px; background: #fff; }
.si-detail[hidden], .si-curves[hidden] { display: none; }
.si-d-h { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; position: relative; padding-right: 30px; } .si-d-h h3 { margin: 0; font-size: 17px; } .si-close { position: absolute; right: 0; top: 0; }
.si-d-g { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin-top: 8px; }
.si-d-t { flex: 1 1 380px; min-width: 0; font-size: 13px; }
.si-cv { flex: 0 1 auto; max-width: 100%; }
.si-svg { width: 100%; height: auto; max-width: 100%; display: block; font-family: inherit; }
.si-svg .g { stroke: #e2e8f0; stroke-width: 1; } .si-svg .fr { fill: none; stroke: #94a3b8; } .si-svg .ax { font-size: 10px; fill: #64748b; stroke: #94a3b8; stroke-width: 0; } .si-svg line.ax { stroke-width: 1; }
.si-svg .al { font-size: 11px; fill: #334155; } .si-svg .t { font-size: 12.5px; font-weight: 700; fill: #0d2b36; } .si-svg .lb { font-size: 10px; fill: #1e293b; }
.si-log { max-width: 250px; }
.si-sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; border: 1px solid #64748b; }
.si-curves { margin: 14px 0; } .si-curves-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .si-curves-h h3 { margin: 0; font-size: 16px; }
.si-cv-g { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; } .si-cv-g .si-cv { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px; }
.si-lg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; padding: 4px 8px; } .si-lg i { display: inline-block; width: 14px; height: 3px; margin-right: 4px; vertical-align: middle; }
@media (max-width: 900px) { .si-cv-g { grid-template-columns: 1fr; } .si-meta { grid-template-columns: 1fr; } .si-d-g .si-cv { flex: 1 1 45%; min-width: 150px; } .si-log { max-width: none; } .si-d-t { flex-basis: 100%; } }
.si-miss { color: #92400e; background: #fffbeb; border-radius: 6px; padding: 4px 8px; margin: 4px 0 0; }
.si-svg .nv { font-size: 10px; font-weight: 700; fill: #9f1239; }
.si-vbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 6px; }
.si-sheets { display: flex; flex-direction: column; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.si-sheet { background: #fff; box-shadow: 0 1px 6px rgba(15,23,42,.15); border-radius: 4px; max-width: 1180px; }
.si-sheet svg { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .si-sheet { min-width: 860px; } }
/* Soil Investigation — daftar titik di kiri, log & kurva di kanan (v5.34) */
.si-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 6px; }
.si-side { border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; position: sticky; top: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 30px); }
.si-side-h { padding: 10px 10px 8px; border-bottom: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.si-side-h input { padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-size: 13px; }
.si-side-l { overflow-y: auto; flex: 1; }
.si-list { width: 100%; } .si-list td { padding: 8px 10px; vertical-align: top; border-bottom: 1px solid #f1f5f9; cursor: pointer; } .si-list tr:hover td { background: #f8fafc; }
.si-list tr.on td { background: #e6f6f4; } .si-list tr.on td:first-child { box-shadow: inset 3px 0 0 #1fb5a8; }
.si-list .small { line-height: 1.35; margin-top: 1px; } .si-list .si-act { width: 1%; } .si-list .si-act .ws-ib { display: block; margin: 0 0 4px; }
.si-main { min-width: 0; }
.si-main .si-detail { margin-top: 0; }
.si-pick { padding: 30px 10px; text-align: center; }
@media (max-width: 980px) { .si-split { grid-template-columns: 1fr; } .si-side { position: static; max-height: 46vh; } }
.si-pager { display: flex; gap: 4px; align-items: center; font-size: 13px; margin: 0 0 8px; flex-wrap: wrap; }
.si-pager button { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; } .si-pager button.on { background: #0d2b36; color: #fff; border-color: #0d2b36; }
.si-sheet[hidden] { display: none; }
/* edit data log (v5.35) */
.si-ed { margin-top: 6px; }
.si-ed-s { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; background: #fff; }
.si-ed-s > summary { cursor: pointer; font-size: 14px; padding: 2px 0; }
.si-ed-s[open] > summary { margin-bottom: 6px; }
.si-ed-t { border-collapse: collapse; font-size: 12.5px; margin-bottom: 6px; }
.si-ed-t th { text-align: left; color: #64748b; font-weight: 600; padding: 3px 4px; background: #f8fafc; white-space: nowrap; }
.si-ed-t td { padding: 2px 3px; }
.si-ed-t input { padding: 4px 6px; border: 1px solid #e2e8f0; border-radius: 5px; font: inherit; font-size: 12.5px; max-width: 100%; }
.si-ed-t input:focus { border-color: #1fb5a8; outline: 0; background: #f0fbfa; }
.si-ed-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 10px; }
.si-ed-meta label { display: flex; flex-direction: column; font-size: 12px; color: #475569; gap: 2px; } .si-ed-meta input { padding: 5px 7px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; font-size: 13px; }
.si-ed-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e2e8f0; padding: 10px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; z-index: 2; }
/* peta referensi online (v5.36) */
.ws-inl { display: inline; margin: 0; }
.rf-h { margin: 22px 0 6px; font-size: 16px; }
#rfTbl input[type=range] { width: 120px; }
#rfTbl .xs { font-size: 11px; }
.rf-check { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rf-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.rf-chip { display: inline-flex; align-items: center; gap: 4px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; }
.rf-sw { display: inline-block; width: 12px; height: 10px; border: 1px solid #94a3b8; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.rf-pop { font-size: 12.5px; max-width: 300px; } .rf-p { margin-bottom: 8px; } .rf-p .ws-pop { margin-top: 4px; }
.rf-lg-t { font-weight: 700; margin-top: 6px; }
.ws-legend img { margin-right: 6px; vertical-align: -1px; border: 1px solid #cbd5e1; }
#rfOut tr[data-ll] { cursor: pointer; }
.rf-st { color: #0f766e; } td.ok { color: #15803d; } td.err { color: #b91c1c; }

/* ---------- v5.38 Penampang geologi (cross section) & model 3D Soil Investigation ---------- */
.xs-card { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 12px 14px; margin: 10px 0 14px; }
.xs-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.xs-head h3 { margin: 0; font-size: 16px; }
.xs-saved { display: flex; gap: 6px; align-items: center; } .xs-saved select { padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-size: 13px; max-width: 280px; }
.xs-pick { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 8px; }
.xs-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 30px; }
.xs-chip { display: inline-flex; align-items: center; gap: 2px; background: #0d2b36; color: #fff; border-radius: 15px; padding: 3px 6px 3px 10px; font-size: 12.5px; }
.xs-chip button { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 9px; cursor: pointer; font-size: 11px; line-height: 1; padding: 3px 5px; margin-left: 2px; }
.xs-chip button:hover { background: rgba(255,255,255,.3); }
.xs-arr { color: #94a3b8; font-style: normal; font-size: 12px; }
.xs-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.xs-add input { padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-size: 13px; width: 230px; max-width: 100%; }
#xsMapPick.on { background: #f97316; color: #fff; border-color: #f97316; }
.xs-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; padding: 8px 0; border-top: 1px solid #edf1f5; }
.xs-bar select { padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; font-size: 12.5px; }
.xs-dl { margin-left: auto; display: flex; gap: 6px; }
.xs-out { min-height: 60px; }
.xs-fig { overflow-x: auto; margin: 6px 0 10px; border: 1px solid #e2e8f0; border-radius: 8px; }
.xs-svg { display: block; width: 100%; min-width: 760px; height: auto; }
.xs-empty { padding: 26px 10px; text-align: center; color: #64748b; font-size: 13.5px; }
.xs-note { margin: 4px 0 0; }
.xs-3dbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; margin: 4px 0 8px; }
.xs-3d { position: relative; border-radius: 10px; overflow: hidden; background: #eef3f7; min-height: 380px; touch-action: none; }
.xs-3d canvas { display: block; }
.xs-3dmsg { padding: 60px 10px; text-align: center; color: #64748b; font-size: 13px; } .xs-3dmsg.err { color: #b91c1c; }
.xs-3dleg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; padding: 6px 2px; } .xs-3dleg i { display: inline-block; width: 13px; height: 10px; border: 1px solid #64748b; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.leaflet-div-icon.xs-end, .xs-end { background: #f97316; color: #fff; border: 2px solid #fff; border-radius: 9px; font: 700 11px/14px var(--sans, Arial); text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
@media (max-width: 700px) { .xs-dl { margin-left: 0; } .xs-add input { width: 100%; } }

/* v5.38b — penampang dalam satu baris + modal, panel potong 3D */
.xs-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 6px 0 8px; }
.xs-row.n1 { grid-template-columns: minmax(0, 1fr); }
.xs-row .xs-fig { margin: 0; height: 430px; display: flex; flex-direction: column; overflow: hidden; cursor: zoom-in; background: #fff; transition: box-shadow .15s, border-color .15s; }
.xs-row.n1 .xs-fig { height: 520px; }
.xs-row .xs-fig:hover, .xs-row .xs-fig:focus { border-color: #1fb5a8; box-shadow: 0 4px 16px rgba(13,43,54,.14); outline: 0; }
.xs-row .xs-svg { flex: 1; min-height: 0; min-width: 0; width: 100%; height: 100%; }
.xs-fig figcaption { font-size: 11.5px; color: #64748b; padding: 5px 10px; border-top: 1px solid #edf1f5; background: #f8fafc; }
@media (max-width: 900px) { .xs-row { grid-template-columns: minmax(0, 1fr); } .xs-row .xs-fig { height: 340px; } }
.xs-modal { position: fixed; inset: 0; z-index: 3000; background: rgba(8,24,31,.72); display: flex; align-items: center; justify-content: center; padding: 2vh 2vw; }
.xs-modal[hidden] { display: none; }
.xs-mbox { background: #fff; border-radius: 12px; width: 100%; height: 100%; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.xs-mhead { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #e2e8f0; } .xs-mhead b { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-mtools { display: flex; gap: 5px; align-items: center; font-size: 12.5px; }
.xs-mtools button { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 4px 9px; cursor: pointer; font: inherit; }
.xs-mtools button:hover { background: #f1f5f9; } .xs-mtools .xs-mx { border-color: transparent; font-size: 15px; }
.xs-mbody { flex: 1; overflow: auto; padding: 10px; background: #f1f5f9; }
.xs-mbody svg { display: block; margin: 0 auto; height: auto; background: #fff; box-shadow: 0 1px 6px rgba(15,23,42,.15); }
body.xs-noscroll { overflow: hidden; }
.xs-3dwrap { background: #fff; }
.xs-3dwrap:fullscreen { padding: 10px 14px; overflow: auto; }
.xs-cut { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 9px; padding: 7px 10px; margin: 4px 0 6px; }
.xs-cutg { display: inline-flex; align-items: center; gap: 6px; }
.xs-cut select { padding: 3px 5px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; font-size: 12px; background: #fff; }
.xs-cut input[type=range] { width: 110px; accent-color: #f97316; }

/* v5.38c — tab Topologi: sidebar kontrol + tampilan */
.xs-card { padding: 0; border: 0; background: none; margin: 6px 0 0; }
.xs-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; background: #fff; }
.xs-layout:fullscreen { padding: 12px; overflow: auto; grid-template-columns: 300px minmax(0, 1fr); }
.xs-side { border: 1px solid #e2e8f0; border-radius: 12px; background: #fbfcfd; position: sticky; top: 10px; max-height: calc(100vh - 24px); overflow-y: auto; }
.xs-layout:fullscreen .xs-side { max-height: calc(100vh - 24px); }
.xs-sec { padding: 11px 12px; border-bottom: 1px solid #e8edf2; display: flex; flex-direction: column; gap: 7px; }
.xs-sec:last-child { border-bottom: 0; } .xs-sec[hidden] { display: none; }
.xs-sec h4 { margin: 2px 0 0; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.xs-sec select, .xs-sec input:not([type]), .xs-sec input[list] { width: 100%; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-size: 13px; background: #fff; }
.xs-btns { display: flex; flex-wrap: wrap; gap: 6px; } .xs-del { color: #b91c1c; }
.xs-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; } .xs-f > span:first-child { color: #334155; font-weight: 600; }
.xs-f input[type=range] { width: 100%; accent-color: #f97316; }
.xs-checks { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.xs-views { display: grid; grid-template-columns: 1fr 1fr; } .xs-views button { font-size: 12.5px; }
.xs-side .xs-chips { flex-direction: column; align-items: stretch; gap: 4px; min-height: 0; }
.xs-side .xs-chip { display: grid; grid-template-columns: 26px 1fr auto auto auto; align-items: center; gap: 4px; background: #fff; color: #0d2b36; border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 4px 4px 6px; }
.xs-side .xs-chip i { font-style: normal; font-weight: 700; font-size: 11px; color: #f97316; text-align: center; }
.xs-side .xs-chip b { font-size: 13px; line-height: 1.15; } .xs-side .xs-chip em { grid-column: 2; grid-row: 2; font-style: normal; font-size: 10.5px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-side .xs-chip b { grid-column: 2; }
.xs-side .xs-chip button { grid-row: 1 / span 2; background: #f1f5f9; color: #334155; border-radius: 6px; padding: 4px 6px; font-size: 10px; }
.xs-side .xs-chip button:disabled { opacity: .3; cursor: default; } .xs-side .xs-chip button[data-rm] { color: #b91c1c; }
.xs-main { min-width: 0; }
.xs-3dtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
@media (max-width: 980px) { .xs-layout { grid-template-columns: minmax(0, 1fr); } .xs-side { position: static; max-height: none; } }

.xs-side .xs-chip { display: flex; align-items: center; gap: 5px; }
.xs-side .xs-chip i { flex: 0 0 22px; }
.xs-side .xs-cn { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xs-side .xs-cn b { font-size: 13px; } .xs-side .xs-cn em { font-style: normal; font-size: 10.5px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-side .xs-chip button { flex: 0 0 auto; }

.xs-side .xs-chip { width: 100%; box-sizing: border-box; overflow: hidden; }
.xs-side .xs-cn { overflow: hidden; }
.xs-btns [hidden] { display: none !important; }

/* v5.39 — koordinat UTM di form titik soil */
.soil-coord { display: flex; flex-direction: column; gap: 6px; }
.soil-coord-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; }
.soil-coord-h .seg button { font-size: 12.5px; }
.soil-coord-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 12px; }
.soil-coord-g[hidden] { display: none; }
#soilCrsOut.err { color: #b91c1c; }
.soil-grid .soil-coord.wide { grid-column: 1 / -1; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; }

/* v5.40 — legenda sumber Soil Investigation & balon titik yang bisa digeser */
.ws-legend { max-width: 320px; }
.ws-lg-src { margin: 3px 0 2px 4px; padding-left: 10px; border-left: 2px solid #bbf7d0; display: flex; flex-direction: column; gap: 2px; }
.ws-legend .ws-lg-src { white-space: normal; overflow: visible; }
.ws-lg-src label { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 11.5px; line-height: 1.3; }
.ws-lg-src input { margin: 0; accent-color: #16a34a; }
.ws-lg-src .ws-lg-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-lg-src em { font-style: normal; color: #64748b; font-size: 10.5px; background: #f1f5f9; border-radius: 8px; padding: 0 5px; }
.soil-pop-drag { cursor: move; user-select: none; font-size: 11px; color: #94a3b8; margin: -4px 0 3px; letter-spacing: .03em; display: inline-block; padding: 1px 6px; border-radius: 6px; background: #f1f5f9; }
.soil-pop-drag:hover { color: #0d2b36; background: #e2e8f0; }
.soil-popup.soil-pop-off .leaflet-popup-tip-container { display: none; }
.soil-popup .leaflet-popup-content-wrapper { box-shadow: 0 4px 18px rgba(13,43,54,.28); }
.xs-views { grid-template-columns: repeat(3, 1fr); } .xs-views button[data-v="both"] { grid-column: span 2; }
/* v5.41 — ringkasan penampang tersimpan */
.xs-sum { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; }
.xs-sum[hidden] { display: none; }
.xs-sum-r { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 5px; font-size: 13px; color: #0d2b36; }
.xs-sum-r i { font-style: normal; color: #f97316; font-size: 11px; }
.xs-done { background: #0d2b36 !important; color: #fff !important; border-color: #0d2b36 !important; }
/* v5.42 — tabel report sumber */
.si-bar .si-reps { flex: 1 1 100%; order: 2; }
.si-rtbl { width: 100%; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; overflow: hidden; }
.si-rtbl-h { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; font-size: 13.5px; background: #f8fafc; }
.si-rtbl .ws-tbl { margin: 0; } .si-rtbl .ws-tbl td, .si-rtbl .ws-tbl th { font-size: 13px; }
.si-rtbl tfoot td { background: #f8fafc; border-top: 1px solid #e2e8f0; }
.si-rin { padding: 4px 7px; border: 1px solid #1fb5a8; border-radius: 6px; font: inherit; font-size: 13px; width: min(320px, 60vw); }
.si-bar .si-elev { margin-left: auto; }
/* v5.43 — analisis stabilitas lereng */
.xs-sl { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 12px 14px; margin: 12px 0 6px; }
.xs-sl.busy { opacity: .55; pointer-events: none; }
.xs-sl-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .xs-sl-h h3 { margin: 0; font-size: 16px; }
.xs-sl-in { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin: 10px 0; font-size: 12.5px; }
.xs-sl-in label { display: flex; flex-direction: column; gap: 3px; color: #475569; }
.xs-sl-in input, .xs-sl-in select { padding: 5px 7px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; font-size: 13px; } .xs-sl-in input { width: 90px; }
.xs-sl-kh { padding: 6px 10px; background: #f1f5f9; border-radius: 6px; }
.xs-sl-res { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 10px; }
.xs-sl-t { border: 1px solid #e2e8f0; border-left: 5px solid #94a3b8; border-radius: 9px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; }
.xs-sl-t span { font-size: 12px; color: #64748b; } .xs-sl-t b { font-size: 22px; color: #0d2b36; } .xs-sl-t em { font-style: normal; font-weight: 600; font-size: 12.5px; } .xs-sl-t small { color: #94a3b8; font-size: 11px; }
.xs-sl-t.ok { border-left-color: #16a34a; } .xs-sl-t.ok em { color: #15803d; } .xs-sl-t.ng { border-left-color: #dc2626; } .xs-sl-t.ng em, .xs-sl-t em.bad { color: #b91c1c; }
.xs-sl-fig { height: auto !important; } .xs-sl-fig .xs-svg { min-width: 0; }
.xs-sl-par { margin: 10px 0 4px; font-size: 13px; } .xs-sl-par summary { cursor: pointer; font-weight: 600; margin-bottom: 6px; }
.xs-sl-par input { width: 72px; padding: 3px 5px; border: 1px solid #cbd5e1; border-radius: 5px; font: inherit; font-size: 12.5px; text-align: right; }
.xs-sl-ed { color: #b45309; }
.xs-slbody { background: #fff !important; padding: 14px 18px !important; font-size: 13px; }
.xs-sld h3 { font-size: 14.5px; margin: 16px 0 6px; } .xs-sld table { border-collapse: collapse; width: 100%; font-size: 12px; margin-bottom: 6px; }
.xs-sld th, .xs-sld td { border: 1px solid #e2e8f0; padding: 3px 6px; text-align: right; } .xs-sld th { background: #f8fafc; } .xs-sld .kv td, .xs-sld td:first-child { text-align: left; }
.xs-sld .kv td:first-child { width: 190px; color: #64748b; } .xs-sld .tw { overflow-x: auto; } .xs-sld .fx { background: #f8fafc; border-left: 3px solid #0d2b36; padding: 6px 10px; }
.xs-sld .ok { color: #15803d; } .xs-sld .ng { color: #b91c1c; }
@media (max-width: 700px) { .xs-sl-res { grid-template-columns: 1fr; } }
.xs-sld table.par td:last-child, .xs-sld table.par th:last-child, .xs-sld table.par th:first-child { text-align: left; }
.xs-sl-in label > span { white-space: nowrap; }
/* v5.44 — parameter gempa otomatis */
.xs-auto { font-style: normal; font-size: 10px; color: #0f766e; background: #ccfbf1; border-radius: 6px; padding: 0 5px; margin-left: 3px; }
.xs-sz-r { border: 0; background: #fef3c7; color: #92400e; border-radius: 6px; font-size: 10.5px; padding: 0 6px; cursor: pointer; margin-left: 3px; }
.xs-sl-in input.man { border-color: #f59e0b; background: #fffbeb; }
.xs-sl-src { margin: -2px 0 8px; line-height: 1.5; }
/* Map Layer per revisi */
.ws-mrev { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.ws-mrev-b { border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: #0d2b36; }
.ws-mrev-b span { color: #64748b; font-size: 11.5px; }
.ws-mrev-b.on { background: #0d2b36; border-color: #0d2b36; color: #fff; }
.ws-mrev-b.on span { color: #cbd5e1; }
.ws-mrev-b.cmp { border-style: dashed; }
.ws-mrev-b.cmp.on { background: #0f766e; border-color: #0f766e; border-style: solid; }
.ws-rgrp td { background: #f8fafc; font-size: 12.5px; padding: 6px 8px; border-bottom: 1px solid #e2e8f0; }
.ws-rgrp a { margin-left: 8px; }
.ws-rtag, .ws-lg-rev { display: inline-block; font-size: 10.5px; font-weight: 600; color: #475569; background: #e2e8f0; border-radius: 4px; padding: 0 5px; margin: 0 3px; vertical-align: 1px; }
/* Tab Komparasi */
.cmp-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.cmp-revs, .cmp-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cmp-rv { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #cbd5e1; border-radius: 999px; padding: 4px 11px 4px 8px; font-size: 12.5px; cursor: pointer; background: #fff; opacity: .55; }
.cmp-rv.on { opacity: 1; border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.cmp-rv input { display: none; }
.cmp-rv i, .cmp-tbl th i, .cmp-chs i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.cmp-rv em { font-style: normal; font-size: 10.5px; background: #fef3c7; color: #92400e; border-radius: 4px; padding: 0 4px; }
.cmp-ctl select, .cmp-ctl input[type=search] { border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12.5px; }
.cmp-ctl input[type=search] { width: 250px; max-width: 100%; }
.cmp-chk { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cmp-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #e2e8f0; margin-bottom: 8px; }
.cmp-tabs button { border: 0; background: none; padding: 7px 10px; font: inherit; font-size: 13px; color: #334155; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cmp-tabs button span { font-size: 11px; color: #64748b; background: #f1f5f9; border-radius: 8px; padding: 0 6px; }
.cmp-tabs button.on { color: #0d2b36; font-weight: 700; border-bottom-color: #0d2b36; }
.cmp-lg { margin: 6px 0 10px; }
.cmp-sw { display: inline-block; width: 12px; height: 10px; vertical-align: -1px; border-radius: 2px; }
.cmp-sw.dif, .cmp-v.dif { background: #fff7e6; }
.cmp-up { color: #15803d; } .cmp-dn { color: #b91c1c; }
.cmp-th { margin: 16px 0 6px; font-size: 14px; color: #0d2b36; border-bottom: 2px solid #0d2b36; padding-bottom: 3px; }
.cmp-g { border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; background: #fff; }
.cmp-g > summary { cursor: pointer; padding: 9px 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 13.5px; list-style: none; }
.cmp-g > summary::-webkit-details-marker { display: none; }
.cmp-g > summary::before { content: '▸'; color: #64748b; margin-right: -4px; }
.cmp-g[open] > summary::before { content: '▾'; }
.cmp-g > summary b { flex: 1; }
.cmp-cnt { font-size: 11.5px; color: #64748b; background: #f1f5f9; border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.cmp-cnt.d { background: #fef3c7; color: #92400e; }
.cmp-body { padding: 0 12px 12px; }
.cmp-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cmp-tbl th { text-align: left; font-size: 11px; color: #475569; background: #f8fafc; padding: 6px 8px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; position: sticky; top: 0; }
.cmp-tbl th.r { text-align: right; }
.cmp-tbl th em { font-style: normal; font-size: 10px; color: #0f766e; }
.cmp-tbl td { padding: 5px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.cmp-tbl tr.d td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.cmp-v { text-align: right; }
.cmp-v:not(.num) { text-align: left; max-width: 260px; }
.cmp-v.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cmp-v.na { color: #94a3b8; text-align: center; }
.cmp-v.base { background: #f0fdfa; }
.cmp-v small { display: block; font-size: 10.5px; }
.cmp-sym { font-size: 10.5px; color: #64748b; font-style: italic; }
.cmp-in { font-size: 10px; color: #1d4ed8; background: #eff6ff; border-radius: 4px; padding: 0 4px; }
.cmp-charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.cmp-ch { margin: 0; border: 1px solid #eef2f6; border-radius: 6px; padding: 8px; }
.cmp-ch figcaption { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.cmp-svg { width: 100%; height: auto; display: block; }
.cmp-chs { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #475569; margin-top: 4px; }
.cmp-chs span { display: inline-flex; gap: 5px; align-items: center; }
@media (max-width: 700px) { .cmp-ctl input[type=search] { width: 100%; } .cmp-tbl { font-size: 11.5px; } .cmp-tabs { flex-wrap: nowrap; overflow-x: auto; } .cmp-tabs button { white-space: nowrap; } .cmp-tbl td:first-child, .cmp-tbl th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 120px; } .cmp-tbl th:first-child { background: #f8fafc; z-index: 2; } .cmp-charts { grid-template-columns: 1fr; } }
/* Edit data: litologi + N-SPT + parameter teknis */
.si-ls tr.si-grp th { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: #0d2b36; background: #e2e8f0; border-left: 2px solid #fff; }
.si-ls input.si-el { background: #f0f9ff; }
.si-ls input.si-el.off { background: #f1f5f9; color: #94a3b8; pointer-events: none; }
.si-ls input.si-n { background: #fff1f2; }
.si-ls input.si-par { background: #f8fafc; text-align: right; }
.si-ls input.si-par::placeholder { color: #64748b; opacity: 1; }
.si-ls input.si-par.man { background: #fefce8; border-color: #eab308; font-weight: 700; color: #0d2b36; }
.si-ls input[data-k=material].new { border-color: #f59e0b; box-shadow: inset 3px 0 0 #f59e0b; }
.si-basis { min-width: 150px; max-width: 320px; font-size: 11.5px; color: #475569; }
.si-kind { white-space: nowrap; }
.si-binfo { border: 0; background: none; color: #0f766e; cursor: pointer; font-size: 13px; padding: 0 4px; }
.si-btxt { white-space: normal; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 8px; margin-top: 4px; line-height: 1.4; }
/* Impor: mode Review / Basic Design */
.imp-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.imp-mode a { display: block; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 14px; background: #fff; color: #0d2b36; text-decoration: none; }
.imp-mode a b { display: block; font-size: 15px; }
.imp-mode a span { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }
.imp-mode a.on { border-color: #0d2b36; box-shadow: inset 0 0 0 1px #0d2b36; background: #f0fdfa; }
@media (max-width: 700px) { .imp-mode { grid-template-columns: 1fr; } }
/* Basic Design dari koordinat */
.bdd-step h2 { margin-top: 0; }
.bdd-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.bdd-tools button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.bdd-tools button i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.bdd-tools button.on { border-color: #0d2b36; background: #0d2b36; color: #fff; }
.bdd-tools button.done:not(.on)::after { content: '✓'; color: #15803d; font-weight: 700; }
.bdd-sep { flex: 0 0 1px; height: 22px; background: #e2e8f0; margin: 0 4px; }
.bdd-hint { font-size: 12.5px; color: #0f766e; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 6px; padding: 6px 10px; margin-bottom: 8px; }
.bdd-map-wrap { position: relative; }
#bddMap { height: 520px; border-radius: 10px; border: 1px solid #e2e8f0; cursor: crosshair; }
.bdd-len { position: absolute; z-index: 500; top: 10px; right: 10px; background: rgba(255,255,255,.94); border-radius: 8px; padding: 8px 10px; font-size: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.bdd-len i, .bdd-lg i { display: inline-block; width: 10px; height: 4px; margin-right: 5px; vertical-align: middle; }
.bdd-pin i { display: block; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.bdd-pin b { position: absolute; left: 16px; top: -3px; white-space: nowrap; font-size: 11px; color: #fff; background: rgba(13,43,54,.85); padding: 1px 5px; border-radius: 4px; }
.bdd-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-top: 10px; }
.bdd-row label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: #475569; }
.bdd-row input, .bdd-row select { border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; }
.bdd-row .bdd-title { flex: 1; min-width: 260px; }
.bdd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 10px 0; }
.bdd-grid2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
@media (max-width: 900px) { .bdd-grid2 { grid-template-columns: 1fr; } }
.bdd-box { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; background: #fff; }
.bdd-box h3 { margin: 0 0 6px; font-size: 14px; }
.bdd-svg { width: 100%; height: auto; display: block; }
.bdd-lg { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: #475569; }
.bdd-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.bdd-kpi > div { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; }
.bdd-kpi span { display: block; font-size: 11.5px; color: #64748b; }
.bdd-kpi b { font-size: 16px; color: #0d2b36; }
.bdd-kpi p { grid-column: 1 / -1; margin: 0; }
.bdd-g { border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; background: #fff; }
.bdd-g > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; font-size: 13.5px; }
.bdd-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bdd-tbl td { padding: 4px 8px; border-top: 1px solid #f1f5f9; vertical-align: middle; }
.bdd-tbl td:first-child { width: 30%; }
.bdd-tbl td:nth-child(2) { width: 130px; }
.bdd-tbl input { width: 120px; border: 1px solid #cbd5e1; border-radius: 5px; padding: 4px 6px; font: inherit; font-size: 12.5px; text-align: right; }
.bdd-tbl input.txt { width: 240px; text-align: left; }
.bdd-tbl tr.man input { background: #fefce8; border-color: #eab308; font-weight: 700; }
.bdd-tbl tr.miss input { border-color: #ef4444; background: #fef2f2; }
.bdd-ok { border: 1px solid #86efac; background: #f0fdf4; border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.bdd-ok h3 { margin: 0 0 6px; color: #15803d; }
@media (max-width: 700px) { .bdd-tbl td:first-child { width: auto; } .bdd-tbl td:nth-child(4) { display: none; } #bddMap { height: 420px; } }
/* Basic Design: toolbar bergrup, guidance & kontur */
.bdd-tools { flex-direction: column; align-items: stretch; }
.bdd-tg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bdd-tg > span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; min-width: 170px; }
.bdd-tools button.on#bddPick { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.bdd-guide { border: 1px solid #e2e8f0; border-radius: 10px; margin-top: 10px; background: #fff; }
.bdd-guide > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; font-size: 13.5px; }
.bdd-guide-b { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; padding: 0 12px 12px; }
@media (max-width: 900px) { .bdd-guide-b { grid-template-columns: 1fr; } }
.bdd-gcol { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.bdd-gcol select, .bdd-gcol input[type=file] { font: inherit; font-size: 12px; max-width: 100%; }
.bdd-gcol select { border: 1px solid #cbd5e1; border-radius: 6px; padding: 4px 6px; }
.bdd-gbtn { display: flex; flex-wrap: wrap; gap: 6px; }
.bdd-glist > div { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid #f1f5f9; padding: 3px 0; }
.bdd-glist > div span { flex: 1; } .bdd-glist em, .bdd-glayers em { font-style: normal; color: #94a3b8; font-size: 11px; }
.bdd-glist button { border: 0; background: none; cursor: pointer; color: #64748b; }
.bdd-glayers { max-height: 150px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.bdd-clbl { font-size: 10px; font-weight: 700; color: #fef3c7; text-shadow: 0 0 2px #000, 0 0 2px #000; white-space: nowrap; }
.bdd-glist label.check { flex: 1; display: flex; gap: 6px; align-items: center; margin: 0; }
.bdd-glist .bdd-gauto { border: 1px solid #fcd34d; background: #fffbeb; color: #92400e; border-radius: 6px; font-size: 11.5px; padding: 2px 6px; }
#bddOtKey { border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12px; }
.bdd-gcol .bdd-gbtn label.small { flex-direction: row; display: inline-flex; align-items: center; gap: 4px; }
/* Basic Design: kontur gradasi, cek elevasi, cross section, draft & export, curah hujan */
.bdd-clbl span { font-weight: 700; text-shadow: 0 0 2px #000, 0 0 3px #000, 0 0 1px #000; white-space: nowrap; line-height: 1; display: block; text-align: center; }
.bdd-clg { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #475569; }
.bdd-clg i { flex: 1; height: 8px; border-radius: 4px; max-width: 180px; }
.bdd-tools button[data-tool].on { background: #0f766e; border-color: #0f766e; color: #fff; }
#bddMap.bdd-probe-on { cursor: crosshair; }
#bddMap.bdd-probe-on .leaflet-interactive { cursor: crosshair; }
.bdd-probe i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #f43f5e; border: 2px solid #fff; box-shadow: 0 0 0 1px #0f172a; box-sizing: border-box; }
.bdd-probe b { position: absolute; left: 15px; top: -4px; background: rgba(15, 23, 42, .85); color: #fff; font-size: 11.5px; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.bdd-xsp i { display: block; width: 10px; height: 10px; background: #fff; border: 2px solid #0f172a; box-sizing: border-box; transform: rotate(45deg); }
.bdd-xsp b { position: absolute; left: 12px; top: -10px; color: #fff; font-size: 14px; font-weight: 800; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.bdd-map-wrap { position: relative; }
.bdd-cur { position: absolute; left: 8px; bottom: 8px; z-index: 500; background: rgba(15, 23, 42, .78); color: #e2e8f0; font-size: 11.5px; padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.bdd-cur:empty { display: none; }
.bdd-xs { border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px 12px; margin-top: 10px; background: #fff; }
.bdd-xsh { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.bdd-xsh .bdd-xsc { border: 1px solid #cbd5e1; background: #fff; border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.bdd-xsh .bdd-xsc em { font-style: normal; font-weight: 400; color: #64748b; }
.bdd-xsh .bdd-xsc.on { background: #0d2b36; border-color: #0d2b36; color: #fff; } .bdd-xsh .bdd-xsc.on em { color: #cbd5e1; }
.bdd-xsh .bdd-xsx { border: 0; background: none; color: #94a3b8; cursor: pointer; margin-left: -4px; }
.bdd-xsvg { width: 100%; height: auto; }
.bdd-xsk { margin: 8px 0; }
.bdd-xsi { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; white-space: nowrap; } .bdd-xsi i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.bdd-draft { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; font-size: 12.5px; }
.bdd-draft select, .bdd-draft input[type=text] { border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 8px; font: inherit; font-size: 12.5px; max-width: 100%; }
.bdd-draft select { max-width: 280px; } .bdd-draft input[type=text] { width: 240px; }
.bdd-draft .bdd-sep { width: 1px; height: 22px; background: #cbd5e1; margin: 0 4px; }
.bdd-draft .bdd-file { cursor: pointer; }
#bddDrMsg { flex-basis: 100%; }
#bddDrMsg:empty { display: none; }
.bdd-rain { margin-top: 12px; }
.bdd-rhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.bdd-rhead h3 { margin: 0; flex: 1 1 auto; }
.bdd-rtabs { display: flex; flex-wrap: wrap; gap: 4px; }
.bdd-rtabs button { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.bdd-rtabs button.on { background: #0d2b36; border-color: #0d2b36; color: #fff; }
.bdd-rcols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 800px) { .bdd-rcols { grid-template-columns: 1fr; } }
.bdd-rmx { font-size: 11.5px; display: block; overflow-x: auto; }
.bdd-rmx td, .bdd-rmx th { padding: 2px 5px; }
.bdd-rmx tr.bdd-rsum td { border-top: 1px solid #cbd5e1; font-weight: 600; background: #f8fafc; }
.bdd-rday td { min-width: 34px; }
.bdd-tools button[hidden], .bdd-draft [hidden] { display: none !important; }
