/* =========================================================
   REKAP DIAMOND v4 — Neutral Gray Design Tokens
   Mobile-first PWA, Dark-only theme
   ========================================================= */

:root {
  /* === Core Colors — Neutral Gray === */
  --bg-deep: #080a0f;
  --bg: #0f1117;
  --bg-elevated: #181b22;
  --bg-surface: #22262f;
  --bg-surface2: #2a2e38;
  --border: #252a34;
  --border-light: #3a3f4a;

  /* === Brand Gradients — Gray Slate === */
  --accent-start: #64748b;
  --accent-end: #475569;
  --accent-gradient: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  --accent-glow: rgba(100, 116, 139, 0.15);

  /* === Semantic Colors === */
  --gold: #F59E0B;
  --gold-dim: #D97706;
  --gold-glow: rgba(245, 158, 11, 0.12);
  --success: #10B981;
  --success-dim: #064E3B;
  --success-glow: rgba(16, 185, 129, 0.12);
  --danger: #EF4444;
  --danger-dim: #7F1D1D;
  --danger-glow: rgba(239, 68, 68, 0.12);
  --warning: #F59E0B;
  --warning-dim: #78350F;
  --warning-glow: rgba(245, 158, 11, 0.12);

  /* === Typography — Neutral Slate === */
  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
  --text-quaternary: #4B5563;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* === Spacing & Radius === */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* === Shadows === */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.6);

  /* === Motion Tokens === */
  --speed-instant: 80ms;
  --speed-fast: 150ms;
  --speed-base: 250ms;
  --speed-slow: 400ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* === Layout === */
  --topbar-h: 56px;
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}
::selection { background: var(--accent-glow); color: var(--text-primary); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { color: var(--text-secondary); }
a { color: var(--accent-end); text-decoration: none; transition: color var(--speed-fast) var(--ease-out); }
a:hover { color: var(--accent-start); }

/* =========================================================
   BACKGROUND AMBIENCE (GPU-accelerated, subtle)
   ========================================================= */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(100,116,139,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100,116,139,.02) 1px, transparent 1px);
  background-size: 40px 40px;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 30% at 20% 10%, rgba(100,116,139,.04) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(100,116,139,.03) 0%, transparent 45%),
    radial-gradient(ellipse 30% 25% at 50% 85%, rgba(245,158,11,.02) 0%, transparent 40%);
}

/* Subtle grid pulse */
@keyframes gridPulse {
  0%, 100% { opacity: 0.02; }
  50% { opacity: 0.04; }
}
.bg-grid::before { animation: gridPulse 8s ease-in-out infinite; will-change: opacity; }

/* Floating gradient orbs */
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}
.bg-orb {
  position: fixed; border-radius: 50%; filter: blur(80px); z-index: -1;
  animation: orbFloat 20s ease-in-out infinite; will-change: transform;
}

/* =========================================================
   BUTTON INTERACTIONS (Premium feel)
   ========================================================= */
