/* Tema "Kaset Teal" + font Louis George Cafe = tampilan bawaan WS Pro web. */
@font-face { font-family: "Louis George Cafe"; src: url("/assets/LouisGeorgeCafe.ttf") format("truetype"); font-weight: 100 600; font-display: swap; }
@font-face { font-family: "Louis George Cafe"; src: url("/assets/LouisGeorgeCafe-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }

:root {
  --bg: #0a2623;
  --card: #0f3531;
  --card2: #134440;
  --text: #e8fffb;
  --muted: #8fc9bf;
  --line: #2a7a70;
  --brand: #f2b33d;
  --brand-ink: #1c1604;
  --accent: #7fe0cf;
  --hero1: #0f4c47;
  --hero2: #0a2623;
  --nav: #0f2f2b;
  --ok: #4fe0a0;
  --danger: #ff6b8a;
  --warn: #f2b94b;
  --shade: rgb(0 0 0 / 0.55);
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 "Louis George Cafe", ui-sans-serif, system-ui, sans-serif; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
.logo { width: 36px; height: 36px; border-radius: 10px; vertical-align: middle; }
.login .logo { width: 72px; height: 72px; border-radius: 18px; display: block; margin: 0 auto 12px; }
.login h1, .login p { text-align: center; }
.hidden { display: none !important; }
h1 { margin: 0 0 4px; font-size: 22px; }
h2 { font-size: 15px; margin: 20px 0 8px; }
code { background: var(--card2); padding: 1px 4px; border-radius: 4px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; margin: 0 0 8px; }
.error { color: var(--danger); min-height: 1em; margin: 6px 0 0; }
.ok { color: var(--ok); margin: 6px 0 0; }

input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card2); }
textarea { resize: vertical; }
label { display: block; margin: 10px 0; color: var(--muted); font-size: 13px; }
label input, label select, label textarea { margin-top: 4px; color: var(--text); }
label.check { display: flex; gap: 8px; align-items: center; }
label.check input { width: auto; margin: 0; }
button { padding: 9px 16px; border-radius: var(--radius); border: 0; background: var(--brand); color: var(--brand-ink); cursor: pointer; font-weight: 600; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
button.danger { background: var(--danger); color: #2a0a14; }
button.small { padding: 4px 10px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px 0 var(--shade), 0 10px 28px -16px var(--shade); }
.narrow { max-width: 560px; margin-inline: auto; }
summary { cursor: pointer; font-weight: 600; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.row > * { flex: 1 1 140px; }
.row > button { flex: 0 0 auto; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: 100%; max-width: 360px; }
.login button { width: 100%; margin-top: 8px; }

header { display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: linear-gradient(135deg, var(--hero1), var(--nav)); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
header nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
header nav button { background: transparent; color: var(--muted); font-weight: 500; white-space: nowrap; }
header nav button.active { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
main { padding: 16px; max-width: 1200px; margin: 0 auto; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.stat { background: linear-gradient(135deg, var(--hero1), var(--hero2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat:first-child b { color: var(--brand); }
.stat b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
td.actions { display: flex; gap: 6px; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.badge.running, .badge.sent, .badge.delivered, .badge.read, .badge.approved { color: var(--ok); border-color: currentColor; }
.badge.paused, .badge.pending, .badge.claimed, .badge.unconfirmed { color: var(--warn); border-color: currentColor; }
.badge.failed, .badge.invalid, .badge.rejected { color: var(--danger); border-color: currentColor; }

.campaign { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.campaign-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.campaign-head h3 { margin: 0; font-size: 16px; }
.campaign pre { white-space: pre-wrap; background: var(--card2); padding: 10px; border-radius: 8px; margin: 10px 0; font: inherit; }
.bar { height: 8px; background: var(--card2); border-radius: 999px; overflow: hidden; display: flex; margin: 10px 0 6px; }
.bar i { display: block; height: 100%; }
.bar .s { background: var(--ok); }
.bar .f { background: var(--danger); }
.bar .u { background: var(--warn); }
.counts { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.counts b { color: var(--text); }
.campaign .row { margin: 10px 0 0; }

dialog { width: min(900px, calc(100vw - 32px)); max-height: 85vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); padding: 16px; }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

@media (max-width: 720px) {
  header { gap: 10px; }
  header nav { order: 3; flex-basis: 100%; }
}
