/* SIMPADU PERADI — Extended Component Styles */

/* ── Toast / Notifications ──────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px; min-width: 280px;
  animation: slide-in .22s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--blue-500); }
@keyframes slide-in {
  from { transform: translateX(50px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,20,40,.5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--line);
}
.modal-header {
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-header h2 { font-size: 15px; font-weight: 700; color: var(--ink); }
.modal-body   { padding: 22px; }
.modal-footer {
  padding: 14px 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 8px;
  position: sticky; bottom: 0; background: var(--surface);
}
.btn-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1;
  padding: 4px 8px; border-radius: var(--radius-sm);
  transition: .12s;
}
.btn-close:hover { background: var(--bg); color: var(--ink); }

/* ── Search input ───────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap .ic {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%); color: var(--muted); font-size: 14px;
}
.search-wrap input { padding-left: 34px; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; }
.pagination .page-btn {
  padding: 6px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-size: 12px; font-weight: 600;
  cursor: pointer; background: var(--surface); color: var(--sub);
  transition: .12s; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center; min-width: 32px;
}
.pagination .page-btn:hover { background: var(--blue-50); border-color: var(--blue-300); color: var(--blue-700); text-decoration: none; }
.pagination .page-btn.active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.pagination .page-btn.disabled { opacity: .4; pointer-events: none; cursor: default; }

/* ── Dot indicators ─────────────────────────────────────────── */
.status-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 5px; flex-shrink: 0;
}
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-blue  { background: var(--blue-500); }
.dot-red   { background: var(--red); }
.dot-gray  { background: var(--muted); }

/* ── Face Recognition UI ────────────────────────────────────── */
.face-wrap { text-align: center; padding: 10px 0; }
.face-ring-outer {
  width: 260px; height: 260px; border-radius: 50%;
  border: 3px solid var(--blue-400); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  position: relative; background: var(--blue-900);
}
.face-ring-inner {
  position: absolute; inset: 12px; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.3);
  animation: spin 10s linear infinite;
}
.face-icon { font-size: 52px; color: #6f86a6; }
.face-hint { font-size: 12px; color: var(--muted); margin-top: 12px; }
.face-result {
  display: none; margin-top: 12px; padding: 10px 14px;
  border-radius: var(--radius-sm); font-size: 13px;
}
.face-result.success { background: var(--grn-bg); color: var(--green); border: 1px solid #bbf7d0; }
.face-result.fail    { background: var(--red-bg); color: var(--red); border: 1px solid #fca5a5; }

/* ── Table action strip ─────────────────────────────────────── */
.tbl-actions { display: flex; gap: 5px; }
.tbl-btn {
  padding: 4px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); font-size: 12px; font-weight: 600;
  cursor: pointer; background: var(--surface); color: var(--sub);
  text-decoration: none; transition: .12s;
}
.tbl-btn:hover { background: var(--blue-50); text-decoration: none; }
.tbl-btn.danger { color: var(--red); border-color: #fca5a5; }
.tbl-btn.danger:hover { background: var(--red-bg); }

/* ── Section header ─────────────────────────────────────────── */
.sec-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.sec-head h2 { font-size: 18px; font-weight: 800; color: var(--ink); }
.sec-head p  { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ── Filter bar ─────────────────────────────────────────────── */
.filter-bar {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.filter-bar .form-group { margin: 0; min-width: 150px; flex: 1; }

/* ── Sidebar badge ──────────────────────────────────────────── */
.s-badge {
  margin-left: auto; background: var(--gold); color: var(--blue-900);
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
}

/* ── Step wizard ─────────────────────────────────────────────── */
.wizard-steps { display: flex; margin-bottom: 24px; }
.w-step { flex: 1; text-align: center; position: relative; }
.w-step .w-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; margin: 0 auto 5px; position: relative; z-index: 2;
}
.w-step .w-lbl { font-size: 12px; color: var(--muted); }
.w-step.active .w-dot { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.w-step.done .w-dot   { background: var(--green); border-color: var(--green); color: #fff; }
.w-step.active .w-lbl, .w-step.done .w-lbl { color: var(--ink); font-weight: 600; }
.w-step:not(:last-child)::after {
  content: ""; position: absolute; top: 17px; left: 50%;
  width: 100%; height: 2px; background: var(--line); z-index: 1;
}
.w-step.done::after { background: var(--green); }

/* ── Spin animation (shared) ─────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Auto-hide alerts ───────────────────────────────────────── */
.auto-hide { animation: fade-out 4s forwards; }
@keyframes fade-out {
  0%, 80% { opacity: 1; } 100% { opacity: 0; pointer-events: none; height: 0; margin: 0; padding: 0; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .modal-box { max-width: 100%; }
  .sec-head  { flex-direction: column; gap: 8px; }
  .filter-bar { flex-direction: column; }
}
