/* Tema TicketiNe — warna diambil dari icon bot (biru es → cyan → biru, latar navy). Gelap = default. */
:root {
  --bg: #0d0c19;
  --bg-2: #121126;
  --surface: #16152b;
  --surface-2: #1f1e38;
  --border: #2a2948;
  --text: #eef6ff;
  --text-2: #b8c5dc;
  --muted: #8592ad;
  --accent: #3fc8ff;
  --accent-2: #3b74e6;
  --accent-ice: #aef6ff;
  --accent-ink: #061226;
  --accent-soft: rgba(63, 200, 255, 0.13);
  --grad: linear-gradient(135deg, #aef6ff 0%, #3fc8ff 45%, #3b74e6 100%);
  --glow: 0 0 0 1px rgba(63, 200, 255, 0.25), 0 10px 40px -10px rgba(63, 200, 255, 0.35);
  --good: #4ade9a;
  --good-soft: rgba(74, 222, 154, 0.13);
  --warn: #fbbf5a;
  --warn-soft: rgba(251, 191, 90, 0.13);
  --danger: #ff6b7a;
  --danger-soft: rgba(255, 107, 122, 0.13);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  --radius: 14px;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #f2f7fd;
  --bg-2: #e9f2fc;
  --surface: #ffffff;
  --surface-2: #eaf3fc;
  --border: #d5e3f2;
  --text: #0c1a2e;
  --text-2: #364a66;
  --muted: #687a93;
  --accent: #0b8fd8;
  --accent-2: #2f63d6;
  --accent-ice: #d9f6ff;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 143, 216, 0.1);
  --grad: linear-gradient(135deg, #3fc8ff 0%, #0b8fd8 50%, #2f63d6 100%);
  --glow: 0 0 0 1px rgba(11, 143, 216, 0.2), 0 10px 30px -12px rgba(11, 143, 216, 0.35);
  --good: #12804a;
  --good-soft: rgba(18, 128, 74, 0.1);
  --warn: #9a5b00;
  --warn-soft: rgba(196, 128, 0, 0.13);
  --danger: #cf2f42;
  --danger-soft: rgba(207, 47, 66, 0.1);
  --shadow: 0 1px 2px rgba(12, 26, 46, 0.06), 0 8px 24px -10px rgba(12, 26, 46, 0.12);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar .inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 16px;
}
.spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }

main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 14px; border-radius: 9px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; white-space: nowrap; text-decoration: none !important;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700;
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }

/* Hero */
.hero { text-align: center; padding: 56px 16px 24px; }
.hero h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 10px; }
.hero p { color: var(--text-2); max-width: 560px; margin: 0 auto 24px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 32px; }
.features .card h3 { margin-bottom: 6px; }

/* Server grid */
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.guild-card { display: flex; align-items: center; gap: 14px; }
.guild-card .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-card .info { min-width: 0; flex: 1; }

