/* ==========================================================================
   DaftarSunat — panel super admin platform
   ========================================================================== */
:root {
  --navy: #0d1e38;
  --navy-2: #132a4c;
  --ink: #0e1c33;
  --ink-soft: #334a68;
  --muted: #6b7f99;
  --line: #e2eaf4;
  --surface: #fff;
  --bg: #f2f6fc;
  --primary: #1b62d4;
  --primary-dark: #1450b4;
  --primary-soft: #e9f1fe;
  --green: #0f8a5f;
  --green-soft: #e4f6ee;
  --amber: #b06000;
  --amber-soft: #fdf1df;
  --red: #d92d3f;
  --red-soft: #fdeaec;
  --violet: #6d4ad8;
  --violet-soft: #efeafe;
  --teal: #0d9488;
  --teal-soft: #e4f6f4;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 39, 74, .05), 0 1px 3px rgba(15, 39, 74, .04);
  --shadow: 0 2px 4px rgba(15, 39, 74, .04), 0 12px 28px -14px rgba(15, 39, 74, .16);
  --shadow-lg: 0 24px 60px -24px rgba(11, 34, 66, .35);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); font-size: 14px; line-height: 1.5;
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 650; }
.mono { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }

/* login */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 500px at 20% 0%, #dbe8ff 0%, rgba(219, 232, 255, 0) 60%), var(--bg); }
.login-card { width: min(430px, 100%); background: #fff; border-radius: 20px; padding: 32px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; }
.login-card .brand { display: flex; align-items: center; gap: 11px; }
.login-card .logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(150deg, #0d1e38, #1b62d4);
  display: grid; place-items: center; color: #fff; }
.login-card h1 { font-size: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid #cfdcec; border-radius: 10px;
  background: #fff; color: var(--ink); font-size: 13.5px; font-family: inherit; min-width: 0;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7f99' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #8ab4f0; box-shadow: 0 0 0 3.5px rgba(27, 98, 212, .13); }

/* shell */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.side {
  background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #dbe6f5;
  padding: 20px 14px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100dvh;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.side .logo { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(150deg, #2b7cf0, #0d9488);
  display: grid; place-items: center; color: #fff; flex: none; }
.side .brand b { color: #fff; font-size: 14px; display: block; }
.side .brand span { font-size: 11px; color: #8fa8c8; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px;
  color: #b9cbe4; font-size: 13.5px; font-weight: 550;
}
.nav a .ic { color: #7f9dc0; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: rgba(43, 124, 240, .22); color: #fff; }
.nav a.active .ic { color: #7db4ff; }
.nav .count { margin-left: auto; background: #d92d3f; color: #fff; border-radius: 999px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.side-foot .who { font-size: 12px; color: #9db6d4; }
.side-foot a { font-size: 12.5px; color: #b9cbe4; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 14px 26px; background: rgba(242, 246, 252, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 234, 244, .9);
}
.topbar h1 { font-size: 17px; }
.topbar .sub { font-size: 12px; color: var(--muted); }
.view { padding: 22px 26px 56px; display: flex; flex-direction: column; gap: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.page-head h2 { font-size: 21px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 10px 0; }
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1150px) { .grid.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.side { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid.two { grid-template-columns: 1fr; } .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; } .view { padding: 16px; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow-sm); }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.stat .value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.stat .foot { font-size: 11.5px; color: var(--muted); }
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .chip { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat .chip.green { background: var(--green-soft); color: var(--green); }
.stat .chip.amber { background: var(--amber-soft); color: var(--amber); }
.stat .chip.violet { background: var(--violet-soft); color: var(--violet); }
.stat .chip.teal { background: var(--teal-soft); color: var(--teal); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid #cfdcec;
  background: #fff; color: var(--ink-soft); font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: .15s; white-space: nowrap;
}
.btn:hover { background: #f7fafe; border-color: #b9cbe1; color: var(--ink); }
.btn-primary { background: linear-gradient(180deg, #2269dd, #1b5fce); border-color: #1b5fce; color: #fff; }
.btn-primary:hover { background: #1a57bf; border-color: #1a57bf; color: #fff; }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: #0b6f4c; border-color: #0b6f4c; color: #fff; }
.btn-danger { color: var(--red); border-color: #f3c8ce; }
.btn-danger:hover { background: var(--red-soft); border-color: #eeb2bb; }
.btn-soft { background: var(--primary-soft); border-color: #cfe0fb; color: var(--primary-dark); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.2px; border-radius: 8px; }
.btn-icon { width: 32px; height: 32px; padding: 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* table */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #7d92ab;
  font-weight: 700; padding: 10px 16px; background: #f8fbfe; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.table td { padding: 11px 16px; border-bottom: 1px solid #eef3f9; vertical-align: middle; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: #f9fbfe; }
table.table td .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cell-main { font-weight: 600; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; background: #eef3f9; color: var(--ink-soft); white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.blue { background: var(--primary-soft); color: #1852b0; }
.badge.green { background: var(--green-soft); color: #0a6f4c; }
.badge.amber { background: var(--amber-soft); color: #92500a; }
.badge.red { background: var(--red-soft); color: #b02436; }
.badge.gray { background: #eef2f7; color: #62748c; }
.badge.violet { background: var(--violet-soft); color: #5535b8; }
.badge.teal { background: var(--teal-soft); color: #0a6f68; }

/* misc */
.empty { padding: 30px 18px; text-align: center; color: var(--muted); font-size: 13px; }
.list-row { display: flex; gap: 11px; align-items: center; padding: 11px 20px; border-bottom: 1px solid #eef3f9; font-size: 13px; }
.list-row:last-child { border-bottom: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.alert { padding: 12px 14px; border-radius: 11px; font-size: 13px; border: 1px solid; }
.alert.info { background: var(--primary-soft); border-color: #cfe0fb; color: #1a4f9e; }
.alert.warn { background: var(--amber-soft); border-color: #f2ddbd; color: #8a4c08; }
.alert.ok { background: var(--green-soft); border-color: #bfe8d3; color: #0a6f4c; }
.alert.danger { background: var(--red-soft); border-color: #f6c9cf; color: #a8202f; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 15px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.toolbar .input, .toolbar .select { width: auto; min-width: 140px; }
.seg { display: inline-flex; background: #eef4fc; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; font-family: inherit; }
.seg button.active { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); }
.loading { display: grid; place-items: center; padding: 44px; color: var(--muted); font-size: 13px; gap: 10px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #dbe7f5; border-top-color: var(--primary); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; }
.timeline-dot { display: flex; flex-direction: column; align-items: center; }
.timeline-dot i { width: 9px; height: 9px; border-radius: 50%; background: #cfe0fb; margin-top: 5px; flex: none; }
.timeline-dot span { width: 2px; flex: 1; background: var(--line); }
.timeline-item:last-child .timeline-dot span { display: none; }
.timeline-item.done .timeline-dot i { background: var(--primary); }
.timeline-body { padding-bottom: 14px; font-size: 12.5px; }
.timeline-body b { display: block; font-size: 13px; }
.bukti-img { max-width: 100%; border-radius: 10px; border: 1px solid var(--line); max-height: 320px; object-fit: contain; background: #f8fbfe; }
.kredensial { background: #f4fbf7; border: 1px dashed #a9dcc2; border-radius: 12px; padding: 14px; }
.kredensial .v { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.paket-line { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }

/* modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(10, 25, 46, .48); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 18px; animation: fade .16s; }
.modal { width: min(660px, 100%); max-height: 90dvh; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { width: min(900px, 100%); }
.modal.slim { width: min(440px, 100%); }
.modal-head { display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.modal-head h3 { font-size: 16.5px; }
.modal-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 4px 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 20px 17px; border-top: 1px solid var(--line);
  background: #fbfdff; border-radius: 0 0 18px 18px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985) } to { opacity: 1; transform: none } }
.toasts { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 9px; max-width: 350px; }
.toast { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 11px;
  padding: 11px 13px; box-shadow: var(--shadow); font-size: 13px; animation: slide .18s; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast b { display: block; font-size: 12.5px; }
@keyframes slide { from { opacity: 0; transform: translateX(14px) } to { opacity: 1; transform: none } }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-soft); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--primary); border-color: #cfdcec; }
