:root{
  --bg:#0b1117; --panel:#0f1720; --ink:#e5eef7; --muted:#a8b3c4;
  --accent:#66d9e8; --accent-2:#3bc9db; --danger:#ff6b6b; --ok:#51cf66; --bd:#1f2a3a;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; font:16px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial;
  color:var(--ink);
  background:radial-gradient(1200px 600px at 15% -10%, #12202e 0, rgba(0,0,0,0) 60%), var(--bg);
  min-height:100dvh; display:grid; place-items:center; padding:24px;
}
.wrap{width:100%; max-width:860px}
.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.1));
  border:1px solid var(--bd); border-radius:16px; padding:22px 18px; backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.brand{display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:14px; text-align:center}
.brand img{width:48px; height:48px; border-radius:10px; background:#0b1520; object-fit:cover}
h1{margin:0; font-size:clamp(22px,3vw,28px)}
h2{margin:0 0 8px; font-size:18px; color:var(--muted); font-weight:600}
p{margin:6px 0 10px}
label{display:block; font-size:14px; color:var(--muted); margin:12px 0 6px}
input, select, textarea{
  width:100%; padding:12px; border-radius:12px; background:#0b1520; color:var(--ink);
  border:1px solid #203040; outline:none;
}
textarea{min-height:120px; resize:vertical}
input:focus, select:focus, textarea:focus{border-color:var(--accent)}
.btn{
  appearance:none; border:0; background:linear-gradient(180deg,var(--accent),var(--accent-2));
  color:#001018; padding:12px 16px; border-radius:12px; font-weight:700; cursor:pointer; width:100%;
  box-shadow:0 6px 18px rgba(59,201,219,.25);
}
.btn.alt{background:linear-gradient(180deg,#7dffb0,#51cf66)}
.btn:disabled{filter:grayscale(.6); opacity:.6; cursor:not-allowed}
.muted{color:var(--muted)}
.row{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:14px}

/* Notifikasi */
.notice{margin:10px 0; border-radius:12px; padding:10px 12px; border:1px solid #203040; background:#0b1520}
.notice.err{border-color:#3b1e24; background:#1a0f12; color:#ffc2c2}
.notice.ok {border-color:#1e3b2a; background:#0f1a14; color:#b8ffd0}
.notice ul{margin:6px 0 0 18px}

/* Grid layanan */
.svc-grid{display:grid; gap:12px; grid-template-columns:1fr}
@media (min-width:700px){ .svc-grid{grid-template-columns:1fr 1fr} }
.svc-card{
  border:1px solid #213249; border-radius:14px; background:#0b1520;
  padding:14px; display:flex; flex-direction:column; gap:10px; transition:transform .12s ease, box-shadow .12s ease;
}
.svc-card:hover{ transform: translateY(-1px); box-shadow:0 10px 24px rgba(0,0,0,.25) }
.svc-head{display:flex; align-items:center; gap:10px; justify-content:space-between}
.svc-title{font-weight:700}
.svc-icon{width:28px; height:28px; display:grid; place-items:center; border-radius:8px; background:#0f1a24; border:1px solid #203040; font-size:16px; color:#a8b3c4}
.badge{font-size:11px; color:#a8b3c4; border:1px solid #203040; padding:4px 8px; border-radius:999px}
.locked{opacity:.6; filter:grayscale(.3); pointer-events:auto}
.lock-badge{font-size:11px; margin-left:8px; color:#ffc2c2; border:1px solid #3b1e24; padding:2px 8px; border-radius:999px; background:#1a0f12}
.svc-actions{display:flex; gap:8px; flex-wrap:wrap; margin-top:4px}
.btn.small{padding:8px 12px; border-radius:10px; font-weight:700; width:auto}

/* Layar dashboard layanan */
#view-service .bar{display:flex; align-items:center; gap:12px; margin-bottom:16px}
.btn-ghost{border:1px solid rgba(255,255,255,.1); background:transparent; padding:10px 14px; border-radius:12px; cursor:pointer; color:var(--ink)}
.grid-2{display:grid; gap:14px; grid-template-columns:1fr 1fr}
.card-lite{border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:16px; background:rgba(255,255,255,.02)}
.card-lite h3{margin:0 0 8px}
.actions{display:flex; flex-wrap:wrap; gap:10px}
.btn.neutral{padding:12px 16px; border-radius:12px; font-weight:700; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.06); color:var(--ink)}
/* ===== Responsive two-column ===== */
.svc-two{display:grid; gap:18px; grid-template-columns:1fr}
@media (min-width:900px){ .svc-two{grid-template-columns:1fr 1fr} }

/* ===== Booths list ===== */
.table{width:100%; border-collapse:separate; border-spacing:0 8px}
.table th,.table td{padding:8px 10px; border:1px solid rgba(255,255,255,.08)}
.table th{background:rgba(255,255,255,.06); font-weight:700; color:var(--ink)}
.table td{background:rgba(255,255,255,.03)}
.table td:first-child,.table th:first-child{border-top-left-radius:10px; border-bottom-left-radius:10px}
.table td:last-child,.table th:last-child{border-top-right-radius:10px; border-bottom-right-radius:10px}

/* ===== Print preview grid (A4 by default) ===== */
.print-controls{display:flex; flex-wrap:wrap; gap:10px; margin:10px 0}
.print-controls input{width:120px}

.print-page{
  --cols: 3;             /* default */
  --rows: 8;
  --gap-mm: 3;
  --qr-mm: 28;

  display:grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: calc(var(--gap-mm) * 1mm);
  padding: 10mm; /* margin dalam halaman */
  background:white; color:black; border-radius:8px;
}

.print-cell{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  border:1px dashed rgba(0,0,0,.08); padding:2mm; background:#fff;
}
.print-cell img{ width: calc(var(--qr-mm) * 1mm); height: calc(var(--qr-mm) * 1mm); object-fit:contain }
.print-cell .cap{ font: 11px/1.2 system-ui; color:#222; margin-top:2mm }

/* ===== Print rules ===== */
@media print{
  body{ background:white; padding:0; }
  .no-print{ display:none !important; }
  .print-page{ page-break-after:always; border:0; }
}
.toolbar{
  display:grid;
  grid-template-columns: 1fr auto;
  gap:10px;
  align-items:center;
  margin:12px 0;
}
.toolbar__search{
  width:100%;
  max-width:100%;
}
.toolbar__actions{
  display:grid;
  grid-auto-flow:column;
  gap:10px;
  align-items:center;
}
.toolbar__actions .btn{
  min-width:160px; 
  height:44px; 
}

@media (max-width:640px){
  .toolbar{
    grid-template-columns: 1fr;
  }
  .toolbar__actions{
    grid-auto-flow:row;
  }
  .toolbar__actions .btn{
    width:100%;
  }
}
