:root {
  --bg: #0a0d12;
  --surface: #12151b;
  --surface-2: #171b23;
  --line: #242833;
  --text: #e7e9ee;
  --muted: #8a92a3;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --blue-dim: #2563eb;
  --amber: #f59e0b;
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .03), 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-float: inset 0 1px 0 rgba(255, 255, 255, .04), 0 16px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* --- Topbar --- */

.topbar {
  height: 64px;
  width: calc(100% - 264px);
  margin-left: 264px;
  padding-left: 28px;
  padding-right: max(24px, calc((100vw - 1440px) / 2));
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 18, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 24px rgba(0, 0, 0, .2);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { display: none; }

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand > span:last-child span { color: var(--blue); }
.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 8px;
  font-weight: 700;
}

.nav { align-self: stretch; display: flex; gap: 30px; margin-left: 70px; }
.nav a { color: var(--muted); text-decoration: none; display: flex; align-items: center; position: relative; font-size: 13px; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.active::after { content: ""; height: 2px; background: var(--blue); position: absolute; left: 0; right: 0; bottom: 0; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-button { border: 0; border-radius: 8px; background: none; color: var(--muted); width: 34px; height: 34px; position: relative; cursor: pointer; transition: background .15s ease, color .15s ease; }
.icon-button:hover { color: var(--text); background: var(--surface-2); }
.icon-button svg, .primary-button svg, .search svg { fill: none; stroke: currentColor; stroke-width: 1.7; }
.notification-dot { position: absolute; width: 6px; height: 6px; background: var(--red); border: 2px solid var(--bg); border-radius: 50%; right: 5px; top: 4px; }

.avatar, .header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #c7d2fe;
  background: #1e2635;
  border: 1px solid var(--line);
}

/* --- Main layout --- */

main {
  max-width: none;
  margin-left: 264px;
  padding: 32px clamp(22px, 4vw, 48px) 64px;
}

.page-path { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 11px; }
.page-path b, .page-path span { color: var(--muted); font-weight: 500; }
.page-path strong { color: var(--text); font-weight: 500; }

/* --- Hero / page header --- */

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
}

.eyebrow { color: var(--blue); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; }
h1 { font-size: clamp(22px, 3vw, 28px); line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 700; color: var(--text); }
.subtitle { color: var(--muted); margin: 8px 0 0; font-size: 13px; line-height: 1.6; max-width: 520px; }

.refresh-area { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; }
.refresh-time { padding-right: 18px; text-align: right; border-right: 1px solid var(--line); }
.refresh-time span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.refresh-time strong { display: block; color: var(--text); font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; white-space: nowrap; }

.primary-button {
  height: 38px;
  padding: 0 16px;
  color: #fff;
  border: 1px solid var(--blue);
  background: var(--blue);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, .22);
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.primary-button:hover { background: var(--blue-dim); box-shadow: 0 6px 18px rgba(59, 130, 246, .3); }
.primary-button:active { transform: scale(.98); }
.primary-button svg { width: 15px; }
.primary-button.loading svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Stats --- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 28px 0 18px;
}

