/* =====================================================
   E-Lemburrr v3.0 — Style Sheet (Firebase Edition)
   © 2026 Heri Antoro. All rights reserved.
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --blue: #3b82f6;
  --blue-dark: #1d4ed8;
  --blue-light: #dbeafe;
  --green: #10b981;
  --green-light: #d1fae5;
  --red: #ef4444;
  --red-light: #fee2e2;
  --orange: #f59e0b;
  --orange-light: #fef3c7;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --teal: #14b8a6;
  --teal-light: #ccfbf1;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.14);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 64px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); height: 100%; overflow: hidden; }

/* SPLASH */
#splash { position: fixed; inset: 0; background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1d4ed8 100%); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity .5s; }
#splash.hidden { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; }
.splash-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 12px; animation: pulse 1.5s infinite; }
.splash-title { font-size: 32px; font-weight: 800; color: #fff; letter-spacing: -1px; }
.splash-sub { font-size: 14px; color: rgba(255,255,255,.6); margin-top: 4px; }
.splash-loader { width: 180px; height: 3px; background: rgba(255,255,255,.2); border-radius: 99px; margin: 24px auto 0; overflow: hidden; }
.loader-bar { height: 100%; width: 0; background: #fff; border-radius: 99px; animation: loadbar 1.8s ease forwards; }
@keyframes loadbar { to { width: 100%; } }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.08)} }

/* LOADING OVERLAY */
#loading-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 8888; display: flex; align-items: center; justify-content: center; }
.loading-inner { background: var(--surface); border-radius: var(--radius); padding: 28px 36px; text-align: center; box-shadow: var(--shadow-lg); }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
.loading-text { font-size: 14px; font-weight: 600; color: var(--text-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* SYNC INDICATOR */
.sync-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sync-dot.online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); animation: sync-pulse 2s infinite; }
.sync-dot.offline { background: var(--red); }
@keyframes sync-pulse { 0%,100%{box-shadow:0 0 0 3px rgba(34,197,94,.25)} 50%{box-shadow:0 0 0 5px rgba(34,197,94,.1)} }

/* TOAST */
#toast { position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%) translateY(20px); background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 99px; font-size: 13px; font-weight: 500; white-space: nowrap; opacity: 0; transition: all .3s; z-index: 8000; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* NOTIF BANNER */
#notif-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 7000; }
.notif-banner-inner { background: var(--blue); color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.notif-banner-inner button { background: rgba(255,255,255,.25); border: none; color: #fff; padding: 4px 12px; border-radius: 99px; cursor: pointer; font-size: 12px; font-weight: 600; }
.notif-dismiss { padding: 4px 8px !important; }

/* SCREEN */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.screen.active {
  display: flex;
}
.screen.fade-in {
  animation: screenFadeIn .25s ease both;
}
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== LOGIN ===== */
#screen-login {
  overflow-y: auto;
  background: #0c1432;
  position: relative;
}

/* Animated background blobs */
.login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: blobFloat 8s ease-in-out infinite;
}
.blob-1 {
  width: 340px; height: 340px;
  background: #1d4ed8;
  top: -80px; left: -80px;
  animation-delay: 0s;
}
.blob-2 {
  width: 280px; height: 280px;
  background: #7c3aed;
  bottom: 5%; right: -60px;
  animation-delay: -3s;
}
.blob-3 {
  width: 200px; height: 200px;
  background: #0369a1;
  top: 45%; left: 30%;
  animation-delay: -5s;
}
@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(20px,-20px) scale(1.05); }
  66%      { transform: translate(-15px,15px) scale(0.97); }
}

/* Login wrap — center vertically on desktop */
.login-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px 24px;
  gap: 20px;
  box-sizing: border-box;
}

