/* ===== Tema ===== */
:root, :root[data-theme="neo"] {
  --bg: #fff3d6; --ink: #121212; --muted: #4a4a4a; --card: #ffffff; --bc: #121212; --bw: 3px; --radius: 0px;
  --shadow: 6px 6px 0 #121212; --shadow-sm: 3px 3px 0 #121212; --shadow-press: 0 0 0 #121212;
  --accent: #ffd23f; --accent-ink: #121212; --accent2: #ff6b9d; --accent3: #4dd4ff; --ok: #3ddc84; --warn: #ffb020; --bad: #ff4d4d;
  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif; --font-head: 'Space Grotesk', system-ui, sans-serif; --head-weight: 700; --head-tr: -0.02em;
  --mono: 'Space Mono', ui-monospace, Menlo, Consolas, monospace; --input-bg: #fff; --hover: #fff0b3; --nav-bg: #ffd23f; --side-bg: #fff; --pattern: radial-gradient(#12121214 1.2px, transparent 1.2px);
}
:root[data-theme="classic"] {
  --bg: #f5f2ea; --ink: #1d2433; --muted: #5d667a; --card: #ffffff; --bc: #ded8c8; --bw: 1px; --radius: 12px;
  --shadow: 0 10px 30px rgba(29,36,51,.08), 0 1px 2px rgba(29,36,51,.06); --shadow-sm: 0 1px 2px rgba(29,36,51,.08); --shadow-press: 0 1px 1px rgba(29,36,51,.1);
  --accent: #1f3a5f; --accent-ink: #ffffff; --accent2: #b08d57; --accent3: #3f6e8c; --ok: #2f8f5b; --warn: #b7791f; --bad: #b3372f;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif; --head-weight: 700; --head-tr: 0;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; --input-bg: #fbfaf6; --hover: #f0ece0; --nav-bg: #ffffff; --side-bg: #ffffff; --pattern: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; padding-bottom: calc(84px + env(safe-area-inset-bottom)); background: var(--bg); background-image: var(--pattern); background-size: 22px 22px; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; min-height: 100vh; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tr); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); } h2 { font-size: 1.6rem; } h3 { font-size: 1.15rem; }
a { color: inherit; } p { margin: 0 0 .8em; } .muted { color: var(--muted); } .mono { font-family: var(--mono); font-size: .9em; }
svg.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; flex: none; }
.hide { display: none !important; }