.btn {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 7px 18px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  transition:
    transform var(--speed-instant) var(--ease-out),
    box-shadow var(--speed-instant) var(--ease-out),
    background var(--speed-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:active { transform: scale(0.96); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn.is-loading { pointer-events: none; }

.btn-primary {
  background: var(--accent-gradient); color: white;
  box-shadow: 0 1px 3px rgba(100,116,139,.2);
}
.btn-primary:hover { box-shadow: 0 4px 12px rgba(100,116,139,.3); }
.btn-secondary {
  background: var(--bg-surface); color: var(--text-secondary); border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-surface2); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(1.1); }
.btn-gold { background: var(--gold); color: #0f1117; font-weight: 700; }
.btn-gold:hover { filter: brightness(1.1); }
.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-lg { padding: 12px 28px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon {
  background: transparent; border: 1px solid var(--border); color: var(--text-quaternary);
  padding: 3px 8px; font-size: 11px; border-radius: var(--radius-sm);
  transition: all var(--speed-fast) var(--ease-out); cursor: pointer; font-family: var(--font);
}
.btn-icon:hover { color: var(--danger); border-color: var(--danger); }

/* Button loading spinner */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border); border-top-color: var(--accent-start);
  border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   FORM FIELD MICRO-ANIMATIONS
   ========================================================= */
.fld { margin-bottom: 14px; }
.fld-label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 5px; letter-spacing: .005em;
}
.fld-input {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-primary); font-size: 14px; font-family: var(--font); outline: none;
  transition: border-color var(--speed-fast) var(--ease-out), box-shadow var(--speed-fast) var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.fld-input:focus {
  border-color: var(--accent-start);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.fld-input::placeholder { color: var(--text-quaternary); }
.fld-input:disabled { opacity: .5; cursor: not-allowed; }
.fld-input-lg { padding: 12px 16px; font-size: 15px; }
select.fld-input {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.fld-textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text-primary); font-size: 14px; font-family: var(--font); outline: none;
  resize: vertical; min-height: 64px;
  transition: border-color var(--speed-fast) var(--ease-out), box-shadow var(--speed-fast) var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.fld-textarea:focus {
  border-color: var(--accent-start); box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Floating label effect */
.fld-group { position: relative; }
.fld-group .fld-label {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 400; color: var(--text-tertiary); pointer-events: none;
  transition: transform var(--speed-fast) var(--ease-out), color var(--speed-fast) var(--ease-out);
}
.fld-group .fld-input:focus + .fld-label,
.fld-group .fld-input:not(:placeholder-shown) + .fld-label {
  transform: translateY(-30px) scale(0.85);
  color: var(--accent-start);
}

/* =========================================================
   CARDS — Glass Morphism
   ========================================================= */
.card {
  background: linear-gradient(135deg, rgba(17,24,39,.7), rgba(30,41,59,.5));
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color var(--speed-fast) var(--ease-out);
  animation: fadeUp var(--speed-base) var(--ease-out) both;
}
.card:hover { border-color: var(--border-light); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; flex-wrap: wrap; gap: 8px;
}
.card-title {
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  letter-spacing: .02em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.card-title .badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; border-radius: 100px; padding: 0 8px;
  background: var(--accent-glow); color: var(--accent-start); font-size: 11px; font-weight: 700;
}

/* =========================================================
   TABS
   ========================================================= */
.tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: var(--bg-elevated); border-radius: var(--radius-sm);
  padding: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 8px 16px; color: var(--text-tertiary); font-size: 12.5px; font-weight: 500; cursor: pointer;
  border-radius: 6px; white-space: nowrap;
  transition: all var(--speed-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.tab:hover { color: var(--text-secondary); background: var(--bg-surface); }
.tab.active { background: var(--accent-glow); color: var(--accent-start); font-weight: 600; }

/* =========================================================
   TABLE — FinanceFlow Clean
   ========================================================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.table-wrap::-webkit-scrollbar { height: 3px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 10px 14px;
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
  color: var(--text-tertiary); font-size: 11px; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid rgba(30,41,59,.5); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr { transition: background var(--speed-fast) var(--ease-out); }
tr:hover td { background: rgba(100,116,139,.02); }
tfoot td {
  border-top: 2px solid var(--border); border-bottom: none;
  font-weight: 700; color: var(--gold);
  background: var(--bg-elevated); font-size: 14px; padding: 12px 14px;
}

/* =========================================================
   STATUS PILLS
   ========================================================= */
.pill { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
.pill-pending { background: var(--gold-glow); color: var(--gold); }
.pill-terlambat { background: var(--warning-glow); color: var(--warning); }
.pill-diterima { background: var(--success-glow); color: var(--success); }
.pill-ditolak { background: var(--danger-glow); color: var(--danger); }
.pill-shift { background: rgba(100,116,139,.1); color: var(--accent-start); }

/* =========================================================
   SHIFT SELECT GRID
   ========================================================= */
.shift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
@media (max-width: 560px) { .shift-grid { grid-template-columns: 1fr; } }
.shift-opt {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 13px; cursor: pointer;
  transition: border-color var(--speed-fast) var(--ease-out), background var(--speed-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.shift-opt:hover { border-color: var(--accent-start); background: var(--accent-glow); }
.shift-opt input { width: auto; margin: 0; accent-color: var(--accent-start); }
.shift-opt.disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }
.shift-hint { color: var(--text-tertiary); font-size: 11px; margin-top: 6px; }

/* Late warning */
.late-warning {
  background: var(--warning-glow); border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius-sm); padding: 10px 14px; color: var(--warning);
  font-size: 12px; margin-top: 10px; line-height: 1.5;
}
.late-warning strong { color: var(--text-primary); }

/* =========================================================
   PHOTO DROP ZONE & PREVIEW
   ========================================================= */
.photo-drop {
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm);
  padding: 20px; text-align: center; cursor: pointer;
  color: var(--text-tertiary); font-size: 13px; margin-top: 6px;
  transition: border-color var(--speed-fast) var(--ease-out), background var(--speed-fast) var(--ease-out);
}
.photo-drop:hover { border-color: var(--accent-start); background: var(--accent-glow); }
.photo-preview-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.photo-preview-item { position: relative; animation: fadeIn .2s var(--ease-out); }
.photo-preview-item img {
  width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm);
  display: block; border: 1px solid var(--border);
}
.photo-preview-item .rm {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--danger); color: white; font-size: 11px; font-weight: 700;
  line-height: 22px; text-align: center; cursor: pointer; border: none; padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.thumb-row { display: flex; gap: 4px; flex-wrap: wrap; }
.thumb {
  width: 32px; height: 32px; border-radius: 6px; object-fit: cover; cursor: pointer;
  border: 1px solid var(--border); transition: transform var(--speed-fast) var(--ease-out);
}
.thumb:hover { transform: scale(1.15); }

/* =========================================================
   SUMMARY BADGES
   ========================================================= */
.sum-badges { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.sum-badge {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 16px; min-width: 100px;
}
.sum-badge b { font-size: 18px; font-weight: 800; display: block; letter-spacing: -.02em; }
.sum-badge span { color: var(--text-tertiary); font-size: 11px; }
.sum-badge.accent b { color: var(--accent-start); }
.sum-badge.gold b { color: var(--gold); }
.sum-badge.success b { color: var(--success); }
.sum-badge.danger b { color: var(--danger); }
.sum-badge.warning b { color: var(--warning); }

/* =========================================================
   VERIFICATION CARDS
   ========================================================= */
.verif-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .verif-grid { grid-template-columns: 1fr; } }
.verif-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; position: relative;
  transition: border-color var(--speed-fast) var(--ease-out); overflow: hidden;
}
.verif-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: var(--accent-gradient); opacity: .4;
}
.verif-card:hover { border-color: var(--border-light); }
.verif-card .vhead { display: flex; justify-content: space-between; align-items: start; margin-bottom: 8px; }
.verif-card .vhead .vname { font-weight: 600; font-size: 14px; letter-spacing: -.01em; }
.verif-card .vdetail { font-size: 12.5px; color: var(--text-tertiary); line-height: 1.7; }
.verif-card .vdetail span { color: var(--text-secondary); }
.verif-card .vphotos { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.verif-card .vphotos img {
  width: 72px; height: 72px; object-fit: cover; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid var(--border);
  transition: transform var(--speed-fast) var(--ease-out);
}
.verif-card .vphotos img:hover { transform: scale(1.05); }
.verif-card .vact { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.verif-card .vreject { display: none; margin-top: 8px; }

/* =========================================================
   MODAL
   ========================================================= */
.modal-bg {
  position: fixed; inset: 0; background: rgba(6,11,23,.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px; max-width: 480px; width: 100%;
  max-height: 90vh; overflow: auto; box-shadow: var(--shadow-xl);
}
.modal .modal-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.modal .modal-body { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal img { max-width: 100%; border-radius: var(--radius); margin-top: 8px; }

/* =========================================================
   LOGIN SCREEN
   ========================================================= */
#login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 50% 35% at 50% 40%, rgba(100,116,139,.06) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 25% 70%, rgba(100,116,139,.04) 0%, transparent 45%),
    radial-gradient(ellipse 30% 25% at 75% 30%, rgba(245,158,11,.03) 0%, transparent 40%);
}
.login-card { width: 100%; max-width: 400px; }
.login-card-inner {
  background: linear-gradient(135deg, rgba(17,24,39,.8), rgba(30,41,59,.6));
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 36px 32px 32px; box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255,255,255,.03);
  position: relative; overflow: hidden;
}
.login-card-inner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-gradient); opacity: .6;
}
.login-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 28px; text-align: center; }
.login-brand .logo-icon { width: 48px; height: 48px; margin-bottom: 10px; }
.login-brand h1 {
  font-size: 24px; font-weight: 800; letter-spacing: -.03em;
  background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.login-brand p { color: var(--text-tertiary); font-size: 12px; margin-top: 2px; }
.login-err { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 16px; }
.login-hint { margin-top: 20px; font-size: 11.5px; color: var(--text-quaternary); line-height: 1.6; border-top: 1px solid var(--border); padding-top: 14px; text-align: center; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-primary); padding: 12px 24px; border-radius: 100px;
  font-weight: 500; font-size: 13px; font-family: var(--font);
  box-shadow: var(--shadow-lg); z-index: 999;
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
}
.toast.success { background: var(--success-dim); border-color: rgba(16,185,129,.3); color: var(--success); }
.toast.error { background: var(--danger-dim); border-color: rgba(239,68,68,.3); color: var(--danger); }
.toast.warning { background: var(--warning-dim); border-color: rgba(245,158,11,.3); color: var(--warning); }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: translateY(0) } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96) } to { opacity: 1; transform: scale(1) } }
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .4; transform: scale(.75) } }
@keyframes spin { to { transform: rotate(360deg) } }

