/* ============================================================
   FreeVPN — subscription generator
   Light / dark themes built on CSS custom properties.
   ============================================================ */

:root {
  --brand: #2f6bff;
  --brand-600: #1f57e0;
  --brand-soft: #eaf0ff;
  --brand-ink: #1746b8;
  --bg: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f9fbff;
  --text: #101828;
  --text-2: #475467;
  --muted: #7a8699;
  --border: #e6ebf5;
  --border-strong: #d5dded;
  --success: #12b76a;
  --success-soft: #e7f8f0;
  --danger: #e5484d;
  --danger-soft: #fdeced;
  --warn: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, .06), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 60px rgba(16, 24, 40, .16);
  --radius: 16px;
  --radius-sm: 11px;
  --ring: 0 0 0 3px rgba(47, 107, 255, .22);
  color-scheme: light;
}

[data-theme="dark"] {
  --brand: #6b96ff;
  --brand-600: #5585ff;
  --brand-soft: #17244a;
  --brand-ink: #a8c1ff;
  --bg: #080d1c;
  --surface: #101829;
  --surface-2: #0c1322;
  --text: #e8eefb;
  --text-2: #a8b6d0;
  --muted: #7f8fae;
  --border: #1d2941;
  --border-strong: #2a3854;
  --success: #34d399;
  --success-soft: #0e2a22;
  --danger: #ff6b6f;
  --danger-soft: #2b1416;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(107, 150, 255, .28);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; letter-spacing: -.018em; }
p { margin: 0; }
button { font: inherit; color: inherit; }

.sprite { display: none; }

.icon {
  width: 18px; height: 18px;
  fill: currentColor;
  flex: none;
}
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 13px; height: 13px; }
.brand-ico { color: var(--brand); vertical-align: -3px; }

/* ----------------------------------------------------------- top bar */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), #7aa2ff);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, .32);
}
.brand-mark .icon { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.brand-text small { font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }

.topbar-actions { display: flex; align-items: center; gap: 8px; position: relative; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  transition: border-color .15s, background .15s, transform .1s;
}
.ghost-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ghost-btn:active { transform: translateY(1px); }
.ghost-btn.icon-only { width: 40px; padding: 0; justify-content: center; }
#langBtn .icon-xs { transform: rotate(90deg); opacity: .6; }

.lang-menu {
  position: absolute; top: 48px; right: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  min-width: 190px;
  z-index: 50;
}
.lang-menu button {
  display: block; width: 100%; text-align: left;
  padding: 9px 11px; border: 0; background: none;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500;
}
.lang-menu button:hover { background: var(--brand-soft); color: var(--brand-ink); }

/* ------------------------------------------------------------- shell */

.shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr) 384px;
  gap: 24px;
  align-items: start;
}

/* ----------------------------------------------------------- sidebar */

