/* =========================================================
   AbsensiOne — Design System "AURORA" (Modern Blue SaaS)
   Palet: Navy (deep) + Blue/Indigo (utama) + Sky/Cyan (aksen)
   ========================================================= */

:root{
  /* Warna inti — tema biru modern */
  --coal-950:#0B1729;
  --coal-900:#0F1F38;
  --coal-800:#15315C;
  --coal-700:#1B3E73;
  --steel-600:#2C5AA0;
  --stone-500:#7A93B8;
  --stone-300:#C7D6EC;

  --amber-600:#2563EB;
  --amber-500:#3B82F6;
  --amber-400:#60A5FA;
  --caution-400:#38BDF8;
  --caution-300:#7DD3FC;
  --rust-600:#1E40AF;
  --ore-gold:#0EA5E9;

  --safe-green:#16A34A;
  --safe-red:#DC2626;

  --ink:#0F172A;
  --ink-soft:#5B6B85;
  --paper:#F5F8FC;
  --paper-alt:#EAF1FB;
  --white:#FFFFFF;
  --border:#DCE6F5;

  --shadow-sm: 0 4px 14px rgba(15,23,42,.08);
  --shadow: 0 14px 34px rgba(15,23,42,.14);
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;

  --font-display:'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:'Inter', system-ui, sans-serif;
  --font-mono:'JetBrains Mono', monospace;
}

*{ box-sizing: border-box; }

body{
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
}

h1,h2,h3,h4,h5,h6{
  font-family: var(--font-display);
  color: var(--coal-950);
  font-weight: 700;
  letter-spacing: -.01em;
}

a{ color: var(--amber-600); }
a:hover{ color: var(--coal-950); }

/* Garis aksen tipis di header/topbar */
.hazard-strip{
  height: 4px;
  background: linear-gradient(90deg, var(--amber-600), var(--caution-400) 50%, var(--amber-400));
}

/* ---------- Landing / Auth background ---------- */
.landing-bg{
  position: relative;
  background:
    radial-gradient(circle at 12% 15%, rgba(37,99,235,.22), transparent 45%),
    radial-gradient(circle at 88% 85%, rgba(56,189,248,.16), transparent 42%),
    linear-gradient(160deg, rgba(11,23,41,.90), rgba(15,31,56,.86) 55%, rgba(44,90,160,.78)),
    url('../img/bg-login-site.jpg') center / cover no-repeat;
  overflow: hidden;
}
.landing-bg > *{ position: relative; z-index: 1; }

.brand-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: rgba(56,189,248,.14);
  border: 1px solid rgba(56,189,248,.4);
  color: var(--caution-300);
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.landing-title{
  color: var(--white);
  font-size: clamp(1.7rem, 5vw, 2.75rem);
  line-height: 1.15;
}

.landing-sub{
  color: rgba(255,255,255,.75);
  font-family: var(--font-body);
  text-transform: none;
  max-width: 480px;
  margin-left:auto; margin-right:auto;
  font-size: clamp(.92rem, 2vw, 1rem);
}

/* ---------- Buttons ---------- */
.btn{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  font-size: .88rem;
  border-radius: var(--radius-sm);
  padding: .6rem 1.15rem;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: linear-gradient(180deg, var(--amber-500), var(--amber-600));
  border-color: var(--amber-600);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(30,64,175,.32);
}
.btn-primary:hover, .btn-primary:focus{
  background: var(--coal-950);
  border-color: var(--coal-950);
  color: var(--caution-300);
}

.btn-outline-primary{
  color: var(--amber-600);
  border-color: var(--amber-600);
}
.btn-outline-primary:hover{
  background: var(--amber-600);
  border-color: var(--amber-600);
  color: var(--white);
}

/* Aksi utama (Submit Absen, Simpan) pakai kuning caution -> fokus mata */
.btn-success{
  background: linear-gradient(180deg, var(--caution-400), var(--ore-gold));
  border-color: var(--ore-gold);
  color: var(--coal-950);
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(14,165,233,.38);
}
.btn-success:hover, .btn-success:focus{
  background: var(--caution-300);
  border-color: var(--caution-300);
  color: var(--coal-950);
}