/* Aurora backdrop — subtle gray nebula animation */
@keyframes auroraDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
}
body::after {
  animation: auroraDrift 12s ease-in-out infinite;
  will-change: transform;
}

/* Card glow & lift on hover */
.verif-card:hover,
.stat-card:hover,
.card:hover {
  border-color: rgba(100,116,139,.35);
  box-shadow: 0 4px 20px rgba(100,116,139,.12), 0 0 0 1px rgba(100,116,139,.15);
  transform: translateY(-2px);
  transition: all .25s var(--ease-out);
}

/* Button glow pulse — primary */
.btn-primary,
.btn-gold {
  box-shadow: 0 0 16px rgba(100,116,139,.15);
  animation: btnPulse 2.8s ease-in-out infinite;
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(100,116,139,.15); }
  50% { box-shadow: 0 0 24px rgba(100,116,139,.3); }
}

/* Skeleton shimmer — loading placeholder animation */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, rgba(100,116,139,.08) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s linear infinite;
  border-radius: var(--radius-sm);
}
.skeleton-line { height: 14px; margin-bottom: 8px; }
.skeleton-block { height: 72px; }

.live-indicator { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; letter-spacing: .1em; color: var(--success); text-transform: uppercase; margin-left: auto; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,.5); animation: livePulse 2s ease-in-out infinite; }
.accent-divider { height: 1px; border: none; margin: 0 0 20px; background: linear-gradient(90deg, transparent, var(--accent-start), var(--accent-end), transparent); opacity: .2; border-radius: 2px; }

