/* ==========================================================================
   AUFALNET ACS Manager — v0.6.50 design system
   Ink navy shell (matches the AUFAL logo), calm paper surfaces, colour only
   for status. One signature: the "lit fiber" — a thin signal-blue → aqua light
   line under the top bar and on the active menu item.
   Type: Poppins (geometric, echoes the logo) for titles and big numbers,
   Inter for everything you read and scan, with tabular figures in data.
   ========================================================================== */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: local("Inter Regular"), local("Inter-Regular"), url("/static/fonts/inter-regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: local("Inter Medium"), local("Inter-Medium"), url("/static/fonts/inter-medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600 800; font-display: swap; src: local("Inter SemiBold"), local("Inter-SemiBold"), url("/static/fonts/inter-semibold.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500 600; font-display: swap; src: local("Poppins Medium"), local("Poppins-Medium"), url("/static/fonts/poppins-medium.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700 900; font-display: swap; src: local("Poppins Bold"), local("Poppins-Bold"), url("/static/fonts/poppins-bold.woff") format("woff"); }

:root {
  /* shell */
  --ink: #0f1e33;
  --ink-2: #152a47;
  --ink-text: #c9d6e8;
  --ink-muted: #7f93b0;
  /* surfaces */
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #eef2f7;
  --border: #e1e7ef;
  --border-strong: #cdd6e2;
  /* text */
  --text: #172338;
  --text-2: #33425a;
  --muted: #5d6c83;
  /* brand + signal */
  --primary: #1d5fd6;
  --primary-dark: #164bab;
  --primary-soft: #e8effc;
  --fiber: #12a5bc;
  --fiber-glow: rgba(18, 165, 188, .35);
  /* status */
  --success: #13804a;
  --success-soft: #e6f5ec;
  --warning: #a8620b;
  --warning-soft: #fdf2e1;
  --danger: #c8322b;
  --danger-soft: #fdecea;
  --info: #1f5f9e;
  --info-soft: #e9f2fb;
  --nav: var(--ink);
  --nav-2: var(--ink-2);
  /* depth + shape */
  --shadow: 0 1px 2px rgba(16, 30, 54, .05), 0 4px 14px rgba(16, 30, 54, .04);
  --shadow-pop: 0 12px 32px rgba(16, 30, 54, .16);
  --r-card: 14px;
  --r-inner: 10px;
  --r-ctl: 9px;
  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Poppins", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --focus: 0 0 0 3px rgba(18, 165, 188, .28);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; font-family: var(--font-ui); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 600; color: var(--text); letter-spacing: -.01em; line-height: 1.25; }
::selection { background: rgba(29, 95, 214, .18); }

/* ---- shell ---- */
.layout { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { background: var(--ink); background-image: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: var(--ink-text); padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.brand { background: #fff; border-radius: 12px; padding: 12px 12px 10px; margin: 0 2px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 0; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.brand img { width: 100%; max-width: 156px; max-height: 64px; object-fit: contain; display: block; }
.brand span { color: var(--ink); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-align: center; overflow-wrap: anywhere; }
.nav-label { padding: 14px 12px 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-muted); letter-spacing: .02em; }
.nav { display: grid; gap: 1px; }
.nav a { position: relative; display: flex; gap: 11px; align-items: center; color: var(--ink-text); padding: 8px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 500; line-height: 1.3; transition: background .15s, color .15s; }
.nav a .ico { width: 18px; height: 18px; flex: 0 0 18px; opacity: .78; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a:hover .ico { opacity: 1; }
.nav a.active { background: rgba(255,255,255,.09); color: #fff; font-weight: 600; }
.nav a.active .ico { opacity: 1; color: #7fe3f1; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #5fb3ff, var(--fiber)); box-shadow: 0 0 10px var(--fiber-glow); }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.sidebar-footer .muted { color: var(--ink-muted); }
.sidebar-footer strong { color: #e6eef9; font-weight: 600; }
.user-mini { display: grid; gap: 1px; font-size: 12px; color: var(--ink-muted); margin-bottom: 8px; text-transform: lowercase; }
.user-mini strong { display: block; color: #fff; font-size: 13px; text-transform: none; }
.sidebar-footer .btn-outline { background: transparent; color: #dce7f6; border-color: rgba(255,255,255,.2); }
.sidebar-footer .btn-outline:hover { background: rgba(255,255,255,.06); }
.sidebar-footer .btn-secondary { background: rgba(255,255,255,.08); color: #e6eef9; }
.sidebar-footer .btn-secondary:hover { background: rgba(255,255,255,.14); }
.main { min-width: 0; overflow-x: hidden; }
.topbar { height: 64px; background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(8px); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 10; }
/* the lit fiber */
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--primary) 0%, var(--fiber) 55%, rgba(18,165,188,0) 100%); opacity: .85; }
.topbar h1 { font-size: 19px; margin: 0; font-weight: 600; }
.content { padding: 24px 28px 56px; max-width: 1680px; margin: 0 auto; }

/* ---- status chips in the top bar ---- */
.topbar-actions { gap: 6px; }
.topbar-actions .badge { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; padding: 4px 10px 4px 8px; }
.topbar-actions .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #a9b5c6; flex: 0 0 7px; }
.topbar-actions .badge-success::before { background: #1fb36a; box-shadow: 0 0 0 3px rgba(31,179,106,.16); }
.topbar-actions .badge-warning::before { background: #e39a1b; box-shadow: 0 0 0 3px rgba(227,154,27,.18); }
.topbar-actions .badge-info { background: var(--primary-soft); border-color: #cddcf7; color: var(--primary-dark); font-weight: 600; }
.topbar-actions .badge-info::before { background: var(--primary); }
.topbar-actions .badge-muted { color: var(--muted); }

/* ---- layout helpers ---- */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---- cards ---- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px 22px; }
.card h2, .card h3 { margin: 0 0 14px; font-size: 16px; }
.card h2 { font-size: 17px; }
.card > p:first-child { margin-top: 0; }
.metric { position: relative; overflow: hidden; padding: 16px 18px 15px; }
.metric::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--border); }
.metric.danger::before { background: var(--danger); }
.metric.warning::before { background: #e39a1b; }
.metric.success::before, .metric.ok::before { background: var(--success); }
.metric .label { color: var(--muted); font-weight: 500; font-size: 12.5px; text-transform: none; letter-spacing: 0; }
.metric .value { font-family: var(--font-title); font-size: 30px; font-weight: 700; margin-top: 4px; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.metric .hint { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.4; }
.metric .hint a { font-weight: 500; }

/* ---- badges (status tags inside tables/cards) ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.badge-success { background: var(--success-soft); color: #0f6b3d; border-color: #c4e6d2; }
.badge-danger { background: var(--danger-soft); color: #a3241e; border-color: #f5c9c5; }
.badge-warning { background: var(--warning-soft); color: #8a4f06; border-color: #f2d8ad; }
.badge-info { background: var(--info-soft); color: #1b4f86; border-color: #cfe1f4; }
.badge-muted { background: var(--surface-3); color: #4a5a72; border-color: var(--border); }

/* ---- tables ---- */
.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th { background: var(--surface-2); color: var(--muted); text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; position: sticky; top: 0; z-index: 1; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: top; }
td strong { font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, tr:hover td { background: #f8fafd; }
.card .table-wrap { box-shadow: none; border-radius: var(--r-inner); }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
input, select, textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--r-ctl); padding: 9px 11px; background: #fff; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #94a2b6; }
input:hover, select:hover, textarea:hover { border-color: #b8c4d4; }
input:focus, select:focus, textarea:focus { border-color: var(--fiber); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
input[disabled], select[disabled], textarea[disabled] { background: var(--surface-2); color: var(--muted); }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d6c83' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
select[multiple] { background-image: none; padding-right: 11px; }
textarea { min-height: 110px; resize: vertical; }
input[type=range] { border: 0; padding: 0; box-shadow: none; accent-color: var(--primary); }

/* ---- buttons ---- */
.btn { border: 1px solid transparent; border-radius: var(--r-ctl); padding: 9px 15px; font-size: 13px; font-weight: 600; line-height: 1.25; display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(22, 75, 171, .25); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--surface-3); color: var(--text-2); border-color: var(--border); }
.btn-secondary:hover { background: #e4e9f1; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a92721; color: #fff; }
.btn-warning { background: #f2a524; color: #3b2503; }
.btn-warning:hover { background: #e0941a; }
.btn-success { background: var(--success); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border-color: #c9d7f0; }
.btn-outline:hover { background: var(--primary-soft); border-color: #a9c0ea; color: var(--primary-dark); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar { display: flex; gap: 10px; align-items: end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.toolbar .filters > div { min-width: 150px; }
.toolbar label { margin-bottom: 5px; }

/* ---- alerts ---- */
.alert { position: relative; border-radius: var(--r-inner); padding: 11px 14px 11px 40px; margin-bottom: 14px; font-weight: 500; font-size: 13.5px; line-height: 1.5; border: 1px solid; }
.alert::before { content: ""; position: absolute; left: 14px; top: 13px; width: 16px; height: 16px; border-radius: 50%; background: currentColor; -webkit-mask: var(--alert-icon) center / 16px no-repeat; mask: var(--alert-icon) center / 16px no-repeat; }
.alert strong, .alert b { font-weight: 600; }
.alert-success { background: var(--success-soft); color: #0f5f37; border-color: #c4e6d2; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E"); }
.alert-danger { background: var(--danger-soft); color: #93201b; border-color: #f5c9c5; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E"); }
.alert-warning { background: var(--warning-soft); color: #7a4505; border-color: #f2d8ad; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20L12 3z'/%3E%3Cpath d='M12 10v4M12 17v.5'/%3E%3C/svg%3E"); }
.alert-info { background: var(--info-soft); color: #194a7c; border-color: #cfe1f4; --alert-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E"); }
.alert code { background: rgba(255,255,255,.6); }

/* ---- text helpers ---- */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 9px 16px; font-size: 13px; }
.kv div:nth-child(odd) { color: var(--muted); font-weight: 500; }
.kv div:nth-child(even) { color: var(--text); }
.bar-row { display: grid; grid-template-columns: 130px 1fr 40px; align-items: center; gap: 12px; margin: 9px 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.bar-row > :last-child { text-align: right; font-weight: 600; }
.bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #3b82e8); border-radius: inherit; }

/* ---- login ---- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; background-color: var(--ink); background-image:
  radial-gradient(1200px 600px at 85% -10%, rgba(18,165,188,.22), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(29,95,214,.35), transparent 60%),
  repeating-linear-gradient(115deg, rgba(255,255,255,.025) 0 1px, transparent 1px 22px); }
.login-card { width: min(420px, 100%); background: #fff; padding: 32px 32px 26px; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.4); position: relative; overflow: hidden; }
.login-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--fiber)); }
.login-logo { margin: 0 auto 18px; max-width: 260px; max-height: 120px; object-fit: contain; display: block; }
.login-card h1 { margin: 0 0 6px; font-size: 21px; text-align: center; }
.login-card .subtitle { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 13.5px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; margin-top: 6px; padding: 11px 15px; font-size: 14px; }
.code-box { font-family: var(--font-mono); background: #0f1e33; color: #d6e4f7; border-radius: var(--r-inner); padding: 14px 16px; white-space: pre-wrap; overflow-x: auto; font-size: 12px; line-height: 1.6; text-align: left; }
.modal-details summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.inline-form { display: inline; }
.footer-note { margin-top: 22px; color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width: 1150px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-4, .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; } .form-grid .full { grid-column: auto; } .kv { grid-template-columns: 1fr; } .kv div:nth-child(odd) { margin-top: 6px; } }

.metric.compact .value { font-size: 28px; }
.danger-zone { border-color: #fecaca; background: #fffafa; }

/* OLT management cards: keeps actions visible without horizontal scrolling. */
.olt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.olt-card { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.olt-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.olt-card-header h3 { margin: 0 0 9px; overflow-wrap: anywhere; }
.olt-vendor { text-align: right; font-weight: 850; white-space: nowrap; }
.olt-vendor span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; margin-top: 3px; }
.olt-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.olt-meta-grid > div { border: 1px solid var(--border); background: #f8fafc; border-radius: 10px; padding: 11px 12px; min-width: 0; }
.olt-meta-grid span, .olt-meta-grid small { display: block; color: var(--muted); font-size: 11px; }
.olt-meta-grid strong { display: block; margin: 4px 0; overflow-wrap: anywhere; font-size: 13px; }
.olt-result { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #f8fafc; min-height: 62px; }
.olt-result strong, .olt-result > span { display: block; }
.olt-result > span { color: var(--muted); font-size: 12px; margin-top: 5px; overflow-wrap: anywhere; }
.olt-result-ok { background: #f0fdf4; border-color: #bbf7d0; }
.olt-result-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.result-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.result-chips span { background: white; border: 1px solid var(--border); border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 750; }
.olt-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }
.olt-actions form { margin: 0; }
.advanced-settings { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #f8fafc; }
.advanced-settings summary { cursor: pointer; font-weight: 800; color: var(--primary); }
.advanced-grid { margin-top: 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #e2e8f0; padding: 2px 5px; border-radius: 5px; }
@media (max-width: 1200px) { .olt-grid { grid-template-columns: 1fr; } }
@media (max-width: 650px) {
  .olt-card-header { flex-direction: column; }
  .olt-vendor { text-align: left; }
  .olt-meta-grid { grid-template-columns: 1fr; }
  .olt-actions .btn, .olt-actions form { width: 100%; }
}
.diagnostic-paths { display: grid; gap: 10px; }
.diagnostic-paths > div { display: grid; gap: 4px; }
.path-code { display: block; white-space: normal; overflow-wrap: anywhere; background: #f1f5f9; border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px; color: #0f3d68; font-size: 12px; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(.92); }
.management-warning { border: 1px solid #fed7aa; background: #fff7ed; border-radius: 9px; padding: 10px 12px; }
.management-warning label { margin: 0; color: #9a3412; }
.management-warning input[type="checkbox"] { width: auto; margin-right: 7px; }

.inline-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.inline-actions form { margin:0; }

.binding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.binding-option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 600;
}
.binding-option input { width: auto; }
.binding-option.binding-recommended { border-color: #60a5fa; background: #eff6ff; }

.grid-span-2 { grid-column: 1 / -1; }
.ssid-section-card {
  min-width: 0;
  overflow: hidden;
}
.ssid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.ssid-card {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.ssid-card > * { min-width: 0; max-width: 100%; }
.ssid-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ssid-card-header > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.ssid-field { min-width: 0; width: 100%; }
.ssid-card input,
.ssid-card select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.ssid-tech-details {
  min-width: 0;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  padding: 9px 11px;
}
.ssid-tech-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.ssid-tech-details > div { display: grid; gap: 5px; margin-top: 9px; min-width: 0; }
.ssid-tech-details span { color: var(--muted); font-size: 11px; font-weight: 750; }
.ssid-tech-details .path-code {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 10px;
}
.ssid-card-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  min-width: 0;
  width: 100%;
}
.ssid-card-footer .btn {
  display: flex;
  width: 100%;
  min-width: 0;
}
.ssid-card-footer .muted { overflow-wrap: anywhere; text-align: center; }
@media (max-width: 1150px) {
  .ssid-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .grid-span-2 { grid-column: auto; }
  .ssid-card { padding: 13px; }
}

.ssid-summary-list {
  display: grid;
  gap: 6px;
  min-width: 190px;
}
.ssid-summary-list > div {
  padding-bottom: 5px;
  border-bottom: 1px dashed var(--border, #d9e1e8);
}
.ssid-summary-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* White-label branding */
.brand { flex-direction: column; gap: 7px; }
.brand span { color: #0f2740; font-size: 12px; font-weight: 850; text-align: center; overflow-wrap: anywhere; }
.branding-preview { text-align: center; }
.branding-preview-logo { min-height: 180px; display: grid; place-items: center; border: 1px dashed var(--border); border-radius: 12px; background: #f8fafc; padding: 18px; margin-bottom: 16px; }
.branding-preview-logo img { max-width: 100%; max-height: 150px; object-fit: contain; }

.secret-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.secret-control input {
  min-width: 0;
  flex: 1 1 auto;
}
.secret-control .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}


/* v0.6.17 - responsive mobile shell (Bootstrap-style breakpoints/off-canvas, local CSS only). */
.mobile-nav-toggle,
.sidebar-close,
.sidebar-mobile-head,
.mobile-nav-backdrop { display: none; }
.topbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-title h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { justify-content: flex-end; min-width: 0; }
.table-wrap { -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }
.table-wrap table { min-width: 680px; }
.card, .alert, .toolbar, .section-title { min-width: 0; }
.card { overflow-wrap: anywhere; }
img, svg { max-width: 100%; }

@media (max-width: 900px) {
  body.mobile-nav-open { overflow: hidden; }
  .layout { display: block; min-height: 100dvh; }
  .main { width: 100%; min-width: 0; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(86vw, 310px);
    height: 100dvh;
    padding: calc(12px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-104%);
    transition: transform .2s ease;
    box-shadow: 18px 0 45px rgba(2, 12, 27, .25);
    overscroll-behavior: contain;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 2px 10px;
    color: #fff;
  }
  .sidebar-close {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    color: #fff;
    background: rgba(255,255,255,.08);
    font-size: 25px;
    line-height: 1;
  }
  .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(2, 12, 27, .55);
    backdrop-filter: blur(2px);
  }
  .mobile-nav-backdrop.is-visible { display: block; }
  .brand { min-height: 82px; margin-bottom: 12px; padding: 8px 10px; }
  .brand img { max-height: 58px; max-width: 170px; }
  .brand span { font-size: 11px; }
  .nav-label { padding: 7px 10px 4px; }
  .nav { display: block; }
  .nav a { min-height: 43px; padding: 10px 11px; margin: 2px 0; }
  .sidebar-footer { margin-top: 16px; display: block; }
  .topbar {
    min-height: 64px;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: calc(9px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 9px max(14px, env(safe-area-inset-left));
    flex-wrap: wrap;
    align-content: center;
    gap: 7px 10px;
  }
  .mobile-nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--nav-2);
    font-size: 22px;
    font-weight: 900;
  }
  .topbar-title { flex: 1 1 240px; }
  .topbar h1 { font-size: 17px; }
  .topbar-actions {
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-actions .badge { flex: 0 0 auto; white-space: nowrap; }
  .content {
    width: 100%;
    max-width: none;
    padding: 16px max(14px, env(safe-area-inset-right)) calc(34px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
  .toolbar { align-items: stretch; }
  .toolbar,
  .toolbar .filters { width: 100%; }
  .toolbar .filters > div { min-width: min(100%, 160px); flex: 1 1 160px; }
  .section-title { margin-top: 20px; }
}

@media (max-width: 720px) {
  .content { padding-top: 12px; }
  .card { padding: 14px; border-radius: 12px; box-shadow: 0 5px 18px rgba(15, 23, 42, .06); }
  .card h2, .card h3 { margin-bottom: 11px; }
  .metric .value { font-size: 29px; }
  .metric.compact .value { font-size: 25px; }
  .grid { gap: 12px; }
  .alert { padding: 10px 12px; margin-bottom: 12px; font-size: 13px; line-height: 1.45; }
  .section-title { align-items: flex-start; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
  .section-title h2 { font-size: 17px; }
  .toolbar { gap: 9px; }
  .toolbar .filters { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .toolbar .filters > div { min-width: 0; width: 100%; }
  .toolbar > .actions, .toolbar > form, .toolbar > .btn { width: 100%; }
  .toolbar > .actions .btn, .toolbar > form .btn { flex: 1 1 auto; }
  input, select, textarea { font-size: 16px; /* prevent iOS focus zoom */ }
  .btn { min-height: 42px; padding: 9px 12px; }
  .btn-sm { min-height: 36px; }
  .actions { gap: 6px; }
  .table-wrap { border-radius: 10px; }
  .table-wrap table { min-width: 640px; font-size: 12px; }
  th, td { padding: 9px 10px; }
  th { font-size: 10px; }
  .code-box { max-width: 100%; font-size: 11px; padding: 11px; }
  .bar-row { grid-template-columns: 94px minmax(0, 1fr) 34px; gap: 7px; }
  .login-page { padding: 18px; }
  .login-card { padding: 22px 18px; border-radius: 16px; }
  .login-logo { max-height: 110px; }
  .olt-actions { display: grid; grid-template-columns: 1fr; }
  .olt-actions .btn, .olt-actions form, .olt-actions form .btn { width: 100%; }
  .inline-actions { align-items: stretch; }
  .inline-actions .btn, .inline-actions form { flex: 1 1 145px; }
  .inline-actions form .btn { width: 100%; }
  .secret-control { align-items: stretch; flex-direction: column; }
  .secret-control .btn { width: 100%; }
}

@media (max-width: 420px) {
  .topbar { gap: 6px; }
  .topbar-title { flex-basis: 100%; }
  .topbar h1 { font-size: 16px; }
  .badge { font-size: 10px; padding: 4px 8px; }
  .card { padding: 12px; }
  .metric .value { font-size: 27px; }
  .table-wrap table { min-width: 600px; }
}

/* v0.6.37 PPP Secret management */
.ppp-toolbar { justify-content: space-between; align-items: center; }
.ppp-metrics { margin-bottom: 16px; }
.ppp-router-picks { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.ppp-router-pick { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: var(--surface-2); cursor: pointer; }
.ppp-router-pick input { width: auto; }
.ppp-password-row { display: flex; gap: 8px; align-items: center; }
.ppp-password-row input { flex: 1 1 auto; }
.ppp-password-row .btn { flex: 0 0 auto; }
.ppp-checks { display: flex; flex-direction: column; gap: 8px; }
.ppp-checks label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.ppp-checks input, .danger-zone input[type=checkbox] { width: auto; }
.ppp-row-actions { flex-wrap: nowrap; gap: 6px; }
.ppp-row-actions form { margin: 0; }
.ppp-form-card { max-width: 980px; }
/* v0.6.38: profile dropdown <-> manual input switch relies on [hidden]. */
#ppp-secret-form [hidden] { display: none !important; }
@media (max-width: 900px) {
  .ppp-password-row { flex-wrap: wrap; }
  .ppp-row-actions { flex-wrap: wrap; }
}

/* v0.6.39 Peta Jaringan (POP / ODC / ODP) */
:root {
  --nm-up: #16a34a;
  --nm-warning: #ca8a04;
  --nm-down: #dc2626;
  --nm-power: #ea580c;
  --nm-empty: #94a3b8;
  /* v0.6.42 per-kind colours (overridable with MAP_COLOR_*) */
  --nm-pop: #1d4ed8;
  --nm-odc: #7e22ce;
  --nm-odp: #0891b2;
  --nm-customer: #c026d3;
}
.netmap { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; height: calc(100dvh - 68px - 76px); min-height: 520px; }
.netmap:fullscreen { height: 100vh; padding: 12px; background: var(--bg); }
.netmap-stage { position: relative; min-width: 0; border: 1px solid var(--border); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); background: #dfe7ef; }
.netmap-canvas { position: absolute; inset: 0; }
.netmap-panel { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; padding-right: 2px; }
.netmap-panel .card { padding: 14px; }
.netmap-panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.netmap-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.netmap-stat { border-radius: 10px; padding: 8px 10px; background: var(--surface-2); border-left: 4px solid var(--nm-empty); }
.netmap-stat strong { display: block; font-size: 22px; line-height: 1.1; }
.netmap-stat span { font-size: 11px; font-weight: 700; color: var(--muted); }
.netmap-stat.s-down { border-color: var(--nm-down); } .netmap-stat.s-down strong { color: var(--nm-down); }
.netmap-stat.s-power { border-color: var(--nm-power); } .netmap-stat.s-power strong { color: var(--nm-power); }
.netmap-stat.s-warning { border-color: var(--nm-warning); } .netmap-stat.s-warning strong { color: var(--nm-warning); }
.netmap-stat.s-up { border-color: var(--nm-up); } .netmap-stat.s-up strong { color: var(--nm-up); }
.netmap-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.netmap-meta .is-offline { color: var(--danger); font-weight: 700; }
.netmap-sound { display: grid; gap: 8px; }
.netmap-sound-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.netmap-sound-row input[type=range] { flex: 1 1 120px; width: auto; padding: 0; }
.netmap-sound-hint { font-size: 12px; font-weight: 650; color: #9a3412; background: #ffedd5; border-radius: 8px; padding: 6px 8px; }
.netmap-btn-toggle[aria-pressed="true"] { background: var(--success); color: #fff; border-color: var(--success); }
.netmap-ack { animation: nm-blink 1s steps(2, start) infinite; }
.netmap-problems { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.netmap-problems button { width: 100%; text-align: left; display: grid; grid-template-columns: 12px 1fr; gap: 2px 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; color: var(--text); }
.netmap-problems button:hover { border-color: var(--primary); }
.netmap-problems .dot { width: 10px; height: 10px; border-radius: 50%; grid-row: span 2; }
.netmap-problems strong { font-size: 13px; }
.netmap-problems small { color: var(--muted); font-size: 11px; grid-column: 2; }
.netmap-problems .is-root strong::after { content: " · titik putus"; color: var(--nm-down); font-weight: 800; font-size: 11px; }
.netmap-empty { font-size: 13px; color: var(--muted); }
.netmap-filters { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.netmap-filters label { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--text); margin: 0; font-size: 13px; }
.netmap-filters input { width: auto; }
.netmap-search { position: relative; }
.netmap-search ul { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); display: grid; gap: 2px; }
.netmap-search ul:empty { display: none; }
.netmap-search li button { width: 100%; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.netmap-search li button:hover { background: var(--surface-2); }
.netmap-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.netmap-tools .btn[aria-pressed="true"] { background: var(--primary); color: #fff; }
.netmap-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12px; }
.netmap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.netmap-legend i { display: inline-block; width: 22px; height: 4px; border-radius: 2px; }
.netmap-banner { position: absolute; z-index: 800; left: 50%; top: 12px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 650; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow); max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
.netmap [hidden], .netmap-banner[hidden] { display: none !important; }
.netmap-stage.is-picking .leaflet-container { cursor: crosshair; }
.netmap-toasts { position: fixed; right: 18px; bottom: 18px; z-index: 2000; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.netmap-toast { background: #fff; border-left: 5px solid var(--nm-down); border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.22); padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; }
.netmap-toast.t-power { border-color: var(--nm-power); }
.netmap-toast.t-recovered { border-color: var(--nm-up); }
.netmap-toast.t-info { border-color: var(--primary); }
.netmap-toast strong { font-size: 14px; }
.netmap-toast .inline-actions { gap: 6px; }
/* markers */
.nm-marker { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; font-weight: 850; font-size: 11px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); background: var(--nm-empty); box-sizing: border-box; }
.nm-marker b { line-height: 1; }
.nm-pop { border-radius: 7px; font-size: 13px; border-width: 3px; }
.nm-odc { border-radius: 4px; transform: rotate(45deg); }
.nm-odc b { transform: rotate(-45deg); }
.nm-odp { border-radius: 50%; font-size: 0; }
.nm-s-up { background: var(--nm-up); }
.nm-s-warning { background: var(--nm-warning); }
.nm-s-down { background: var(--nm-down); }
.nm-s-power { background: var(--nm-power); }
.nm-s-empty { background: var(--nm-empty); }
.nm-root { animation: nm-pulse 1.4s ease-out infinite; }
.nm-moving { outline: 3px dashed #0f172a; outline-offset: 3px; }
.nm-vertex { width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-sizing: border-box; }
.nm-me { width: 100%; height: 100%; border-radius: 50%; background: #2563eb; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(37,99,235,.25); box-sizing: border-box; }
/* lines */
.nm-line { transition: stroke .3s; }
.nm-line-empty { stroke-dasharray: 4 8; }
.nm-line-power { stroke-dasharray: 14 8; }
.nm-line-down { stroke-dasharray: 14 10; animation: nm-march .9s linear infinite, nm-line-blink 1s ease-in-out infinite; }
.nm-line-editing { stroke-dasharray: 8 6; }
/* popups */
.nm-pop-card { min-width: 220px; max-width: 290px; font-size: 13px; display: grid; gap: 6px; }
.nm-pop-card h4 { margin: 0; font-size: 15px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nm-pop-card .nm-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; color: var(--muted); }
.nm-pop-card .nm-kv span:nth-child(even) { color: var(--text); font-weight: 600; }
.nm-pop-card .inline-actions { gap: 6px; margin-top: 4px; }
.nm-pop-card .btn { padding: 5px 9px; font-size: 12px; }
.nm-state { display: inline-block; padding: 2px 8px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; background: var(--nm-empty); }
.nm-state.s-up { background: var(--nm-up); } .nm-state.s-warning { background: var(--nm-warning); }
.nm-state.s-down { background: var(--nm-down); } .nm-state.s-power { background: var(--nm-power); }
.leaflet-container { font: inherit; }
.leaflet-container input, .leaflet-container select { width: auto; }
.leaflet-container a.btn-primary, .leaflet-container a.btn-primary:hover { color: #fff; }
.leaflet-container a.btn-outline { color: var(--primary); }
.leaflet-tooltip.nm-tip { font-weight: 700; font-size: 12px; }
/* form / detail mini maps */
.nm-picker { height: 360px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.nm-mini { height: 280px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.nm-coord-row { display: flex; gap: 8px; align-items: center; }
.nm-coord-row input { flex: 1 1 auto; }
.nm-coord-row .btn { flex: 0 0 auto; }
.nm-pon-list { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 160px; overflow-y: auto; padding: 8px; border: 1px solid var(--border); border-radius: 9px; }
/* v0.6.41 customers */
.nm-cust-pin { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--nm-customer); border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); box-sizing: border-box; }
/* v0.6.40 multi-OLT sources */
.nm-sources { display: grid; gap: 10px; }
.nm-source { border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; background: var(--surface-2); display: grid; gap: 8px; }
.nm-source-olt { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--text); flex-wrap: wrap; }
.nm-source-olt input { width: auto; }
.nm-source .nm-pon-list { background: var(--surface); }
.nm-sources [hidden] { display: none !important; }
.nm-pon-list label { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; margin: 0; font-size: 13px; color: var(--text); }
.nm-pon-list input { width: auto; }
.nm-checks label { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.nm-checks input { width: auto; }
.nm-inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.nm-inline-form select { width: auto; min-width: 84px; padding: 6px 8px; }
/* v0.6.42 "Per jenis": fill = kind colour, status = ring around the marker. */
.nm-color-type .nm-marker.nm-pop { background: var(--nm-pop); }
.nm-color-type .nm-marker.nm-odc { background: var(--nm-odc); }
.nm-color-type .nm-marker.nm-odp { background: var(--nm-odp); }
.nm-color-type .nm-marker.nm-s-up { box-shadow: 0 0 0 2px var(--nm-up), 0 1px 4px rgba(0,0,0,.45); }
.nm-color-type .nm-marker.nm-s-warning { box-shadow: 0 0 0 3px var(--nm-warning), 0 1px 4px rgba(0,0,0,.45); }
.nm-color-type .nm-marker.nm-s-power { box-shadow: 0 0 0 3px var(--nm-power), 0 1px 4px rgba(0,0,0,.45); }
.nm-color-type .nm-marker.nm-s-down { box-shadow: 0 0 0 3px var(--nm-down), 0 1px 4px rgba(0,0,0,.45); }
.nm-color-type .nm-marker.nm-s-empty { box-shadow: 0 0 0 2px var(--nm-empty), 0 1px 4px rgba(0,0,0,.45); opacity: .8; }
.nm-color-type .nm-marker.nm-s-down.nm-root { animation: nm-pulse-ring 1.4s ease-out infinite; }
.nm-color-type .nm-marker.nm-s-power.nm-root { animation: nm-pulse-ring-power 1.4s ease-out infinite; }
.netmap-colormode { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 13px; font-weight: 650; }
.netmap-colormode > span { margin-right: 2px; }
.netmap-colormode .btn[aria-pressed="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.netmap-legend-kinds { margin-bottom: 8px; }
.netmap-legend-note { margin-bottom: 6px; }
.nm-swatch, .nm-kind-dot { display: inline-block; flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; background: var(--nm-odp); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15,23,42,.35); box-sizing: border-box; vertical-align: middle; }
.nm-swatch.k-pop, .nm-kind-dot.k-pop { background: var(--nm-pop); border-radius: 3px; width: 14px; height: 14px; }
.nm-swatch.k-odc, .nm-kind-dot.k-odc { background: var(--nm-odc); border-radius: 2px; transform: rotate(45deg); }
.nm-swatch.k-odp, .nm-kind-dot.k-odp { background: var(--nm-odp); }
.nm-swatch.k-customer, .nm-kind-dot.k-customer { background: var(--nm-customer); width: 10px; height: 10px; border-color: #1e293b; border-width: 1.5px; }
.nm-kind-dot { margin-right: 2px; }
@keyframes nm-pulse-ring { 0% { box-shadow: 0 0 0 3px var(--nm-down), 0 0 0 3px rgba(220,38,38,.75), 0 1px 4px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 3px var(--nm-down), 0 0 0 18px rgba(220,38,38,0), 0 1px 4px rgba(0,0,0,.45); } }
@keyframes nm-pulse-ring-power { 0% { box-shadow: 0 0 0 3px var(--nm-power), 0 0 0 3px rgba(234,88,12,.75), 0 1px 4px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 3px var(--nm-power), 0 0 0 18px rgba(234,88,12,0), 0 1px 4px rgba(0,0,0,.45); } }
@keyframes nm-pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.75), 0 1px 4px rgba(0,0,0,.45); } 100% { box-shadow: 0 0 0 16px rgba(220,38,38,0), 0 1px 4px rgba(0,0,0,.45); } }
@keyframes nm-march { to { stroke-dashoffset: -24; } }
/* v0.6.46: offline customer — the whole drop cable blinks and marches, the house ring pulses. */
.nm-drop-alarm { stroke-dasharray: 10 6; animation: nm-march .9s linear infinite, nm-line-blink 1s ease-in-out infinite; }
.nm-cust-alarm { animation: nm-cust-pulse 1s ease-in-out infinite; }
@keyframes nm-line-blink { 50% { stroke-opacity: .2; } }
@keyframes nm-cust-pulse { 50% { stroke-width: 8px; stroke-opacity: .35; } }
@keyframes nm-blink { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .nm-drop-alarm, .nm-cust-alarm, .nm-root, .nm-color-type .nm-marker.nm-s-down.nm-root, .nm-color-type .nm-marker.nm-s-power.nm-root, .nm-line-down, .netmap-ack { animation: none; } }
@media (max-width: 1100px) {
  .netmap { grid-template-columns: 1fr; height: auto; }
  .netmap-stage { height: 68dvh; min-height: 420px; }
  .netmap-panel { overflow: visible; }
}

/* v0.6.43 Add-on ACS */
.acs-locked { border: 1px dashed var(--border); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; color: var(--text); margin-top: 8px; }
.acs-locked .small, .acs-locked.small { color: var(--muted); }
.acs-locked.acs-note { display: block; margin: 10px 0 0; }
.acs-usage { display: grid; gap: 3px; min-width: 120px; }
.acs-usage-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.acs-usage-bar i { display: block; height: 100%; background: var(--success); }
.acs-usage-bar.is-high i { background: var(--warning, #ca8a04); }
.acs-usage-bar.is-over i { background: var(--danger); }
.acs-tier-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.acs-tier-table th, .acs-tier-table td { padding: 4px 6px; border-bottom: 1px solid var(--border); text-align: left; }
/* Checkbox inside a form-grid label stays checkbox-sized (Tenant settings: Telegram/WA/ACS). */
.form-grid label > input[type=checkbox] { width: auto; margin: 0 6px 0 0; vertical-align: middle; }

/* ==========================================================================
   v0.6.50 component refinements (keep after the component rules above)
   ========================================================================== */
.olt-grid { gap: 16px; }
.olt-card { gap: 14px; }
.olt-card-header h3 { font-size: 17px; margin-bottom: 8px; }
.olt-vendor { font-family: var(--font-title); font-weight: 600; color: var(--text); }
.olt-vendor span { font-family: var(--font-ui); font-weight: 500; }
.olt-meta-grid > div, .olt-result, .advanced-settings, .ssid-card, .binding-option { background: var(--surface-2); border-color: var(--border); }
.olt-meta-grid > div { border-radius: var(--r-inner); }
.olt-meta-grid strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.olt-result-ok { background: var(--success-soft); border-color: #c4e6d2; }
.olt-result-error { background: var(--danger-soft); border-color: #f5c9c5; color: #93201b; }
.result-chips span { font-weight: 500; color: var(--text-2); }
.advanced-settings { border-radius: var(--r-inner); padding: 12px 14px; }
.advanced-settings summary, .modal-details summary { font-weight: 600; color: var(--text-2); list-style-position: inside; }
.advanced-settings[open] > summary { margin-bottom: 4px; color: var(--primary); }
code { font-family: var(--font-mono); font-size: .92em; background: var(--surface-3); color: #23406a; padding: 1px 5px; border-radius: 5px; }
.path-code { background: var(--surface-2); color: #23406a; }
.danger-zone { border-color: #f5c9c5; background: #fffbfa; }
.management-warning { border-color: #f2d8ad; background: var(--warning-soft); }
.ssid-tech-details { border-color: var(--border-strong); }
.binding-option { font-weight: 500; }
.binding-option.binding-recommended { border-color: #a9c0ea; background: var(--primary-soft); }
.branding-preview-logo { background: var(--surface-2); border-color: var(--border-strong); }
.acs-locked { border-color: var(--border-strong); background: var(--surface-2); }
.ppp-router-pick { background: var(--surface-2); border-color: var(--border); }
.mobile-nav-toggle { background: var(--surface-2); color: var(--ink); }
.sidebar-close { font-weight: 400; }

/* map panel: sentence-case headings, quieter tiles */
.netmap { height: calc(100dvh - 64px - 72px); }
.netmap-stage { border-radius: var(--r-card); border-color: var(--border); }
.netmap-panel h3 { font-family: var(--font-title); font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 600; margin: 0 0 10px; }
.netmap-subhead { margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.netmap-stat { background: var(--surface-2); border: 1px solid var(--border); border-left-width: 3px; border-radius: 9px; padding: 7px 10px; }
.netmap-stat strong { font-family: var(--font-title); font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; }
.netmap-stat span { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.netmap-problems button { background: var(--surface-2); border-color: var(--border); border-radius: 9px; }
.netmap-problems button:hover { border-color: #a9c0ea; background: var(--primary-soft); }
.netmap-problems .is-customer strong { font-weight: 600; }
.netmap-toast { border-radius: 12px; box-shadow: var(--shadow-pop); border: 1px solid var(--border); border-left: 4px solid var(--nm-down); }
.netmap-banner { background: var(--ink); border-radius: 10px; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-pop); }

@media (max-width: 900px) {
  .layout { display: block; }
  .nav a.active::before { left: -14px; }
  .topbar { background: #fff; }
}
@media (max-width: 720px) {
  .card { padding: 14px 15px; border-radius: 12px; box-shadow: var(--shadow); }
  .metric .value { font-size: 26px; }
  .alert { padding: 10px 12px 10px 36px; }
  .alert::before { left: 12px; top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .sidebar, .topbar, .mobile-nav-backdrop { display: none !important; }
  .layout { display: block; }
  .card, .table-wrap { box-shadow: none; }
}
/* dashboard bars carry status colour where the row is a status */
.bar-online span, .bar-normal span { background: linear-gradient(90deg, #13804a, #22a565); }
.bar-offline span, .bar-kritis span { background: linear-gradient(90deg, #c8322b, #e05a4f); }
.bar-tinggi span, .bar-terlalu-bagus span { background: linear-gradient(90deg, #c77a0f, #e8a33a); }
.bar-belum-ada-data span { background: #b6c2d2; }
.brand { padding: 14px 12px 12px; }
.sidebar > * { flex-shrink: 0; }
.netmap-stat.s-down, .netmap-stat.s-power, .netmap-stat.s-warning, .netmap-stat.s-up { border-color: var(--border); }
.netmap-stat.s-down { border-left-color: var(--nm-down); }
.netmap-stat.s-power { border-left-color: var(--nm-power); }
.netmap-stat.s-warning { border-left-color: var(--nm-warning); }
.netmap-stat.s-up { border-left-color: var(--nm-up); }
.netmap-stat span { font-size: 11.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
@media (max-width: 720px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 .metric .hint { font-size: 11.5px; } }

/* ---- v0.6.52 users, account, shared page bits ---- */
.page-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.page-intro p { margin: 0; max-width: 72ch; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 12px; }
.back-link:hover { color: var(--primary); }
.field-hint { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.static-field { padding: 9px 11px; border: 1px dashed var(--border-strong); border-radius: var(--r-ctl); color: var(--muted); background: var(--surface-2); }
label.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text-2); margin: 0; }
label.check input { width: auto; margin: 0; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); }
.col-actions { text-align: right; width: 1%; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--fiber)); color: #fff; font-family: var(--font-title); font-weight: 600; font-size: 13px; }
.avatar-lg { width: 52px; height: 52px; flex-basis: 52px; font-size: 20px; }
.user-cell { display: flex; align-items: center; gap: 11px; }
.user-cell strong { display: block; font-weight: 600; }
.user-cell small { display: block; color: var(--muted); font-size: 12px; }
.role-tag { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }
.role-tag.role-superadmin { background: #f3ecff; color: #5b2bb5; border-color: #e1d3fb; }
.role-tag.role-admin { background: var(--primary-soft); color: var(--primary-dark); border-color: #cddcf7; }
.role-tag.role-noc { background: #e3f6f8; color: #0b6f80; border-color: #c2e9ef; }
.role-tag.role-technician { background: var(--warning-soft); color: #8a4f06; border-color: #f2d8ad; }
.users-bottom { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); margin-top: 18px; align-items: start; }
.role-list { margin: 0; display: grid; gap: 12px; }
.role-list > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: start; }
.role-list dt { margin: 0; }
.role-list dd { margin: 0; color: var(--text-2); font-size: 13px; padding-top: 2px; }
.user-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.user-head h2 { margin: 0 0 2px; font-size: 19px; }
.user-head .muted { font-size: 13px; }
.user-head-tags { margin-left: auto; }
.danger-zone h3 { color: #93201b; }
/* sidebar account link */
a.user-mini { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 0 -8px 8px; border-radius: 9px; color: var(--ink-muted); text-transform: none; }
a.user-mini:hover { background: rgba(255,255,255,.06); color: #dce7f6; }
a.user-mini .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
a.user-mini > span:last-child { display: grid; font-size: 12px; line-height: 1.35; min-width: 0; }
a.user-mini strong { color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* browser autofill: keep the field white instead of Chrome's blue wash */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}
input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #fff inset, var(--focus); }
@media (max-width: 900px) {
  .users-bottom { grid-template-columns: 1fr; }
  .user-head-tags { margin-left: 0; }
}
/* file pickers, number fields, disclosure rows, empty tables */
input[type=file] { padding: 6px; background: var(--surface-2); border-style: dashed; color: var(--muted); font-size: 13px; }
input[type=file]::file-selector-button { margin-right: 10px; border: 1px solid #c9d7f0; border-radius: 7px; background: #fff; color: var(--primary); font: inherit; font-weight: 600; padding: 6px 12px; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--primary-soft); }
input[type=number] { -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; }
details > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: 0 0 6px; margin: 0 3px 0 1px; opacity: .7; }
details[open] > summary::before { transform: rotate(45deg); }
details.card > summary { font-family: var(--font-title); font-weight: 600; color: var(--text); }
td.muted[colspan], td[colspan].muted, .empty-cell { color: var(--muted); text-align: center; padding: 22px 14px; white-space: normal; }
input[type=checkbox] { width: 16px; height: 16px; }