.btn-light{
  background: var(--white);
  color: var(--coal-950);
  border: none;
  font-weight: 700;
}
.btn-light:hover{ background: var(--caution-400); color: var(--coal-950); }

.btn-outline-light{
  border-color: rgba(255,255,255,.55);
  color: var(--white);
}
.btn-outline-light:hover{
  background: rgba(255,255,255,.12);
  border-color: var(--white);
  color: var(--white);
}

.btn-outline-danger{ text-transform: none; font-family: var(--font-body); font-weight: 600; }
.btn-outline-secondary{ text-transform: none; font-family: var(--font-body); font-weight: 600; }

/* ---------- Cards ---------- */
.card-step{
  border: none;
  border-left: 4px solid var(--amber-500);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background: var(--white);
  transition: box-shadow .15s ease;
}
.card-step:hover{ box-shadow: var(--shadow); }

.step-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--coal-950);
  color: var(--caution-400);
  font-family: var(--font-display);
  font-weight: 700;
  margin-right: 10px;
  flex-shrink: 0;
}
.step-disabled{
  opacity: .45;
  pointer-events: none;
  filter: grayscale(.3);
}

/* ---------- Viewfinder: elemen khas untuk area Scan & Selfie ---------- */
.viewfinder{
  position: relative;
  background: var(--paper-alt);
  border-radius: var(--radius);
  padding: 16px;
  width: 100%;
}
.vf-corner{
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid var(--amber-500);
}
.vf-tl{ top:8px; left:8px; border-right:none; border-bottom:none; border-radius:8px 0 0 0; }
.vf-tr{ top:8px; right:8px; border-left:none; border-bottom:none; border-radius:0 8px 0 0; }
.vf-bl{ bottom:8px; left:8px; border-right:none; border-top:none; border-radius:0 0 0 8px; }
.vf-br{ bottom:8px; right:8px; border-left:none; border-top:none; border-radius:0 0 8px 0; }

#qr-reader{
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.selfie-preview{
  max-width: 220px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: none;
  display:block;
  margin: 0 auto;
}

/* ---------- Forms ---------- */
.form-label{
  font-weight: 600;
  color: var(--coal-900);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.form-control, .form-select{
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  padding: .55rem .8rem;
  background: var(--white);
}
.form-control:focus, .form-select:focus{
  border-color: var(--amber-500);
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.16);
}

/* =========================================================
   LANDING v2: Navbar + Hero (halaman index.html)
   ========================================================= */
.site-header{
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 14px rgba(15,23,42,.06);
}
.site-nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.site-nav .nav-brand{
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--coal-950);
  text-decoration: none;
}
.site-nav .nav-brand .mark{
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 3px;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37,99,235,.14);
}
.site-nav .nav-brand .mark img{
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 6px;
}
.site-nav .nav-brand .txt{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
  text-transform: uppercase;
  line-height: 1.1;
}
.site-nav .nav-brand .txt small{
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  text-transform: none;
  font-size: .68rem;
  color: var(--ink-soft);
}
.site-nav .nav-links{
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0; padding: 0;
}
.site-nav .nav-links a{
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav .nav-links a:hover{ color: var(--amber-600); }
.nav-toggle-btn{
  display: none;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--coal-950);
}

