/* =====================================================
   HR Management System
   Design: White + Black + #f5c400 (Gold)
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --gold:       #f5c400;
  --gold-dark:  #d4a900;
  --gold-light: #fff8e1;
  --black:      #0a0a0a;
  --dark:       #111111;
  --dark2:      #1a1a1a;
  --white:      #ffffff;
  --gray-50:    #fafafa;
  --gray-100:   #f5f5f5;
  --gray-200:   #eeeeee;
  --gray-300:   #e0e0e0;
  --gray-400:   #bdbdbd;
  --gray-500:   #9e9e9e;
  --gray-600:   #757575;
  --gray-700:   #616161;
  --gray-800:   #424242;
  --sidebar-w:  260px;
  --topbar-h:   64px;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-xs:  6px;
  --shadow:     0 1px 4px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.18);
  --transition: .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-100);
  color: var(--black);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ─────────────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, #111 0%, #1a1a1a 50%, #0d0d0d 100%);
  position: relative;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,196,0,.15) 0%, transparent 70%);
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,196,0,.1) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand {
  text-align: center;
  position: relative; z-index: 1;
}

.login-brand img {
  max-width: 200px;
  filter: brightness(0) invert(1);
  margin-bottom: 32px;
}

.login-brand h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.login-brand p {
  color: var(--gray-500);
  font-size: 15px;
}

.login-features {
  margin-top: 48px;
  list-style: none;
  width: 100%;
  max-width: 320px;
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,.75);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 14px;
}

.login-features li i {
  color: var(--gold);
  font-size: 18px;
  width: 22px;
  text-align: center;
}

.login-right {
  width: 480px;
  min-height: 100vh;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}

.login-card .subtitle {
  color: var(--gray-500);
  margin-bottom: 36px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 7px;
  letter-spacing: .3px;
}

.form-control, .form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--black);
  font-family: inherit;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,196,0,.15);
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 16px;
  pointer-events: none;
}

.input-icon .form-control {
  padding-left: 40px;
}

.input-icon .toggle-pw {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--gray-400);
  background: none;
  border: none;
  outline: none;
  font-size: 16px;
}

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  letter-spacing: .3px;
  margin-top: 8px;
}

.btn-login:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,196,0,.35);
}

.btn-login:active { transform: translateY(0); }

.btn-login.loading {
  opacity: .7;
  cursor: not-allowed;
  transform: none !important;
}

.login-error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.login-error.show { display: flex; align-items: center; gap: 8px; }

/* ─────────────────────────────────────────────────────
   APP LAYOUT
───────────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--dark);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}

.sidebar::-webkit-scrollbar { width: 3px; }

.sidebar-logo {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo img {
  max-width: 130px;
  filter: brightness(0) invert(1);
}

.sidebar-user {
  padding: 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.user-info .user-name {
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.user-info .user-role {
  font-size: 11.5px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}

.sidebar-nav {
  padding: 14px 10px;
  flex: 1;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255,255,255,.3);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border-radius: var(--radius-xs);
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(255,255,255,.07);
  color: var(--white);
  border-color: rgba(255,255,255,.06);
}

.nav-link.active {
  background: var(--gold);
  color: var(--black);
  font-weight: 700;
  border-color: var(--gold);
}

.nav-link.active i { color: var(--black); }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 13px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-xs);
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-logout:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: var(--white);
}

/* ── MAIN CONTENT ──────────────────────────────────── */
.main-wrap {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-time {
  font-size: 13px;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
}

.topbar-notif {
  position: relative;
  width: 38px;
  height: 38px;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 17px;
  transition: all var(--transition);
}

.topbar-notif:hover { background: var(--gray-200); color: var(--black); }

.notif-badge {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: #dc2626;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--black);
  font-size: 22px;
}

/* ── PAGE CONTENT ──────────────────────────────────── */
.page-content {
  padding: 28px;
  flex: 1;
}

.page { display: none; }
.page.active { display: block; animation: fadeUp .25s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--black);
}

.page-header p {
  font-size: 13.5px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* ── CARDS ─────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  margin: 0;
}

.card-body { padding: 22px; }

/* ── STAT CARDS ────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--card-accent, var(--gray-300));
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--transition), border-color var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.stat-icon.gold   { background: rgba(245,196,0,.18); color: #b08800; }
.stat-icon.black  { background: var(--dark); color: var(--gold); }
.stat-icon.green  { background: #dcfce7; color: #15803d; }
.stat-icon.red    { background: #fee2e2; color: #b91c1c; }
.stat-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }

.stat-val {
  font-size: 38px;
  font-weight: 800;
  color: var(--black);
  line-height: 1;
  letter-spacing: -2px;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.1px;
}

/* ── PUNCH CARD ────────────────────────────────────── */
.punch-card {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.punch-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(245,196,0,.2) 0%, transparent 70%);
  pointer-events: none;
}

