/* SpeedSMP dashboard: modern dark, glassmorphism, soft rounded gray stat boxes, accent #2563EB */
:root {
  --bg: #000000;
  --glass: rgba(26, 29, 36, 0.68);
  --glass-panel: rgba(20, 23, 29, 0.88);
  --soft-gray: rgba(148, 163, 184, 0.14);
  --soft-gray-border: rgba(203, 213, 225, 0.16);
  --border: rgba(255, 255, 255, 0.1);
  --accent: #2563EB;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #dc2626;
  --radius: 24px;
  --radius-sm: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.22), transparent 42%),
    radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.12), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body { min-height: 100vh; padding-top: 128px; }

/* Menu atas (bisa digeser ke samping) */
.tabs {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 19;
  display: flex; gap: 4px; overflow-x: auto; padding: 5px;
  width: max-content; max-width: calc(100vw - 24px);
  scrollbar-width: none; background: rgba(20, 20, 24, 0.75); border-radius: 999px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border); box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: #fff; }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-btn { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; color: var(--text); }
.theme-btn svg { width: 18px; height: 18px; display: block; }
.theme-btn .i-sun { display: none; }
body.light .theme-btn .i-sun { display: block; }
body.light .theme-btn .i-moon { display: none; }
h2, h3, p { margin: 0 0 8px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; margin-top: 10px; }

.glass {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.glass-panel {
  background: var(--glass-panel);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.glass-hero {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.86), rgba(37, 99, 235, 0.78) 58%, rgba(59, 130, 246, 0.65));
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(147, 197, 253, 0.28);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.24);
}