.hero-section{
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  background:
    linear-gradient(115deg, rgba(11,23,41,.93) 0%, rgba(11,23,41,.82) 38%, rgba(15,31,56,.55) 65%, rgba(15,31,56,.35) 100%),
    url('../img/bg-hero-truck.jpg') center 30% / cover no-repeat;
}
.hero-inner{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4.5rem;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background: rgba(56,189,248,.14);
  border: 1px solid rgba(125,211,252,.4);
  color: var(--caution-300);
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-title{
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  color: var(--white);
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
  margin-bottom: 1rem;
}
.hero-title .accent{ color: var(--caution-300); }
.hero-sub{
  color: rgba(255,255,255,.86);
  font-family: var(--font-body);
  text-transform: none;
  font-weight: 400;
  font-size: 1.02rem;
  max-width: 480px;
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 10px rgba(0,0,0,.3);
}
.hero-actions{ display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-actions .btn-outline-primary{
  color: var(--white);
  border-color: rgba(255,255,255,.55);
}
.hero-actions .btn-outline-primary:hover{
  background: rgba(255,255,255,.12);
  border-color: var(--white);
  color: var(--white);
}
.hero-trust{
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: 1.75rem;
  color: rgba(255,255,255,.86);
  font-size: .82rem;
}
.hero-trust .dot{ color: var(--safe-green); }

/* ---------- Ilustrasi hero: blob + mock phone (viewfinder scan) ---------- */
.hero-art{
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-blob{
  position: absolute;
  inset: 0;
  z-index: 0;
}
.phone-mock{
  position: relative;
  z-index: 1;
  width: 240px;
  background: var(--coal-950);
  border-radius: 34px;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(30,24,17,.35);
}
.phone-mock .screen{
  background: var(--paper);
  border-radius: 24px;
  overflow: hidden;
  padding: 16px 14px 20px;
}
.phone-mock .screen-topbar{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 12px;
}
.phone-mock .screen-topbar .clock{
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  color: var(--coal-950);
}
.phone-mock .screen-topbar .badge-live{
  background: var(--safe-green);
  color: var(--white);
  font-size: .58rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}
.phone-mock .scan-box{
  position: relative;
  background: var(--coal-950);
  border-radius: 14px;
  height: 130px;
  display: flex; align-items:center; justify-content:center;
  margin-bottom: 12px;
}
.phone-mock .scan-box .vf-corner{ width:16px; height:16px; border-width:2px; border-color: var(--caution-400); }
.phone-mock .scan-box .qr-icon{ font-size: 1.8rem; }
.phone-mock .mini-row{
  display:flex; align-items:center; gap:8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 9px;
  margin-bottom: 8px;
  font-size: .68rem;
  font-weight: 600;
  color: var(--coal-900);
}
.phone-mock .mini-row .ic{
  width: 22px; height:22px;
  border-radius: 7px;
  background: var(--paper-alt);
  display:flex; align-items:center; justify-content:center;
  font-size: .8rem;
  flex-shrink:0;
}
.phone-mock .mini-cta{
  margin-top: 4px;
  background: linear-gradient(180deg, var(--caution-400), var(--ore-gold));
  color: var(--coal-950);
  text-align:center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-radius: 9px;
  padding: 9px;
}
.float-chip{
  position: absolute;
  z-index: 2;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: .55rem .8rem;
  display:flex; align-items:center; gap:.5rem;
  font-size: .76rem;
  font-weight: 700;
  color: var(--coal-950);
}
.float-chip.chip-gps{ top: 6%; right: 2%; }
.float-chip.chip-selfie{ bottom: 10%; left: 0%; }
.float-chip .ic{ font-size: 1rem; }

/* ---------- Alur kerja section ---------- */
.alur-section{ background: var(--paper-alt); padding: 4rem 1.5rem; }
.alur-inner{ max-width: 1200px; margin: 0 auto; }
.section-heading{ text-align:center; margin-bottom: 2.5rem; }
.section-heading h2{ font-size: clamp(1.5rem,3vw,2rem); margin-bottom:.5rem; }
.section-heading p{ color: var(--ink-soft); text-transform:none; font-family: var(--font-body); }
.alur-steps{ display:grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
@media (max-width: 767.98px){ .alur-steps{ grid-template-columns: 1fr; } }

/* ---------- Footer CTA ---------- */
.footer-cta{
  background: linear-gradient(160deg, var(--coal-950), var(--coal-800) 60%, var(--steel-600));
  color: var(--white);
  padding: 3rem 1.5rem;
  text-align: center;
}
.footer-cta h3{ color: var(--white); margin-bottom:.6rem; }
.footer-cta p{ color: rgba(255,255,255,.7); text-transform:none; font-family: var(--font-body); margin-bottom:1.5rem; }
.site-footer-bottom{
  text-align:center;
  padding: 1rem;
  font-size: .78rem;
  color: var(--ink-soft);
  background: var(--paper);
}

@media (max-width: 991.98px){
  .site-nav .nav-links{
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 240px;
    background: var(--coal-950);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 1.5rem 1.5rem;
    transform: translateX(100%);
    transition: transform .22s ease;
    z-index: 1050;
  }
  .site-nav .nav-links.open{ transform: translateX(0); }
  .site-nav .nav-links a{ color: rgba(255,255,255,.8); }
  .nav-toggle-btn{ display:flex; }
  .hero-inner{ grid-template-columns: 1fr; }
  .hero-art{ order: -1; min-height: 320px; }
  .hero-sub{ margin-left:auto; margin-right:auto; }
}

/* =========================================================
   ADMIN SHELL: Topbar + Sidebar (responsif: sidebar jadi drawer di HP/tablet)
   ========================================================= */
.app-shell{ min-height: 100vh; }

.topbar{
  background: var(--white);
  color: var(--ink);
  padding: .7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  position: sticky;
  top: 0;
  z-index: 1040;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(15,23,42,.03);
}
.topbar .topbar-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  margin: 0;
  flex: 1;
  color: var(--ink);
}
.sidebar-toggle-btn{
  background: var(--paper-alt);
  border: 1.5px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius-sm);
  width: 38px; height: 38px;
  display: none;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.avatar-circle{
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--amber-400), var(--rust-600));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(37,99,235,.32);
}
.topbar-profile{
  display: flex; align-items: center; gap: .55rem;
  cursor: pointer;
  padding: .3rem .6rem .3rem .3rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.topbar-profile:hover{ background: var(--paper-alt); border-color: var(--border); }
.topbar-profile .profile-name{
  color: var(--ink);
  font-weight: 700;
  font-size: .86rem;
  line-height: 1.15;
}
.topbar-profile .profile-role{
  color: var(--ink-soft);
  font-size: .72rem;
  line-height: 1.1;
}

.sidebar{
  min-height: 100vh;
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 15% 0%, rgba(56,189,248,.16), transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(37,99,235,.18), transparent 50%),
    linear-gradient(180deg, var(--coal-950), var(--coal-900) 55%, var(--coal-800));
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 4px 0 24px rgba(11,23,41,.18);
}
.sidebar-brand{
  display: flex; align-items: center; gap: .65rem;
  color: var(--white);
  margin-bottom: 1.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .mark{
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 4px;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(11,23,41,.35);
}
.sidebar-brand .mark img{
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.sidebar-brand .txt h5{ margin: 0; color: var(--white); font-size: 1.02rem; font-weight: 700; }
.sidebar-brand .txt small{ color: var(--stone-300); text-transform: none; font-size: .72rem; }

.sidebar-section-label{
  color: rgba(255,255,255,.38);
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .6rem .3rem;
}

.sidebar .nav-link{
  color: rgba(255,255,255,.68);
  font-weight: 600;
  font-size: .87rem;
  padding: .58rem .7rem;
  border-radius: 11px;
  display: flex; align-items: center; gap: .65rem;
  position: relative;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.sidebar .nav-link .nav-icon{
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
  transition: background .15s ease;
}
.sidebar .nav-link:hover{
  color: var(--white);
  background: rgba(255,255,255,.06);
}
.sidebar .nav-link.active{
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-600), var(--steel-600));
  box-shadow: 0 6px 16px rgba(37,99,235,.35);
  transform: translateX(2px);
}
.sidebar .nav-link.active .nav-icon{ background: rgba(255,255,255,.18); }

.sidebar-footer{
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.btn-sidebar-logout{
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-weight: 600;
  font-size: .85rem;
  padding: .55rem .8rem;
  border-radius: 11px;
  transition: background .15s ease, border-color .15s ease;
}
.btn-sidebar-logout .nav-icon{
  width: 26px; height: 26px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
}
.btn-sidebar-logout:hover{
  background: rgba(220,38,38,.14);
  border-color: rgba(220,38,38,.35);
  color: var(--white);
}

.sidebar-overlay{
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,23,41,.55);
  backdrop-filter: blur(2px);
  z-index: 1045;
}

/* Mobile & tablet: sidebar jadi drawer yang bisa ditarik keluar/masuk */
@media (max-width: 991.98px){
  .sidebar-toggle-btn{ display: inline-flex; }
  .sidebar{
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform .22s ease;
    overflow-y: auto;
  }
  .sidebar.open{ transform: translateX(0); }
  .sidebar-overlay.show{ display: block; }
  main.app-main{ padding: 1rem !important; }
}

/* ---------- Dashboard: kartu statistik ---------- */
.dashboard-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1199.98px){ .dashboard-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px){ .dashboard-grid{ grid-template-columns: repeat(2, 1fr); gap: .7rem; } }
@media (max-width: 480px){ .dashboard-grid{ grid-template-columns: repeat(2, 1fr); gap: .55rem; } }

.stat-card{
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.2rem;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--amber-500);
}
.stat-card.accent-green{ border-top-color: var(--safe-green); }
.stat-card.accent-red{ border-top-color: var(--safe-red); }
.stat-card.accent-gold{ border-top-color: var(--ore-gold); }
.stat-card .stat-icon{
  font-size: 1.5rem;
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--paper-alt);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .6rem;
}
.stat-card .stat-value{
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--coal-950);
  line-height: 1;
  margin-bottom: .15rem;
}
.stat-card .stat-label{
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.recent-activity-item{
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}
.recent-activity-item:last-child{ border-bottom: none; }
.recent-activity-item .ra-icon{
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-alt);
  flex-shrink: 0;
}