.is-loading { pointer-events: none; opacity: .7; }

/* Stagger entrance */
.stagger > * { animation: fadeUp var(--speed-base) var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 40ms; }
.stagger > *:nth-child(3) { animation-delay: 80ms; }
.stagger > *:nth-child(4) { animation-delay: 120ms; }
.stagger > *:nth-child(5) { animation-delay: 160ms; }
.stagger > *:nth-child(6) { animation-delay: 200ms; }
.stagger > *:nth-child(7) { animation-delay: 240ms; }
.stagger > *:nth-child(8) { animation-delay: 280ms; }

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* Utilities */
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-center { align-items: center; }
.flex-between { justify-content: space-between; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; color: var(--text-tertiary); }
.font-mono { font-family: var(--font-mono); }
.kendala-note { color: var(--warning); font-size: 11px; font-style: italic; cursor: help; }

/* =========================================================
   STAT CARDS — Dashboard KPI tiles
   ========================================================= */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
.stat-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden;
  transition: border-color var(--speed-fast) var(--ease-out);
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-gradient); opacity: .35;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-card .sc-icon {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--accent-glow); border-radius: var(--radius-sm); margin-bottom: 10px;
}
.stat-card .sc-icon svg { width: 16px; height: 16px; flex-shrink: 0; }
.stat-card.gold .sc-icon { background: var(--gold-glow); }
.stat-card.gold .sc-icon svg { color: var(--gold); }
.stat-card.accent .sc-icon { background: var(--accent-glow); }
.stat-card.accent .sc-icon svg { color: var(--accent-start); }
.stat-card.success .sc-icon { background: var(--success-glow); }
.stat-card.success .sc-icon svg { color: var(--success); }
.stat-card .sc-label { font-size: 11.5px; color: var(--text-tertiary); font-weight: 500; margin-bottom: 2px; }
.stat-card .sc-value { font-size: 28px; font-weight: 800; color: var(--text-primary); letter-spacing: -.03em; line-height: 1.1; }
.stat-card .sc-sub { font-size: 11px; color: var(--text-quaternary); margin-top: 2px; }

/* Filter row */
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filter-row .fld { min-width: 140px; flex: 1; margin-bottom: 0; }
.filter-row .fld:last-child { min-width: auto; flex: 0; }

/* Responsive */
@media (max-width: 600px) {
  .card { padding: 16px; }
  .verif-card { padding: 14px; }
  table { font-size: 12px; }
  th, td { padding: 8px 10px; }
  .toast { font-size: 12px; padding: 10px 18px; }
  .filter-row .fld { min-width: 100%; }
  .stat-card { padding: 16px; }
  .stat-card .sc-value { font-size: 24px; }
  :root { --topbar-h: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Grid helpers */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

/* Empty state */
.empty-state { padding: 48px 20px; text-align: center; color: var(--text-tertiary); line-height: 1.6; }
.empty-state .empty-icon { font-size: 32px; display: block; margin-bottom: 10px; opacity: .5; }
.empty-state .empty-title { color: var(--text-secondary); font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.empty-state .empty-desc { color: var(--text-quaternary); font-size: 13px; }
.load-more-wrap { text-align: center; padding: 16px 0 4px; }