/* Guild header & tabs */
.guild-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.tabs a {
  padding: 10px 14px; color: var(--text-2); font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-color: var(--accent); }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .hint { color: var(--muted); font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

/* Chart */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 200px; overflow: visible; }
.chart .bar { fill: var(--accent); }
.chart .hit:hover + .bar, .chart .bar.on { fill: var(--accent); opacity: 0.75; }
.chart .grid line { stroke: var(--border); }
.chart text { fill: var(--muted); font-size: 11px; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--text); color: var(--bg);
  padding: 6px 9px; border-radius: 7px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%);
}
details.table-view { margin-top: 10px; }
details.table-view summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* Tables / lists */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input { flex: 1; min-width: 180px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg button { background: var(--surface); border: 0; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.active { background: var(--accent-soft); color: var(--accent); }

.ticket-list { display: grid; }
.ticket-row {
  display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--border); color: var(--text);
}
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--surface-2); text-decoration: none; }
.ticket-row .num { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.ticket-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row .meta { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row .side { text-align: right; font-size: 13px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.open { background: var(--good-soft); color: var(--good); }
.badge.closed { background: var(--surface-2); color: var(--muted); }
.badge.unclaimed { background: var(--warn-soft); color: var(--warn); }
.badge.bot { background: var(--accent); color: var(--accent-ink); font-size: 10px; padding: 0 5px; border-radius: 4px; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type='text'], input[type='number'], input[type='search'], input[type='url'], input[type='password'], select, textarea {
  width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; min-height: 84px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.topic-row { display: grid; grid-template-columns: 70px 1fr 1.4fr auto; gap: 8px; margin-bottom: 8px; }
@media (max-width: 640px) { .topic-row { grid-template-columns: 60px 1fr auto; } .topic-row .desc { grid-column: 1 / -1; grid-row: 2; } }
.savebar {
  position: sticky; bottom: 12px; display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow);
}

/* Discord preview */
.discord-preview { background: #313338; color: #dbdee1; border-radius: 10px; padding: 14px 16px; font-size: 14px; line-height: 1.4; }
.dc-msg { display: flex; gap: 12px; }
.dc-av { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; display: grid; place-items: center; flex: none; font-size: 18px; }
.dc-name { color: #fff; font-weight: 600; margin-bottom: 4px; }
.dc-bot { background: #5865f2; color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 3px; vertical-align: 2px; font-weight: 600; }
.dc-content { margin-bottom: 4px; }
.mention { background: rgba(88, 101, 242, 0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.discord-embed { border-left: 4px solid #5865f2; background: #2b2d31; border-radius: 4px; padding: 10px 14px 12px; max-width: 520px; }
.dc-embed-body { display: flex; gap: 12px; align-items: flex-start; }
.discord-embed .t { color: #fff; font-weight: 700; margin-bottom: 6px; word-break: break-word; }
.discord-embed .d { white-space: pre-wrap; word-break: break-word; }
.discord-embed code { background: #1e1f22; padding: 1px 4px; border-radius: 3px; font-size: 13px; }
.dc-field { margin-top: 8px; } .dc-field b { color: #fff; font-size: 13px; }
.dc-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; flex: none; }
.dc-image { display: block; max-width: 100%; max-height: 260px; border-radius: 4px; margin-top: 12px; }
.dc-footer { color: #b5bac1; font-size: 12px; margin-top: 8px; }
.dc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dc-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: 4px; font-size: 14px; font-weight: 500; color: #fff; background: #5865f2; white-space: nowrap; }
.dc-btn.secondary { background: #4e5058; } .dc-btn.success { background: #248046; } .dc-btn.danger { background: #da373c; }
.discord-select { display: flex; justify-content: space-between; margin-top: 8px; max-width: 520px; background: #1e1f22; border-radius: 4px; padding: 9px 12px; color: #949ba4; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.editor .preview-col { position: sticky; top: 72px; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } .editor .preview-col { position: static; } }
.color-field { display: flex; gap: 8px; }
.color-field input[type='color'] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; flex: none; }

.chip { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.type-card { padding: 0; overflow: hidden; }
.type-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; }
.type-head .dc-btn { font-size: 13px; padding: 4px 11px; }
.type-head .icon-btn:disabled { opacity: 0.3; cursor: default; }
.type-head .chev { color: var(--muted); width: 14px; text-align: center; }
.type-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.type-body { border-top: 1px solid var(--border); padding: 16px; }
.q-row { display: grid; grid-template-columns: 1.2fr 1.2fr 110px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
@media (max-width: 700px) { .q-row { grid-template-columns: 1fr 1fr; } .q-row input[data-q='label'] { grid-column: 1 / -1; } .q-row input[data-q='placeholder'] { grid-column: 1 / -1; } }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.checklist li:last-child { border-bottom: 0; }
.checklist li.done { color: var(--muted); }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: 12px; flex: none; }
.checklist li.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.progress { width: 140px; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--good); border-radius: 99px; }
.callout.info { background: var(--accent-soft); }
.brand-accent { color: var(--accent); }

/* Ticket detail */
.detail { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.chat { display: grid; gap: 2px; max-height: 62vh; overflow-y: auto; padding-right: 4px; }
.msg { display: flex; gap: 12px; padding: 8px 6px; border-radius: 8px; }
.msg:hover { background: var(--surface-2); }
.msg .body { min-width: 0; }
.msg .who { font-weight: 600; font-size: 14px; }
.msg .when { color: var(--muted); font-size: 12px; margin-left: 6px; font-weight: 400; }
.msg .text { white-space: pre-wrap; word-break: break-word; color: var(--text-2); }
.msg-flag { margin-left: 6px; font-size: 11px; color: var(--muted); }
.msg-flag.del { background: var(--danger, #da373c); color: #fff; border-radius: 4px; padding: 0 5px; }
.msg.deleted .text { color: var(--muted); text-decoration: line-through; }
.msg-edits summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg-edits .old { white-space: pre-wrap; word-break: break-word; color: var(--muted); border-left: 2px solid var(--border); padding-left: 8px; margin: 4px 0; }
.msg .files a { font-size: 13px; display: inline-block; margin-top: 4px; }
.composer { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; display: grid; gap: 8px; }
dl.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
dl.meta dt { color: var(--muted); }
dl.meta dd { margin: 0; word-break: break-word; }

.callout { border-radius: var(--radius); padding: 14px 16px; background: var(--warn-soft); color: var(--text); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.skeleton { color: var(--muted); padding: 40px; text-align: center; }

/* Toast */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow); }
.toast.error { background: var(--danger); color: #fff; }

dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px; width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.45); }

@media (max-width: 520px) {
  .brand span:last-child { display: none; }
  .user-chip span { display: none; }
  .ticket-row { grid-template-columns: 56px 1fr; }
  .ticket-row .side { grid-column: 2; text-align: left; display: flex; gap: 8px; align-items: center; }
}
.hero-logo { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: var(--accent); display: grid; place-items: center; font-size: 32px; }

@media (max-width: 700px) {
  .type-head { flex-wrap: nowrap; gap: 6px; padding: 12px; }
  .type-head .type-desc { display: none; }
  .q-row { grid-template-columns: 1fr auto auto; }
  .q-row { padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
}

/* ---------- Website publik ---------- */
.nav { display: flex; gap: 2px; margin-left: 12px; }
.nav a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
@media (max-width: 820px) { .nav a[data-section] { display: none; } }
.btn.big { padding: 12px 20px; font-size: 15px; border-radius: 11px; }
.pill { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; }
.landing-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 40px 0 24px; }
.landing-hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 16px; }
.lead { font-size: 17px; color: var(--text-2); margin: 0 0 24px; max-width: 560px; }
.hero-preview { transform: rotate(-1deg); box-shadow: 0 30px 60px rgba(10, 12, 30, 0.25); border-radius: 12px; }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; }
.hero-stats div { display: grid; }
.hero-stats b { font-size: 24px; letter-spacing: -0.02em; }
.hero-stats span { color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .landing-hero { grid-template-columns: 1fr; padding-top: 16px; } .hero-preview { transform: none; } }
.landing-section { padding: 56px 0 8px; scroll-margin-top: 64px; }
.section-h { font-size: clamp(22px, 3vw, 30px); text-align: center; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--muted); margin: 6px 0 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.feature h3 { margin: 10px 0 4px; }
.feature p { margin: 0; }
.feature-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; font-size: 21px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.steps h3 { margin: 12px 0 4px; }
.steps p { margin: 0; }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.cmd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmd-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 12px 20px; }
.cmd-table td { padding: 12px 20px; border-top: 1px solid var(--border); vertical-align: top; }
.cmd-table code { color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) { .cmd-table th:nth-child(2), .cmd-table td:nth-child(2) { display: none; } .cmd-table td, .cmd-table th { padding: 10px 14px; } }
.faq { display: grid; gap: 10px; max-width: 780px; margin: 0 auto; }
.faq details { padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; }
.cta { text-align: center; margin: 64px 0 0; padding: 40px 20px; background: linear-gradient(135deg, var(--accent-soft), transparent); }
.cta h2 { font-size: 26px; margin-bottom: 6px; }
.legal { max-width: 780px; margin: 0 auto; }
.legal h1 { margin: 8px 0 14px; }
.legal li { margin-bottom: 6px; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 40px; }
.site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 24px 16px; display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.faq { margin-top: 22px; }

/* =====================================================================
   Tema TicketiNe v2 — gaya dashboard bot modern (sidebar, kartu bercahaya)
   ===================================================================== */
body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(63, 200, 255, 0.12), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(59, 116, 230, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
:root[data-theme='light'] body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(63, 200, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at -10% 20%, rgba(59, 116, 230, 0.1), transparent 60%),
    var(--bg);
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme='light'] .grad-text { background: linear-gradient(135deg, #0b8fd8, #2f63d6); -webkit-background-clip: text; background-clip: text; }
.brand-accent { color: var(--accent); }

/* Topbar kaca */
.topbar { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.in-dash .topbar .inner, .in-dash main { max-width: 1440px; }
.brand { font-size: 17px; letter-spacing: -0.01em; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; background: none; box-shadow: 0 0 18px rgba(63, 200, 255, 0.35); }
.nav a.active, .nav a:hover { background: var(--accent-soft); color: var(--text); }

/* Tombol */
.btn { background: var(--grad); color: var(--accent-ink); border: 0; box-shadow: 0 6px 20px -8px rgba(63, 200, 255, 0.6); transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 26px -8px rgba(63, 200, 255, 0.7); }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn.danger { background: linear-gradient(135deg, #ff8a96, #e5384f); color: #fff; box-shadow: 0 6px 20px -8px rgba(229, 56, 79, 0.6); }
:root[data-theme='light'] .btn:not(.ghost):not(.danger) { color: #fff; }

/* Kartu */
.card { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--accent) 8%), var(--surface) 40%); border: 1px solid var(--border); border-radius: var(--radius); }
.card.stat { position: relative; overflow: hidden; }
.card.stat::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 140px; height: 140px; background: radial-gradient(circle, rgba(63, 200, 255, 0.18), transparent 70%); }
.stat .value { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme='light'] .stat .value { background: none; color: var(--text); }
input[type='text'], input[type='number'], input[type='search'], input[type='url'], input[type='password'], select, textarea { background: var(--bg-2); border-color: var(--border); border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chart .bar { fill: url(#bar-grad); fill: var(--accent); }
.badge.bot { background: var(--grad); }
.seg button.active { background: var(--accent-soft); color: var(--accent); }
.dialog, dialog { background: var(--surface); }
.callout.info { background: var(--accent-soft); border: 1px solid rgba(63, 200, 255, 0.25); }

/* ---------- Layout dashboard ---------- */
.dash { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar {
  position: sticky; top: 76px; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; max-height: calc(100vh - 96px);
}
.server-switch { position: relative; }
.server-switch summary {
  list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 11px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border);
}
.server-switch summary::-webkit-details-marker { display: none; }
.server-switch[open] summary, .server-switch summary:hover { border-color: var(--accent); }
.server-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--muted); font-size: 12px; }
.server-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; display: grid; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto;
}
.server-menu a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; color: var(--text); font-size: 14px; }
.server-menu a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-menu a:hover { background: var(--accent-soft); text-decoration: none; }
.avatar.xs { width: 24px; height: 24px; font-size: 10px; border-radius: 8px; }
.avatar.sm { border-radius: 9px; }
.side-label { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 14px 10px 4px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 600; font-size: 14px;
}
.side-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--accent-soft); color: var(--text); }
.side-nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.side-nav a.active .ico { color: var(--accent); }
.ico { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.side-invite { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.side-invite:hover { color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.dash-main { min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.dash-head h1 { font-size: 26px; margin: 2px 0 2px; }
.crumb { color: var(--muted); font-size: 13px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--accent); }

.nav-arrow, .nav-track { display: none; }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; gap: 14px; }
  .sidebar { position: static; max-height: none; padding: 10px; }
  .side-label, .side-foot { display: none; }
  .side-nav { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 10px; scrollbar-width: none; scroll-behavior: smooth; }
  .side-nav::-webkit-scrollbar { display: none; }
  .nav-track { position: absolute; left: 4px; right: 4px; bottom: 0; height: 4px; border-radius: 4px; background: var(--surface-2); display: none; }
  .nav-track span { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }
  .side-nav-wrap.nav-scrollable .nav-track { display: block; }
  /* Petunjuk "masih ada menu": bayangan + panah di sisi yang bisa digeser (public/nav-scroll.js). */
  .side-nav-wrap { position: relative; }
  .side-nav-wrap::before, .side-nav-wrap::after { content: ''; position: absolute; top: 0; bottom: 10px; width: 44px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
  .side-nav-wrap::before { left: 0; background: linear-gradient(to right, var(--surface), transparent); }
  .side-nav-wrap::after { right: 0; background: linear-gradient(to left, var(--surface), transparent); }
  .side-nav-wrap.nav-more-left::before, .side-nav-wrap.nav-more-right::after { opacity: 1; }
  .nav-arrow { position: absolute; top: calc(50% - 5px); transform: translateY(-50%); z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--accent); font: 700 18px/1 inherit; display: none; align-items: center; justify-content: center; padding: 0 0 2px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
  .nav-arrow.left { left: 0; }
  .nav-arrow.right { right: 0; }
  .side-nav-wrap.nav-more-left .nav-arrow.left, .side-nav-wrap.nav-more-right .nav-arrow.right { display: flex; }
  .side-nav a { flex: none; padding: 8px 12px; }
  .side-nav a.active::before { display: none; }
  .dash-head h1 { font-size: 22px; }
}

/* ---------- Daftar server ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 8px 0 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; margin-bottom: 4px; }
.guild-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guild-card {
  display: block; padding: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}
.guild-card:hover { transform: translateY(-3px); border-color: rgba(63, 200, 255, 0.5); box-shadow: var(--glow); }
.guild-card.inactive { opacity: 0.8; }
.guild-banner { height: 78px; background: var(--grad); background-size: cover; background-position: center; filter: saturate(1.2); position: relative; }
.guild-banner[style] { filter: blur(18px) saturate(1.4); transform: scale(1.3); }
.guild-body { display: flex; align-items: center; gap: 12px; padding: 0 16px 16px; margin-top: -26px; position: relative; }
.guild-body .avatar.lg { width: 56px; height: 56px; border-radius: 16px; border: 3px solid var(--surface); background: var(--surface-2); }
.guild-body .info { flex: 1; min-width: 0; padding-top: 26px; }
.guild-body .btn { margin-top: 26px; }
.guild-card .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-on { color: var(--good); font-weight: 600; }

/* ---------- Beranda ---------- */
.landing-hero { padding: 56px 0 32px; }
.landing-hero h1 { font-weight: 800; }
.pill { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(63, 200, 255, 0.3); }
.hero-art { position: relative; display: grid; justify-items: center; }
.hero-glow { position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(63, 200, 255, 0.35), transparent 65%); filter: blur(30px); top: -10px; }
.hero-logo-img { position: relative; width: min(340px, 80%); height: auto; border-radius: 40px; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 30px 50px rgba(63, 200, 255, 0.25)); }
.hero-art .hero-preview { position: relative; margin-top: -70px; width: min(460px, 100%); transform: rotate(-2deg); border-radius: 12px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), var(--glow); }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(1deg); } }
@media (prefers-reduced-motion: reduce) { .hero-logo-img { animation: none; } }
.hero-stats b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 28px; }
.feature { transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s; }
.feature:hover { transform: translateY(-3px); border-color: rgba(63, 200, 255, 0.45); box-shadow: var(--glow); }
.feature-icon { background: var(--accent-soft); border: 1px solid rgba(63, 200, 255, 0.25); }
.step-n { background: var(--grad); color: var(--accent-ink); }
.cmd-table code { color: var(--accent); }
.cta { background: radial-gradient(600px 200px at 50% 0%, rgba(63, 200, 255, 0.22), transparent 70%), var(--surface); border-color: rgba(63, 200, 255, 0.3); }
.section-h { font-weight: 800; }
.site-footer { background: var(--bg-2); }

/* Pratinjau Discord memakai logo */
img.dc-av { object-fit: cover; }
.dc-bot { background: #5865f2; }
.checklist li.done .tick { background: var(--good); border-color: var(--good); color: var(--accent-ink); }
.progress span { background: var(--grad); }
.dash > * { min-width: 0; }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); } .toolbar select { flex: 1; } }
.guild-body { flex-wrap: wrap; }
.guild-body .btn { margin-top: 0; width: 100%; }
.guild-body .info { padding-top: 30px; }
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; width: 100%; }


/* =====================================================================
   Beranda v4 — tata letak TicketiNe sendiri, font Lexend
   ===================================================================== */
:root { --bg: #0a0a14; --bg-2: #0e0e1b; --surface: #12121f; --surface-2: #1a1a2b; --border: #26263d; --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif; }
body, button, input, select, textarea { font-family: var(--font); }
h1, h2, h3, h4 { font-family: var(--font); letter-spacing: -0.02em; }
code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }
.icon-btn .ico { width: 18px; height: 18px; display: block; }

/* Topbar penuh */
.topbar .inner { gap: 14px; padding: 12px 16px; }
.brand { font-size: 18px; font-weight: 600; }
.nav { margin-left: 18px; gap: 4px; }
.nav a { color: var(--text-2); font-weight: 400; font-size: 15px; padding: 6px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }
.lang { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; }
.lang button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.lang button.active { color: var(--accent); }
@media (max-width: 900px) { .nav a[data-section] { display: none; } }
@media (max-width: 560px) { .brand span, .user-chip span { display: none; } .topbar .inner { gap: 8px; } .lang button { padding: 4px 4px; } }

.home { display: block; }
.h-section { padding: 110px 0 0; scroll-margin-top: 80px; }
.h-label { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 14px; }
.h-center { text-align: center; font-size: clamp(28px, 3.6vw, 40px); font-weight: 600; margin: 0 0 12px; }
.h-center-sub { text-align: center; color: var(--muted); margin: 0 0 36px; }

/* Tombol CTA */
.cta-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 14px; font-weight: 600; font-size: 16px; text-decoration: none !important; cursor: pointer;
  background: var(--grad); color: #04121f; box-shadow: 0 12px 34px -12px rgba(63, 200, 255, 0.7); transition: transform 0.15s, box-shadow 0.15s; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(63, 200, 255, 0.8); }
.cta-btn .ico { width: 20px; height: 20px; }
.cta-btn.soft { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.cta-btn.soft:hover { border-color: var(--accent); }
.cta-btn.dark { background: #0a0a14; color: #fff; box-shadow: none; }
.h-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.h-actions.left { justify-content: flex-start; margin-top: 24px; }

/* Hero tengah */
.h-hero { position: relative; text-align: center; padding: 64px 0 0; }
.h-orb { position: absolute; left: 50%; top: -40px; width: 760px; height: 520px; transform: translateX(-50%); pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, rgba(63, 200, 255, 0.22), rgba(59, 116, 230, 0.12) 55%, transparent); filter: blur(20px); }
.h-logo { width: 132px; height: 132px; border-radius: 34px; box-shadow: 0 20px 60px -20px rgba(63, 200, 255, 0.6); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
.h-badge { display: flex; width: fit-content; margin: 26px auto 0; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); padding: 6px 14px; border-radius: 999px; }
.h-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.h-title { font-size: clamp(40px, 7vw, 76px); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; margin: 22px auto 20px; max-width: 900px; }
.h-lead { color: var(--text-2); font-size: 18px; font-weight: 300; line-height: 1.7; max-width: 640px; margin: 0 auto 34px; }
.h-shot { margin: 64px auto 0; max-width: 980px; }

/* Jendela Discord */
.dc-window { display: grid; grid-template-columns: 220px 1fr; text-align: left; border-radius: 18px; overflow: hidden; border: 1px solid #2c2e36; background: #313338; color: #dbdee1;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 0 6px rgba(63, 200, 255, 0.06); font-size: 14px; }
.dcw-side { background: #2b2d31; padding: 12px 8px; display: grid; align-content: start; gap: 2px; }
.dcw-server { font-weight: 600; color: #fff; padding: 6px 8px 14px; border-bottom: 1px solid #1f2023; margin-bottom: 8px; }
.dcw-cat { font-size: 11px; font-weight: 600; color: #949ba4; letter-spacing: 0.04em; padding: 14px 8px 4px; }
.dcw-ch { display: flex; align-items: center; gap: 6px; color: #949ba4; padding: 6px 8px; border-radius: 6px; }
.dcw-ch .ico { width: 16px; height: 16px; }
.dcw-ch.active { background: #404249; color: #fff; }
.dcw-main { display: flex; flex-direction: column; min-width: 0; }
.dcw-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid #26272b; color: #fff; }
.dcw-head .ico { width: 18px; height: 18px; color: #80848e; }
.dcw-msgs { padding: 16px; display: grid; gap: 14px; }
.dcw-msg { display: flex; gap: 14px; }
.dcw-av { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; }
.dcw-av.letter { display: grid; place-items: center; background: #f59e0b; color: #1a1a1a; font-weight: 700; }
.dcw-body { min-width: 0; flex: 1; }
.dcw-name { color: #fff; font-weight: 500; margin-bottom: 2px; }
.dcw-name.staff { color: #3fc8ff; }
.dcw-name small { color: #949ba4; font-size: 12px; margin-left: 4px; font-weight: 400; }
.dcw-content { margin-bottom: 6px; }
.dcw-sys { color: #949ba4; font-size: 13px; padding-left: 54px; }
.dcw-input { display: flex; align-items: center; gap: 10px; margin: 0 16px 16px; background: #383a40; border-radius: 8px; padding: 11px 14px; color: #6d6f78; }
.dcw-input .ico { width: 20px; height: 20px; padding: 2px; background: #b5bac1; color: #383a40; border-radius: 50%; }
.dc-window .discord-embed { max-width: 440px; }
.pop { opacity: 0; transform: translateY(8px); }
.h-shot.in .pop { animation: pop 0.5s ease forwards; animation-delay: calc(var(--d) * 0.5s); }
@keyframes pop { to { opacity: 1; transform: none; } }
@media (max-width: 720px) { .dc-window { grid-template-columns: 1fr; } .dcw-side { display: none; } .dcw-sys { padding-left: 0; } }

/* Strip angka */
.h-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 80px; background: var(--border); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.h-stats div { background: var(--bg-2); padding: 28px 24px; display: grid; gap: 6px; text-align: center; }
.h-stats b { font-size: 34px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-stats span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .h-stats { grid-template-columns: 1fr 1fr; } }

/* Baris zig-zag */
.z-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.z-row + .z-row { margin-top: 100px; }
.z-row.flip .z-copy { order: 2; }
.z-copy h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; line-height: 1.15; margin: 0 0 14px; }
.z-copy p { color: var(--text-2); font-weight: 300; font-size: 17px; line-height: 1.7; margin: 0 0 20px; }
.z-copy ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.z-copy li { display: flex; align-items: center; gap: 10px; }
.z-copy li .ico { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: none; }
.z-visual { position: relative; padding: 28px; border-radius: 24px; background: radial-gradient(400px 260px at 70% 20%, rgba(63, 200, 255, 0.14), transparent 70%), var(--surface); border: 1px solid var(--border); }
@media (max-width: 860px) { .z-row { grid-template-columns: 1fr; gap: 28px; } .z-row.flip .z-copy { order: 0; } .z-row + .z-row { margin-top: 72px; } }

.panel-stage { position: relative; }
.swatches { position: absolute; right: -10px; bottom: -14px; display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); padding: 8px; border-radius: 12px; box-shadow: var(--shadow); }
.swatches i { width: 20px; height: 20px; border-radius: 6px; }
.swatches i:first-child { outline: 2px solid #fff; outline-offset: 2px; }

.modal-mock { background: #313338; color: #dbdee1; border-radius: 12px; padding: 18px; max-width: 400px; margin: 0 auto; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); font-size: 14px; }
.mm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: #fff; }
.mm-head img { width: 24px; height: 24px; border-radius: 50%; }
.mm-head b { flex: 1; font-size: 17px; }
.mm-head span { color: #949ba4; }
.modal-mock label { display: block; font-size: 12px; font-weight: 700; color: #b5bac1; margin: 12px 0 6px; letter-spacing: 0.02em; }
.modal-mock label i { color: #f23f42; font-style: normal; }
.mm-input { background: #1e1f22; border-radius: 4px; padding: 10px 12px; color: #dbdee1; }
.mm-input.tall { min-height: 64px; }
.mm-foot { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 18px; }
.mm-foot b { background: #5865f2; color: #fff; padding: 8px 18px; border-radius: 4px; font-weight: 500; }
.type-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

.dash-mock { display: flex; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); min-height: 280px; }
.dm-side { width: 54px; background: var(--surface); border-right: 1px solid var(--border); display: grid; align-content: start; gap: 10px; padding: 14px 12px; }
.dm-side i { height: 26px; border-radius: 8px; background: var(--surface-2); }
.dm-side i.on { background: var(--grad); }
.dm-main { flex: 1; padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.dm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dm-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; }
.dm-stats small { color: var(--muted); font-size: 11px; }
.dm-stats b { font-size: 20px; color: var(--accent); }
.dm-bars { display: flex; align-items: end; gap: 6px; height: 70px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.dm-bars i { flex: 1; border-radius: 4px 4px 0 0; background: var(--grad); }
.dm-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.dm-row span { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-row em { font-style: normal; }

/* Grid fitur kecil */
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.mini { display: flex; gap: 16px; padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: border-color 0.2s, transform 0.2s; }
.mini:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-2px); }
.mini-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #04121f; }
.mini-ico .ico { width: 22px; height: 22px; }
.mini h3 { font-size: 17px; font-weight: 600; margin: 0 0 4px; }
.mini p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 300; line-height: 1.6; }
@media (max-width: 900px) { .mini-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .mini-grid { grid-template-columns: 1fr; } }

/* Cara kerja: intro tetap + timeline */
.how { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.how-intro { position: sticky; top: 100px; }
.how-intro h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; margin: 0 0 14px; }
.how-intro p { color: var(--text-2); font-weight: 300; font-size: 17px; line-height: 1.7; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 18px; }
.timeline::before { content: ''; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2), transparent); opacity: 0.5; }
.timeline li { position: relative; display: flex; gap: 20px; padding: 20px 22px 20px 0; }
.tl-num { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: 18px; background: var(--bg); border: 2px solid var(--accent); color: var(--accent); position: relative; }
.timeline li div { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; flex: 1; }
.timeline h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.timeline p { margin: 0; color: var(--muted); font-weight: 300; line-height: 1.6; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; gap: 32px; } .how-intro { position: static; } }

/* Perintah: tab */
.cmd-card { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 10px; }
.cmd-tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg-2); border-radius: 14px; margin-bottom: 8px; }
.cmd-tabs button { flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 500; padding: 10px; border-radius: 10px; cursor: pointer; }
.cmd-tabs button.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.cmd-item { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 12px; }
.cmd-item:hover { background: var(--surface-2); }
.cmd-item code { color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.cmd-item span { color: var(--text-2); font-weight: 300; }
@media (max-width: 600px) { .cmd-item { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* Keamanan */
.safe-card { display: flex; gap: 28px; padding: 36px; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--good) 30%, var(--border)); background: radial-gradient(500px 220px at 0% 0%, var(--good-soft), transparent 70%), var(--surface); }
.safe-ico { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--good-soft); color: var(--good); }
.safe-ico .ico { width: 32px; height: 32px; }
.safe-copy h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; margin: 0 0 10px; }
.safe-copy p { color: var(--text-2); font-weight: 300; line-height: 1.7; margin: 0 0 20px; max-width: 760px; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-chips span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.perm-chips .ico { width: 14px; height: 14px; color: var(--good); }
.perm-chips .no { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); color: var(--danger); background: var(--danger-soft); }
.perm-chips .no .ico { color: var(--danger); }
@media (max-width: 700px) { .safe-card { flex-direction: column; padding: 24px; } }

/* FAQ 2 kolom */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; align-items: start; }
.faq-grid details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.faq-grid details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.faq-grid summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-grid summary::-webkit-details-marker { display: none; }
.faq-grid summary::after { content: '⌄'; color: var(--accent); transition: transform 0.2s; }
.faq-grid details[open] summary::after { transform: rotate(180deg); }
.faq-grid p { margin: 12px 0 0; color: var(--muted); font-weight: 300; line-height: 1.6; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: 1fr; } }

/* Banner CTA terang */
.h-banner { display: flex; align-items: center; gap: 28px; margin: 110px 0 20px; padding: 40px; border-radius: 28px; background: var(--grad); color: #04121f; box-shadow: 0 30px 80px -30px rgba(63, 200, 255, 0.6); }
.h-banner img { border-radius: 20px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5); flex: none; }
.h-banner > div:first-of-type { flex: 1; }
.h-banner h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; margin: 0 0 8px; }
.h-banner p { margin: 0; font-weight: 400; opacity: 0.85; }
@media (max-width: 760px) { .h-banner { flex-direction: column; text-align: center; padding: 28px; } }

/* Footer multi-kolom */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 80px; }
.site-footer .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 48px 16px 28px; align-items: start; }
.foot-brand p { max-width: 320px; margin: 12px 0 0; }
.foot-grid h4 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.foot-grid > div:not(.foot-brand) { display: grid; gap: 8px; }
.foot-grid a:not(.brand) { color: var(--muted); font-size: 14px; }
.foot-grid a:not(.brand):hover { color: var(--accent); text-decoration: none; }
.site-footer .foot-bottom { display: block; border-top: 1px solid var(--border); padding: 18px 16px 24px; }
@media (max-width: 760px) { .site-footer .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* Animasi muncul */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: calc(var(--d, 0) * 100ms); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .pop { opacity: 1; transform: none; transition: none; animation: none !important; }
  .h-logo { animation: none; }
}
@media (max-width: 860px) { .h-section { padding-top: 80px; } }
.home { overflow-x: clip; }
.h-orb { width: min(760px, 100%); }
.z-row > *, .how > *, .mini-grid > *, .faq-grid > * { min-width: 0; }
@media (max-width: 860px) { .z-row, .how { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .dm-stats { grid-template-columns: 1fr 1fr; } .dm-stats div:last-child { display: none; } .z-visual { padding: 16px; } }

/* Model 3D interaktif di hero */
.h-model { position: relative; display: grid; justify-items: center; }
.h-model.is-3d { width: min(340px, 86vw); height: 300px; margin: -20px auto -10px; }
.h-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; cursor: grab; outline: none; }
.h-viewer:active { cursor: grabbing; }
.h-hint { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; pointer-events: none; opacity: 0.85; white-space: nowrap; }
@media (max-width: 560px) { .h-model.is-3d { height: 240px; } }

/* Logo baru transparan (.webp): tanpa kotak/bayangan persegi, pakai bayangan mengikuti bentuk */
.brand .logo, .h-logo, .h-banner img, .dcw-av, img.dc-av, .mm-head img { border-radius: 0; box-shadow: none; background: transparent; object-fit: contain; }
.h-logo { width: 170px; height: 170px; filter: drop-shadow(0 18px 30px rgba(63, 200, 255, 0.45)); }
.brand .logo { filter: drop-shadow(0 2px 6px rgba(63, 200, 255, 0.35)); }
.h-banner img { filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35)); }
.dcw-av, img.dc-av { background: #1e1f22; border-radius: 50%; padding: 3px; }
.h-banner img { width: 110px; height: 110px; }

/* ---------- Premium ---------- */
.badge.premium { background: linear-gradient(135deg, var(--accent-ice), var(--accent)); color: var(--accent-ink); font-size: 10px; padding: 1px 7px; letter-spacing: .04em; vertical-align: middle; }
.help { color: var(--muted); font-size: 12px; margin-top: 6px; }
.page-narrow { max-width: 860px; margin: 0 auto; }
.premium-card.on { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); }
.premium-card h2 { font-size: 24px; margin: 2px 0 4px; }
.plan-table { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.plan-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 14px; align-items: center; }
.plan-row:first-child { border-top: 0; }
.plan-row > div:not(:first-child) { text-align: center; }
.plan-row.head { background: var(--surface-2); font-weight: 600; font-size: 13px; }
.plan-row .pro { color: var(--accent); font-weight: 600; }
.plan-row .soon { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
@media (max-width: 560px) { .plan-row { grid-template-columns: minmax(0, 1fr) 64px 76px; padding: 9px 10px; font-size: 13px; } }
.steps-mini { margin: 8px 0 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; font-size: 14px; }
.guild-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.guild-pick .chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.table { display: grid; }
.table-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.table-row:first-child { border-top: 0; }
.table-row:has(> :nth-child(4)) { grid-template-columns: minmax(170px, auto) 80px minmax(0, 1fr) auto; }
@media (max-width: 640px) { .table-row, .table-row:has(> :nth-child(4)) { grid-template-columns: 1fr; gap: 6px; } }
pre.codes { margin: 8px 0 0; white-space: pre-wrap; font-size: 13px; user-select: all; }
/* Di layar kecil link Premium tetap ada di footer; header cukup Dashboard. */
@media (max-width: 560px) { .nav a[data-page="premium"] { display: none; } }
.stack > * { min-width: 0; }
.steps-mini code { overflow-wrap: anywhere; }
.premium-card .section-title { flex-wrap: wrap; gap: 14px; }

/* ---------- Panels ---------- */
.list-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.list-head input[type='search'] { flex: 1 1 220px; max-width: 340px; }
.list-head select { width: auto; }
.quota { color: var(--muted); font-size: 14px; }
.quota b { color: var(--text); font-size: 18px; }
.panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.panel-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.panel-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border-bottom: 1px solid var(--border); }
.panel-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.panel-mini { padding: 12px; max-height: 360px; overflow: hidden; position: relative; }
.panel-mini::after { content: ''; position: absolute; inset: auto 0 0; height: 40px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.panel-mini .discord-preview { font-size: 13px; }

/* Wizard */
.wizard { max-width: 760px; margin: 0 auto; text-align: center; padding: 28px; }
.wz-steps { display: flex; justify-content: space-between; list-style: none; padding: 0; margin: 0 0 28px; gap: 6px; }
.wz-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); position: relative; }
.wz-steps li span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); font-weight: 700; background: var(--surface); }
.wz-steps li.on { color: var(--text); } .wz-steps li.on span { border-color: var(--accent); color: var(--accent); }
.wz-steps li.done span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wz-body h2 { margin-bottom: 4px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0 6px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: center; padding: 26px 16px 18px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.choice b { font-size: 16px; }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice:disabled { opacity: .5; cursor: not-allowed; }
.choice-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.wz-foot { display: flex; justify-content: space-between; margin-top: 26px; }

/* Designer */
.designer { display: grid; gap: 14px; padding-bottom: 70px; }
.designer-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.designer-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .designer-grid { grid-template-columns: 1fr; } }
.designer-side { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 0; }
@media (max-width: 1100px) { .designer-side { position: static; max-height: none; } }
.side-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 16px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.side-head h2 { font-size: 17px; word-break: break-word; }
.side-sec, .set-block { padding: 14px 18px; border-bottom: 1px solid var(--border); display: grid; gap: 8px; }
.side-sec h4, .set-block h4 { margin: 0; font-size: 14px; }
.side-sec p, .set-block p { margin: 0; }
.set-block select.mode { width: auto; max-width: 100%; }
.set-block.locked { opacity: .65; }
.side-tabs { margin: 12px 18px 4px; display: flex; }
.side-tabs button { flex: 1; }
.guide { padding: 14px 18px; display: grid; gap: 8px; font-size: 14px; }
.guide h4 { margin: 8px 0 0; } .guide ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; } .guide p { margin: 0; }
.form-grid.tight { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.counter { font-size: 11px; color: var(--muted); justify-self: end; }
.mini-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.danger-text { color: var(--danger) !important; }
.ghost-add { border: 1.5px dashed var(--border); background: transparent; color: var(--text-2); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.ghost-add:hover { border-color: var(--accent); color: var(--accent); }
.ghost-add.wide { width: 100%; padding: 10px; margin-top: 10px; }
.ghost-add.active, .discord-preview .ghost-add.active { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.discord-preview.live { display: grid; gap: 10px; }
.pv-content { background: #383a40; color: #dbdee1; border: 1px dashed #4e5058; border-radius: 8px; min-height: 52px; font-size: 14px; }
.pv-block { border: 1px solid #3f4147; border-radius: 10px; padding: 8px 10px 10px; }
.pv-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.pv-tab { font-size: 12px; font-weight: 600; color: #b5bac1; }
.pv-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.pv-actions button { background: #2b2d31; border: 1px solid #3f4147; color: #dbdee1; border-radius: 6px; font-size: 11px; padding: 2px 8px; cursor: pointer; }
.pv-actions button.danger { color: #f87171; }
.pv-sep { display: flex; justify-content: space-between; font-size: 12px; color: #949ba4; border-top: 1px solid #3f4147; padding-top: 8px; margin-top: 4px; }
.pv-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pv-opts > span { background: #2b2d31; border: 1px solid #3f4147; border-radius: 6px; padding: 4px 10px; font-size: 13px; display: inline-flex; gap: 4px; align-items: center; }
.discord-preview .ghost-add { border-color: #4e5058; color: #b5bac1; }
[data-sel] { cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
[data-sel]:hover { outline-color: rgba(63, 200, 255, .45); }
[data-picked='1'] { outline-color: var(--accent); }
.dc-btn.off { opacity: .5; }
.dc-ext { font-size: 11px; opacity: .8; }
.dc-emoji { width: 18px; height: 18px; vertical-align: -3px; }
.dc-author { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.dc-author img, .dc-footer img { width: 20px; height: 20px; border-radius: 50%; }
.dc-footer { display: flex; align-items: center; gap: 6px; }
.discord-embed .t.link { color: #00a8fc; }
.dc-fields { display: grid; gap: 8px; margin-top: 8px; }
.dc-fields.inline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dc-h1 { font-size: 20px; display: block; } .dc-h2 { font-size: 17px; display: block; } .dc-h3 { font-size: 15px; display: block; }
.dc-sub { font-size: 12px; color: #949ba4; }
.floatbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px 10px 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); font-size: 14px; max-width: calc(100vw - 24px); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips select { width: auto; max-width: 100%; font-size: 13px; padding: 5px 8px; }
.chip-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-soft); color: var(--text); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 13px; }
.chip-tag button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--good, #22c55e); }
.switch input:checked::after { transform: translateX(16px); }
.switch b { color: var(--muted); font-size: 11px; }
.perm-list { display: grid; gap: 6px; }
.perm-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.perm-fixed { border: 1px dashed var(--border); border-radius: 8px; padding: 8px; }
.q-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.q-card.off { opacity: .6; }
.q-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.q-card input.num { width: 72px; }
.choices { display: grid; gap: 6px; }
.choice-row { display: grid; grid-template-columns: auto 52px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.emoji-in { text-align: center; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; background: #5865f2; }
.dot.secondary { background: #4e5058; } .dot.success { background: #248046; } .dot.danger { background: #da373c; }
.seg[data-style] { flex-wrap: wrap; }

/* ---------- Pengaturan ---------- */
.set-section { display: grid; gap: 12px; }
.set-section-head h2 { font-size: 18px; margin-bottom: 2px; }
.set-section-head p { margin: 0; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.set-card.wide { grid-column: 1 / -1; }
.set-card h4 { margin: 0; font-size: 14px; }
.set-card p { margin: 0; flex: 1; }
.set-control { margin-top: 6px; }
.set-control input[type='color'] { width: 100%; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; }
.set-control input[type='range'] { width: 100%; accent-color: var(--accent); }
.range-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.danger-zone .set-section-head h2 { color: var(--danger); }
.danger-zone .set-card { border-color: var(--danger-soft); }

/* ---------- Riwayat & statistik ---------- */
:root { --chart-1: #1f9ad6; --chart-2: #bd8019; --chart-3: #22a46c; }
:root[data-theme='light'] { --chart-1: #1f8fd0; --chart-2: #c27c12; --chart-3: #1c9a63; }
.filters summary { cursor: pointer; color: var(--text-2); font-size: 14px; display: inline-block; border: 1.5px dashed var(--border); border-radius: 9px; padding: 6px 12px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.filter-row label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.filter-row select, .filter-row input { width: auto; }
.table-card { padding: 0; overflow: hidden; }
.table-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; }
.htable { overflow-x: auto; }
.hrow { display: grid; grid-template-columns: 80px minmax(110px, 1fr) 110px 150px 150px minmax(140px, 1.2fr) 90px; gap: 10px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--border); color: var(--text); min-width: 900px; font-size: 14px; }
a.hrow:hover { background: var(--surface-2); text-decoration: none; }
.hrow.head { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.hrow .tag { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.pager2 { display: inline-flex; gap: 4px; }
.pager2 button { min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.pager2 button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pager2 button:disabled { opacity: .4; cursor: default; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat2 .value { font-size: 32px; font-weight: 700; margin-top: 6px; }
.stat-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 14px; }
.a-grid { align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.chart-box { width: 100%; min-height: 60px; }
.pager2 .gap { align-self: center; color: var(--muted); padding: 0 2px; }
.chart-title { font-size: 16px; margin-bottom: 10px; }
.chart2 { width: 100%; height: auto; display: block; overflow: visible; }
.chart2 .grid { stroke: var(--border); stroke-width: 1; }
.chart2 .axis { fill: var(--muted); font-size: 11px; }
.chart2 .hit { fill: transparent; }
.chart2 .hit:hover { fill: var(--surface-2); fill-opacity: .5; }
.chart2 .bar, .chart2 .hit { cursor: default; }
.bar.s1, .swatch.s1 { fill: var(--chart-1); background: var(--chart-1); }
.bar.s2, .swatch.s2 { fill: var(--chart-2); background: var(--chart-2); }
.bar.s3, .swatch.s3 { fill: var(--chart-3); background: var(--chart-3); }
.chart2 .bar { pointer-events: none; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.chart-legend.col { flex-direction: column; gap: 8px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-empty { display: grid; place-items: center; min-height: 160px; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; }
.chart-tip { position: fixed; z-index: 100; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.35); color: var(--text); display: grid; gap: 3px; }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: center; }
.donut { width: 180px; height: 180px; }
.donut .ring { fill: none; stroke-width: 22; }
.donut .ring.s1 { stroke: var(--chart-1); } .donut .ring.s2 { stroke: var(--chart-2); } .donut .ring.s3 { stroke: var(--chart-3); }
.donut .ring.empty { stroke: var(--border); }
.donut-sub { fill: var(--muted); font-size: 11px; }
.donut-num { fill: var(--text); font-size: 26px; font-weight: 700; }
.leaderboard { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.leaderboard li { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.leaderboard .rank { font-weight: 700; color: var(--accent); }
.leaderboard .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.locked-card { text-align: center; display: grid; gap: 8px; justify-items: center; padding: 36px 20px; }
input.num { width: 72px; }

.staff-filter { gap: 6px; margin-bottom: 8px; color: var(--muted); }
.staff-filter select { width: auto; }

/* ---------- Permissions & audit ---------- */
.callout.danger { background: var(--danger-soft); border-color: var(--danger); color: var(--text); }
.perm-role { border-top: 1px solid var(--border); padding: 14px 0; display: grid; gap: 10px; }
.perm-role:first-of-type { border-top: 0; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.arow { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(140px, 1.3fr) 160px minmax(170px, 1fr); gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 14px; min-width: 760px; }
.arow.head { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.arow .tag { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
#au-rows { overflow-x: auto; }
.list-head label input[type='date'] { width: auto; margin-left: 4px; }
input[type='date'] { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); padding: 8px 10px; font: inherit; font-size: 14px; color-scheme: dark; }
:root[data-theme='light'] input[type='date'] { color-scheme: light; }

/* ---------- Custom commands & personalizer ---------- */
.cmd-row { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--border); color: var(--text); }
.cmd-row:first-child { border-top: 0; }
.cmd-row:hover { background: var(--surface-2); text-decoration: none; }
.cmd-row code { color: var(--accent); font-weight: 600; }
.pz-av { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.pz-banner-box { height: 90px; border-radius: 10px; border: 1px dashed var(--border); background: var(--surface-2) center / cover; margin-bottom: 8px; }
.pz-card { background: #232428; border-radius: 12px; overflow: hidden; color: #dbdee1; max-width: 340px; }
.pz-banner { height: 105px; background: linear-gradient(135deg, #1f9ad6, #3b74e6) center / cover; }
.pz-avatar { width: 84px; height: 84px; border-radius: 50%; border: 6px solid #232428; margin: -44px 0 0 14px; object-fit: cover; background: #232428; display: block; }
.pz-body { padding: 6px 16px 16px; }
.pz-about { background: #111214; border-radius: 8px; padding: 10px; margin-top: 10px; display: grid; gap: 4px; font-size: 13px; white-space: pre-wrap; }
.field { position: relative; }

/* ---------- Applications ---------- */
.aprow { display: grid; grid-template-columns: 70px minmax(150px, 1.2fr) minmax(120px, 1fr) 110px 150px minmax(120px, 1fr); gap: 10px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--border); color: var(--text); min-width: 760px; font-size: 14px; }
a.aprow:hover { background: var(--surface-2); text-decoration: none; }
.aprow.head { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.badge.denied { background: var(--danger-soft); color: var(--danger); }
#ap-status { flex-wrap: wrap; }
.ap-n { font-weight: 500; opacity: .8; }
.ap-ico { font-size: 22px; }
.ap-answer { border-top: 1px solid var(--border); padding-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ap-answer .muted { margin-bottom: 4px; font-weight: 600; }
.ap-detail { align-items: start; }
.ap-modal { background: #313338; color: #dbdee1; border-radius: 10px; padding: 16px; display: grid; gap: 12px; max-width: 440px; }
.ap-modal > b { font-size: 17px; color: #f2f3f5; }
.ap-q { display: grid; gap: 6px; }
.ap-q .req { color: #f23f43; }
.ap-input { background: #1e1f22; border-radius: 6px; min-height: 36px; padding: 8px 10px; font-size: 13px; color: #87898c; }
@media (max-width: 700px) {
  .ap-detail { grid-template-columns: 1fr; }
  #ap-status button { padding: 8px 9px; }
}
.designer-head #ap-channel { width: auto; max-width: 240px; }

/* ---------- Audit log di HP: tiap kejadian jadi kartu ---------- */
.arow .tag { white-space: nowrap; display: inline-block; }
@media (max-width: 700px) {
  #au-rows { overflow: visible; }
  .arow { min-width: 0; grid-template-columns: 1fr auto; grid-template-areas: 'event time' 'detail detail' 'user user'; gap: 6px 10px; padding: 12px 14px; }
  .arow.head { display: none; }
  .arow > span:nth-child(1) { grid-area: event; min-width: 0; }
  .arow > span:nth-child(2) { grid-area: detail; overflow-wrap: anywhere; }
  .arow > span:nth-child(3) { grid-area: time; color: var(--muted); text-align: right; }
  .arow > span:nth-child(4) { grid-area: user; }
  .arow .tag { white-space: normal; }
}

/* ---------- Menu profil ---------- */
.user-chip { cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid transparent; position: relative; }
.user-chip:hover { border-color: var(--border); background: var(--surface-2); }
.profile-menu { position: fixed; top: 58px; right: 16px; z-index: 60; max-height: calc(100vh - 80px); overflow-y: auto; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); display: grid; gap: 2px; }
.profile-menu a, .pm-lang { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 14px; }
.profile-menu a:hover { background: var(--surface-2); text-decoration: none; }
.profile-menu a > span:first-child, .pm-lang > span:first-child { width: 20px; text-align: center; }
.profile-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.pm-lang .spacer { flex: 1; }
.pm-lang button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 6px; padding: 2px 8px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.pm-lang button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ---------- Pengaturan (dialog) ---------- */
.settings-dialog { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); }
.settings-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.settings-head { display: flex; gap: 12px; align-items: flex-start; padding: 18px 18px 12px; }
.settings-head h2 { margin: 0 0 2px; font-size: 18px; }
.settings-head .icon-btn { margin-left: auto; }
.settings-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.settings-body { display: grid; gap: 10px; padding: 0 18px 16px; }
.set-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-2); }
.set-box .dom-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.set-box > .muted.small:last-child { margin-top: 6px; }
.state-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.state-label.on { color: var(--good); }
.state-label.off { color: var(--danger); }
.settings-foot { display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); }

/* ---------- Halaman akun (Paket Premium & Transcript) ---------- */
.account-page { max-width: 980px; margin: 0 auto; }
.account-page h1 { font-size: 28px; margin: 10px 0 4px; }
.account-page > p.muted { margin: 0 0 18px; }
.back-link { color: var(--muted); display: inline-block; margin-bottom: 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 12px; min-height: 170px; }
.plan-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.plan-meta { display: grid; gap: 3px; font-size: 14px; }
.trow { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(120px, 1fr) 70px 160px 160px 80px; gap: 10px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--border); font-size: 14px; min-width: 820px; }
.trow.head { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.ellipsis { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .trow { min-width: 0; grid-template-columns: 1fr auto; grid-template-areas: 'server view' 'ticket ticket' 'opened closed'; gap: 4px 10px; }
  .trow.head { display: none; }
  .trow > span:nth-child(1) { grid-area: server; }
  .trow > span:nth-child(2) { grid-area: ticket; }
  .trow > span:nth-child(3) { display: none; }
  .trow > span:nth-child(4) { grid-area: opened; color: var(--muted); }
  .trow > span:nth-child(5) { grid-area: closed; color: var(--muted); text-align: right; }
  .trow > span:nth-child(6) { grid-area: view; }
}

/* ---------- Gambar di transcript ---------- */
.msg-img { display: block; margin-top: 8px; max-width: min(360px, 100%); }
.msg-img img { max-width: 100%; max-height: 300px; border-radius: 8px; border: 1px solid var(--border); display: block; }
.img-gate { margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); font-size: 14px; max-width: 460px; }
.img-gate.blocked { color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- Menu ☰ di HP ---------- */
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Login pindah ke menu ☰ agar header tidak penuh; bahasa & tema tetap di header. */
  #login-btn { display: none; }
}
.site-menu { max-height: calc(100vh - 80px); overflow-y: auto; min-width: 240px; }

/* ---------- Kartu harga Premium (geser kiri-kanan) ---------- */
.price-scroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 2px 10px; align-items: flex-start; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.price-scroll::-webkit-scrollbar { height: 6px; }
.price-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
.price-card { position: relative; flex: 0 0 280px; min-height: 470px; scroll-snap-align: center; display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 20px 20px; }
.price-card.pro { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.price-card.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px color-mix(in srgb, var(--accent) 18%, transparent); }
.price-flag { position: absolute; top: -11px; left: 20px; background: var(--grad); color: var(--accent-ink); font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; }
.price-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.price-top h3 { margin: 0; font-size: 18px; }
.price-term { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.price-now { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.price-old { color: var(--muted); font-size: 16px; text-decoration-thickness: 2px; text-decoration-color: var(--danger); }
.price-sub { margin-top: -6px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.price-same { font-size: 14px; font-weight: 600; color: var(--accent); }
.price-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14px; color: var(--text-2); }
.price-feats li { padding-left: 2px; }
.price-feats li.more { display: none; }
.price-card.show-all .price-feats li.more { display: list-item; }
.see-all { align-self: flex-start; font-size: 13px; }
.price-cta { margin-top: auto; width: 100%; justify-content: center; text-align: center; }
.price-dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.price-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); cursor: pointer; transition: width .2s, background .2s; }
.price-dots span.on { width: 20px; border-radius: 4px; background: var(--accent); }
.compare summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.compare summary::-webkit-details-marker { display: none; }
.compare summary h2 { margin: 0; }
.compare[open] summary { margin-bottom: 12px; }
@media (max-width: 560px) {
  /* Kartu berikutnya terlihat sebagian sebagai petunjuk bisa digeser. */
  .price-card { flex-basis: 82%; }
}

/* ---------- Pemilih emoji ---------- */
.ep-field { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); min-height: 40px; min-width: 0; }
.ep-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--text); font: inherit; padding: 6px 10px; cursor: pointer; text-align: left; }
.ep-value { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.ep-value img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.ep-char { font-size: 20px; line-height: 1; }
.ep-name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-placeholder { color: var(--muted); font-size: 14px; }
.ep-caret { color: var(--muted); font-size: 12px; }
.ep-clear { background: none; border: 0; border-left: 1px solid var(--border); color: var(--muted); font-size: 18px; padding: 0 10px; cursor: pointer; display: none; }
.ep-field.has-value .ep-clear { display: block; }
.ep-clear:hover { color: var(--danger); }
.choice-row .ep-field { flex: 0 0 120px; }
.ep-popup { position: fixed; z-index: 90; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 36px rgba(0, 0, 0, .4); padding: 10px; display: grid; gap: 8px; }
.ep-search { width: 100%; }
.ep-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); padding-bottom: 6px; scrollbar-width: thin; }
.ep-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-radius: 8px; padding: 6px 9px; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ep-tabs button.on { background: var(--accent-soft); color: var(--text); }
.ep-tabs button:hover { color: var(--text); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 2px; max-height: 260px; overflow-y: auto; }
.ep-cell { aspect-ratio: 1; display: grid; place-items: center; background: none; border: 1px solid transparent; border-radius: 8px; font-size: 22px; cursor: pointer; padding: 0; }
.ep-cell:hover { background: var(--surface-2); border-color: var(--accent); }
.ep-cell img { width: 30px; height: 30px; object-fit: contain; }
.ep-empty, .ep-note { grid-column: 1 / -1; padding: 6px 2px; }

/* ---------- Drag untuk mengurutkan (sortable.js) ---------- */
.drag-handle { cursor: grab; touch-action: none; user-select: none; color: var(--muted); font-size: 15px; line-height: 1; padding: 4px 4px; border-radius: 6px; }
.drag-handle:hover { color: var(--text); background: var(--surface-2); }
.pv-head .drag-handle { color: #949ba4; }
.pv-head .drag-handle:hover { background: #2b2d31; color: #dbdee1; }
.pv-head { justify-content: flex-start; }
.pv-head .pv-actions { margin-left: auto; }
.dc-row [data-sel^='option:'], .pv-opts [data-sel^='option:'] { touch-action: pan-y; cursor: grab; }
.sort-dragging { position: relative; z-index: 30; opacity: 0.85; box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.55); cursor: grabbing; transition: none !important; }
.sort-before { box-shadow: inset 0 3px 0 0 var(--accent); }
.sort-after { box-shadow: inset 0 -3px 0 0 var(--accent); }
.dc-row .sort-before, .pv-opts .sort-before { box-shadow: -3px 0 0 0 var(--accent); }
.dc-row .sort-after, .pv-opts .sort-after { box-shadow: 3px 0 0 0 var(--accent); }
body.sort-active, body.sort-active * { cursor: grabbing !important; user-select: none; }
.q-head .drag-handle, .emb-card .drag-handle, .opt-card .drag-handle { margin-right: 2px; }

/* ---------- Panel tata letak Kotak (Components V2) ---------- */
.pv-layout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 12px; }
.cv-box { position: relative; background: #2b2d31; border: 1px solid #3f4147; border-radius: 8px; padding: 14px 16px 14px 18px; max-width: 560px; display: grid; gap: 8px; overflow: hidden; }
.cv-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent-bar, transparent); }
.cv-box.live { max-width: none; gap: 10px; }
.cv-text { white-space: pre-wrap; word-break: break-word; min-width: 0; }
.cv-text .dc-h1 { font-size: 22px; } .cv-text .dc-h2 { font-size: 18px; }
.cv-image { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: 8px; }
.cv-image.empty, .cv-thumb.empty { display: grid; place-items: center; min-height: 90px; border: 1.5px dashed #4e5058; color: #949ba4; background: transparent; }
.cv-sep { height: 8px; }
.cv-sep.large { height: 20px; }
.cv-sep.line { height: 1px; background: #4e5058; margin: 4px 0; }
.cv-sep.line.large { margin: 10px 0; }
.cv-sep-hit { padding: 6px 0; cursor: pointer; border-radius: 6px; }
.cv-sep-hit .cv-sep:not(.line) { border-top: 1px dashed #4e5058; height: 0; }
.cv-section { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.cv-section .cv-text { flex: 1; }
.cv-acc { flex: none; display: flex; align-items: center; }
.cv-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cv-thumb.empty { width: 80px; min-height: 80px; }
.cv-box .dc-row { margin-top: 0; }
.cv-box .discord-select { margin-top: 0; max-width: none; }
.cv-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #b5bac1; }
.cv-toolbar input[type='color'] { width: 34px; height: 26px; padding: 0; border: 0; background: none; }
.cv-add { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.warn-text { color: var(--warn); }
.cv-box.live .pv-block { background: #2b2d31; }
.dc-file { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; background: #2b2d31; border: 1px solid #3f4147; border-radius: 6px; padding: 8px 12px; color: #00a8fc; font-size: 13px; }

/* ---------- Beranda: fitur baru & contoh panel Kotak ---------- */
.box-mock { max-width: 520px; margin: 0 auto; box-shadow: var(--shadow); }
.box-mock .cv-box { gap: 10px; }
.box-banner { height: 92px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #aef6ff 0%, #3fc8ff 45%, #3b74e6 100%); color: #061226; font-weight: 800; font-size: 22px; letter-spacing: 0.02em; }
.box-mock .dc-sub { color: #949ba4; font-size: 13px; }

/* Beranda: contoh kode webhook */
.code-mock { background: #0f1020; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); max-width: 520px; margin: 0 auto; }
.cm-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: #8592ad; font-size: 12px; }
.cm-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3b55; }
.cm-bar span { margin-left: 8px; }
.code-mock pre { margin: 0; padding: 16px 18px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #dbe4ff; overflow-x: auto; }
.code-mock .k { color: #7dd3fc; } .code-mock .s { color: #86efac; } .code-mock .c { color: #6b7280; }
.cm-link { display: block; padding: 10px 18px 14px; font-size: 14px; }

/* ---------- Editor pesan (message-editor.js) ---------- */
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.me-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.me-preview-wrap { position: sticky; top: 80px; display: grid; gap: 6px; min-width: 0; }
.me-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.me-sec { display: grid; gap: 6px; }
.me-emb { padding: 8px 10px; }
.me-emb-head { display: flex; align-items: center; gap: 8px; }
.me-toggle { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-toggle::before { content: '▸'; display: inline-block; margin-right: 6px; color: var(--muted); transition: transform 0.15s; }
.me-emb.open .me-toggle::before { transform: rotate(90deg); }
.me-emb-head input[type='color'] { width: 34px; height: 26px; padding: 0; border: 0; background: none; }
.me-emb-body { display: grid; gap: 12px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.me-fields, .me-links { display: grid; gap: 6px; }
.me-blocks { display: grid; gap: 8px; }
.me-block { padding: 8px 10px; }
.me-block .me-emb-head b { flex: 1; min-width: 0; }
.me-block-body { display: grid; gap: 6px; margin-top: 8px; }
.me-editor input[type="color"] { width: 40px; height: 30px; padding: 0; border: 0; background: none; }
.me-editor [hidden] { display: none !important; }
.me-add { justify-content: flex-start; }
.me-layout { flex-wrap: wrap; max-width: 100%; }
.me-field { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 6px; align-items: center; }
.me-link { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 6px; align-items: center; }
.me-link .ep-field { min-width: 0; }
@media (max-width: 900px) {
  .me-grid { grid-template-columns: minmax(0, 1fr); }
  .me-preview-wrap { position: static; }
  .me-field { grid-template-columns: auto minmax(0, 1fr) auto; }
  .me-field input[data-me$='.value'] { grid-column: 2 / -1; }
  .me-link { grid-template-columns: auto 64px minmax(0, 1fr) auto; }
  .me-link input[data-me$='.url'] { grid-column: 2 / 4; }
}
.me-narrow .me-grid, .designer-side .me-grid { grid-template-columns: minmax(0, 1fr); }
.designer-side .me-preview-wrap { position: static; }
.designer-side .me-field { grid-template-columns: auto minmax(0, 1fr) auto; }
.designer-side .me-field input[data-me$='.value'] { grid-column: 2 / -1; }
.designer-side .me-link { grid-template-columns: auto 64px minmax(0, 1fr) auto; }
.designer-side .me-link input[data-me$='.url'] { grid-column: 2 / 4; }

/* Tombol sisip emoji di kolom teks */
.ei-input { padding-right: 72px !important; }
.ei-btn { position: fixed; z-index: 85; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; font-size: 17px; line-height: 1; cursor: pointer; opacity: .75; filter: grayscale(.4); transition: opacity .15s, filter .15s, background .15s; }
.ei-btn[hidden] { display: none; }
.ei-btn:hover, .ei-btn:focus-visible { opacity: 1; filter: none; background: var(--bg-3, rgba(127, 127, 127, .15)); }

/* Editor yang dikunci (fitur Premium) */
.is-locked { opacity: .55; pointer-events: none; user-select: none; }

/* Panel owner: pengaturan paket */
.plan-edit .plan-row > div:not(:first-child) { display: flex; justify-content: center; align-items: center; }
.plan-edit input[type='number'] { width: 90px; text-align: center; }
.plan-edit .switch b { display: none; }

/* Editor pesan: kolom tidak melebar karena isi panjang (mis. dropdown variabel di layar kecil) */
.me-grid > *, .me-editor, .me-sec { min-width: 0; }
.me-editor select, .me-editor textarea, .me-editor input { max-width: 100%; }

/* Form tutup ticket (Pengaturan → Tutup ticket) */
.cf-list { display: grid; gap: 8px; margin-bottom: 8px; }
.cf-q { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); }
.cf-q .drag-handle { cursor: grab; color: var(--muted); }
.cf-req { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cf-meta { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cf-meta .cf-id { width: 120px; padding: 4px 8px; font-size: 12px; }
@media (max-width: 700px) {
  .cf-q { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cf-q .drag-handle { grid-area: 1 / 1; }
  .cf-q [data-cf='label'] { grid-area: 1 / 2; }
  .cf-q [data-cf-del] { grid-area: 1 / 3; }
  .cf-q [data-cf='placeholder'] { grid-area: 2 / 2 / 3 / 4; }
  .cf-q [data-cf='style'] { grid-area: 3 / 2; }
  .cf-q .cf-req { grid-area: 3 / 3; }
  .cf-q .cf-meta { grid-area: 4 / 2 / 5 / 4; }
}

/* Tombol { } & daftar variabel */
.vi-btn { font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); filter: none; white-space: nowrap; }
.vp-popup { max-height: min(420px, 70vh); grid-template-rows: auto auto 1fr; }
.vp-list { overflow-y: auto; display: grid; gap: 10px; padding-right: 2px; }
.vp-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
.vp-item { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 6px 8px; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.vp-item:hover, .vp-item:focus-visible { background: var(--bg-3, rgba(127, 127, 127, .15)); }
.vp-item code { color: var(--accent); white-space: nowrap; }
.vp-item span { color: var(--text-2); }

/* Upload gambar (public/image-upload.js) */
.iu-btn { position: fixed; z-index: 60; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.iu-btn[hidden] { display: none; }
.iu-btn:hover { border-color: var(--accent); color: var(--accent); }
input.iu-input { padding-right: 38px; }
input.iu-busy { opacity: 0.6; }
.iu-note { position: fixed; z-index: 61; max-width: 290px; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.iu-note.error { border-color: #f23f43; color: #f23f43; }
img.img-broken { min-height: 72px; min-width: 72px; background: repeating-linear-gradient(45deg, rgba(242, 63, 67, 0.12) 0 8px, transparent 8px 16px); border: 1px dashed #f23f43; border-radius: 6px; color: #f23f43; font-size: 12px; cursor: pointer; }

/* Beberapa kotak dalam satu pesan (blok "Kotak baru") */
.cv-box + .cv-box { margin-top: 8px; }
.cv-boxbreak { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px dashed #4e5058; border-radius: 6px; color: #b5bac1; font-size: 12px; cursor: pointer; }
.cv-boxdot { width: 12px; height: 12px; border-radius: 3px; border: 1px solid #4e5058; flex: none; }