/* Brand / logo */
.login-brand { text-align: center; }
.login-icon-wrap {
  width: 60px; height: 60px;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  backdrop-filter: blur(8px);
  animation: iconPop .5s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes iconPop { from { transform: scale(.6); opacity:0; } to { transform: scale(1); opacity:1; } }
.login-icon-emoji { font-size: 28px; line-height: 1; }
.login-app-name {
  font-size: 26px; font-weight: 800;
  color: #fff; letter-spacing: -0.5px;
  animation: fadeUp .4s .1s ease both;
}
.login-app-name span { color: #60a5fa; }
.login-tagline {
  font-size: 12px; color: rgba(255,255,255,.45);
  margin-top: 4px;
  animation: fadeUp .4s .2s ease both;
}
@keyframes fadeUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

/* Card */
.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255,255,255,.97);
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.1);
  animation: cardSlide .45s .15s cubic-bezier(.22,1,.36,1) both;
  backdrop-filter: blur(12px);
}
@keyframes cardSlide { from { opacity:0; transform: translateY(24px); } to { opacity:1; transform: translateY(0); } }
.login-card-title {
  font-size: 17px; font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

/* Inputs compact */
.field { margin-bottom: 10px; }
.field label { font-size: 11px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 11px; font-size: 15px; }
.input-wrap input {
  width: 100%;
  padding: 10px 10px 10px 35px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #f8fafc;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap input:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.eye-btn { position: absolute; right: 10px; background: none; border: none; cursor: pointer; font-size: 15px; opacity: .6; }
.eye-btn:hover { opacity: 1; }

/* Login button */
.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(59,130,246,.4);
}
.btn-login:hover { box-shadow: 0 6px 20px rgba(59,130,246,.5); transform: translateY(-1px); }
.btn-login:active { transform: scale(.98); box-shadow: none; }
.btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }
#login-btn-icon { font-size: 17px; transition: transform .2s; }
.btn-login:not(:disabled):hover #login-btn-icon { transform: translateX(3px); }

/* Demo hint — collapsible */
.demo-hint {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.demo-hint summary.demo-hint-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .5px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.demo-hint summary::-webkit-details-marker { display: none; }
.demo-hint[open] summary { color: var(--text-2); }
.demo-accounts { margin-top: 8px; animation: fadeUp .2s ease both; }

.demo-row {
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
  color: var(--text-2);
}
.demo-row:hover { background: var(--bg); }
.demo-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; flex-shrink: 0; }
.demo-badge.admin { background: var(--blue-light); color: var(--blue-dark); }
.demo-badge.staff { background: var(--green-light); color: #065f46; }
.demo-pass { font-size: 11px; color: var(--text-3); margin-top: 6px; padding: 0 8px; }
.demo-pass code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* Footer */
.login-footer {
  font-size: 11px;
  color: rgba(255,255,255,.25);
  text-align: center;
  animation: fadeUp .4s .35s ease both;
}

/* ===== RESPONSIVE LOGIN — Desktop ===== */
@media (min-width: 600px) {
  .login-wrap { padding: 40px 24px; }
  .login-card { padding: 28px 28px 22px; }
  .login-icon-wrap { width: 68px; height: 68px; border-radius: 20px; }
  .login-icon-emoji { font-size: 32px; }
  .login-app-name { font-size: 30px; }
}

/* ===== RESPONSIVE LOGIN — safe area iOS ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .login-wrap { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
.field { margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 12px; font-size: 16px; }
.input-wrap input { width: 100%; padding: 11px 12px 11px 38px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; background: var(--bg); transition: border .2s; }
.input-wrap input:focus { outline: none; border-color: var(--blue); background: #fff; }
.eye-btn { position: absolute; right: 10px; background: none; border: none; cursor: pointer; font-size: 16px; }
input, select, textarea {
  font-family: inherit;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
/* Remove blue outline on mobile tap */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: none;
}
select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--bg); cursor: pointer; }
select:focus { outline: none; border-color: var(--blue); }
textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; resize: vertical; background: var(--bg); }
textarea:focus { outline: none; border-color: var(--blue); }
input[type=date], input[type=month], input[type=time] { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--bg); }
input[type=date]:focus, input[type=month]:focus, input[type=time]:focus { outline: none; border-color: var(--blue); }