/* ---------- Cards (generic content card) ---------- */
.card{
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ---------- Tables ---------- */
.table thead{
  font-family: var(--font-display);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  background: var(--paper-alt);
}
.table thead th{ border: none; padding: .7rem .9rem; white-space: nowrap; }
.table td{ padding: .7rem .9rem; vertical-align: middle; }
.table-hover tbody tr:hover{ background: var(--paper-alt); }

/* ---------- Badges & status ---------- */
.badge-masuk{ background: var(--amber-600); }
.badge-pulang{ background: var(--caution-400); color: var(--coal-950); }
.status-ok{ color: var(--safe-green); font-weight: 600; }
.status-bad{ color: var(--safe-red); font-weight: 600; }

/* ---------- Warna tanggal absensi (jam masuk vs jam kerja yang ditentukan admin) ---------- */
.attendance-early{ color: var(--safe-green); font-weight: 600; } /* hijau: absen sebelum jam masuk */
.attendance-ontime{ color: var(--ink); font-weight: 600; } /* hitam: tepat waktu / dalam toleransi / absen pulang */
.attendance-late{ color: var(--safe-red); font-weight: 600; } /* merah: absen di luar jam masuk yang ditentukan */

/* ---------- Map ---------- */
#map-picker{
  height: 320px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
}