.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px;
  border-radius: 11px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--brand-soft); color: var(--brand-ink); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.promo {
  background: linear-gradient(160deg, var(--brand-soft), color-mix(in srgb, var(--brand-soft) 40%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.promo-icon {
  width: 42px; height: 42px; margin: 0 auto 10px;
  border-radius: 12px; display: grid; place-items: center;
  background: var(--brand); color: #fff;
  box-shadow: 0 8px 18px rgba(47, 107, 255, .28);
}
.promo strong { display: block; font-size: 14.5px; margin-bottom: 6px; }
.promo p { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }

/* ----------------------------------------------------------- content */

.content { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* banner pemulihan subscription */
.recover {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
}
.recover[hidden] { display: none; }
.recover-icon {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex: none;
  background: var(--warn); color: #fff;
}
.recover-text strong { font-size: 14px; }
.recover-text p { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.recover-text code {
  font-family: ui-monospace, Menlo, monospace; font-size: 11.5px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 5px;
}
.recover-actions { display: flex; gap: 8px; align-items: center; }
.recover-actions input {
  width: 230px; height: 36px; font-size: 12.5px;
  font-family: ui-monospace, Menlo, monospace;
}

.token-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px; color: var(--muted);
}
.token-line code {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.token-line .icon-btn { width: 26px; height: 26px; flex: none; }

.hero {
  position: relative;
  display: flex; align-items: center; gap: 20px;
  padding: 26px 30px;
  border-radius: var(--radius);
  background:
    radial-gradient(1100px 300px at 88% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-soft) 35%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  overflow: hidden;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-ink);
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  margin-bottom: 10px;
}
.hero h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.hero p { margin-top: 8px; color: var(--text-2); max-width: 52ch; font-size: 14px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0 0; padding: 0; list-style: none; }
.hero-points li { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.hero-points .icon { width: 17px; height: 17px; color: var(--brand); }
.hero-art { margin-left: auto; width: 230px; flex: none; }
.hero-art svg { width: 100%; height: auto; }

/* -------------------------------------------------------------- card */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-sub { margin-top: 5px; color: var(--muted); font-size: 12.8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.head-tools { display: flex; align-items: center; gap: 8px; }

.badge {
  padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-2);
}

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* ------------------------------------------------------------ inputs */

.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin: 16px 0 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.seg-btn {
  padding: 9px 12px; border: 0; border-radius: 9px;
  background: transparent; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg-btn:hover { color: var(--text-2); }
.seg-btn.is-active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.input-wrap { position: relative; display: block; }

input[type="text"], input[type="number"], input[type="search"], input[type="password"], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8699' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
  padding-right: 34px;
}
.input-wrap textarea { padding-right: 44px; }
.input-action {
  position: absolute; top: 9px; right: 9px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.input-action:hover { color: var(--brand); border-color: var(--brand); }
textarea + .input-action { top: 9px; }

.check {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer; font-size: 13px; font-weight: 500;
  user-select: none;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 18px; height: 18px; border-radius: 6px;
  border: 1.6px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; color: transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.check .box .icon { width: 13px; height: 13px; }
.check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.check:has(input:checked) .box { background: var(--brand); border-color: var(--brand); color: #fff; }
.check:has(input:focus-visible) { box-shadow: var(--ring); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }

.advanced {
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2);
  margin: 4px 0 16px; overflow: hidden;
}
.advanced > summary {
  list-style: none; cursor: pointer;
  padding: 11px 14px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary .icon { transition: transform .18s; transform: rotate(90deg); }
.advanced[open] > summary .icon { transform: rotate(-90deg); }
.advanced-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); }

.form-section-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin: 14px 0 8px;
}
.form-section-title:first-child { margin-top: 10px; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(47, 107, 255, .26); }
.btn-primary:hover { background: var(--brand-600); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.chip {
  padding: 7px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* ------------------------------------------------------- account list */

.info-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; max-height: 430px; overflow: auto; }
.info-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s;
}
.info-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 17px; line-height: 1;
}
.avatar.is-flag { font-size: 19px; }
.info-main { min-width: 0; flex: 1; }
.info-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-meta { font-size: 11.8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--success); margin-top: 1px; }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 20%, transparent); }

.row-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center; vertical-align: middle;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

.empty {
  padding: 26px 16px; text-align: center;
  color: var(--muted); font-size: 13px;
  border: 1px dashed var(--border-strong); border-radius: 12px;
  background: var(--surface-2);
}

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

.table-wrap { margin-top: 14px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.table th:first-child { border-top-left-radius: 10px; }
.table th:last-child { border-top-right-radius: 10px; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table td:last-child { white-space: nowrap; }
.table td:last-child .btn-sm { vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.ta-r { text-align: right; }
.cell-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 11.5px; font-weight: 700; text-transform: lowercase;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--text-2); }
.search { width: 190px; height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }

/* --------------------------------------------------------------- rail */

.rail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: 11.5px; }
.stat .icon { width: 19px; height: 19px; color: var(--brand); }
.stat b { color: var(--text); }
.sub-tools { display: flex; gap: 8px; margin-top: 14px; }
.sub-tools .btn { flex: 1; }

/* phone preview */
.phone {
  width: 232px; margin: 18px auto 14px;
  padding: 10px;
  border-radius: 34px;
  background: linear-gradient(160deg, #2b3550, #0d1220);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .08);
  position: relative;
}
.phone-notch {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 18px; border-radius: 999px; background: #06090f; z-index: 2;
}
.phone-screen {
  border-radius: 26px; overflow: hidden;
  background: #141a27; color: #e8edf7;
  font-size: 11px; line-height: 1.4;
}
.phone-status { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px 4px; font-size: 10.5px; font-weight: 600; }
.phone-status-right { display: flex; gap: 3px; align-items: center; }
.phone-status-right i { display: block; width: 4px; height: 7px; background: #cfd8e8; border-radius: 1px; }
.phone-status-right i:first-child { height: 4px; margin-right: 2px; }
.phone-nav { display: flex; align-items: center; gap: 6px; padding: 8px 14px 10px; }
.phone-nav strong { font-size: 13px; font-weight: 600; flex: 1; }
.phone-nav .icon { transform: rotate(180deg); opacity: .75; }
.phone-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 14px 10px; }
.phone-tabs span { text-align: center; padding: 6px 0; border-radius: 7px; color: #8b96ad; font-weight: 600; font-size: 10.5px; }
.phone-tabs span.is-active { background: #23304a; color: #6f96ff; }
.phone-body { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.phone-input {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 8px;
  background: #0d1220; border: 1px solid #26314a;
  font-family: ui-monospace, Menlo, monospace; font-size: 9.5px;
}
.phone-input span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: rtl; text-align: left; color: #9fb0cd; }
.phone-qr { background: #fff; padding: 8px; border-radius: 10px; display: grid; place-items: center; }
.phone-hint { text-align: center; color: #7d8aa3; font-size: 10px; }
.phone-btn {
  height: 34px; border: 0; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.phone-switch { display: flex; gap: 8px; justify-content: center; }

/* --------------------------------------------------------------- log */

.log-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; }
.log-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12.5px;
}
.log-item time { color: var(--muted); font-size: 11.5px; margin-left: auto; white-space: nowrap; }
.log-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none; }
.log-dot.is-add { background: var(--success); }
.log-dot.is-del { background: var(--danger); }

/* -------------------------------------------------------------- help */

.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.help-grid article { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.help-grid h3 { display: flex; align-items: center; gap: 7px; font-size: 13.5px; margin-bottom: 8px; }
.help-grid h3 .icon { color: var(--brand); }
.help-grid p, .help-grid ol { font-size: 12.5px; color: var(--text-2); }
.help-grid ol { padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.help-grid code {
  font-family: ui-monospace, Menlo, monospace; font-size: 11.5px;
  background: var(--brand-soft); color: var(--brand-ink); padding: 1px 6px; border-radius: 5px;
}

/* -------------------------------------------------------------- modal */

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 24, .55); backdrop-filter: blur(3px); }
.modal-card {
  position: relative; width: min(660px, 100%);
  max-height: min(86vh, 900px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ------------------------------------------------------------- toasts */

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 380px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 13px; font-weight: 500;
  animation: slide-in .2s ease-out;
}
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } }
.toast .icon { width: 17px; height: 17px; }
.toast.ok { border-left: 3px solid var(--success); }
.toast.ok .icon { color: var(--success); }
.toast.err { border-left: 3px solid var(--danger); }
.toast.err .icon { color: var(--danger); }
.toast.info { border-left: 3px solid var(--brand); }
.toast.info .icon { color: var(--brand); }

/* -------------------------------------------------------- responsive */

@media (max-width: 1320px) {
  .shell { grid-template-columns: 210px minmax(0, 1fr); }
  .rail { grid-column: 1 / -1; position: static; flex-direction: row; flex-wrap: wrap; }
  .rail > .card { flex: 1 1 340px; }
}

@media (max-width: 980px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-art { display: none; }
  .recover { grid-template-columns: auto minmax(0, 1fr); }
  .recover-actions { grid-column: 1 / -1; }
  .recover-actions input { flex: 1; width: auto; }
}

@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .sidebar { position: static; }
  .nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .nav-item { white-space: nowrap; }
  .promo { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .brand-text small { display: none; }
  .stats { grid-template-columns: 1fr; }
  .toasts { left: 16px; right: 16px; }
  .toast { min-width: 0; max-width: none; }
}

/* link subscription: URL panjang membutuhkan ruang lebih */
#subLink { min-height: 104px; font-size: 12px; line-height: 1.7; word-break: break-all; }
