:root {
  --bg: #0b1220;
  --bg-2: #0e1729;
  --ink: #e7eef7;
  --muted: #94a8bf;
  --line: rgba(148, 168, 191, 0.16);
  --line-strong: rgba(148, 168, 191, 0.3);
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.08);
  --indigo: #6366f1;
  --sky: #0ea5e9;
  --cyan: #22d3ee;
  --teal: #2dd4bf;
  --grad: linear-gradient(135deg, #6366f1 0%, #0ea5e9 60%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(34, 211, 238, 0.12));
  --danger: #f87171;
  --ok: #34d399;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 6, 18, 0.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
}

/* Cahaya gradien halus di latar */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(99, 102, 241, 0.22), transparent 60%),
    radial-gradient(800px 520px at 105% 12%, rgba(34, 211, 238, 0.14), transparent 55%),
    radial-gradient(700px 500px at 50% 115%, rgba(45, 212, 191, 0.1), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 18px; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: rgba(99, 102, 241, 0.45); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.12rem; letter-spacing: 0.2px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35); }
.brand em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar nav > a { color: var(--muted); font-size: 0.93rem; font-weight: 600; padding: 6px 2px; transition: color 0.15s; }
.topbar nav > a:hover { color: var(--ink); text-decoration: none; }
.linklike { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: 0.93rem; cursor: pointer; padding: 6px 2px; }
.linklike:hover { color: var(--ink); }
.inline { display: inline; }

/* ---------- Pesan ---------- */
.flash {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(2, 6, 18, 0.3);
}
.notice {
  margin: 14px 0 0;
  padding: 11px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 146, 60, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fde68a;
  font-size: 0.92rem;
}

main.wrap { padding-top: 28px; padding-bottom: 48px; }
h1 { font-size: 1.55rem; margin: 10px 0 14px; letter-spacing: -0.02em; }
h2 { font-size: 1.12rem; margin: 0 0 12px; }
h3 { margin: 0 0 6px; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 44px 8px 10px; }
.hero .pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); line-height: 1.15; margin: 18px 0 10px; }
.hero h1 .grad { background: linear-gradient(90deg, #818cf8, #22d3ee, #2dd4bf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Grid ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px 0; }
@media (max-width: 760px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } }

/* ---------- Kartu ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(6px);
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
}
.card:hover { border-color: var(--line-strong); }
.card.hoverable:hover { background: var(--card-hover); transform: translateY(-2px); box-shadow: var(--shadow); }

.sectionhead { margin-top: 30px; }
.sectionhead h2 { display: flex; align-items: center; gap: 10px; }
.sectionhead h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Tile ikon */
.tile {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad-soft); border: 1px solid rgba(99, 102, 241, 0.35);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

/* Kartu channel */
.chcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); position: relative; }
.chcard:hover { text-decoration: none; }
.chcard .arrow { position: absolute; top: 18px; right: 18px; color: var(--muted); transition: transform 0.18s, color 0.18s; }
.chcard:hover .arrow { transform: translateX(4px); color: var(--cyan); }
.chcard .meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.83rem; }
.chcard.active-co { border-left: 3px solid var(--cyan); }
.chhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  background: rgba(148, 168, 191, 0.14); color: var(--muted); border: 1px solid transparent;
}
.badge-on { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35); }
.badge-off { background: rgba(248, 113, 113, 0.12); color: #fca5a5; border-color: rgba(248, 113, 113, 0.35); }

/* ---------- Avatar pseudonim ---------- */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.03em;
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.avatar.lg { width: 48px; height: 48px; font-size: 0.95rem; }
.avatar.sm { width: 30px; height: 30px; font-size: 0.62rem; }
.av-1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.av-2 { background: linear-gradient(135deg, #0ea5e9, #22d3ee); }
.av-3 { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.av-4 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.av-5 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.av-6 { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.av-7 { background: linear-gradient(135deg, #10b981, #34d399); }
.av-8 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }

/* ---------- Kartu kiriman ---------- */
.postcard { display: block; text-decoration: none; color: var(--ink); }
.postcard:hover { text-decoration: none; }
.postcard .meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.postcard .who { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.postcard .who b { color: #b6c4d6; }
.postcard .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.postcard h3 { font-size: 1.05rem; }
.postcard .excerpt {
  color: var(--muted); font-size: 0.9rem; margin: 6px 0 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.postcard .foot { display: flex; gap: 16px; color: var(--muted); font-size: 0.8rem; }

/* ---------- Form ---------- */
label { display: block; font-size: 0.87rem; font-weight: 600; color: #c3d0e0; margin-bottom: 12px; }
input[type="email"], input[type="password"], input[type="text"], input[name="title"], textarea, select {
  width: 100%; margin-top: 5px; padding: 11px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; color: var(--ink);
  background: rgba(2, 6, 18, 0.5);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: #5c718b; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff;
  border: 0; border-radius: 11px;
  padding: 11px 20px; font-weight: 700; font-size: 0.95rem; font-family: inherit;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 8px 26px rgba(14, 165, 233, 0.42); }
.btn:active { transform: translateY(0); }
.btn-small { padding: 6px 13px; font-size: 0.8rem; border-radius: 8px; box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #f97316); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.28); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); box-shadow: none; }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }
.btn-big { padding: 14px 26px; font-size: 1.02rem; }
.btn.sec { background: transparent; border: 1px solid var(--line-strong); box-shadow: none; color: var(--ink); }
.btn.sec:hover { border-color: var(--cyan); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Lain-lain ---------- */
.composer h2 { margin-top: 0; }
.notice-card { background: var(--grad-soft); border-color: rgba(99, 102, 241, 0.3); }
.crumbs { margin: 2px 0 10px; font-size: 0.9rem; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--cyan); }
.center { text-align: center; }
.big { font-size: 1.85rem; font-weight: 800; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.excerpt { font-style: italic; }
.verifylink { font-size: 1.05rem; }

.thread .meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.thread .who { color: var(--muted); font-size: 0.88rem; }
.thread .who b { color: #b6c4d6; }
.thread .body { white-space: pre-line; margin-top: 8px; font-size: 1.0rem; }
.thread .divider { border: 0; border-top: 1px solid var(--line); margin: 18px 0 4px; }

.comment { background: rgba(2, 6, 18, 0.35); }
.comment .meta { display: flex; align-items: center; gap: 10px; }
.comment .who { color: var(--muted); font-size: 0.83rem; }
.comment .who b { color: #b6c4d6; }
.comment .body { white-space: pre-line; font-size: 0.95rem; }

.reportbox { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 12px; }
.reportbox summary { color: var(--muted); font-size: 0.85rem; cursor: pointer; }
.reportbox summary:hover { color: var(--danger); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }

.tablewrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.87rem; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: rgba(148, 168, 191, 0.08); color: #c3d0e0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

.report { border-left: 3px solid var(--danger); }
.stats .card { margin-bottom: 0; }
.stats .small-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; }

.footer { background: rgba(2, 6, 18, 0.6); border-top: 1px solid var(--line); padding: 22px 0 30px; margin-top: 40px; font-size: 0.85rem; color: var(--muted); position: relative; }
.footer::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; background: var(--grad); opacity: 0.6; }
.footer p { margin: 6px 0; }

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