/* ---------- Modals ---------- */
.modal-content{ border-radius: var(--radius-lg); border: none; }
.modal-header{ border-bottom: 1px solid var(--border); }
.modal-header .modal-title{ font-size: 1.05rem; }
.modal-footer{ border-top: 1px solid var(--border); }

/* ---------- Misc ---------- */
code, .font-mono{ font-family: var(--font-mono); }
::selection{ background: var(--caution-300); color: var(--coal-950); }

/* ---------- Responsif umum: absen.html di HP/tablet ---------- */
@media (max-width: 575.98px){
  .container{ padding-left: .85rem; padding-right: .85rem; }
  h3{ font-size: 1.3rem; }
  .btn{ font-size: .82rem; }
}
@media (min-width: 576px) and (max-width: 991.98px){
  .container{ max-width: 640px; }
}

/* =========================================================
   ADMIN DASHBOARD — refinement minimalis untuk HP
   Semua elemen/fitur tetap ada, cuma dirapikan spacing,
   ukuran, dan densitas visualnya biar enak dipakai di layar kecil.
   ========================================================= */
@media (max-width: 575.98px){

  /* Topbar lebih ramping */
  .app-shell .topbar{
    padding: .55rem .8rem;
    gap: .5rem;
  }
  .app-shell .topbar-title{
    font-size: .98rem;
  }
  .app-shell .sidebar-toggle-btn{
    width: 34px; height: 34px;
    font-size: 1rem;
  }
  .app-shell .avatar-circle{
    width: 32px; height: 32px;
    font-size: .82rem;
  }

  /* Sidebar drawer: padding lebih pas, item lebih rapat */
  .app-shell .sidebar{ width: 84vw; max-width: 280px; }
  .app-shell .sidebar.p-3{ padding: .9rem !important; }
  .app-shell .sidebar-brand{ margin-bottom: 1.15rem; padding-bottom: .85rem; }
  .app-shell .sidebar .nav-link{ padding: .52rem .6rem; font-size: .84rem; }

  /* Konten utama: padding lebih hemat, tapi tetap bernapas */
  main.app-main{ padding: .85rem !important; }
  main.app-main h4{ font-size: 1.05rem; margin-bottom: .35rem !important; }
  main.app-main h6{ font-size: .92rem; }
  main.app-main .text-muted.mb-3{ font-size: .82rem; margin-bottom: .85rem !important; }

  /* Card & card-step: padding lebih ringkas, shadow lebih halus */
  main.app-main .card.p-3{ padding: .8rem !important; }
  main.app-main .card.p-4{ padding: 1rem !important; }
  main.app-main .card-step{ border-left-width: 3px; border-radius: 14px; box-shadow: none; border: 1px solid var(--border); border-left: 3px solid var(--amber-500); }

  /* Header tiap tab (judul + tombol aksi): stack rapi & tombol full width */
  main.app-main .d-flex.justify-content-between.align-items-center.mb-3{
    align-items: stretch !important;
    gap: .5rem !important;
  }
  main.app-main .d-flex.justify-content-between.align-items-center.mb-3 h4{
    margin-bottom: .1rem;
  }
  main.app-main .d-flex.justify-content-between.align-items-center.mb-3 > div{
    display: flex; flex-direction: column; gap: .45rem;
  }
  main.app-main .d-flex.justify-content-between.align-items-center.mb-3 .btn{
    width: 100%;
  }

  /* Stat card: lebih kompak buat grid 2 kolom */
  .stat-card{ padding: .75rem .8rem; border-radius: 13px; }
  .stat-card .stat-icon{
    width: 34px; height: 34px;
    font-size: 1.1rem;
    border-radius: 9px;
    margin-bottom: .4rem;
  }
  .stat-card .stat-value{ font-size: 1.35rem; }
  .stat-card .stat-label{ font-size: .66rem; letter-spacing: .015em; }

  /* Filter form di dalam card: jarak lebih rapat */
  main.app-main .row.g-2 > [class*="col-"]{ margin-bottom: .35rem; }
  main.app-main .form-label{ font-size: .74rem; margin-bottom: .25rem; }
  main.app-main .form-control, main.app-main .form-select{ font-size: .88rem; padding: .5rem .7rem; }
  main.app-main .btn{ font-size: .82rem; padding: .5rem .9rem; }

  /* Tombol export/filter: full width & rapi ditumpuk di HP kecil */
  main.app-main .mt-3.d-flex.gap-2.flex-wrap{ flex-direction: column; }
  main.app-main .mt-3.d-flex.gap-2.flex-wrap .btn{ width: 100%; }

  /* Sub-tab rekap: bisa discroll horizontal biar nggak numpuk */
  #recap-subnav{ flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #recap-subnav .nav-link{ white-space: nowrap; font-size: .84rem; padding: .5rem .85rem; }

  /* Tabel: font lebih kecil biar konten padat tapi tetap kebaca, tetap bisa discroll */
  main.app-main .table{ font-size: .8rem; }
  main.app-main .table thead th{ padding: .55rem .6rem; font-size: .66rem; }
  main.app-main .table td{ padding: .55rem .6rem; }
  main.app-main .table-responsive{ border-radius: 10px; }

  /* Recent activity di dashboard: lebih rapat */
  .recent-activity-item{ padding: .5rem 0; gap: .55rem; }
  .recent-activity-item .ra-icon{ width: 30px; height: 30px; font-size: .85rem; }

  /* Modal: lebih nempel ke tepi layar, padding hemat */
  .modal-dialog{ margin: .6rem; }
  .modal-header, .modal-body, .modal-footer{ padding: .85rem 1rem; }
  .modal-header .modal-title{ font-size: .95rem; }

  /* Map picker sedikit lebih pendek biar nggak makan layar */
  #map-picker{ height: 240px; }
}