.stats.stats-compact { grid-template-columns: minmax(0, 280px); }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease, transform .15s ease;
}
.stat-card:hover { border-color: #333a48; transform: translateY(-1px); }

.stat-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; font-family: "DM Mono", monospace; }
.stat-icon.green { color: var(--green); background: rgba(34, 197, 94, .1); }
.stat-icon.blue { color: var(--blue); background: rgba(59, 130, 246, .12); }
.stat-icon.red { color: var(--red); background: rgba(239, 68, 68, .1); }
.stat-icon.amber { color: var(--amber); background: rgba(245, 158, 11, .1); }
.stat-card span { color: var(--muted); display: block; font-size: 11px; margin-bottom: 5px; }
.stat-card strong { font-family: "DM Mono", monospace; font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.stat-card strong.loss { color: var(--red); }
.stat-card small { grid-column: 1 / -1; color: #616a78; font-size: 10px; margin-left: 48px; margin-top: -8px; }

/* --- Panel / table --- */

.panel { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.panel-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
h2 { font-size: 13px; margin: 0 0 5px; color: var(--text); font-weight: 600; }
.panel-header p { margin: 0; font-size: 10px; color: var(--muted); }
.live-dot { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; margin-right: 5px; }

.panel-tools { display: flex; align-items: center; gap: 10px; }
/* Aksi massal (stop all / archive all) di header panel worker. */
.bulk-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.bulk-button:hover:not(:disabled) { color: var(--text); }
.bulk-start:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.bulk-stop:hover:not(:disabled) { border-color: var(--red, #ef4444); color: var(--red, #ef4444); }
.bulk-archive:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.bulk-button:disabled { opacity: .45; cursor: not-allowed; }

.col-menu { position: relative; }
.col-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  cursor: pointer;
}
.col-toggle svg { stroke: currentColor; fill: none; stroke-width: 2; }
.col-toggle:hover { border-color: var(--blue); color: var(--text); }
.col-dropdown {
  position: absolute;
  right: 0;
  top: 42px;
  z-index: 40;
  width: 200px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow-float);
}
.col-dropdown-title { margin: 2px 4px 8px; color: #727a89; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.col-option { display: flex; align-items: center; gap: 9px; padding: 6px 6px; border-radius: 6px; color: #c3c9d3; font-size: 11px; cursor: pointer; }
.col-option:hover { background: var(--surface); }
.col-option input { accent-color: var(--blue); width: 14px; height: 14px; }
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.th-sort:hover { color: #c3c9d3; }
.th-sort-active { color: var(--blue); }
.sort-arrow { font-size: 9px; margin-left: 2px; }

.search {
  width: 220px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .14); }
.search svg { width: 15px; flex: 0 0 auto; }
.search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 11px; }

.table-wrap {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #2c313d transparent;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: #2c313d; border-radius: 8px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #3a4150; }

table { width: 100%; border-collapse: collapse; min-width: max-content; }
thead { background: var(--surface-2); }
th {
  color: #7d8494;
  padding: 12px 17px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 9px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

td {
  height: 50px;
  padding: 0 17px;
  color: #aeb4c0;
  border-bottom: 1px solid var(--line);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  white-space: nowrap;
}

tbody tr { transition: background .12s; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .012); }
/* Aksen kiri dipasang di baris, bukan di td:first-child, supaya tetap muncul
   walau kolom pertama disembunyikan lewat menu Kolom. */
tbody tr:hover { background: linear-gradient(to right, var(--blue) 0 2px, var(--surface-2) 2px); }

.sort { color: var(--blue); font-size: 8px; margin-left: 3px; }
.account { display: flex; align-items: center; gap: 9px; }
.account-number { color: #727a89; }

.badge { border-radius: 6px; padding: 3px 8px; font-family: Inter, sans-serif; font-size: 9px; font-weight: 600; letter-spacing: .02em; }
.badge.member { color: #4ade80; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .18); }
.badge.guest { color: #fbbf24; background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .18); }
.badge.idpass { color: #4ade80; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .18); }

.profit { color: var(--green); }
.loss { color: var(--red); }
.status { font-family: Inter, sans-serif; color: #b2b9c6; }
.status-dot { color: #8a92a3; font-size: 15px; vertical-align: -1px; margin-right: 5px; }
.status-indicator { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; vertical-align: 1px; background: currentColor; }
.status-running { color: #4ade80; }
.status-stopped { color: #f87171; }
.status-disconnected { color: #6b7280; }

.worker-number {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .01em;
  color: #93c5fd;
  background: rgba(59, 130, 246, .1);
  border: 1px solid rgba(59, 130, 246, .18);
  white-space: nowrap;
}

.game-select {
  width: 88px;
  max-width: 100%;
  padding: 6px 20px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-2);
  font: inherit;
}
.game-select:disabled { cursor: wait; opacity: .6; }

.bet-input {
  width: 92px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  color: var(--text);
  background: var(--surface-2);
  font: inherit;
}
.bet-input:focus { border-color: var(--blue); }
.bet-input:disabled { cursor: wait; opacity: .6; }
.bet-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.bet-auto::before {
  content: "⌁";
  color: var(--blue);
  font-size: 12px;
}

.bet-result { font-weight: 600; }
.bet-win { color: #4ade80; }
.bet-lose { color: #f87171; }
.bet-draw { color: #6b7280; }
.balance-win { color: #4ade80; font-weight: 600; }
.balance-lose { color: #f87171; font-weight: 600; }
.balance-draw { color: #b2b9c6; }

.account-action {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .12s ease, color .12s ease;
}
.action-stop { color: #f87171; }
.action-play { color: #4ade80; }
.action-archive { color: #93c5fd; }
.account-action:hover { background: currentColor; color: #0a0d12; }
.account-action:disabled { cursor: wait; opacity: .5; }
.account-action + .account-action { margin-left: 6px; }
.cell-actions { white-space: nowrap; }
.cell-actions > * { display: inline-grid; vertical-align: middle; }
.cell-actions > * + * { margin-left: 6px; }

.menu-button { color: #727a89; background: none; border: 0; cursor: pointer; font-size: 18px; }
.empty { text-align: center; color: var(--muted); height: 130px; }

.panel-footer { padding: 13px 20px; display: flex; justify-content: space-between; color: #616a78; font-size: 9px; border-top: 1px solid var(--line); }

/* --- Sidebar --- */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: 4px 0 24px rgba(0, 0, 0, .22);
}

.sidebar-brand { min-height: 64px; padding: 0 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.sidebar-logo { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--blue); border-radius: 8px; }
.sidebar-brand div { display: flex; flex-direction: column; gap: 3px; }
.sidebar-brand strong { font-size: 12px; letter-spacing: .06em; }
.sidebar-brand small { color: var(--muted); font-size: 7px; letter-spacing: .16em; }
.sidebar-close { display: block; margin-left: auto; border: 0; color: var(--muted); background: transparent; font-size: 22px; cursor: pointer; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2c313d transparent; }
.nav-group { margin-bottom: 18px; }
.nav-group p { margin: 0; padding: 8px 12px; color: #5b6472; font-size: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.sidebar-link {
  min-height: 38px;
  margin: 2px 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 7px;
  font-size: 12px;
  transition: color .15s, background .15s;
}
.sidebar-link:hover { color: var(--text); background: var(--surface-2); }
.sidebar-link.active { color: #fff; background: rgba(59, 130, 246, .12); box-shadow: inset 2px 0 var(--blue); }

.nav-icon { width: 20px; color: #6b7280; font-family: "DM Mono", monospace; font-size: 16px; text-align: center; }
.sidebar-link.active .nav-icon { color: var(--blue); }
.active-pulse { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--blue); }

.nav-count, .nav-pill { margin-left: auto; color: #93c5fd; background: rgba(59, 130, 246, .12); border-radius: 8px; padding: 3px 7px; font-size: 8px; font-weight: 700; }
.nav-pill { color: #fbbf24; background: rgba(245, 158, 11, .12); letter-spacing: .05em; }

.system-card { margin: 0 12px 12px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); box-shadow: var(--shadow-card); }
.system-card > div:first-child { display: flex; align-items: center; gap: 8px; }
.system-card strong { font-size: 10px; font-weight: 600; }
.system-card small { display: block; margin: 6px 0 10px 16px; color: var(--muted); font-size: 8px; }
.system-orbit { width: 7px; height: 7px; border: 2px solid var(--green); border-radius: 50%; }
.system-orbit.is-idle { border-color: var(--muted); }
.health-track { height: 3px; overflow: hidden; border-radius: 4px; background: #252a34; }
.health-track span { display: block; width: 100%; height: 100%; background: var(--green); }

.sidebar-profile { min-height: 64px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); }
.sidebar-profile .avatar { flex: 0 0 auto; width: 34px; height: 34px; }
.sidebar-profile > div:nth-child(2) { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 4px; }
.sidebar-profile strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile small { color: var(--muted); font-size: 8px; }
.sidebar-profile button { border: 0; color: var(--muted); background: none; cursor: pointer; }

.sidebar, .topbar, main { transition: transform .2s ease, margin-left .2s ease, width .2s ease; }

.mobile-menu { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface-2); cursor: pointer; }
.mobile-menu:hover { border-color: var(--blue); }
.sidebar-overlay { display: none; }

body.sidebar-hidden .sidebar { transform: translateX(-105%); }
body.sidebar-hidden .topbar { width: 100%; margin-left: 0; }
body.sidebar-hidden main { margin-left: 0; }

/* --- Account creator page --- */

.creator-main { padding-top: 28px; }

.creator-heading {
  min-height: 100px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.creator-heading h1 { font-size: 22px; }
.creator-heading-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(59, 130, 246, .1);
  font-size: 26px;
}

.creator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; margin-top: 18px; }

.creator-card, .creator-info, .results-card { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-card); }
.creator-card { padding: 24px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.section-title h2, .results-header h2 { margin: 0 0 4px; color: var(--text); font-size: 13px; }
.section-title p, .results-header p { margin: 0; color: var(--muted); font-size: 9px; }
.section-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--blue);
  border-radius: 8px;
  background: rgba(59, 130, 246, .1);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; color: #a8afbc; font-size: 10px; }
.field small { color: #616a78; font-size: 8px; }
.field input, .field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--text);
  background: var(--surface-2);
  border-radius: 7px;
  font-size: 11px;
}
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .14); }
.delay-range { display: flex; align-items: center; gap: 8px; }
.delay-range input { text-align: center; }
.delay-sep { color: #616a78; font-size: 12px; }

.toggle-field {
  margin-top: 20px;
  padding: 14px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  cursor: pointer;
}
.toggle-field > span { display: flex; flex: 1; flex-direction: column; gap: 4px; }
.toggle-field strong { color: #c3c9d3; font-size: 10px; }
.toggle-field small { color: #616a78; font-size: 8px; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-field i { width: 34px; height: 19px; position: relative; border-radius: 10px; background: #2c313d; transition: .15s; }
.toggle-field i::after {
  content: "";
  width: 13px;
  height: 13px;
  position: absolute;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #8a92a3;
  transition: .15s;
}
.toggle-field input:checked + i { background: var(--blue); }
.toggle-field input:checked + i::after { left: 18px; background: white; }

.field-toggle { justify-content: flex-start; }
.switch { display: flex; align-items: center; gap: 10px; height: 40px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 34px; height: 19px; flex: 0 0 auto; position: relative; border-radius: 10px; background: #2c313d; transition: .15s; }
.switch-track::after {
  content: "";
  width: 13px;
  height: 13px;
  position: absolute;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #8a92a3;
  transition: .15s;
}
.switch input:checked + .switch-track { background: var(--blue); }
.switch input:checked + .switch-track::after { left: 18px; background: white; }
.switch-label { color: #c3c9d3; font-size: 10px; }

.pass-cell { color: #fbbf24; font-family: "DM Mono", monospace; margin-right: 8px; }
td .copy-button { height: 26px; padding: 0 10px; font-size: 9px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.secondary-button, .create-button, .copy-button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #c3c9d3;
  background: var(--surface-2);
  font-size: 10px;
  cursor: pointer;
}
.secondary-button:hover, .copy-button:hover { border-color: var(--blue); }
.secondary-button:disabled { opacity: .4; cursor: not-allowed; }

.create-button { border: 1px solid var(--blue); color: #fff; background: var(--blue); box-shadow: 0 4px 14px rgba(59, 130, 246, .22); transition: background .15s ease, box-shadow .15s ease; }
.create-button:hover { background: var(--blue-dim); box-shadow: 0 6px 18px rgba(59, 130, 246, .3); }
.create-button:disabled { opacity: .6; cursor: wait; }

.creator-info { padding: 24px; }
.info-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--blue); border-radius: 9px; background: rgba(59, 130, 246, .1); }
.creator-info h2 { margin: 20px 0 10px; font-size: 14px; }
.creator-info p { color: var(--muted); font-size: 10px; line-height: 1.7; }
.creator-info ul { padding: 0; margin: 22px 0 0; list-style: none; }
.creator-info li { margin: 11px 0; color: #b0b7c2; font-size: 9px; }
.creator-info li span { margin-right: 8px; color: var(--green); }

.results-card { margin-top: 18px; overflow: hidden; }
.results-header { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.results-empty { min-height: 160px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #5b6472; }
.results-empty span { font-size: 22px; }
.results-empty strong { margin: 10px 0 4px; color: #8a92a3; font-size: 11px; }
.results-empty p { margin: 0; font-size: 8px; }

.result-row {
  min-height: 62px;
  padding: 10px 22px;
  display: grid;
  grid-template-columns: 36px minmax(180px, 1fr) 200px auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
}
.result-number { color: #5b6472; font-family: "DM Mono", monospace; font-size: 9px; }
.result-credentials { display: flex; flex-direction: column; gap: 5px; }
.result-credentials strong { color: var(--text); font-size: 11px; }
.result-credentials code { color: #8a92a3; font-size: 9px; }
.result-meta { display: flex; gap: 8px; }
.result-meta span { padding: 4px 8px; color: #a8afbc; border-radius: 8px; background: var(--surface-2); font-size: 8px; }
.copy-button { height: 32px; }

.queue-status { min-width: 76px; padding: 6px 10px; border-radius: 8px; text-align: center; text-transform: uppercase; font-size: 8px; font-weight: 700; letter-spacing: .06em; }
.queue-pending { color: #fbbf24; background: rgba(245, 158, 11, .12); }
.queue-processing { color: #93c5fd; background: rgba(59, 130, 246, .13); }
.queue-done { color: #4ade80; background: rgba(34, 197, 94, .12); }
.queue-failed { color: #f87171; background: rgba(239, 68, 68, .12); }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  padding: 12px 16px;
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, .3);
  border-radius: 8px;
  background: #0f2419;
  font-size: 10px;
  opacity: 0;
  box-shadow: var(--shadow-float);
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s;
}
.toast.show { opacity: 1; transform: translateY(0); }

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 8, 12, .68);
  backdrop-filter: blur(2px);
}
.confirm-box {
  width: 100%;
  max-width: 420px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
}
.confirm-box h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text);
}
.confirm-desc {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
}
.confirm-list {
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
}
.confirm-list dt {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}
.confirm-list dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.confirm-actions button {
  padding: 9px 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--line);
}
.confirm-cancel {
  background: var(--surface-2);
  color: var(--text);
}
.confirm-cancel:hover { border-color: var(--muted); }
.confirm-ok {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue-dim);
}
.confirm-ok:hover { background: var(--blue-dim); }
.confirm-danger {
  background: var(--red);
  border-color: var(--red);
}
.confirm-danger:hover { background: #dc2626; border-color: #dc2626; }

@media (max-width: 950px) {
  .creator-layout { grid-template-columns: 1fr; }
  .creator-info { display: none; }
}

@media (max-width: 600px) {
  .page-path { display: none; }
  .creator-main { padding-top: 20px; }
  .creator-heading { min-height: 0; padding: 22px 20px; }
  .creator-heading-mark { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .creator-card { padding: 18px; }
  .result-row { grid-template-columns: 28px 1fr auto; }
  .result-meta { display: none; }
}

/* --- Accessibility / motion --- */

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* --- Responsive --- */

@media (max-width: 1100px) {
  .sidebar { width: 230px; }
  .topbar { width: calc(100% - 230px); margin-left: 230px; }
  main { margin-left: 230px; }
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}

@media (max-width: 760px) {
  .sidebar {
    width: min(284px, 86vw);
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(0, 0, 0, .6);
  }
  .sidebar-overlay.show { display: block; }
  .topbar { width: 100%; margin-left: 0; }
  main { margin-left: 0; }
}

@media (max-width: 600px) {
  main { padding: 24px 16px 48px; }
  .topbar { padding-right: 16px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .primary-button { width: 100%; justify-content: center; }
  .refresh-area { width: 100%; align-items: stretch; flex-direction: column; gap: 10px; }
  .refresh-time { padding: 0; text-align: left; border-right: 0; }
  .stats { grid-template-columns: 1fr; margin-top: 20px; }
  .panel-header { align-items: stretch; flex-direction: column; gap: 12px; }
  .search { width: 100%; }
  .panel-footer { gap: 10px; flex-direction: column; }
}

/* --- Halaman login --- */

.login-body {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  /* Halaman login berdiri sendiri: tidak ada sidebar/topbar. */
  grid-template-columns: 1fr;
}

.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 360px at 18% 12%, rgba(59, 130, 246, .10), transparent 60%),
    radial-gradient(480px 320px at 88% 82%, rgba(59, 130, 246, .07), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 42px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 42px 100%;
  -webkit-mask-image: radial-gradient(760px 560px at 50% 40%, #000, transparent 78%);
  mask-image: radial-gradient(760px 560px at 50% 40%, #000, transparent 78%);
  opacity: .5;
}

.login-shell { position: relative; z-index: 1; width: 100%; max-width: 380px; }

.login-card {
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
}

.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; }
.login-brand > div { display: flex; flex-direction: column; gap: 3px; }
.login-brand strong { font-size: 12px; letter-spacing: .08em; }
.login-brand small { color: var(--muted); font-size: 8px; letter-spacing: .14em; }

.login-card h1 { margin: 0 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.login-sub { margin: 0 0 22px; color: var(--muted); font-size: 11px; }

.login-card form { display: flex; flex-direction: column; gap: 16px; }

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.5;
}
.login-alert-icon { flex: 0 0 auto; margin-top: 2px; opacity: .85; }
.login-alert-error {
  border-color: rgba(239, 68, 68, .4);
  color: #fca5a5;
  background: rgba(239, 68, 68, .08);
}

.field-icon .field-input {
  position: relative;
  display: flex;
  align-items: center;
}
.field-icon .field-input > svg:first-child {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}
.field-icon .field-input input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 34px;
  border: 1px solid var(--line);
  outline: 0;
  color: var(--text);
  background: var(--surface-2);
  border-radius: 7px;
  font-size: 11px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field-icon .field-input input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, .14); }
.field-icon .field-input input[name="password"] { padding-right: 34px; }

.field-toggle-visibility {
  position: absolute;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: none;
  cursor: pointer;
}
.field-toggle-visibility:hover { color: var(--text); }
.field-toggle-visibility.is-visible { color: var(--blue); }

.login-button {
  position: relative;
  height: 42px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.login-button:hover { background: var(--blue-dim); }
.login-button:active { transform: translateY(1px); }
.login-button.is-loading { color: transparent; cursor: default; }
.login-button.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .7s linear infinite;
}
@keyframes login-spin { to { transform: rotate(360deg); } }

.login-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 22px 0 0;
  color: #616a78;
  font-size: 9px;
  text-align: center;
}

/* Tombol logout di kartu profil sidebar. */
.logout-form { margin: 0; flex: 0 0 auto; }
.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: none;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.logout-button:hover { border-color: rgba(239, 68, 68, .4); color: var(--red); background: rgba(239, 68, 68, .08); }

/* --- Topbar bersama: profil + notifikasi (topbar.js) --- */
.header-actions .header-avatar { cursor: pointer; transition: box-shadow .15s ease, transform .1s ease; }
.header-actions .header-avatar:hover { box-shadow: 0 0 0 2px rgba(59, 130, 246, .35); }
.header-actions .header-avatar:active { transform: scale(.96); }

.rd-anchor { position: relative; display: inline-flex; }

.rd-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 224px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-float);
  padding: 6px;
  z-index: 70;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .13s ease, transform .13s ease, visibility .13s;
}
.rd-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }

.rd-menu-head { display: flex; align-items: center; gap: 11px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.rd-menu-avatar {
  width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
  color: #c7d2fe; background: #1e2635; border: 1px solid var(--line);
}
.rd-menu-id { min-width: 0; }
.rd-menu-id strong { display: block; font-size: 13px; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-menu-id small { font-size: 11px; color: var(--muted); }

.rd-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--text); font-size: 13px; font-weight: 500;
  text-align: left; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.rd-menu-item:hover { background: var(--surface-2); }
.rd-menu-item .rd-mi-ic { width: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.rd-menu-item.danger:hover { background: rgba(239, 68, 68, .1); color: var(--red); }
.rd-menu-item.danger:hover .rd-mi-ic { color: var(--red); }

/* Notifikasi */
.rd-notif-menu { min-width: 300px; padding: 0; overflow: hidden; }
.rd-notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rd-notif-head strong { font-size: 13px; color: var(--text); }
.rd-notif-seen { border: 0; background: none; color: var(--blue); font-size: 11px; font-weight: 600; cursor: pointer; padding: 0; }
.rd-notif-seen:hover { text-decoration: underline; }
.rd-notif-list { max-height: 340px; overflow-y: auto; }
.rd-notif-empty { padding: 26px 14px; text-align: center; color: var(--muted); font-size: 12px; }
.rd-notif-item { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.rd-notif-item:last-child { border-bottom: 0; }
.rd-notif-item.unread { background: rgba(59, 130, 246, .06); }
.rd-notif-ic {
  width: 28px; height: 28px; flex: 0 0 auto; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px;
  color: var(--green); background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .22);
}
.rd-notif-txt { min-width: 0; }
.rd-notif-txt strong { display: block; font-size: 12px; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-notif-txt small { font-size: 11px; color: var(--muted); font-family: "DM Mono", monospace; }

/* Modal ganti password */
.rd-modal {
  position: fixed; inset: 0; z-index: 80; padding: 20px;
  display: none; align-items: center; justify-content: center;
  background: rgba(5, 7, 11, .72); backdrop-filter: blur(3px);
}
.rd-modal.open { display: flex; animation: rdFade .12s ease; }
@keyframes rdFade { from { opacity: 0; } to { opacity: 1; } }
.rd-modal-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-float); overflow: hidden;
}
.rd-modal-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.rd-modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); }
.rd-modal-head p { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.rd-modal-body { padding: 20px 22px; }
.rd-field { margin-bottom: 15px; }
.rd-field label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.rd-field input {
  width: 100%; height: 40px; padding: 0 13px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; outline: none; transition: border-color .12s ease;
}
.rd-field input:focus { border-color: var(--blue); }
.rd-pw-msg { margin: 4px 0 0; font-size: 12px; min-height: 16px; color: var(--muted); }
.rd-pw-msg.err { color: var(--red); }
.rd-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.rd-btn {
  height: 38px; padding: 0 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--line); transition: background .12s ease, border-color .12s ease, opacity .12s ease;
}
.rd-btn.ghost { background: var(--surface-2); color: var(--muted); }
.rd-btn.ghost:hover { color: var(--text); }
.rd-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.rd-btn.primary:hover { background: var(--blue-dim); }
.rd-btn:disabled { opacity: .6; cursor: default; }

/* Toast bersama */
.rd-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  z-index: 90; max-width: 90vw; padding: 12px 18px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow-float);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.rd-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.rd-toast.ok { border-color: rgba(34, 197, 94, .4); }
.rd-toast.err { border-color: rgba(239, 68, 68, .4); }
