/* MY Bee Savior — admin panel */
:root {
  --honey: #f5b301; --honey-2: #ffcb3d; --ink: #1b1408; --muted: #75695a; --bg: #f7f4ec; --card: #fff;
  --line: rgba(27, 20, 8, .1); --ok: #1f9d55; --ok-soft: #e3f6ea; --warn-soft: #fff1d2; --bad: #d23b2b; --bad-soft: #fde7e4;
  --font: 'Inter', system-ui, sans-serif; --display: 'Bricolage Grotesque', 'Inter', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.h1 { font: 800 28px/1.2 var(--display); margin: 6px 0 20px; letter-spacing: -.01em; }
code { background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 5px; font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; font: 600 14.5px var(--font); border: 1.5px solid transparent; cursor: pointer; text-decoration: none; background: none; color: inherit; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.97); }
.btn-lg { height: 52px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }
.btn-honey { background: var(--honey); color: var(--ink); }
.btn-honey:hover { background: var(--honey-2); }
.btn-dark { background: var(--ink); color: var(--honey); }
.btn-ghost { border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--bad); color: #fff; }
.link { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0; }

.abar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 0 22px; height: 62px; background: var(--ink); color: #fff; }
.abrand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 17px var(--display); color: var(--honey); }
.atabs { display: flex; gap: 4px; }
.atabs a { text-decoration: none; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; color: rgba(255, 255, 255, .75); }
.atabs a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.atabs a.on { background: var(--honey); color: var(--ink); }
.ame { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.ame span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ame .link { color: var(--honey); }
.amain { width: min(1200px, 100% - 32px); margin: 24px auto 60px; }
@media (max-width: 760px) {
  .abar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 8px; }
  .abrand span { display: none; }
  .atabs { order: 3; width: 100%; overflow-x: auto; }
  .ame span { display: none; }
}

.flash { padding: 12px 16px; border-radius: 12px; margin: 0 0 18px; font-size: 14px; }
.flash-ok { background: var(--ok-soft); color: #0f5130; }
.flash-warn { background: var(--warn-soft); color: #6b4300; }
.flash-err { background: var(--bad-soft); color: #7a1a10; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; }
.stat b { display: block; font: 800 30px/1 var(--display); }
.stat span { font-size: 13px; color: var(--muted); }
.stat.ok b { color: var(--ok); }
.stat.muted b { color: var(--muted); }
.stat.honey { background: var(--honey); border-color: var(--honey); }
.stat.honey span { color: var(--ink); }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { height: 42px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; background: #fff; }
.filters input { flex: 1 1 260px; }

.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fcfaf4; position: sticky; top: 0; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fffbef; }
.tbl .nm { font-weight: 600; text-decoration: none; display: block; }
.tbl .nm:hover { text-decoration: underline; }
.tbl small { color: var(--muted); font-size: 12.5px; }
.acts { white-space: nowrap; text-align: right; }
.acts a { font-size: 13px; font-weight: 600; text-decoration: none; padding: 5px 9px; border-radius: 8px; }
.acts a:hover { background: var(--bg); }
.ava { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--honey); display: grid; place-items: center; font: 800 14px var(--display); overflow: hidden; flex: none; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.ava.xl { width: 140px; height: 140px; font-size: 42px; border: 4px solid var(--honey); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-aktif { background: var(--ok-soft); color: #0f5130; }
.pill-tamat { background: var(--warn-soft); color: #6b4300; }
.pill-tidak { background: #eee9de; color: var(--muted); }

.back { display: inline-block; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 4px; }
.edit-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
.side { display: grid; gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.panel h2 { font: 800 17px var(--display); margin: 0 0 14px; }
.panel label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.panel input:not([type=radio]):not([type=file]), .panel select, .panel textarea { display: block; width: 100%; margin-top: 6px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 500 15px var(--font); color: var(--ink); background: #fff; }
.panel input:focus, .panel select:focus, .panel textarea:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(245, 179, 1, .2); }
.panel small { display: block; font-weight: 400; margin-top: 5px; font-size: 12px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.radios { display: grid; gap: 8px; margin-bottom: 16px; }
.radio { display: flex !important; align-items: center; gap: 10px; margin: 0 !important; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink) !important; font-size: 14.5px !important; }
.radio:has(input:checked) { border-color: var(--honey); background: #fff8e2; }
.radio input { accent-color: var(--ink); width: 18px; height: 18px; }
.photo-box { display: grid; justify-items: center; gap: 12px; text-align: center; }
.file input { display: none; }
.plink { display: block; font-size: 12.5px; word-break: break-all; background: var(--bg); padding: 10px 12px; border-radius: 10px; margin: 0 0 8px; text-decoration: none; }
.warn-txt { color: #8a5a00 !important; margin-bottom: 12px; }
.danger { margin-top: 18px; border-color: rgba(210, 59, 43, .3); }
.danger-acts { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .edit-grid, .row2 { grid-template-columns: 1fr; } }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 0%, #fff3c4, var(--bg) 60%); }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 24px; padding: 36px 30px; text-align: center; box-shadow: 0 30px 60px -30px rgba(27, 20, 8, .4); display: grid; gap: 14px; justify-items: center; }
.login-card h1 { font: 800 26px var(--display); margin: 0; }
.login-card p { margin: 0; }
.login-card .flash { text-align: left; width: 100%; margin: 0; }
.login-card .dev { width: 100%; }
.login-card .back { margin-top: 8px; }

.qr-single { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center; }
.qr-single .qr svg { width: 100%; height: auto; }
@media (max-width: 700px) { .qr-single { grid-template-columns: 1fr; } }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.qr-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; break-inside: avoid; }
.qr-tile svg { width: 100%; height: auto; }
.qr-tile b { display: block; font-size: 13px; margin-top: 4px; }
.qr-tile span { font-size: 12px; color: var(--muted); }
@media print {
  .abar, .noprint, .flash { display: none !important; }
  body { background: #fff; }
  .amain { width: 100%; margin: 0; }
  .qr-sheet { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .qr-tile { border: 1px dashed #bbb; border-radius: 0; }
}

/* Log masuk 2 langkah */
.login-form { width: 100%; display: grid; gap: 14px; text-align: left; }
.login-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.login-form input { height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; font: 500 16px var(--font); color: var(--ink); background: #fff; width: 100%; }
.login-form input:focus { outline: none; border-color: var(--honey); box-shadow: 0 0 0 3px rgba(245, 179, 1, .2); }
.login-form .otp { text-align: center; font-size: 28px; letter-spacing: 10px; font-weight: 700; height: 60px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 70px; }
.pw-t { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--bg, #f6f1e4); border: 0; border-radius: 8px; padding: 6px 10px; font: 600 12.5px var(--font); color: var(--muted); cursor: pointer; }
.otp-actions { display: flex; gap: 22px; justify-content: center; font-size: 14px; }
.narrow-panel { max-width: 520px; }
.narrow-panel h1 { font: 800 24px var(--display); margin: 0 0 6px; }
.narrow-panel form { margin-top: 16px; }