/* =========================================================
   BOTTOM NAVBAR — tampil di HP/tablet, gaya mobile-app
   ========================================================= */
.bottom-nav{
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1055;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(15,23,42,.10);
  padding: .45rem .5rem calc(.45rem + env(safe-area-inset-bottom, 0px));
  align-items: stretch;
  justify-content: space-around;
  border-radius: 18px 18px 0 0;
}
.bottom-nav-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .18rem;
  flex: 1;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: .66rem;
  font-weight: 600;
  text-decoration: none;
  padding: .25rem .2rem;
}
.bottom-nav-item:hover{ color: var(--amber-600); }
.bottom-nav-item .bn-icon{
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: transparent;
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.bottom-nav-item.active{ color: var(--amber-600); }
.bottom-nav-item.active .bn-icon{
  background: linear-gradient(155deg, var(--amber-500), var(--steel-600));
  color: var(--white);
  box-shadow: 0 8px 16px rgba(37,99,235,.35);
  transform: translateY(-2px);
}
.bottom-nav-item:active .bn-icon{ transform: scale(.94); }

@media (max-width: 991.98px){
  .bottom-nav{ display: flex; }
  .app-shell main.app-main{ padding-bottom: 5.75rem !important; }
}

/* ---------- Welcome card (dashboard, gaya app mobile) ---------- */
.welcome-card{
  background: linear-gradient(135deg, var(--amber-600), var(--steel-600) 70%, var(--caution-400));
  border-radius: var(--radius-lg);
  padding: .9rem 1.1rem;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.welcome-card::after{
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.welcome-card .avatar-circle{
  background: rgba(255,255,255,.22);
  color: var(--white);
  box-shadow: none;
}
.welcome-card .welcome-hi{ font-size: .72rem; opacity: .85; }
.welcome-card .welcome-name{ font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.welcome-card .welcome-bell{
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

/* ---------- Bottom Sheet "Lainnya" (gantiin sidebar geser kiri-kanan di HP) ---------- */
.sheet-overlay{
  display: none;
  position: fixed; inset: 0;
  background: rgba(11,23,41,.55);
  backdrop-filter: blur(2px);
  z-index: 1060;
}
.sheet-overlay.show{ display: block; }

.bottom-sheet{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1065;
  background: var(--white);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -14px 34px rgba(15,23,42,.22);
  padding: .6rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  max-height: 78vh;
  overflow-y: auto;
}
.bottom-sheet.open{ transform: translateY(0); }

.bottom-sheet-handle{
  width: 40px; height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: .3rem auto .7rem;
}
.bottom-sheet-header{
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: var(--coal-950);
  margin-bottom: .9rem;
}
.bottom-sheet-close{
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--paper-alt);
  color: var(--ink-soft);
  font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.bottom-sheet-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem .4rem;
}
.bottom-sheet-grid .bottom-nav-item{
  color: var(--ink-soft);
  padding: .4rem .2rem;
  border-radius: 14px;
}
.bottom-sheet-grid .bottom-nav-item:hover,
.bottom-sheet-grid .bottom-nav-item:active{ background: var(--paper-alt); }
.bottom-sheet-grid .bn-icon{
  width: 44px; height: 44px;
  background: var(--paper-alt);
  color: var(--amber-600);
  font-size: 1.25rem;
  border-radius: 14px;
}
.bottom-sheet-grid .bn-icon-danger{
  background: rgba(220,38,38,.10);
  color: var(--safe-red);
}
.bottom-sheet-grid .bottom-nav-item.active .bn-icon{
  background: linear-gradient(155deg, var(--amber-500), var(--steel-600));
  color: var(--white);
  box-shadow: 0 8px 16px rgba(37,99,235,.35);
}

@media (min-width: 992px){
  .sheet-overlay, .bottom-sheet{ display: none !important; }
}