/* ===== Layout ===== */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); border-bottom: var(--bw) solid var(--bc); }
.topbar .in { max-width: 1200px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--ink); }
.brand .logo { width: 38px; height: 38px; display: grid; place-items: center; background: var(--accent2); color: #121212; border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
:root[data-theme="classic"] .brand .logo { background: var(--accent); color: #fff; }
.wrap, .grid > *, .row > * { min-width: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 28px 20px 70px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; } .page-head h2 { margin: 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .grow { flex: 1; } .right { margin-left: auto; }
.grid { display: grid; gap: 18px; } .g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } .g3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stack > * + * { margin-top: 14px; }

/* ===== Komponen ===== */
.card { background: var(--card); border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card.flat { box-shadow: var(--shadow-sm); } .card h3 { display: flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; font: inherit; font-weight: 700; color: var(--ink); background: var(--card); border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow-sm); cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { background: var(--hover); } .btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: var(--shadow-press); }
:root[data-theme="classic"] .btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); } .btn.primary:hover { filter: brightness(1.06); }
.btn.pink { background: var(--accent2); color: #121212; } .btn.cyan { background: var(--accent3); color: #121212; } .btn.ok { background: var(--ok); color: #121212; }
:root[data-theme="classic"] .btn.pink, :root[data-theme="classic"] .btn.cyan, :root[data-theme="classic"] .btn.ok { color: #fff; }
.btn.danger { background: var(--bad); color: #fff; } .btn.sm { padding: 6px 10px; font-size: .88rem; } .btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.field { display: block; margin-bottom: 14px; } .field > span { display: block; font-weight: 700; margin-bottom: 6px; font-size: .9rem; } .field small { display: block; margin-top: 5px; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--input-bg); border: var(--bw) solid var(--bc); border-radius: var(--radius); padding: 10px 12px; outline: none; }
input:focus, select:focus, textarea:focus { box-shadow: var(--shadow-sm); border-color: var(--ink); } :root[data-theme="classic"] input:focus, :root[data-theme="classic"] select:focus { box-shadow: 0 0 0 3px rgba(31,58,95,.18); border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; padding: 0; accent-color: var(--ink); } input[type=file] { padding: 8px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin-bottom: 10px; cursor: pointer; }
.badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; border: var(--bw) solid var(--bc); border-radius: var(--radius); background: var(--card); }
:root[data-theme="classic"] .badge { border-radius: 999px; font-size: .72rem; }
.badge.running { background: var(--ok); color: #121212; } .badge.offline, .badge.stopped { background: #e5e5e5; color: #121212; } .badge.starting, .badge.installing, .badge.stopping { background: var(--warn); color: #121212; }
.badge.suspended, .badge.banned, .badge.bad { background: var(--bad); color: #fff; } .badge.unknown { background: var(--card); } .badge.role { background: var(--accent3); color: #121212; }
:root[data-theme="classic"] .badge.running { background: #e3f3ea; color: var(--ok); } :root[data-theme="classic"] .badge.offline, :root[data-theme="classic"] .badge.stopped { background: #ecebe6; color: #555; }
:root[data-theme="classic"] .badge.starting, :root[data-theme="classic"] .badge.installing, :root[data-theme="classic"] .badge.stopping { background: #fbf0d9; color: var(--warn); }
:root[data-theme="classic"] .badge.role { background: #e6eef7; color: var(--accent); } :root[data-theme="classic"] .badge.suspended, :root[data-theme="classic"] .badge.banned, :root[data-theme="classic"] .badge.bad { background: #f8e3e1; color: var(--bad); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.stat { display: flex; flex-direction: column; gap: 4px; } .stat .n { font-family: var(--font-head); font-size: 2.6rem; font-weight: 700; line-height: 1; } .stat .l { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); }
.card.c1 { background: var(--accent); color: var(--accent-ink); } .card.c2 { background: var(--accent2); color: #121212; } .card.c3 { background: var(--accent3); color: #121212; } .card.c4 { background: var(--ok); color: #121212; }
:root[data-theme="classic"] .card.c1, :root[data-theme="classic"] .card.c2, :root[data-theme="classic"] .card.c3, :root[data-theme="classic"] .card.c4 { background: var(--card); color: var(--ink); border-top: 3px solid var(--accent2); }
.card.c1 .l, .card.c2 .l, .card.c3 .l, .card.c4 .l { color: inherit; }
.tablewrap { overflow-x: auto; border: var(--bw) solid var(--bc); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; min-width: 640px; } th, td { text-align: left; padding: 12px 14px; border-bottom: var(--bw) solid var(--bc); vertical-align: middle; } tr:last-child td { border-bottom: 0; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; background: var(--hover); } td .row { flex-wrap: nowrap; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); } .empty .i { width: 2.4em; height: 2.4em; margin-bottom: 8px; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; margin: 14px 0 34px; } .hero p.lead { font-size: 1.15rem; max-width: 52ch; }
.hero .art { background: var(--accent3); border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; display: grid; gap: 12px; }
:root[data-theme="classic"] .hero .art { background: var(--accent); color: #fff; }
.mini { display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--ink); border: var(--bw) solid var(--bc); border-radius: var(--radius); padding: 10px 14px; font-weight: 700; box-shadow: var(--shadow-sm); }
.carousel { position: relative; border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: var(--card); margin-bottom: 30px; }
.slide { display: none; position: relative; min-height: 190px; color: inherit; text-decoration: none; } .slide.on { display: block; }
.slide img { width: 100%; height: clamp(160px, 28vw, 300px); object-fit: cover; display: block; }
.slide .cap { padding: 14px 18px; background: var(--accent); color: var(--accent-ink); } .slide .cap h3 { margin: 0 0 2px; }
.slide.noimg { padding: 30px; background: var(--accent2); min-height: 170px; } :root[data-theme="classic"] .slide.noimg { background: var(--accent); color: #fff; }
.dots { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; } .dots button { width: 14px; height: 14px; border: var(--bw) solid var(--bc); background: var(--card); border-radius: 50%; cursor: pointer; padding: 0; } .dots button.on { background: var(--ink); }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; } .opt { position: relative; } .opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; width: 100%; height: 100%; }
.opt .box { display: flex; align-items: center; gap: 10px; padding: 14px; border: var(--bw) solid var(--bc); border-radius: var(--radius); background: var(--card); font-weight: 700; box-shadow: var(--shadow-sm); }
.opt input:checked + .box { background: var(--accent); color: var(--accent-ink); transform: translate(2px, 2px); box-shadow: var(--shadow-press); } :root[data-theme="classic"] .opt input:checked + .box { transform: none; box-shadow: 0 0 0 2px var(--accent); }
.opt input:focus-visible + .box { outline: 3px dashed var(--ink); outline-offset: 2px; } .opt input:disabled + .box { opacity: .5; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; align-items: center; } .kv dt { font-weight: 700; color: var(--muted); } .kv dd { margin: 0; word-break: break-word; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar { height: 14px; border: var(--bw) solid var(--bc); background: var(--card); border-radius: var(--radius); overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--accent2); transition: width .4s; } :root[data-theme="classic"] .bar > i { background: var(--accent); }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--mono); margin-bottom: 10px; } .crumbs button { background: none; border: 0; font: inherit; cursor: pointer; text-decoration: underline; padding: 0; color: inherit; }
.files .f { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: var(--bw) solid var(--bc); cursor: pointer; } .files .f:hover { background: var(--hover); } .files .f:last-child { border-bottom: 0; } .files .f .sz { margin-left: auto; color: var(--muted); font-size: .85rem; }
pre.code { background: #121212; color: #e8e8e8; padding: 14px; overflow: auto; max-height: 55vh; font-family: var(--mono); font-size: .85rem; border-radius: var(--radius); margin: 0; white-space: pre-wrap; word-break: break-word; }
.auth { max-width: 440px; margin: 40px auto; } .tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; } .tabs button { padding: 8px 14px; font: inherit; font-weight: 700; border: var(--bw) solid var(--bc); background: var(--card); border-radius: var(--radius); cursor: pointer; color: var(--ink); } .tabs button.on { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.quota-row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; align-items: center; margin-bottom: 8px; }
.srv { position: relative; } .srv .tag { position: absolute; top: -14px; left: 14px; background: var(--accent3); color: #121212; border: var(--bw) solid var(--bc); border-radius: var(--radius); padding: 2px 10px; font-weight: 700; font-size: .8rem; } :root[data-theme="classic"] .srv .tag { background: var(--accent); color: #fff; }
.log { display: flex; gap: 10px; padding: 10px 0; border-bottom: var(--bw) solid var(--bc); align-items: flex-start; } .log:last-child { border-bottom: 0; } .log time { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
footer.foot { text-align: center; color: var(--muted); padding: 24px; font-size: .85rem; }

/* ===== Modal, toast ===== */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { width: min(640px, 100%); max-height: 92vh; overflow-y: auto; background: var(--card); border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; } .modal.wide { width: min(900px, 100%); }
.modal .mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; } .modal .mh h3 { margin: 0; } .modal .mf { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
#toasts { position: fixed; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--card); border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow-sm); font-weight: 600; max-width: 360px; animation: pop .2s ease-out; } .toast.ok { background: var(--ok); color: #121212; } .toast.err { background: var(--bad); color: #fff; }
:root[data-theme="classic"] .toast.ok { background: #e3f3ea; color: var(--ok); } :root[data-theme="classic"] .toast.err { background: #f8e3e1; color: var(--bad); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== Topbar ringkas + menu bawah ===== */
.topbar .in { flex-wrap: nowrap; justify-content: space-between; gap: 10px; } .brand { min-width: 0; } .brand .bname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools { display: flex; gap: 8px; flex: none; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--nav-bg); border-top: var(--bw) solid var(--bc); padding-bottom: env(safe-area-inset-bottom); }
.bn-in { display: flex; width: max-content; max-width: 100%; margin: 0 auto; overflow-x: auto; scrollbar-width: none; padding: 6px 8px; gap: 4px; } .bn-in::-webkit-scrollbar { display: none; }
.bottomnav a { flex: 1 0 auto; min-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px; text-decoration: none; font-weight: 700; font-size: .72rem; border: var(--bw) solid transparent; border-radius: var(--radius); color: var(--ink); }
.bottomnav a svg.i { width: 1.5em; height: 1.5em; } .bottomnav a:hover { background: var(--hover); }
.bottomnav a.on { background: var(--card); border-color: var(--bc); box-shadow: var(--shadow-sm); }
:root[data-theme="classic"] .bottomnav a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: none; }
@media (max-width: 560px) { .tools .lbl { display: none; } .wrap { padding: 20px 14px 40px; } .page-head h2 { font-size: 1.35rem; } }

/* ===== Chat ===== */
.chat { padding: 0; overflow: hidden; }
.msgs { height: min(62vh, 560px); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--hover); }
.msg { max-width: min(520px, 88%); align-self: flex-start; background: var(--card); border: var(--bw) solid var(--bc); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 8px 12px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg .mt { white-space: pre-wrap; overflow-wrap: anywhere; } .mh2 { display: flex; gap: 8px; align-items: center; font-size: .82rem; margin-bottom: 2px; } .mh2 time { margin-left: auto; opacity: .7; }
.msg .x { background: none; border: 0; cursor: pointer; color: inherit; padding: 0; opacity: .7; } .msg .x:hover { opacity: 1; }
.chatform { display: flex; gap: 10px; padding: 12px; border-top: var(--bw) solid var(--bc); background: var(--card); }