.alert-danger { background: var(--red-light); color: var(--red); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 12px; }
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; border: none; padding: 12px 20px;
  border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 3px 12px rgba(59,130,246,.3);
}
.btn-primary:hover { box-shadow: 0 5px 16px rgba(59,130,246,.4); transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98); box-shadow: none; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-primary.full { width: 100%; }
.btn-danger { background: var(--red); color: #fff; border: none; padding: 12px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-danger.full { width: 100%; }
.btn-ghost { background: var(--bg); color: var(--text-2); border: 1.5px solid var(--border); padding: 10px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-ghost.full { width: 100%; margin-top: 8px; }
.btn-export { background: var(--green); color: #fff; border: none; padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-secondary { background: var(--surface); color: var(--blue); border: 1.5px solid var(--blue); padding: 9px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* demo styles now in login section above */

/* ===== STAFF APP ===== */
#screen-staff { background: var(--bg); }
.app-header { height: var(--header-h); background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; flex-shrink: 0; }
.app-header-left { display: flex; align-items: center; gap: 12px; }
.app-avatar { width: 38px; height: 38px; background: rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; flex-shrink: 0; }
.app-greeting { font-size: 15px; font-weight: 700; color: #fff; }
.app-date { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 1px; }
.icon-btn { background: rgba(255,255,255,.15); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; }

.app-content { flex: 1; overflow: hidden; position: relative; }
.tab-panel { position: absolute; inset: 0; overflow-y: auto; padding: 16px 16px calc(var(--nav-h) + 16px); display: none; }
.tab-panel.active { display: block; }
/* Pastikan hanya 1 tab panel yang visible */
#staff-home, #staff-catat, #staff-history, #staff-ro, #staff-profil { display: none; }
#staff-home.active, #staff-catat.active, #staff-history.active, #staff-ro.active, #staff-profil.active { display: block; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); cursor: pointer; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-icon.blue { background: var(--blue-light); }
.stat-icon.green { background: var(--green-light); }
.stat-icon.purple { background: var(--purple-light); }
.stat-icon.orange { background: var(--orange-light); }
.stat-icon.teal { background: var(--teal-light); }
.stat-val { font-size: 20px; font-weight: 800; color: var(--text); font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 11px; color: var(--text-3); margin-top: 1px; font-weight: 500; }
.stat-info { flex: 1; }

/* PERIOD BAR */
.period-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.period-label { font-size: 12px; font-weight: 600; color: var(--text-3); }
.period-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.period-tab { background: var(--surface); border: 1.5px solid var(--border); color: var(--text-2); padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .15s; }
.period-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.custom-period-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.custom-period-row input { flex: 1; }
.period-summary { background: var(--blue-light); color: var(--blue-dark); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; margin-bottom: 12px; }

/* RECORD LIST */
.record-list { display: flex; flex-direction: column; gap: 10px; }
.record-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.record-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.record-date { font-size: 13px; font-weight: 700; color: var(--text); }
.record-hours { font-size: 15px; font-weight: 800; color: var(--blue); font-family: 'JetBrains Mono', monospace; }
.record-time { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.record-desc { font-size: 13px; color: var(--text-2); }
.record-name { font-size: 12px; font-weight: 600; color: var(--purple); margin-bottom: 2px; }
.record-dept { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--blue-light); color: var(--blue-dark); margin-bottom: 4px; }
.record-cost { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 4px; }

/* FORM */
.form-card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.form-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.time-row { display: flex; align-items: flex-end; gap: 8px; }
.flex1 { flex: 1; }
.time-sep { font-size: 20px; color: var(--text-3); padding-bottom: 10px; }
.hours-display { background: var(--blue-light); border-radius: var(--radius-sm); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hours-label { font-size: 13px; font-weight: 600; color: var(--blue-dark); }
.hours-val { font-size: 20px; font-weight: 800; color: var(--blue); font-family: 'JetBrains Mono', monospace; }
.required { color: var(--red); }

/* FILTER */
.filter-section { background: var(--surface); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.filter-row { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: 12px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.range-wrap { display: flex; align-items: center; gap: 8px; flex: 1; }
.range-wrap input { flex: 1; }
.monthly-summary { background: var(--green-light); color: #065f46; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.data-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.data-count { font-size: 13px; color: var(--text-3); font-weight: 600; }

/* PROFILE */
.profile-card { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); border-radius: var(--radius); padding: 28px; text-align: center; margin-bottom: 16px; }
.profile-avatar { width: 72px; height: 72px; background: rgba(255,255,255,.2); border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; color: #fff; }
.profile-name { font-size: 20px; font-weight: 800; color: #fff; }
.profile-role { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }
.profile-dept { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 4px; }
.profile-info-card { background: var(--surface); border-radius: var(--radius); padding: 4px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.profile-info-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.profile-info-row:last-child { border-bottom: none; }
.profile-info-row span:first-child { color: var(--text-3); font-weight: 500; }
.profile-info-row span:last-child { font-weight: 600; }
.section-label { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; }

/* BOTTOM NAV */
.bottom-nav {
  height: var(--nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 4px;
  flex-shrink: 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,.06);
  /* iOS safe area (home indicator) */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { height: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
  .tab-panel { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); }
}
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 8px 4px; border: none; background: none; cursor: pointer; border-radius: 12px; transition: background .15s; }
.nav-item:active { background: var(--bg); }
.nav-icon { font-size: 22px; transition: transform .2s; }
.nav-label { font-size: 10px; font-weight: 600; color: var(--text-3); }
.nav-item.active .nav-icon { transform: translateY(-2px); }
.nav-item.active .nav-label { color: var(--blue); font-weight: 700; }

/* ===== ADMIN ===== */
#screen-admin { overflow-y: auto; }
.admin-header { background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%); padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.admin-logo { font-size: 22px; font-weight: 800; color: #fff; }
.admin-subtitle { font-size: 11px; color: rgba(255,255,255,.5); }
.admin-header-right { display: flex; align-items: center; gap: 10px; }
.admin-badge { background: rgba(255,255,255,.2); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: .5px; }
.admin-tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; flex-shrink: 0; padding: 0 4px; }
.admin-tab { white-space: nowrap; padding: 12px 16px; border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-3); border-bottom: 2.5px solid transparent; transition: all .15s; font-family: inherit; }
.admin-tab.active { color: var(--blue); border-bottom-color: var(--blue); }
.admin-content { flex: 1; }
.admin-panel { display: none; padding: 16px; }
.admin-panel.active { display: block; }
.admin-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.admin-stat { background: var(--surface); border-radius: var(--radius); padding: 16px 14px; box-shadow: var(--shadow-sm); border-left: 4px solid transparent; }
.admin-stat.blue { border-left-color: var(--blue); }
.admin-stat.green { border-left-color: var(--green); }
.admin-stat.purple { border-left-color: var(--purple); }
.admin-stat.orange { border-left-color: var(--orange); }
.as-num { font-size: 24px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.as-label { font-size: 11px; color: var(--text-3); margin-top: 4px; font-weight: 500; }
.admin-period-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

/* RECAP TABLE */
.recap-table { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-top: 8px; }
.recap-row { display: grid; grid-template-columns: 1fr 70px 60px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; align-items: center; gap: 8px; }
.recap-row:last-child { border-bottom: none; }
.recap-row.header { background: var(--bg); font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--text-3); letter-spacing: .5px; }
.recap-name { font-weight: 600; }
.recap-dept { font-size: 11px; color: var(--text-3); }

/* NOTIF */
.notif-settings-card { background: var(--surface); border-radius: var(--radius); padding: 4px 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.notif-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif-row:last-child { border-bottom: none; }
.notif-row-label { font-size: 13px; font-weight: 600; }
.notif-row-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 99px; transition: .3s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
input:checked + .toggle-slider { background: var(--blue); }
input:checked + .toggle-slider::before { transform: translateX(20px); }
.notif-schedule-row { display: flex; justify-content: space-between; align-items: center; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* REPORT */
.report-btns { display: flex; gap: 8px; margin-top: 4px; }
.report-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.report-box { background: #f8fafc; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; }
.report-box pre { font-family: 'JetBrains Mono', monospace; font-size: 12px; white-space: pre-wrap; word-break: break-word; color: var(--text); line-height: 1.6; }

/* GAJI */
.gaji-result { background: linear-gradient(135deg, #065f46 0%, #047857 100%); border-radius: var(--radius); padding: 16px; color: #fff; margin-top: 12px; }
.gaji-result-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.15); font-size: 13px; }
.gaji-result-row:last-child { border-bottom: none; font-size: 15px; font-weight: 800; }
.gaji-result-label { color: rgba(255,255,255,.8); }
.gaji-result-val { font-family: 'JetBrains Mono', monospace; font-weight: 700; }
.gaji-note { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 8px; line-height: 1.5; }

/* STAFF CARD */
.staff-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.staff-av { width: 44px; height: 44px; border-radius: 50%; background: var(--blue-light); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--blue-dark); flex-shrink: 0; }
.staff-info { flex: 1; min-width: 0; }
.staff-name { font-size: 14px; font-weight: 700; }
.staff-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.btn-sm { background: var(--red-light); color: var(--red); border: none; padding: 5px 10px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-sm.edit { background: var(--blue-light); color: var(--blue-dark); }

/* DEPT CARD */
.dept-card { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.dept-name { font-size: 14px; font-weight: 700; }
.dept-count { font-size: 12px; color: var(--text-3); }

/* SALARY TABLE */
.salary-table-wrap { overflow-x: auto; margin-top: 12px; }
.salary-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.salary-table th { background: var(--bg); padding: 8px 10px; text-align: left; font-size: 11px; text-transform: uppercase; color: var(--text-3); letter-spacing: .5px; font-weight: 700; }
.salary-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.salary-table tr:last-child td { border-bottom: none; }
.salary-table .mono { font-family: 'JetBrains Mono', monospace; }

/* COPYRIGHT */
.copyright-bar { text-align: center; font-size: 11px; color: var(--text-3); padding: 8px 16px; background: var(--surface); border-top: 1px solid var(--border); flex-shrink: 0; }

/* =====================================================
   UPDATE BANNER
   ===================================================== */
#update-banner {
  position: fixed;
  bottom: calc(var(--nav-h) + 12px);
  left: 12px;
  right: 12px;
  z-index: 9000;
  animation: bannerSlideUp .35s cubic-bezier(.22,1,.36,1) both;
}
@keyframes bannerSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.update-banner-inner {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.update-banner-icon { font-size: 22px; flex-shrink: 0; }
.update-banner-text { flex: 1; min-width: 0; }
.update-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.update-banner-sub {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
}
.update-banner-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: background .15s;
}
.update-banner-btn:hover { background: var(--blue-dark); }
.update-banner-btn:disabled { opacity: .6; cursor: not-allowed; }
.update-banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}
.update-banner-close:hover { color: rgba(255,255,255,.8); }

/* Di admin — banner sedikit lebih tinggi karena tidak ada bottom nav */
#screen-admin ~ #update-banner,
#screen-admin.active + #update-banner {
  bottom: 20px;
}

/* =====================================================
   FORGOT PASSWORD & ALERT SUCCESS
   ===================================================== */
.alert-success {
  background: var(--green-light);
  color: #065f46;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
  animation: fadeUp .2s ease both;
}

.forgot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.forgot-label {
  font-size: 12px;
  color: var(--text-3);
}
.forgot-btn {
  background: none;
  border: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background .15s;
}
.forgot-btn:hover { background: var(--blue-light); }
.forgot-btn:disabled { opacity: .5; cursor: not-allowed; }

/* =====================================================
   BULK UPLOAD KARYAWAN
   ===================================================== */
.staff-add-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-sm);
}
.staff-add-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-3);
  background: transparent;
  transition: all .2s;
}
.staff-add-tab.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.3);
}

.bulk-template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.bulk-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* Drop zone */
.bulk-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg);
}
.bulk-drop-zone:hover, .bulk-drop-zone.dragover {
  border-color: var(--blue);
  background: var(--blue-light);
}
.bulk-drop-icon { font-size: 32px; margin-bottom: 8px; }
.bulk-drop-text { font-size: 14px; font-weight: 600; color: var(--text-2); }
.bulk-drop-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* Preview */
.bulk-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}
.bulk-preview-table {
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  max-height: 240px;
  overflow-y: auto;
}
.bulk-preview-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.8fr 28px;
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 6px;
}
.bulk-preview-row:last-child { border-bottom: none; }
.bulk-preview-row.header {
  background: var(--surface);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: .4px;
  position: sticky;
  top: 0;
}
.bulk-preview-row.error { background: var(--red-light); }
.bulk-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-row-email { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-row-dept { color: var(--text-3); }
.bulk-row-status { font-size: 14px; text-align: center; }

.bulk-errors {
  background: var(--red-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  color: var(--red);
  margin-top: 8px;
  line-height: 1.6;
}

/* Progress */
.bulk-progress-wrap { margin-top: 14px; }
.bulk-progress-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.bulk-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 99px;
  width: 0%;
  transition: width .3s ease;
}
.bulk-progress-text {
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  font-weight: 600;
}

/* =====================================================
   LOG OUT BUTTON HEADER
   ===================================================== */
.btn-logout-header {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
  letter-spacing: .3px;
}
.btn-logout-header:hover { background: rgba(255,255,255,.25); }

/* =====================================================
   REPLACE OFF (RO) SYSTEM
   ===================================================== */

/* Admin RO summary grid */
.ro-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.ro-summary-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid transparent;
  text-align: center;
}
.ro-summary-card.blue  { border-left-color: var(--blue); }
.ro-summary-card.green { border-left-color: var(--green); }
.ro-summary-card.orange{ border-left-color: var(--orange); }
.ro-summary-card.purple{ border-left-color: var(--purple); }
.ro-sum-num   { font-size: 28px; font-weight: 800; font-family: 'JetBrains Mono',monospace; }
.ro-sum-label { font-size: 11px; color: var(--text-3); margin-top: 4px; font-weight: 500; }

