﻿/* ============================================================
   ISTIDLA — Sistem Absensi Karyawan — Cinematic Dark Academic
   Tema: Deep navy + electric blue + teal glow + glass morphism
   ============================================================ */

:root {
  --p:       #3b82f6;
  --p-dark:  #2563eb;
  --p-deep:  #1e3a8a;
  --p-light: #bfdbfe;
  --p-pale:  #eff6ff;
  --teal:    #14b8a6;
  --teal-d:  #0d9488;
  --teal-l:  #99f6e4;
  --cyan:    #06b6d4;
  --gold:    #f59e0b;
  --gold-d:  #d97706;
  --ink:     #0f172a;
  --ink-2:   #475569;
  --ink-3:   #64748b;
  --card:    #ffffff;
  --bg:      #f0f4f8;
  --bg-2:    #e8edf3;
  --border:  #e2e8f0;
  --shadow-sm: 0 4px 20px rgba(0,0,0,.28);
  --shadow:    0 12px 44px rgba(0,0,0,.34);
  --shadow-lg: 0 28px 72px rgba(0,0,0,.44);
  --shadow-p:  0 8px 32px rgba(59,130,246,.35);
  --r:  16px;
  --r-sm: 10px;
  --r-lg: 24px;
  --tx: cubic-bezier(.4,0,.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
a { color: var(--p); text-decoration: none; }
img { max-width: 100%; display: block; }

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #060a14;
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle, rgba(59,130,246,.06) 1px, transparent 1px),
    radial-gradient(ellipse 115% 70% at -8% -5%,  #0c1a3a,                     transparent 55%),
    radial-gradient(ellipse 75%  60% at 108% -8%, rgba(20,184,166,.20),         transparent 50%),
    radial-gradient(ellipse 65%  75% at -5%  65%, rgba(59,130,246,.10),         transparent 52%),
    radial-gradient(ellipse 90%  55% at 55%  115%,rgba(6,10,20,.95),            transparent 55%),
    radial-gradient(ellipse 70%  70% at 65%  35%, rgba(6,182,212,.04),          transparent 60%);
  background-size:
    28px 28px,
    100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
}

/* ── TOPBAR ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, #060a14 0%, #0a1628 50%, #0c1a3a 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 8px 32px rgba(0,0,0,.25);
  backdrop-filter: saturate(200%) blur(20px);
}
.topbar::after {
  content: "";
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.5), rgba(20,184,166,.3), transparent);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 22px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; flex: 1; text-decoration: none; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--p), var(--teal));
  display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 4px 14px rgba(59,130,246,.4), 0 0 0 1px rgba(255,255,255,.08);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: .4px; display: block; color: #fff; }
.brand-text small  { font-size: 11px; opacity: .6; display: block; color: #94a3b8; }
.navmenu { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.navmenu a {
  color: #94a3b8; padding: 7px 13px; border-radius: 8px;
  font-weight: 600; font-size: 13.5px; transition: .2s var(--tx);
  white-space: nowrap;
}
.navmenu a:hover { color: #fff; background: rgba(255,255,255,.08); }
.navmenu a.active {
  color: #fff; background: rgba(59,130,246,.2);
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.35);
}
.btn-login, .btn-logout {
  background: linear-gradient(135deg, var(--p), var(--p-dark)) !important;
  color: #fff !important; font-weight: 700 !important;
  padding: 8px 16px !important; border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(59,130,246,.35) !important;
}
.btn-logout {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  box-shadow: 0 4px 12px rgba(239,68,68,.3) !important;
}
.userchip {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  padding: 6px 12px; border-radius: 99px;
  font-size: 12.5px; color: #cbd5e1; white-space: nowrap;
}
.hamburger {
  display: none; background: transparent; border: 0;
  width: 36px; height: 36px; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px; padding: 0;
}
.hamburger span { display: block; height: 2.5px; background: #cbd5e1; border-radius: 2px; transition: .3s; }

/* ── MAIN ── */
.main-wrap {
  max-width: 1200px; margin: 0 auto; padding: 28px 22px 70px;
  min-height: calc(100vh - 220px);
}

/* ── FLASH ── */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: var(--r-sm); margin-bottom: 20px;
  font-weight: 600; font-size: 14px;
  animation: slideDown .4s var(--tx);
}
.flash-success { background: #dcfce7; color: #065f46; border: 1px solid #86efac; }
.flash-error   { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.flash-info    { background: #dbeafe; color: #1e3a8a; border: 1px solid #93c5fd; }
@keyframes slideDown { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── HERO ── */
.hero {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, #0c1a3a 0%, #1e3a8a 45%, #1e40af 70%, #0a1628 100%);
  color: #fff; padding: 44px 36px; margin-bottom: 30px;
  box-shadow: 0 20px 60px rgba(30,58,138,.45), inset 0 1px 0 rgba(255,255,255,.08);
}
.hero::before {
  content: ""; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.25), transparent 70%);
  top: -200px; right: -150px; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,.18), transparent 70%);
  bottom: -100px; left: -50px; pointer-events: none;
  animation: floatBlob 12s ease-in-out infinite;
}
@keyframes floatBlob { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-16px) scale(1.05); } }
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
  padding: 6px 14px; border-radius: 99px; font-size: 12px; font-weight: 700; letter-spacing: .8px;
  margin-bottom: 16px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(22px, 3.8vw, 36px); font-weight: 800; line-height: 1.18; }
