/* Panel admin Canvas Perwira. Ditulis tangan, tanpa build step.
   Bahasa visualnya mengikuti macOS: permukaan berkaca, garis setipis rambut,
   sudut membulat, dan aksen biru sistem. */
:root {
    --bg: #f5f5f7;
    --surface: #ffffff;
    --line: rgba(0, 0, 0, .1);
    --text: #1d1d1f;
    --muted: #6e6e73;
    --primary: #0071e3;
    --primary-dark: #0060c0;
    --danger: #ff3b30;
    --warn: #b25000;
    --warn-bg: #fff2e0;
    --ok: #16794a;
    --ok-bg: #e3f7ec;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 14px;
    letter-spacing: -.01em;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ----------------------------------------------------------- Kerangka */
.shell { display: flex; min-height: 100vh; }

/* Sidebar terang berkaca seperti jendela Finder */
.sidebar {
    width: 224px;
    flex: 0 0 224px;
    background: rgba(246, 246, 248, .82);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-right: .5px solid var(--line);
    color: var(--text);
    display: flex;
    flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}

.sidebar .logo {
    padding: 18px 18px 14px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    letter-spacing: -.01em;
    display: flex; align-items: center; gap: 8px;
}
.sidebar .logo img { height: 22px; width: auto; flex: none; }

.sidebar nav { padding: 4px 10px; flex: 1; }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    color: var(--text);
    font-weight: 500;
    font-size: 13px;
}
.sidebar nav a + a { margin-top: 1px; }
.sidebar nav a:hover { background: rgba(0, 0, 0, .05); text-decoration: none; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar nav a i { width: 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
.sidebar nav a.active i { color: #fff; }

.sidebar .me {
    padding: 12px 14px;
    border-top: .5px solid var(--line);
    font-size: 12px;
}
.sidebar .me strong { color: var(--text); display: block; font-weight: 600; }
.sidebar .me span { color: var(--muted); }
.sidebar .me form { margin-top: 9px; }
.sidebar .me button {
    width: 100%;
    background: var(--surface);
    color: var(--text);
    border: .5px solid var(--line);
    padding: 7px;
    border-radius: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}
.sidebar .me button:hover { background: #f5f5f7; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: .5px solid var(--line);
    padding: 13px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky; top: 0; z-index: 10;
}
.topbar h1 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.content { padding: 24px 26px; }

/* ----------------------------------------------------------- Kartu & tabel */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.card + .card { margin-top: 18px; }
.card > h2 {
    margin: 0;
    padding: 15px 20px 13px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .01em;
    border-bottom: 1px solid var(--line);
}
.card .body { padding: 20px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 20px; text-align: left; border-bottom: 1px solid var(--line); }
th {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
    color: var(--muted); background: #fcfcfd; padding-top: 10px; padding-bottom: 10px;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .1s ease; }
tbody tr:hover { background: #f9fafb; }
td.actions { text-align: right; white-space: nowrap; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.empty i { font-size: 22px; opacity: .35; display: block; margin-bottom: 10px; }

/* ----------------------------------------------------------- Tombol */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: #f3f4f6; border-color: #d5dae1; text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.danger { color: var(--danger); border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; border-color: #fca5a5; }
.btn.sm { padding: 6px 9px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 7px; flex-wrap: wrap; }

/* ----------------------------------------------------------- Form */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-family: inherit;
    font-size: 13.5px;
    background: var(--surface);
    color: var(--text);
    transition: border-color .12s ease, box-shadow .12s ease;
}
input::placeholder, textarea::placeholder { color: #9aa3af; }
input:focus, select:focus, textarea:focus {
    outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12);
}
textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 16px; height: 16px; }

/* ----------------------------------------------------------- Notifikasi */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 500; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: #fee2e2; color: var(--danger); }
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: var(--muted);
}
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.off { background: #fee2e2; color: var(--danger); }

/* ----------------------------------------------------------- Login & impersonate */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login-card h1 {
    margin: 0 0 4px; font-size: 20px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
.login-card h1 img { height: 34px; width: auto; }
.login-card .sub { text-align: center; color: var(--muted); margin-bottom: 22px; font-size: 13px; }
.login-card .btn { width: 100%; justify-content: center; padding: 11px; }

.impersonating {
    background: var(--warn-bg);
    color: var(--warn);
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pager { display: flex; gap: 6px; margin-top: 16px; }
.pager a, .pager span { padding: 6px 11px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-size: 13px; }
.pager .on { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 800px) {
    .sidebar { display: none; }
    .grid2 { grid-template-columns: 1fr; }
    .content { padding: 16px; }
}

/* ----------------------------------------------------------- Docs & API */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }

.docs-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: 20px; }
.docs-toc a {
    display: flex; align-items: center; gap: 9px;
    padding: 8px 11px; border-radius: 7px; color: var(--text); font-size: 13px; font-weight: 500;
}
.docs-toc a:hover { background: #f3f4f6; text-decoration: none; }
.docs-toc a.active { background: var(--primary); color: #fff; }
.docs-toc a i { width: 15px; text-align: center; opacity: .8; }

.prose { padding: 22px 26px; line-height: 1.7; }
.prose h3 { margin: 26px 0 10px; font-size: 15px; font-weight: 700; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.prose th, .prose td { padding: 9px 13px; font-size: 13px; }
.prose code {
    background: #f1f5f9; padding: 2px 6px; border-radius: 5px;
    font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: #b91c1c;
}
.prose pre {
    background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 9px;
    overflow-x: auto; font-size: 12.5px; line-height: 1.6; margin: 0 0 16px;
}
.prose pre code { background: none; color: inherit; padding: 0; }
.prose .note {
    background: #eff6ff; border-left: 3px solid var(--primary);
    padding: 11px 15px; border-radius: 0 8px 8px 0; margin: 0 0 16px; font-size: 13px;
}
.prose .warn-box {
    background: var(--warn-bg); border-left: 3px solid var(--warn);
    padding: 11px 15px; border-radius: 0 8px 8px 0; margin: 0 0 16px; font-size: 13px; color: #78350f;
}

.token-box { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.token-box input {
    font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
    background: #f8fafc; flex: 1; min-width: 260px;
}

.method { font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 5px; letter-spacing: .5px; }
.method.post { background: var(--ok-bg); color: var(--ok); }
.method.put { background: var(--warn-bg); color: var(--warn); }
.method.delete { background: #fee2e2; color: var(--danger); }

@media (max-width: 900px) {
    .docs { grid-template-columns: 1fr; }
    .docs-toc { position: static; }
}

/* ----------------------------------------------------------- Dashboard */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }

.stat {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px;
}
.stat .label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.stat .value { font-size: 26px; font-weight: 700; line-height: 1.25; margin-top: 6px; }
.stat .value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat.accent { border-color: #bfdbfe; background: #f5f9ff; }
.stat.accent .value { color: var(--primary); }

.bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }

/* ----------------------------------------------------------- Katalog */
.swatch {
    display: inline-block; width: 14px; height: 14px; border-radius: 4px;
    border: 1px solid rgba(0,0,0,.15); vertical-align: middle;
}
.colors { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; }

.colorgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.colorgrid.disabled { opacity: .45; pointer-events: none; }
.colorrow { display: flex; align-items: center; gap: 8px; }
.colorrow .no {
    width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; background: #f1f5f9;
    color: var(--muted); font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.colorrow input[type=text] { flex: 1; padding: 6px 9px; font-size: 13px; }
.colorrow input[type=color] {
    width: 38px; height: 32px; flex: 0 0 38px; padding: 2px;
    border: 1px solid var(--line); border-radius: 7px; background: var(--surface); cursor: pointer;
}

.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.template {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
    display: flex; flex-direction: column; gap: 10px;
}
.template.locked { opacity: .6; }
.template .meta strong { display: block; font-size: 13px; }
.template form { margin-top: auto; }

.thumb {
    background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
    height: 90px; display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 26px; overflow: hidden;
}
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb-lg { height: 150px; margin-bottom: 16px; }

.portlist { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.port {
    background: #f1f5f9; border: 1px solid var(--line); border-radius: 5px;
    padding: 3px 8px; font-size: 11.5px; font-family: ui-monospace, Consolas, monospace;
}

.docs-toc .toc-op { margin-left: auto; font-size: 10px; opacity: .5; }

/* ----------------------------------------------------------- Search bar */
.searchbar {
    display: flex; align-items: center; gap: 9px;
    max-width: 340px; margin-bottom: 16px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.searchbar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, .12); }
.searchbar > i { color: #9aa3af; font-size: 12.5px; }
/* Pakai [type=text] supaya menang dari aturan umum kolom isian di bawah;
   tanpa itu kotak pencarian dapat border dua lapis. */
.searchbar input[type=text] {
    flex: 1; border: 0; outline: 0; background: transparent;
    padding: 9px 0; font-size: 13.5px; font-family: inherit;
    border-radius: 0; box-shadow: none;
}
.searchbar input[type=text]:focus { border: 0; box-shadow: none; }
.searchbar-x {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 6px;
    color: var(--muted); font-size: 11px; text-decoration: none;
}
.searchbar-x:hover { background: #f1f5f9; color: var(--text); text-decoration: none; }

/* --------------------------------------------------------- Sidebar rapi */
.sidebar .logo { font-size: 14px; letter-spacing: .2px; padding: 17px 16px; }
.sidebar nav { padding: 10px 10px; }
.sidebar nav a { font-size: 13px; padding: 9px 11px; border-radius: 9px; }
.sidebar nav a + a { margin-top: 2px; }
.sidebar .me { padding: 13px 16px; }

/* Judul halaman sedikit lebih tenang */
.topbar h1 { font-size: 17px; letter-spacing: -.01em; }
.topbar { padding: 13px 24px; }

/* Badge lebih ramping */
.badge { padding: 3px 8px; font-size: 10.5px; letter-spacing: .2px; }

/* Baris paket di dashboard: ringkas, bukan kartu penuh */
.planbar {
    display: flex; align-items: center; gap: 10px;
    margin-top: 18px; padding: 11px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    font-size: 13px; color: var(--muted);
}
.planbar i { color: var(--muted); font-size: 13px; }
.planbar strong { color: var(--text); }
.planbar span { color: var(--muted); }
.planbar a { margin-left: auto; font-size: 12.5px; font-weight: 500; }
.planbar.pro { border-color: #bfdbfe; background: #f7faff; }
.planbar.pro i { color: #f59e0b; }
.planbar.pro strong { color: var(--primary); }

/* Kartu statistik sedikit lebih tenang */
.stat { border-radius: 12px; padding: 15px 17px; }
.stat .label { font-size: 10.5px; letter-spacing: .6px; }
.stat .value { font-size: 24px; }
.stat .sub { font-size: 11.5px; }

/* =============================================== Sentuhan akhir macOS */
/* Kartu: garis setipis rambut, bayangan sangat tipis, sudut 12px */
.card {
    border: .5px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.card > h2 {
    border-bottom: .5px solid var(--line);
    font-size: 12.5px; font-weight: 600; color: var(--text);
    letter-spacing: -.01em;
    background: rgba(250, 250, 252, .7);
}

th { background: rgba(250, 250, 252, .8); border-bottom: .5px solid var(--line); }
td { border-bottom: .5px solid var(--line); }
tbody tr:hover { background: rgba(0, 113, 227, .04); }

/* Tombol: putih bergaris rambut, aksi utama biru penuh */
.btn {
    border: .5px solid var(--line);
    border-radius: 7px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    font-weight: 500;
}
.btn:hover { background: #f5f5f7; border-color: var(--line); }
.btn:active { background: #ededf0; }
.btn.primary {
    border-color: transparent; box-shadow: 0 1px 2px rgba(0, 113, 227, .3);
    font-weight: 600;
}
.btn.danger { color: var(--danger); border-color: rgba(255, 59, 48, .35); }
.btn.danger:hover { background: rgba(255, 59, 48, .07); }
.btn.sm { border-radius: 6px; }

/* Kolom isian: sudut 7px, cincin fokus biru sistem */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=file], select, textarea {
    border: .5px solid rgba(0, 0, 0, .18);
    border-radius: 7px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .03);
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .25);
}
.searchbar {
    border: .5px solid rgba(0, 0, 0, .18); border-radius: 8px;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .03);
}
.searchbar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 113, 227, .25); }

/* Lencana: pil lembut bergaris rambut */
.badge {
    border: .5px solid rgba(0, 0, 0, .06);
    font-weight: 600; letter-spacing: 0;
    background: rgba(0, 0, 0, .05); color: var(--muted);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(22, 121, 74, .18); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(178, 80, 0, .18); }
.badge.off { background: rgba(255, 59, 48, .1); color: var(--danger); border-color: rgba(255, 59, 48, .2); }

.alert { border-radius: 10px; border: .5px solid transparent; }
.alert.ok { border-color: rgba(22, 121, 74, .2); }
.alert.err { border-color: rgba(255, 59, 48, .25); background: rgba(255, 59, 48, .08); color: var(--danger); }

.stat {
    border: .5px solid var(--line); border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.stat.accent { background: rgba(0, 113, 227, .05); border-color: rgba(0, 113, 227, .2); }
.stat.accent .value { color: var(--primary); }

.planbar { border: .5px solid var(--line); border-radius: 10px; }
.planbar.pro { background: rgba(0, 113, 227, .05); border-color: rgba(0, 113, 227, .2); }

.pager a, .pager span { border: .5px solid var(--line); border-radius: 7px; }
.pager .on { background: var(--primary); border-color: var(--primary); }

.impersonating { border-bottom: .5px solid rgba(178, 80, 0, .2); }

.login-card {
    border: .5px solid var(--line); border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .1);
}

.docs-toc { border: .5px solid var(--line); border-radius: 12px; }
.docs-toc a { border-radius: 7px; font-size: 12.5px; }
.docs-toc a.active { background: var(--primary); }

.prose code { background: rgba(0, 0, 0, .05); color: #b8005c; }
.prose pre { background: #1d1d1f; border-radius: 10px; }
.prose .note { background: rgba(0, 113, 227, .06); border-left-color: var(--primary); border-radius: 0 8px 8px 0; }

.template { border: .5px solid var(--line); border-radius: 12px; }
.thumb { border: .5px solid var(--line); border-radius: 9px; background: #fafafc; }
.port { border: .5px solid var(--line); background: rgba(0, 0, 0, .04); border-radius: 6px; }
.colorrow input[type=color] { border: .5px solid var(--line); border-radius: 6px; }

/* Saklar on/off untuk pengaturan platform */
.saklar { display: flex; align-items: flex-start; gap: .75rem; cursor: pointer; }
.saklar input { position: absolute; opacity: 0; width: 0; height: 0; }
.saklar-tuas {
    flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px;
    background: #cbd5e1; position: relative; transition: background .15s ease;
    margin-top: .1rem;
}
.saklar-tuas::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s ease;
}
.saklar input:checked + .saklar-tuas { background: #2563eb; }
.saklar input:checked + .saklar-tuas::after { transform: translateX(18px); }
.saklar input:focus-visible + .saklar-tuas { outline: 2px solid #2563eb; outline-offset: 2px; }
.saklar-teks { display: flex; flex-direction: column; gap: .15rem; }
.saklar-teks small { color: #64748b; line-height: 1.45; }

/* ------------------------------------------------- Maps gabungan (operator) */
.maps-wrap { display: flex; gap: 16px; height: calc(100vh - 190px); min-height: 440px; }
.maps-side {
    width: 320px; flex: none; display: flex; flex-direction: column; gap: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 14px; overflow: auto;
}
.maps-canvas {
    flex: 1; position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
#maps-map { position: absolute; inset: 0; }
.maps-note {
    position: absolute; left: 12px; bottom: 12px; z-index: 500;
    background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 12px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px;
}

.maps-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.maps-sum > div {
    background: var(--bg); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column;
}
.maps-sum strong { font-size: 15px; }
.maps-sum span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.maps-head {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); margin-top: 6px; display: flex; justify-content: space-between; align-items: baseline;
}
.maps-hint { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 10.5px; }

.maps-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.maps-filter label { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.maps-filter i { width: 14px; text-align: center; color: var(--muted); font-size: 11px; }

.maps-users { display: flex; flex-direction: column; gap: 6px; }
.maps-user { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.maps-user.mati { opacity: .45; }
.maps-user-row { display: flex; align-items: stretch; }
.maps-user-head {
    flex: 1; display: flex; align-items: center; gap: 8px; background: none; border: 0;
    padding: 8px 10px 8px 4px; cursor: pointer; text-align: left; font-family: inherit; color: var(--text);
}
.maps-user-head .warna { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.maps-user-head .nama { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.maps-user-head strong { font-size: 13px; }
.maps-user-head .nama span { font-size: 11px; color: var(--muted); }
.maps-user-head .chev { font-size: 10px; color: var(--muted); }

.eye {
    border: 0; background: none; cursor: pointer; color: var(--muted); width: 32px; flex: none;
    font-size: 13px;
}
.eye:hover { color: var(--primary); }

.maps-projects { border-top: 1px solid var(--line); background: var(--bg); }
.maps-projects.hidden { display: none; }
.maps-project { display: flex; align-items: center; border-top: 1px solid var(--line); }
.maps-project:first-child { border-top: 0; }
.maps-project.mati { opacity: .45; }
.maps-project .nama {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
    background: none; border: 0; padding: 6px 10px 6px 2px; cursor: pointer; font-family: inherit;
    color: var(--text); text-align: left;
}
.maps-project strong { font-size: 12px; }
.maps-project .nama span { font-size: 10.5px; color: var(--muted); }

/* Ikon aset, disalin seperlunya dari canvas.css supaya halaman ini berdiri sendiri */
.device-icon {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px; color: #fff; font-size: .85rem;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.icon-dc { background: #2563eb; }
.icon-pop { background: #7c3aed; }
.icon-joint { background: #0891b2; border-radius: 50%; }
.icon-splitter { background: #d97706; }
.icon-customer { background: #059669; border-radius: 10px; }
.leaflet-tooltip .tip-sub { color: #64748b; font-size: 10.5px; }

@media (max-width: 900px) {
    .maps-wrap { flex-direction: column; height: auto; }
    .maps-side { width: auto; max-height: 320px; }
    .maps-canvas { height: 60vh; }
}

/* Detail aset di peta gabungan: muncul saat kabel/titik diklik */
.maps-detail {
    position: absolute; top: 12px; right: 12px; z-index: 600; width: 300px;
    max-height: calc(100% - 24px); overflow: auto;
    background: rgba(255, 255, 255, .97); border: 1px solid var(--line); border-radius: 12px;
    padding: 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}
.maps-detail.hidden { display: none; }
.maps-detail-head { display: flex; gap: 8px; align-items: flex-start; }
.maps-detail-head .judul { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.maps-detail-head strong { font-size: 13px; }
.maps-detail-head span { font-size: 11px; color: var(--muted); }
.maps-detail-head .asal { color: var(--primary); }
.maps-detail-head .x { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; }
.maps-detail .muted { font-size: 11.5px; color: var(--muted); margin: 8px 0; }
.maps-sub {
    font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); margin: 10px 0 5px;
}
.core-row { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin-bottom: 3px; }
.core-row .tube { font-size: 10px; font-weight: 700; color: var(--muted); width: 20px; }
.core {
    width: 20px; height: 20px; border: 1px solid rgba(0, 0, 0, .18); border-radius: 5px;
    font-size: 9.5px; font-weight: 700; color: #fff; cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .5); padding: 0;
}
.core:hover { outline: 2px solid var(--primary); }
.rack-row { font-size: 11.5px; padding: 4px 0; border-top: 1px solid var(--line); display: flex; gap: 6px; }
.rack-row span { margin-left: auto; color: var(--muted); }
.rute { display: flex; flex-direction: column; padding: 5px 0; border-top: 1px solid var(--line); }
.rute strong { font-size: 11.5px; }
.rute span { font-size: 10.5px; color: var(--muted); }