/* RO balance table */
.ro-balance-table { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.ro-balance-row {
  display: grid;
  grid-template-columns: 1fr 60px 60px 60px 80px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  align-items: center;
  gap: 6px;
}
.ro-balance-row:last-child { border-bottom: none; }
.ro-balance-row.header {
  background: var(--bg);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: .4px;
}
.ro-balance-name { font-weight: 600; }
.ro-balance-dept { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ro-saldo-num-cell { font-family: 'JetBrains Mono',monospace; font-weight: 700; text-align: center; }
.ro-saldo-num-cell.green { color: var(--green); }
.ro-saldo-num-cell.orange { color: var(--orange); }

/* RO badge */
.ro-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: 6px;
}
.ro-nav-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

/* RO request card */
.ro-request-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--orange);
}
.ro-request-card.approved { border-left-color: var(--green); }
.ro-request-card.taken    { border-left-color: var(--blue); }
.ro-request-card.rejected { border-left-color: var(--red); }
.ro-request-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.ro-request-name { font-size: 14px; font-weight: 700; }
.ro-request-date { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.ro-request-dept { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--blue-light); color: var(--blue-dark); margin-bottom: 4px; }
.ro-jabatan-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--purple-light); color: var(--purple); margin-left: 4px; }
.ro-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}
.ro-status-badge.pending  { background: var(--orange-light); color: #92400e; }
.ro-status-badge.approved { background: var(--green-light);  color: #065f46; }
.ro-status-badge.taken    { background: var(--blue-light);   color: var(--blue-dark); }
.ro-status-badge.rejected { background: var(--red-light);    color: var(--red); }
.ro-approve-btns { display: flex; gap: 6px; margin-top: 10px; }
.btn-approve { background: var(--green); color: #fff; border: none; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-reject  { background: var(--red-light); color: var(--red); border: none; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-taken   { background: var(--blue-light); color: var(--blue-dark); border: none; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* Staff RO saldo card */
.ro-saldo-card {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  color: #fff;
}
.ro-saldo-title { font-size: 14px; font-weight: 700; color: rgba(255,255,255,.8); margin-bottom: 16px; }
.ro-saldo-main  { display: flex; align-items: center; justify-content: space-around; }
.ro-saldo-item  { text-align: center; }
.ro-saldo-num   { font-size: 28px; font-weight: 800; font-family: 'JetBrains Mono',monospace; color: #fff; }
.ro-saldo-num.earned { color: #6ee7b7; }
.ro-saldo-num.used   { color: #fca5a5; }
.ro-saldo-label { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 4px; }
.ro-saldo-divider { width: 1px; height: 50px; background: rgba(255,255,255,.2); }
.ro-info-note   { text-align: center; font-size: 11px; color: rgba(255,255,255,.5); margin-top: 14px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 10px; }

/* RO lembur type badge on record card */
.record-ro-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--green-light);
  color: #065f46;
  margin-top: 4px;
}

/* Upcoming RO reminder */
.ro-upcoming-card {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ro-upcoming-icon { font-size: 28px; flex-shrink: 0; }
.ro-upcoming-date { font-size: 15px; font-weight: 700; }
.ro-upcoming-label{ font-size: 12px; color: rgba(255,255,255,.7); margin-top: 2px; }

/* Nav item relative for badge */
.nav-item { position: relative; }

/* Bulk preview 5 kolom (dengan jabatan) */
.bulk-preview-row-5 {
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.7fr 0.8fr 24px;
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 6px;
}
.bulk-preview-row-5:last-child { border-bottom: none; }
.bulk-preview-row-5.header {
  background: var(--surface);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-3);
  letter-spacing: .4px;
  position: sticky;
  top: 0;
}

/* RO Revoke button */
.btn-revoke {
  background: var(--orange-light);
  color: #92400e;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* RO Durasi selector */
.ro-durasi-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ro-durasi-btn {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all .2s;
}
.ro-durasi-btn.active {
  border-color: var(--blue);
  background: var(--blue-light);
}
.ro-durasi-icon { font-size: 24px; margin-bottom: 4px; }
.ro-durasi-label { font-size: 13px; font-weight: 700; color: var(--text); }
.ro-durasi-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ro-durasi-btn.active .ro-durasi-label { color: var(--blue-dark); }
.ro-durasi-btn.active .ro-durasi-sub { color: var(--blue); }

/* RO Sesi selector */
.ro-sesi-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ro-sesi-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: all .15s;
}
.ro-sesi-btn.active {
  border-color: var(--green);
  background: var(--green-light);
  color: #065f46;
}

/* Saldo info */
.ro-saldo-info {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
  display: none;
}

/* =====================================================
   FOTO PROFIL UPLOAD
   ===================================================== */
.profile-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  cursor: pointer;
}
.profile-avatar-wrap .profile-avatar {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.profile-avatar-wrap img.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-edit-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  background: var(--blue);
  border: 2px solid var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

/* Header avatar juga support foto */
.app-avatar {
  overflow: hidden;
}
.app-avatar img.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar di staff card admin */
.staff-av {
  overflow: hidden;
}
.staff-av img.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Upload progress overlay */
.avatar-uploading {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* =====================================================
   STAFF SEARCH
   ===================================================== */
.staff-search-wrap {
  position: relative;
  margin-bottom: 8px;
}
.staff-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.staff-search-wrap input {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.staff-search-wrap input:focus {
  outline: none;
  border-color: var(--blue);
}
.staff-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--text-3);
  cursor: pointer;
  font-family: inherit;
}
.staff-search-count {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 10px;
  font-weight: 600;
}

/* =====================================================
   ANALYTICS DASHBOARD
   ===================================================== */
.analytics-period-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.analytics-period-bar select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--surface);
  font-weight: 600;
}
.chart-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  max-height: 220px;
  overflow: hidden;
}
.chart-card canvas {
  max-height: 196px;
}
.ana-rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}
.ana-rank-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
  flex-shrink: 0;
}
.ana-rank-num.top1 { background: #fef3c7; color: #92400e; }
.ana-rank-num.top2 { background: #e5e7eb; color: #374151; }
.ana-rank-num.top3 { background: #fed7aa; color: #9a3412; }
.ana-rank-info { flex: 1; min-width: 0; }
.ana-rank-name { font-weight: 600; font-size: 14px; }
.ana-rank-dept { font-size: 12px; color: var(--text-3); }
.ana-rank-hours { font-weight: 700; font-size: 15px; color: var(--blue); white-space: nowrap; }

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
}