.punch-date {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 6px;
  font-weight: 500;
}

.punch-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 20px;
}

.punch-status-badge.checked-in  { background: rgba(34,197,94,.2); color: #4ade80; }
.punch-status-badge.checked-out { background: rgba(100,116,139,.2); color: rgba(255,255,255,.6); }
.punch-status-badge.not-checked  { background: rgba(239,68,68,.2); color: #f87171; }

.punch-times {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.punch-time-box {
  flex: 1;
}

.punch-time-box label {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.punch-time-box .time {
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
}

.punch-time-box .time.gold { color: var(--gold); }

.punch-hours {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  margin-bottom: 20px;
}

.punch-hours span { color: var(--gold); font-weight: 700; }

.punch-btns {
  display: flex;
  gap: 12px;
}

.btn-checkin, .btn-checkout {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.btn-checkin {
  background: var(--gold);
  color: var(--black);
}

.btn-checkin:hover { background: var(--gold-dark); transform: translateY(-1px); }
.btn-checkin:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.btn-checkout {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.15);
}

.btn-checkout:hover { background: rgba(255,255,255,.18); }
.btn-checkout:disabled { opacity: .4; cursor: not-allowed; }

.geo-status {
  margin-top: 14px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.5);
}

.geo-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray-400);
  flex-shrink: 0;
}

.geo-status.ok .dot     { background: #4ade80; }
.geo-status.far .dot    { background: #f87171; }
.geo-status.loading .dot{ background: var(--gold); animation: pulse 1s infinite; }

@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }

/* ── TABLES ────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

table thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--black);
  vertical-align: middle;
}

table tbody tr:hover { background: var(--gray-50); }
table tbody tr:last-child td { border-bottom: none; }

.emp-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--black);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── BADGES ─────────────────────────────────────────── */
.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.badge-present  { background: #f0fdf4; color: #16a34a; }
.badge-absent   { background: #fef2f2; color: #dc2626; }
.badge-late     { background: #fff7ed; color: #ea580c; }
.badge-holiday  { background: #eff6ff; color: #2563eb; }
.badge-on-leave { background: #faf5ff; color: #9333ea; }
.badge-gold     { background: var(--gold-light); color: var(--gold-dark); }
.badge-black    { background: var(--dark); color: var(--white); }
.badge-active   { background: #f0fdf4; color: #16a34a; }
.badge-inactive { background: #f9fafb; color: var(--gray-500); }
.badge-pending  { background: #fff7ed; color: #ea580c; }
.badge-approved { background: #f0fdf4; color: #16a34a; }
.badge-rejected { background: #fef2f2; color: #dc2626; }
.badge-draft    { background: #f9fafb; color: var(--gray-600); }
.badge-paid     { background: #f0fdf4; color: #16a34a; }
.badge-admin    { background: var(--gold-light); color: var(--gold-dark); }
.badge-hr       { background: #eff6ff; color: #2563eb; }
.badge-employee { background: #f9fafb; color: var(--gray-600); }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-xs); }

.btn-primary { background: var(--gold); color: var(--black); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); transform: translateY(-1px); }

.btn-dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark:hover { background: var(--dark2); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--black); border-color: var(--gray-300); }
.btn-outline:hover { background: var(--gray-100); }

.btn-danger { background: #dc2626; color: var(--white); border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }

.btn-success { background: #16a34a; color: var(--white); border-color: #16a34a; }
.btn-success:hover { background: #15803d; }

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition);
}

.btn-icon:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-icon.danger:hover { background: #dc2626; border-color: #dc2626; }

/* ── MODALS ─────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}

.modal-overlay.show { display: flex; animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}

.modal-box.modal-lg { max-width: 780px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
}

.modal-close {
  width: 32px; height: 32px;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: 18px;
  transition: all var(--transition);
}

.modal-close:hover { background: #dc2626; color: var(--white); }

.modal-body { padding: 24px 26px; }
.modal-footer { padding: 18px 26px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; justify-content: flex-end; }

/* ── FORM GRID ──────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid .full { grid-column: 1 / -1; }

.form-group { margin-bottom: 0; }

/* ── FILTERS ─────────────────────────────────────────── */
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-select {
  padding: 8px 13px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  color: var(--black);
  background: var(--white);
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.filter-select:focus { border-color: var(--gold); }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-xs);
  padding: 0 13px;
  transition: border-color var(--transition);
}

.search-box:focus-within { border-color: var(--gold); }

.search-box i { color: var(--gray-400); font-size: 15px; }

.search-box input {
  border: none;
  outline: none;
  padding: 8px 0;
  font-size: 13.5px;
  width: 180px;
  font-family: inherit;
  background: transparent;
}

/* ── TOAST ──────────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  pointer-events: all;
  animation: slideToast .3s ease;
  border-left: 4px solid transparent;
}

@keyframes slideToast {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { background: #f0fdf4; color: #15803d; border-color: #16a34a; }
.toast.toast-error   { background: #fef2f2; color: #b91c1c; border-color: #dc2626; }
.toast.toast-info    { background: #eff6ff; color: #1d4ed8; border-color: #2563eb; }
.toast.toast-warn    { background: #fffbeb; color: #b45309; border-color: var(--gold); }
.toast.toast-hide    { animation: slideToastOut .3s ease forwards; }

@keyframes slideToastOut {
  to { opacity: 0; transform: translateX(40px); }
}

/* ── EMPTY STATE ─────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state i {
  font-size: 48px;
  color: var(--gray-300);
  margin-bottom: 16px;
  display: block;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.empty-state p { font-size: 13.5px; }

/* ── LOADING ─────────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid rgba(0,0,0,.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

/* ── ATTENDANCE STATUS DOTS ──────────────────────────── */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.dot-present { background: #16a34a; }
.dot-absent  { background: #dc2626; }
.dot-late    { background: #ea580c; }
.dot-holiday { background: #2563eb; }
.dot-leave   { background: #9333ea; }

/* ── CALENDAR STRIP ─────────────────────────────────── */
.cal-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.cal-day {
  flex-shrink: 0;
  width: 44px;
  text-align: center;
  padding: 8px 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  cursor: default;
  background: var(--white);
}

.cal-day .day-name { font-size: 10.5px; color: var(--gray-500); font-weight: 600; }
.cal-day .day-num  { font-size: 15px; font-weight: 700; color: var(--black); margin: 2px 0; }
.cal-day .day-dot  { height: 5px; width: 5px; border-radius: 50%; margin: 0 auto; }

.cal-day.present { background: #f0fdf4; border-color: #16a34a; }
.cal-day.present .day-num { color: #16a34a; }
.cal-day.absent  { background: #fef2f2; border-color: #dc2626; }
.cal-day.absent  .day-num { color: #dc2626; }
.cal-day.late    { background: #fff7ed; border-color: #ea580c; }
.cal-day.late    .day-num { color: #ea580c; }
.cal-day.today   { border-color: var(--gold); background: var(--gold-light); }
.cal-day.today   .day-num { color: var(--gold-dark); }
.cal-day.weekend { background: var(--gray-50); }
.cal-day.weekend .day-num { color: var(--gray-400); }

/* ── PROGRESS BAR ───────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gold);
  transition: width .5s ease;
}

.progress-fill.green  { background: #16a34a; }
.progress-fill.red    { background: #dc2626; }
.progress-fill.blue   { background: #2563eb; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrap { margin-left: 0; }
  .hamburger { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; }
}

@media (max-width: 640px) {
  .page-content { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .punch-times { gap: 14px; }
  .punch-time-box .time { font-size: 20px; }
  .filters { gap: 8px; }
}

/* ── FLATICON OVERRIDE ──────────────────────────────── */
.fi { font-size: 1.1em; vertical-align: middle; }

/* ── TOOLTIPS ───────────────────────────────────────── */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
}

/* ── PAYSLIP PRINT ──────────────────────────────────── */
@media print {
  .sidebar, .topbar, .page-header .btn, .filters { display: none !important; }
  .main-wrap { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
}

/* ── CHART CONTAINER ───────────────────────────────── */
.chart-container { position: relative; height: 220px; }

/* ── PROFILE CARD ───────────────────────────────────── */
.profile-banner {
  background: var(--dark);
  border-radius: var(--radius) var(--radius) 0 0;
  height: 120px;
  position: relative;
}

.profile-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-weight: 800;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: -40px;
  left: 26px;
  border: 4px solid var(--white);
  text-transform: uppercase;
}

/* ── LIVE INDICATOR ─────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34,197,94,.4);
  animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ── OVERLAY for sidebar mobile ─────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
}

.sidebar-overlay.show { display: block; }