.soft-box {
  background: var(--soft-gray);
  border: 1px solid var(--soft-gray-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}

/* Header */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 16px; border-radius: 0; border-top: 0; border-left: 0; border-right: 0;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.logo { width: 32px; height: 32px; border-radius: 12px; background: var(--accent); display: grid; place-items: center; font-weight: 800; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--soft-gray); border: 1px solid var(--soft-gray-border); font-size: 13px;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-pill.running .dot { background: var(--ok); }
.status-pill.starting .dot, .status-pill.stopping .dot { background: var(--warn); }
.status-pill.offline .dot { background: var(--danger); }
.menu-btn {
  margin-left: auto; width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--accent);
  cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
}
.menu-btn span { width: 18px; height: 2px; background: #fff; border-radius: 2px; }

/* Sidebar dari kanan */
.sidebar {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(305px, 86vw); z-index: 40;
  border-left: 1px solid var(--border); padding: 18px;
  display: flex; flex-direction: column; gap: 16px;
  transform: translateX(100%); transition: transform .25s ease;
}
.sidebar.open { transform: translateX(0); }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .58); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 30; }
.overlay.show { opacity: 1; pointer-events: auto; }
.profile { display: flex; align-items: center; gap: 12px; }
.pinfo { flex: 1; min-width: 0; }
.pname { font-weight: 700; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #60a5fa); display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.sid-box { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--soft-gray); border: 1px solid var(--soft-gray-border); }
.side-nav { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.nav-link { padding: 12px 16px; border-radius: 999px; color: var(--text); text-decoration: none; font-size: 14px; }
.nav-link.active { background: var(--accent); color: #fff; }
.kill-btn { margin-top: auto; padding: 14px; border: 0; border-radius: var(--radius-sm); background: var(--danger); color: #fff; font-weight: 700; cursor: pointer; font-size: 15px; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--soft-gray-border); background: var(--soft-gray); color: var(--text); cursor: pointer; flex-shrink: 0; font-size: 15px; }

/* Layout */
main { padding: 16px; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.page { display: none; flex-direction: column; gap: 16px; }
.page.active { display: flex; }
.card { border-radius: var(--radius); padding: 18px; }

/* Hero */
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hero-top p { font-size: 20px; font-weight: 700; }
.badge-soft { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); font-size: 12px; font-weight: 600; }
.uptime-label { margin-top: 12px; font-size: 13px; opacity: .88; }
.uptime { font-size: 30px; font-weight: 800; }
.power { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.pill {
  padding: 10px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px;
  background: var(--soft-gray); color: var(--text); border: 1px solid var(--soft-gray-border);
}
.pill-glass { background: rgba(255, 255, 255, 0.16); color: #fff; border: 1px solid rgba(255, 255, 255, 0.22); }
.pill-primary { background: var(--accent); color: #fff; border-color: transparent; }
.pill-danger { background: rgba(220, 38, 38, 0.2); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }
.pill-ghost { background: transparent; }
.pill.wide, .wide { width: 100%; }

/* Stats: 3 kotak abu-abu melengkung */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px; border-radius: 22px; background: rgba(156, 163, 175, 0.12); border: 1px solid rgba(203, 213, 225, 0.16); }
.stat .label { font-size: 12px; color: #cbd5e1; }
.stat .value { font-size: 15px; font-weight: 700; margin: 6px 0 8px; word-break: break-word; }
.bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.bar > div { height: 100%; width: 0; background: #60a5fa; border-radius: 999px; transition: width .4s; }

/* Console */
.console {
  background: rgba(8, 10, 14, 0.85); border: 1px solid var(--soft-gray-border); border-radius: var(--radius-sm);
  padding: 12px; height: 320px; overflow: auto; font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-all; margin: 10px 0;
}
.quick { display: flex; gap: 8px; }
input, textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--soft-gray-border);
  background: var(--soft-gray); color: var(--text); font-size: 14px; font-family: inherit;
}
input[readonly] { opacity: .7; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
textarea { min-height: 300px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.check input { width: auto; }

/* Info & Quick Grid */
.badge { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft-gray); color: var(--muted); }
.badge.running { background: rgba(34, 197, 94, .18); color: #4ade80; }
.badge.starting, .badge.stopping { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.badge.offline { background: rgba(220, 38, 38, .18); color: #f87171; }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.specs > div { padding: 12px; display: flex; flex-direction: column; gap: 4px; border-radius: 22px; background: rgba(156, 163, 175, 0.12); border: 1px solid rgba(203, 213, 225, 0.16); }
.specs b { font-size: 13px; word-break: break-word; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* File manager, Backups & Plugins */
.crumb { font-size: 13px; color: var(--muted); margin: 10px 0; word-break: break-all; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--soft-gray); border: 1px solid var(--soft-gray-border);
}
.file-item.clickable { cursor: pointer; }
.file-item.clickable:hover { border-color: #60a5fa; }
.fi-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.fi-name { font-weight: 600; word-break: break-all; }
.fi-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.backup-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.plugin-url-row { display: flex; gap: 8px; margin-top: 10px; }
.plugin-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.plugin-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px; border-radius: var(--radius-sm); background: var(--soft-gray); border: 1px solid var(--soft-gray-border);
}
.plugin-info { flex: 1; min-width: 0; }
.plugin-title { font-weight: 700; font-size: 15px; }

/* Akun */
.profile-hero { display: flex; align-items: center; gap: 16px; border-radius: var(--radius); padding: 18px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form label.check { flex-direction: row; }
.form .pill { margin-top: 4px; }
.err { color: #f87171; font-size: 13px; min-height: 18px; }

/* Ikon garis (SVG), IP server, dan kotak stat */
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; margin-right: 8px; vertical-align: middle; background: rgba(147, 197, 253, 0.1); color: #93c5fd; }
.ico svg { width: 15px; height: 15px; }
.fi-icon { display: inline-grid; place-items: center; color: #93c5fd; }
.sid-box { padding: 6px 6px 6px 18px; border-radius: 999px; background: rgba(156, 163, 175, 0.12); border: 1px solid rgba(203, 213, 225, 0.16); }
.sid-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
.round-btn.globe { width: 38px; height: 38px; display: grid; place-items: center; background: rgba(37, 99, 235, 0.22); border-color: rgba(147, 197, 253, 0.3); color: #bfdbfe; padding: 0; }
.round-btn.globe svg { width: 18px; height: 18px; }
.stat .label { display: flex; align-items: center; }

/* Mode pagi (terang) */
body.light {
  --bg: #eef1f6;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-panel: rgba(255, 255, 255, 0.92);
  --soft-gray: rgba(15, 23, 42, 0.05);
  --soft-gray-border: rgba(15, 23, 42, 0.12);
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --muted: #64748b;
}
body.light .tabs { background: rgba(255, 255, 255, 0.8); }
body.light .stat .label { color: #334155; }
body.light .pill-glass { background: rgba(37, 99, 235, 0.08); color: var(--text); border-color: rgba(37, 99, 235, 0.2); }
body.light .console { background: rgba(241, 245, 249, 0.9); color: #0f172a; }
body.light .sid-box, body.light .stat, body.light .specs > div { background: rgba(15, 23, 42, 0.05); }
body.light .glass { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08); }

/* Login & toast */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(8px); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 12px; }
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); }
.toast { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--glass-panel); backdrop-filter: blur(14px); border: 1px solid var(--soft-gray-border); font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.toast.err { border-color: var(--danger); }

@media (min-width: 720px) {
  main { padding: 24px; }
  .console { height: 420px; }
  .stat .value { font-size: 19px; }
  .plugin-grid { grid-template-columns: repeat(2, 1fr); }
}