.hero p { margin: 0 0 20px; font-size: clamp(13.5px, 1.8vw, 16px); opacity: .88; max-width: 520px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #fff; padding: 13px 26px; border-radius: 99px;
  font-weight: 800; font-size: 15px;
  box-shadow: 0 8px 24px rgba(20,184,166,.45), 0 0 0 1px rgba(255,255,255,.1);
  transition: .25s var(--tx);
}
.hero-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(20,184,166,.55); }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-top: 26px; }
.hero-stat {
  background: rgba(255,255,255,.1); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 14px 12px;
  transition: .2s var(--tx);
}
.hero-stat:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.hero-stat .v { font-size: 26px; font-weight: 800; display: block; line-height: 1; }
.hero-stat .l { font-size: 11px; opacity: .75; margin-top: 4px; display: block; }

/* ── SECTION TITLE ── */
.section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 32px 0 18px; font-size: 19px; font-weight: 800; color: #e2e8f0;
}
.section-title::before {
  content: ""; width: 4px; height: 22px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--p), var(--teal));
  border-radius: 99px;
}

/* ── HISTORY GRID ── */
.history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.history-card {
  background: var(--card); border-radius: var(--r); overflow: hidden;
  border: 1px solid rgba(255,255,255,.06); transition: .3s var(--tx);
  display: flex; flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06);
  animation: fadeUp .5s var(--tx) both;
}
.history-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 60px rgba(0,0,0,.48), 0 0 0 1px rgba(59,130,246,.25);
  border-color: rgba(59,130,246,.25);
}
.history-photo { position: relative; width: 100%; aspect-ratio: 4/3; background: #f1f5f9; overflow: hidden; }
.history-photo img { width: 100%; height: 100%; object-fit: cover; transition: .45s var(--tx); }
.history-card:hover .history-photo img { transform: scale(1.07); }
.history-photo .badge {
  position: absolute; top: 10px; left: 10px;
  background: linear-gradient(135deg, var(--p), var(--p-dark));
  color: #fff; padding: 4px 10px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(59,130,246,.4);
}
.history-photo .badge.pulang { background: linear-gradient(135deg, var(--teal), var(--teal-d)); }
.history-photo .badge.outside { background: linear-gradient(135deg, #ef4444, #dc2626); }
.history-photo .clock-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(6,10,20,.85));
  color: #fff; padding: 28px 14px 12px;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.history-photo .clock-overlay .jam { font-size: 20px; font-weight: 800; }
.history-photo .clock-overlay .tgl { font-size: 11px; opacity: .85; }
.history-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.history-body .nama { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.history-body .jab  { font-size: 12px; color: var(--ink-3); }
.history-body .lok  { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.history-body .lok b { color: var(--p-dark); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.empty-state {
  text-align: center; padding: 70px 24px;
  background: var(--card); border-radius: var(--r);
  border: 2px dashed var(--border); box-shadow: var(--shadow-sm);
}
.empty-state .ic { font-size: 64px; display: block; margin-bottom: 10px; }
.empty-state h3 { margin: 0 0 6px; color: var(--ink); }
.empty-state p  { margin: 0; color: var(--ink-2); }

/* ── CARD ── */
.card {
  background: var(--card); border-radius: var(--r);
  padding: 24px; border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.32), 0 1px 0 rgba(255,255,255,.08);
  margin-bottom: 20px;
}

/* ── FORMS ── */
label { display: block; font-weight: 600; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
input, select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: 14px; font-family: inherit;
  background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: var(--r-sm);
  font-weight: 700; font-size: 13.5px; border: 0;
  cursor: pointer; transition: .22s var(--tx); font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--p), var(--p-dark));
  color: #fff; box-shadow: 0 4px 16px rgba(59,130,246,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,.45); }
.btn-warning {
  background: linear-gradient(135deg, var(--teal), var(--teal-d));
  color: #fff; box-shadow: 0 4px 16px rgba(20,184,166,.35);
}
.btn-warning:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(20,184,166,.45); }
.btn-danger  { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.3); }
.btn-danger:hover  { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(239,68,68,.4); }
.btn-secondary { background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--border); }
.btn-secondary:hover { background: #dde3eb; color: var(--ink); }
.btn-block   { display: flex; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── ABSEN PAGE ── */
.absen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.camera-box {
  background: #0a1628; border-radius: var(--r); overflow: hidden;
  position: relative; aspect-ratio: 1/1;
  border: 2px solid rgba(59,130,246,.4);
  box-shadow: 0 16px 48px rgba(30,58,138,.2);
}
.camera-box video, .camera-box canvas, .camera-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera-box canvas { display: none; }
.camera-frame {
  position: absolute; inset: 14px;
  border: 2px dashed rgba(59,130,246,.55); border-radius: 12px; pointer-events: none;
}
.camera-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px;
  background: var(--bg-2); border: 1px solid var(--border);
  font-size: 12.5px; font-weight: 600; margin-bottom: 8px;
}
.status-pill.ok   { background: var(--p-pale); color: var(--p-deep); border-color: #93c5fd; }
.status-pill.bad  { background: #fef2f2; color: #7f1d1d; border-color: #fca5a5; }
.status-pill.wait { background: #fffbeb; color: #78350f; border-color: #fde68a; }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.live-clock {
  font-size: 44px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--p), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  font-variant-numeric: tabular-nums; text-align: center; margin: 6px 0;
}
.live-date { text-align: center; color: var(--ink-3); font-size: 13px; margin-bottom: 14px; }
.info-row { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--ink-2); }
.info-row .v { font-weight: 700; color: var(--ink); text-align: right; max-width: 60%; word-break: break-word; }

/* ── LOGIN ── */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 30px 16px;
  background: linear-gradient(135deg, #0c1a3a 0%, #060a14 50%, #0a1628 100%);
  position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ""; position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,130,246,.15), transparent 60%);
  top: -200px; right: -200px; pointer-events: none;
}
.login-wrap::after {
  content: ""; position: absolute;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,.1), transparent 60%);
  bottom: -100px; left: -100px; pointer-events: none;
}
.login-card {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-lg); padding: 40px 34px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1);
  position: relative; z-index: 1;
}
.login-card label { color: #94a3b8; }
.login-card input {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12);
  color: #fff;
}
.login-card input::placeholder { color: rgba(255,255,255,.3); }
.login-card input:focus { border-color: var(--p); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.login-header { text-align: center; margin-bottom: 30px; }
.login-header .logo {
  width: 86px; height: 86px; border-radius: 22px; margin: 0 auto 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(59,130,246,.4), 0 0 0 1px rgba(255,255,255,.15);
}
.login-header .logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }
.login-header h1 { margin: 0; font-size: 26px; color: #fff; font-weight: 800; }
.login-header p  { margin: 6px 0 0; color: #94a3b8; font-size: 13px; }
.flash.flash-error { background: rgba(239,68,68,.15); color: #fca5a5; border: 1px solid rgba(239,68,68,.3); }

/* ── TABLE (Admin) ── */
.table-wrap {
  background: var(--card); border-radius: var(--r);
  overflow: hidden; border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 8px 32px rgba(0,0,0,.32), 0 1px 0 rgba(255,255,255,.06);
}
.table-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.table-toolbar input, .table-toolbar select { padding: 8px 12px; font-size: 13px; }
.table-toolbar .grow { flex: 1; min-width: 180px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 840px; }
.dt th, .dt td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dt thead { background: linear-gradient(135deg, #0c1a3a, #1e3a8a); }
.dt th { color: #94a3b8; font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; }
.dt tbody tr { transition: background .15s; }
.dt tbody tr:nth-child(even) { background: #fafbfc; }
.dt tbody tr:hover { background: #eff6ff; }
.dt tbody tr.checked { background: #fffbeb; }
.dt img.thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 2px solid var(--border); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.tag-masuk  { background: var(--p-light); color: var(--p-deep); }
.tag-pulang { background: #99f6e4; color: #134e4a; }
.tag-in  { background: var(--p-pale); color: var(--p-deep); }
.tag-out { background: #fee2e2; color: #7f1d1d; }
.act { display: inline-flex; gap: 6px; }
.act a, .act button {
  padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 700; border: 0; cursor: pointer;
  text-decoration: none; transition: .15s var(--tx);
}
.act .e { background: #dbeafe; color: #1e40af; }
.act .e:hover { background: #bfdbfe; }
.act .d { background: #fee2e2; color: #991b1b; }
.act .d:hover { background: #fecaca; }

/* ── ADMIN STATS ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat {
  border-radius: var(--r); padding: 20px 22px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid transparent;
  transition: .25s var(--tx);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat         { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #93c5fd; }
.stat.s2      { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); border-color: #99f6e4; }
.stat.s3      { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fde68a; }
.stat.s4      { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-color: #7dd3fc; }
.stat .lbl    { font-size: 11.5px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.stat .num    { font-size: 32px; font-weight: 800; color: var(--ink); margin-top: 6px; line-height: 1; }
.stat .ic     { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 36px; opacity: .22; }

/* ── PAGINATION ── */
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 8px 14px; border-radius: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  color: #cbd5e1; text-decoration: none; font-weight: 600; font-size: 13px;
  transition: .15s var(--tx); backdrop-filter: blur(6px);
}
.pager a:hover { background: rgba(59,130,246,.2); border-color: rgba(59,130,246,.35); color: #60a5fa; }
.pager .cur { background: linear-gradient(135deg, var(--p), var(--p-dark)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(59,130,246,.4); }

/* teks keterangan di bawah pager */
.pager + p { color: #64748b !important; }

/* ── FOOTER ── */
.site-footer {
  background: linear-gradient(135deg, #060a14 0%, #0a1628 100%);
  color: #64748b; margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,.04);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 28px 22px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center;
}
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand strong { color: #e2e8f0; font-size: 17px; display: block; }
.foot-brand p { margin: 2px 0 0; font-size: 12.5px; }
.foot-info { font-size: 12.5px; text-align: right; }
.foot-info p { margin: 3px 0; }

/* ── ADMIN SIDEBAR LAYOUT ── */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px; flex-shrink: 0;
  background: linear-gradient(180deg, #060a14 0%, #0a1628 35%, #0c1a3a 100%);
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 200;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(59,130,246,.1);
  transition: transform .3s var(--tx);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sidebar-header {
  padding: 18px 16px 14px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--p), var(--teal));
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 4px 12px rgba(59,130,246,.4);
  overflow: hidden;
}
.sidebar-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.sidebar-brand strong { color: #f1f5f9; font-size: 16px; font-weight: 800; display: block; line-height: 1.2; }
.sidebar-brand small  { color: #60a5fa; font-size: 10.5px; display: block; margin-top: 2px; }

.sidebar-nav { flex: 1; padding: 10px 10px; display: flex; flex-direction: column; gap: 1px; }
.nav-label {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: #3b6da8; padding: 12px 10px 5px;
  display: block;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 9px;
  color: #7b9cc0; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: .17s var(--tx);
  white-space: nowrap;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #a5c4e0; }
.sidebar-nav a.active {
  background: rgba(59,130,246,.13); color: #60a5fa;
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.2);
}
.sidebar-nav a .ni { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-sep { height: 1px; background: rgba(255,255,255,.05); margin: 8px 10px; }

.sidebar-footer {
  flex-shrink: 0; padding: 12px 10px 14px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.sidebar-user {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  background: rgba(255,255,255,.03); border-radius: 9px; margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,.05);
}
.sidebar-user .av {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--p-dark), var(--teal-d));
  display: grid; place-items: center; font-size: 15px;
}
.sidebar-user .si strong { color: #cbd5e1; font-size: 12.5px; display: block; }
.sidebar-user .si small  { color: #60a5fa; font-size: 10.5px; display: block; }
.sidebar-nav a.nav-out { color: #c45c5c !important; }
.sidebar-nav a.nav-out:hover { background: rgba(239,68,68,.1) !important; color: #ef4444 !important; }

/* Admin body */
.admin-body { margin-left: 250px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.admin-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6,10,20,.88); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(59,130,246,.08);
  padding: 0 24px; height: 58px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
.admin-topbar::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,.3), transparent);
}
.at-left  { display: flex; align-items: center; gap: 10px; }
.at-right { display: flex; align-items: center; gap: 10px; }
.page-title { font-size: 15px; font-weight: 800; color: #e2e8f0; letter-spacing: .2px; }
.sidebar-toggle {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09);
  cursor: pointer; color: #94a3b8; font-size: 17px; flex-shrink: 0;
}

.admin-content { flex: 1; padding: 26px 28px 60px; background: #f0f4f8; }

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); z-index: 150; backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* Autocomplete dropdown */
.ac-wrap { position: relative; }
.ac-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 300;
  background: #fff; border: 1.5px solid var(--p);
  border-radius: var(--r-sm); box-shadow: 0 12px 40px rgba(0,0,0,.18);
  max-height: 220px; overflow-y: auto;
}
.ac-dropdown:empty { display: none; }
.ac-item {
  padding: 10px 14px; cursor: pointer; transition: background .12s;
  display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f1f5f9;
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover, .ac-item.focused { background: var(--p-pale); }
.ac-item .ac-nama { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.ac-item .ac-jab  { font-size: 12px; color: var(--ink-3); }

/* ── RESPONSIVE ── */
@media (max-width: 920px) {
  .absen-grid { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-body { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .admin-content { padding: 18px 16px 50px; }
}
@media (max-width: 760px) {
  .hamburger { display: flex; }
  .navmenu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0a1628; border-top: 1px solid rgba(255,255,255,.06);
    padding: 0 16px; max-height: 0; overflow: hidden; transition: .35s var(--tx);
  }
  .navmenu.open { max-height: 600px; padding: 12px 16px 18px; }
  .navmenu a, .navmenu .userchip { margin: 4px 0; text-align: center; }
  .topbar-inner { position: relative; }
  .brand-text small { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .foot-info { text-align: center; }
  .hero { padding: 30px 24px; }
  .table-toolbar { padding: 12px; }
  .main-wrap { padding: 20px 16px 60px; }
}
@media (max-width: 480px) {
  .login-card { padding: 30px 20px; }
  .live-clock { font-size: 36px; }
  .stat .num  { font-size: 26px; }
  .history-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .history-photo .clock-overlay .jam { font-size: 16px; }
  .hero h1 { font-size: 20px; }
}

/* ── iOS safe area ── */
@supports (padding: max(0px)) {
  .topbar-inner { padding-top: max(12px, env(safe-area-inset-top)); }
  .site-footer .footer-inner { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}

/* ── Print ── */
@media print {
  .topbar, .site-footer, .table-toolbar, .pager, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .table-wrap { box-shadow: none; border: 1px solid #ccc; }
}
