/* ═══════════════════════════════════════════════════
   ConnectDifferently — ShiftSync CSS
   Brand: #1E1B2E navy | #F4703A orange | #E040A0 pink | #9B3DE8 purple
   ═══════════════════════════════════════════════════ */

:root {
  --navy:    #1E1B2E;
  --navy2:   #2A2640;
  --navy3:   #352F50;
  --orange:  #F4703A;
  --pink:    #E040A0;
  --purple:  #9B3DE8;
  --purple2: #7B2DBE;
  --grad:    linear-gradient(135deg, #F4703A 0%, #E040A0 50%, #9B3DE8 100%);
  --grad2:   linear-gradient(135deg, #9B3DE8 0%, #E040A0 100%);
  --white:   #FFFFFF;
  --gray50:  #F8F7FF;
  --gray100: #EEECF8;
  --gray200: #D8D4EE;
  --gray400: #9990BB;
  --gray600: #5C5480;
  --green:   #22C55E;
  --yellow:  #F59E0B;
  --red:     #EF4444;
  --blue:    #3B82F6;
  --shadow:  0 4px 24px rgba(30,27,46,0.12);
  --shadow2: 0 8px 40px rgba(155,61,232,0.18);
  --radius:  14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray50);
  color: var(--navy);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── NAV ─────────────────────────────────────────── */
.cd-nav {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.cd-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.cd-logo-icon {
  width: 36px; height: 36px;
  background: var(--grad);
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
}
.cd-logo-icon::before {
  content: '✦';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}
.cd-logo-icon.lg { width: 56px; height: 56px; border-radius: 14px; }
.cd-logo-icon.lg::before { font-size: 28px; }

.cd-brand-text {
  color: var(--white);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.3px;
}
.cd-brand-text strong { font-weight: 700; }

.cd-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  color: var(--gray200);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 7px;
}
.nav-link:hover { background: var(--navy3); color: var(--white); }
.nav-link.nav-logout { color: var(--gray400); }
.nav-link.nav-logout:hover { background: rgba(239,68,68,.15); color: #ff8080; }

.cd-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}

.cd-mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--navy2);
  padding: 12px 0;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.cd-mobile-menu.open { display: block; }
.cd-mobile-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray200);
  text-decoration: none;
  padding: 12px 24px;
  font-size: 15px;
}
.cd-mobile-menu a:hover { background: var(--navy3); color: var(--white); }

.cd-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ── PAGE HEADER ─────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.page-sub { color: var(--gray600); font-size: 14px; margin-top: 2px; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── CARDS ───────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray100);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header h3 i { color: var(--purple); }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-primary {
  background: var(--grad2);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(155,61,232,.35); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-secondary:hover { border-color: var(--purple); color: var(--purple); background: rgba(155,61,232,.05); }

.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

.btn-icon {
  width: 34px; height: 34px;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.btn-confirm { background: rgba(34,197,94,.12); color: var(--green); }
.btn-confirm:hover { background: var(--green); color: white; }
.btn-note { background: rgba(59,130,246,.12); color: var(--blue); }
.btn-note:hover { background: var(--blue); color: white; }
.btn-confirm.confirmed { background: var(--green); color: white; }

/* QuickBooks Buttons */
.btn-qb {
  background: var(--grad);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-qb:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(244,112,58,.3); }
.btn-qb-outline {
  background: transparent;
  color: var(--purple);
  border: 1.5px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-qb-outline:hover { background: rgba(155,61,232,.1); }

/* ── BADGES ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-present, .badge-eligible { background: rgba(34,197,94,.12); color: #16a34a; }
.badge-late, .badge-at-risk { background: rgba(245,158,11,.12); color: #d97706; }
.badge-absent, .badge-ineligible { background: rgba(239,68,68,.12); color: #dc2626; }
.badge-ready { background: rgba(155,61,232,.12); color: var(--purple); }
.badge-ai { background: var(--grad); color: white; font-size: 11px; }
.badge-lg { padding: 6px 16px; font-size: 13px; }

/* ── LOGIN PAGE ──────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .cd-logo-icon { margin: 0 auto 16px; }
.login-logo h1 {
  font-size: 24px;
  color: var(--navy);
  font-weight: 400;
  letter-spacing: -0.5px;
}
.login-logo h1 strong { font-weight: 800; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-sub { color: var(--gray600); font-size: 13px; margin-top: 4px; }

.role-tabs {
  display: flex;
  gap: 6px;
  background: var(--gray100);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 24px;
}
.role-tab {
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray600);
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.role-tab.active {
  background: var(--white);
  color: var(--purple);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray600);
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-group input, .form-control {
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 15px;
  color: var(--navy);
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group input:focus, .form-control:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155,61,232,.1);
}

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray400);
  cursor: pointer;
  font-size: 15px;
}

.login-hint {
  text-align: center;
  color: var(--gray400);
  font-size: 12px;
  margin-top: 20px;
  line-height: 1.8;
}
.hint-chip {
  display: inline-block;
  background: var(--gray100);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  margin: 2px;
  transition: all .2s;
}
.hint-chip:hover { background: var(--purple); color: white; }

/* Orb animations */
.login-bg-art { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: float 8s ease-in-out infinite;
}
.orb1 { width: 400px; height: 400px; background: var(--purple); top: -100px; right: -100px; }
.orb2 { width: 300px; height: 300px; background: var(--orange); bottom: -80px; left: -80px; animation-delay: -3s; }
.orb3 { width: 200px; height: 200px; background: var(--pink); top: 50%; left: 20%; animation-delay: -6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ── CLOCK WIDGET ─────────────────────────────────── */
.clock-widget-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 8px;
}

.clock-widget {
  background: var(--navy);
  border-radius: 24px;
  padding: 40px 48px;
  text-align: center;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow2);
  position: relative;
  overflow: hidden;
}
.clock-widget::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0.06;
  pointer-events: none;
}

.clock-time {
  font-size: 56px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-bottom: 6px;
}

.clock-date {
  color: var(--gray400);
  font-size: 15px;
  margin-bottom: 16px;
}

.clock-shift {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  padding: 6px 16px;
  color: var(--gray200);
  font-size: 13px;
  margin-bottom: 20px;
}

.clock-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--gray400);
  font-size: 14px;
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-idle { background: var(--gray400); }
.dot-active { background: var(--green); box-shadow: 0 0 0 4px rgba(34,197,94,.25); animation: pulse 1.5s infinite; }
.dot-out { background: var(--orange); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(34,197,94,.25); }
  50% { box-shadow: 0 0 0 8px rgba(34,197,94,.1); }
}

.btn-clock {
  border: none;
  border-radius: 16px;
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.btn-clockin {
  background: var(--grad);
  color: white;
  box-shadow: 0 8px 32px rgba(155,61,232,.4);
}
.btn-clockin:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(155,61,232,.5); }
.btn-clockout {
  background: rgba(239,68,68,.15);
  color: #ff8080;
  border: 2px solid rgba(239,68,68,.3) !important;
}
.btn-clockout:hover { background: var(--red); color: white; border-color: var(--red) !important; }

.gps-status {
  color: var(--gray400);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.gps-ok { color: var(--green); }
.gps-err { color: var(--red); }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-empty {
  text-align: center;
  padding: 32px;
  color: var(--gray400);
}
.timeline-empty i { display: block; margin-bottom: 8px; opacity: .4; }
.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--gray50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple);
}
.tl-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(155,61,232,.12);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tl-info { flex: 1; }
.tl-label { font-weight: 600; font-size: 14px; }
.tl-time { font-size: 12px; color: var(--gray400); }
.tl-loc { font-size: 12px; color: var(--gray600); display: flex; align-items: center; gap: 4px; }

/* ── GRIDS ───────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Stat mini cards */
.card.mt-24 .stat-icon-wrap, .card .stat-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
}
.purple { background: rgba(155,61,232,.12); color: var(--purple); }
.orange { background: rgba(244,112,58,.12); color: var(--orange); }
.yellow { background: rgba(245,158,11,.12); color: var(--yellow); }
.green  { background: rgba(34,197,94,.12);  color: var(--green); }
.red    { background: rgba(239,68,68,.12);  color: var(--red); }
.blue   { background: rgba(59,130,246,.12); color: var(--blue); }

.stat-num { font-size: 22px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 13px; color: var(--gray600); margin-top: 2px; }

/* ── STATS BAR ───────────────────────────────────── */
.stats-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.stats-bar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.stats-bar-item.green { background: rgba(34,197,94,.1); color: #16a34a; }
.stats-bar-item.yellow { background: rgba(245,158,11,.1); color: #d97706; }
.stats-bar-item.red { background: rgba(239,68,68,.1); color: #dc2626; }
.stats-bar-item.blue { background: rgba(59,130,246,.1); color: #2563eb; }

/* ── TABLE ───────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.cd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cd-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray600);
  border-bottom: 1.5px solid var(--gray100);
}
.cd-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray100);
  color: var(--navy);
}
.cd-table tr:last-child td { border-bottom: none; }
.cd-table tr:hover td { background: var(--gray50); }

.student-cell { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad2);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }

.time-chip {
  background: var(--gray100);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: monospace;
}

.status-select {
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%239990BB' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}
.status-present { background: rgba(34,197,94,.1); color: #16a34a; border-color: rgba(34,197,94,.3); }
.status-late { background: rgba(245,158,11,.1); color: #d97706; border-color: rgba(245,158,11,.3); }
.status-absent { background: rgba(239,68,68,.1); color: #dc2626; border-color: rgba(239,68,68,.3); }
.status-excused { background: rgba(59,130,246,.1); color: #2563eb; border-color: rgba(59,130,246,.3); }

/* ── QUICKBOOKS PANEL ─────────────────────────────── */
.qb-panel {
  background: linear-gradient(135deg, #1E1B2E, #2A2640);
  border: 1px solid rgba(155,61,232,.3);
  color: var(--white);
}
.qb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.qb-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
}
.qb-bolt { font-size: 20px; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.qb-bolt.lg { font-size: 40px; }
.qb-desc { color: var(--gray400); font-size: 14px; margin-bottom: 16px; }
.qb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.qb-sync-status {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(34,197,94,.1);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
}

.qb-banner {
  background: var(--navy);
  border: 1px solid rgba(155,61,232,.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.qb-banner-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.qb-banner-left h3 { color: var(--white); font-size: 18px; margin-bottom: 4px; }
.qb-banner-left p { color: var(--gray400); font-size: 14px; max-width: 500px; }
.qb-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qb-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.qb-status-dot.connected { background: var(--green); box-shadow: 0 0 0 4px rgba(34,197,94,.2); animation: pulse 2s infinite; }
.qb-connected-text { color: var(--green); font-size: 14px; font-weight: 600; }

/* ── KPI CARDS ───────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.kpi-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray100);
  border-top: 3px solid;
  transition: transform .2s;
}
.kpi-card:hover { transform: translateY(-2px); }
.kpi-purple { border-top-color: var(--purple); }
.kpi-green  { border-top-color: var(--green); }
.kpi-orange { border-top-color: var(--orange); }
.kpi-yellow { border-top-color: var(--yellow); }
.kpi-blue   { border-top-color: var(--blue); }
.kpi-red    { border-top-color: var(--red); }

.kpi-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.kpi-purple .kpi-icon { background: rgba(155,61,232,.1); color: var(--purple); }
.kpi-green  .kpi-icon { background: rgba(34,197,94,.1);  color: var(--green); }
.kpi-orange .kpi-icon { background: rgba(244,112,58,.1); color: var(--orange); }
.kpi-yellow .kpi-icon { background: rgba(245,158,11,.1); color: var(--yellow); }
.kpi-blue   .kpi-icon { background: rgba(59,130,246,.1); color: var(--blue); }
.kpi-red    .kpi-icon { background: rgba(239,68,68,.1);  color: var(--red); }

.kpi-num { font-size: 28px; font-weight: 800; line-height: 1; }
.kpi-label { font-size: 13px; color: var(--gray600); margin: 3px 0; }
.kpi-delta { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }

/* ── DASHBOARD GRID ──────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dash-chart-card { grid-column: 1 / -1; }

/* ── ALERT LIST ──────────────────────────────────── */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}
.alert-late  { background: rgba(245,158,11,.07); border-left: 3px solid var(--yellow); }
.alert-absent{ background: rgba(239,68,68,.07);  border-left: 3px solid var(--red); }
.alert-risk  { background: rgba(155,61,232,.07); border-left: 3px solid var(--purple); }

.alert-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.alert-late  .alert-icon { background: rgba(245,158,11,.15); color: var(--yellow); }
.alert-absent .alert-icon { background: rgba(239,68,68,.15); color: var(--red); }
.alert-risk  .alert-icon { background: rgba(155,61,232,.15); color: var(--purple); }

.alert-body { flex: 1; }
.alert-body strong { display: block; font-size: 14px; color: var(--navy); }
.alert-body span { font-size: 13px; color: var(--gray600); }
.alert-body time { display: block; font-size: 11px; color: var(--gray400); margin-top: 2px; }

/* Top list */
.top-list { display: flex; flex-direction: column; gap: 12px; }
.top-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-rank {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.rank-1 { background: #FFD700; color: #7A5800; }
.rank-2 { background: #C0C0C0; color: #555; }
.rank-3 { background: #CD7F32; color: white; }
.rank-4, .rank-5 { background: var(--gray100); color: var(--gray600); }

.top-info { flex: 1; }
.top-info strong { font-size: 13px; display: block; margin-bottom: 4px; }
.progress-bar-wrap {
  height: 5px;
  background: var(--gray100);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--grad);
  border-radius: 99px;
}
.top-stat { font-size: 12px; font-weight: 600; color: var(--gray600); white-space: nowrap; }

/* Chart legend */
.chart-legend { display: flex; gap: 16px; margin-top: 12px; justify-content: center; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray600); }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.leg-dot.green { background: var(--green); }
.leg-dot.yellow { background: var(--yellow); }
.leg-dot.red { background: var(--red); }

/* ── PROFILE PAGE ────────────────────────────────── */
.profile-hero { display: flex; align-items: center; gap: 20px; }
.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--grad);
  color: white;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(155,61,232,.35);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.profile-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid;
}
.profile-stat-card i { font-size: 24px; margin-bottom: 8px; display: block; }
.profile-stat-card.green { border-top-color: var(--green); }
.profile-stat-card.green i { color: var(--green); }
.profile-stat-card.blue  { border-top-color: var(--blue); }
.profile-stat-card.blue i { color: var(--blue); }
.profile-stat-card.yellow { border-top-color: var(--yellow); }
.profile-stat-card.yellow i { color: var(--yellow); }
.profile-stat-card.red  { border-top-color: var(--red); }
.profile-stat-card.red i { color: var(--red); }
.psc-num { font-size: 26px; font-weight: 800; color: var(--navy); }
.psc-label { font-size: 13px; color: var(--gray600); margin-top: 3px; }

/* Stipend Card */
.stipend-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.stipend-left { display: flex; align-items: center; gap: 16px; }
.stipend-icon {
  width: 52px; height: 52px;
  background: var(--grad);
  border-radius: 14px;
  color: white;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stipend-left h3 { font-size: 17px; margin-bottom: 3px; }
.stipend-left p { font-size: 13px; color: var(--gray600); }
.stipend-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.stipend-meter {
  width: 240px;
  height: 8px;
  background: var(--gray100);
  border-radius: 99px;
  overflow: hidden;
}
.meter-bar { height: 100%; background: var(--grad); border-radius: 99px; }
.stipend-details { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.green-text { color: var(--green); font-size: 13px; font-weight: 500; }
.yellow-text { color: var(--yellow); font-size: 13px; font-weight: 500; }
.red-text { color: var(--red); font-size: 13px; font-weight: 500; }

/* ── REPORTS PAGE ────────────────────────────────── */
.report-builder { margin-bottom: 0; }
.report-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 16px;
}
.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}
.date-range span { color: var(--gray400); font-size: 13px; white-space: nowrap; }
.report-actions { display: flex; gap: 8px; align-items: center; }

.export-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--gray100);
  cursor: pointer;
  transition: all .2s;
}
.export-card:hover { border-color: var(--purple); transform: translateY(-2px); box-shadow: var(--shadow2); }
.export-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}
.export-icon.green { background: rgba(34,197,94,.1); color: var(--green); }
.export-icon.blue  { background: rgba(59,130,246,.1); color: var(--blue); }
.export-icon.purple { background: rgba(155,61,232,.1); color: var(--purple); }
.export-card h4 { font-size: 16px; margin-bottom: 6px; }
.export-card p { font-size: 13px; color: var(--gray600); margin-bottom: 14px; }
.btn-export-sm {
  background: var(--gray100);
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all .2s;
}
.btn-export-sm:hover { background: var(--purple); color: white; }

/* ── SETTINGS PAGE ───────────────────────────────── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.settings-section { padding: 24px; }
.settings-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--gray100);
}
.settings-section-header h3 { font-size: 16px; }
.settings-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.settings-icon.purple { background: rgba(155,61,232,.1); color: var(--purple); }
.settings-icon.green  { background: rgba(34,197,94,.1);  color: var(--green); }
.settings-icon.orange { background: rgba(244,112,58,.1); color: var(--orange); }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray100);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { flex: 1; }
.setting-label strong { font-size: 14px; display: block; margin-bottom: 2px; }
.setting-label p { font-size: 12px; color: var(--gray600); margin: 0; }
.setting-control { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.setting-control.wide { width: 220px; }

.num-input {
  width: 60px;
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: var(--navy);
  outline: none;
}
.num-input:focus { border-color: var(--purple); }

.form-control.sm { width: auto; }
.form-control.sm { padding: 7px 10px; }

/* Toggle Switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray200);
  border-radius: 24px;
  transition: .3s;
}
.slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: .3s;
}
.toggle input:checked + .slider { background: var(--purple); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* QB API list */
.qb-connect-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(34,197,94,.08);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.qb-account { margin-left: auto; font-size: 13px; color: var(--gray600); }

.qb-api-info {
  background: var(--navy);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 16px;
}
.qb-api-info h4 {
  color: var(--white);
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.api-list { display: flex; flex-direction: column; gap: 8px; }
.api-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.api-method {
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  font-family: monospace;
  flex-shrink: 0;
}
.api-method.get  { background: rgba(34,197,94,.2);  color: #22C55E; }
.api-method.post { background: rgba(244,112,58,.2); color: var(--orange); }
.api-item code {
  font-size: 12px;
  color: var(--purple);
  background: rgba(155,61,232,.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}
.api-desc { font-size: 12px; color: var(--gray400); }
.qb-actions.mt-16 { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ── MODAL ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,27,46,.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.modal-header h3 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gray400); }
.modal-textarea {
  width: 100%;
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  min-height: 100px;
  resize: vertical;
  outline: none;
}
.modal-textarea:focus { border-color: var(--purple); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ── SEARCH ──────────────────────────────────────── */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray50);
  border: 1.5px solid var(--gray100);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
}
.search-wrap i { color: var(--gray400); font-size: 13px; }
.search-wrap input {
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: var(--navy);
  width: 180px;
}

/* ── MISC ────────────────────────────────────────── */
.date-picker {
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  color: var(--navy);
  outline: none;
}
.date-picker:focus { border-color: var(--purple); }

.select-sm {
  border: 1.5px solid var(--gray200);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--navy);
  outline: none;
  background: var(--white);
}

.link-sm {
  font-size: 13px;
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--green);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dash-chart-card { grid-column: 1; }
  .settings-grid { grid-template-columns: 1fr; }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .cd-nav-links { display: none; }
  .cd-hamburger { display: block; }
  .cd-main { padding: 20px 16px 40px; }
  .page-header { flex-direction: column; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .report-form { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
  .clock-time { font-size: 40px; }
  .clock-widget { padding: 28px 24px; }
  .qb-banner { flex-direction: column; }
  .stipend-card { flex-direction: column; }
  .stipend-right { align-items: flex-start; }
  .stipend-meter { width: 100%; }
  .profile-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .profile-stats-grid { grid-template-columns: 1fr 1fr; }
  .header-actions { width: 100%; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .stats-bar { flex-direction: column; }
}

/* ── AI KEY SETUP PANEL ──────────────────────────── */
.ai-key-setup {
  background: var(--navy);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 20px;
  border: 1px solid rgba(155,61,232,.25);
}
.ai-key-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.ai-key-header > i {
  font-size: 22px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 2px;
  flex-shrink: 0;
}
.ai-key-header strong { color: var(--white); display: block; margin-bottom: 2px; }
.ai-key-header p { color: var(--gray400); font-size: 13px; margin: 0; }
.ai-key-status { margin-left: auto; font-size: 13px; white-space: nowrap; }
.ai-key-fields { display: flex; flex-direction: column; gap: 12px; }
.ai-key-fields .form-group label { color: var(--gray200); }
.ai-key-fields .form-control { background: rgba(255,255,255,.06); border-color: rgba(155,61,232,.3); color: var(--white); }
.ai-key-fields .form-control::placeholder { color: var(--gray600); }
.ai-key-fields .form-control:focus { border-color: var(--purple); background: rgba(255,255,255,.1); }
.ai-key-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-key-note {
  color: var(--gray400);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   LOCATION VERIFICATION SYSTEM — CSS
   ═══════════════════════════════════════════════════════ */

/* ── Geofence Proximity Banner ──────────────────────── */
.geo-banner {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 16px 20px 10px;
  margin-bottom: 16px;
  border: 1px solid rgba(155,61,232,.25);
  overflow: hidden;
}
.geo-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.geo-pulse {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--gray400);
}
.geo-pulse.inside  { background: var(--green);  box-shadow: 0 0 0 6px rgba(34,197,94,.2);  animation: pulse 1.5s infinite; }
.geo-pulse.outside { background: var(--red);    box-shadow: 0 0 0 6px rgba(239,68,68,.2); }
.geo-pulse.partial { background: var(--yellow); box-shadow: 0 0 0 6px rgba(245,158,11,.2); }
.geo-pulse.scanning{ background: var(--purple); animation: pulse 0.8s infinite; }

.geo-banner-text { flex: 1; }
.geo-banner-text strong { color: var(--white); display: block; font-size: 15px; }
.geo-banner-text span   { color: var(--gray400); font-size: 13px; }
.geo-banner-badge .badge { font-size: 12px; }

.geo-distance-bar {
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 99px;
  overflow: hidden;
}
.geo-distance-fill {
  height: 100%;
  background: var(--grad);
  border-radius: 99px;
  transition: width 0.8s ease;
}

/* ── Location Verification Panel ────────────────────── */
.location-verify-panel {
  background: var(--white);
  border: 2px solid var(--purple);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(155,61,232,.2);
}
.lv-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.lv-shield {
  font-size: 28px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}
.lv-header > div { flex: 1; }
.lv-header strong { font-size: 17px; display: block; margin-bottom: 2px; }
.lv-header p { font-size: 13px; color: var(--gray600); margin: 0; }
.lv-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gray400); }

.lv-checks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.lv-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--gray50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gray200);
  transition: border-color .3s;
}
.lv-check.pass { border-left-color: var(--green);  background: rgba(34,197,94,.05); }
.lv-check.fail { border-left-color: var(--red);    background: rgba(239,68,68,.05); }
.lv-check.warn { border-left-color: var(--yellow); background: rgba(245,158,11,.05); }

.lvc-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--gray100);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--gray600); flex-shrink: 0;
}
.lv-check.pass .lvc-icon { background: rgba(34,197,94,.12); color: var(--green); }
.lv-check.fail .lvc-icon { background: rgba(239,68,68,.12);  color: var(--red); }
.lv-check.warn .lvc-icon { background: rgba(245,158,11,.12); color: var(--yellow); }

.lvc-info { flex: 1; }
.lvc-info strong { font-size: 13px; display: block; }
.lvc-info span   { font-size: 12px; color: var(--gray600); }
.lvc-status { font-size: 16px; }
.lvc-status .fa-check        { color: var(--green); }
.lvc-status .fa-xmark        { color: var(--red); }
.lvc-status .fa-minus        { color: var(--yellow); }

.lv-result {
  text-align: center;
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.lv-result.result-pass { background: rgba(34,197,94,.08);  border: 1.5px solid rgba(34,197,94,.3); }
.lv-result.result-fail { background: rgba(239,68,68,.08);  border: 1.5px solid rgba(239,68,68,.3); }
.lv-result.result-warn { background: rgba(245,158,11,.08); border: 1.5px solid rgba(245,158,11,.3); }

.lv-result-icon { font-size: 36px; margin-bottom: 8px; }
.lv-result.result-pass .lv-result-icon { color: var(--green); }
.lv-result.result-fail .lv-result-icon { color: var(--red); }
.lv-result.result-warn .lv-result-icon { color: var(--yellow); }

.lv-result-message { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.lv-result-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ── Mini Map ────────────────────────────────────────── */
.mini-map {
  height: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e8f0fe;
  position: relative;
}
.mini-map-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--gray400); gap: 8px;
}
.map-legend {
  display: flex; gap: 16px; margin-top: 10px;
  flex-wrap: wrap;
}
.map-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray600); }
.map-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.map-dot.campus { background: var(--purple); }
.map-dot.you    { background: var(--blue); }
.map-dot.fence  { background: rgba(155,61,232,.3); border: 2px solid var(--purple); }

/* ── Geofence Config Page ────────────────────────────── */
.geo-config-status {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.geo-status-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray100);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow);
}
.geo-status-item i { color: var(--gray400); }
.geo-status-item.active { border-color: var(--green); }
.geo-status-item.active i { color: var(--green); }

.geo-config-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
  align-items: start;
}

.geo-form { display: flex; flex-direction: column; gap: 18px; }
.geo-coord-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.geo-slider {
  -webkit-appearance: none;
  width: 100%; height: 6px;
  background: var(--gray200);
  border-radius: 99px;
  outline: none;
  margin-top: 8px;
}
.geo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--grad);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(155,61,232,.4);
}
.slider-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--gray400); margin-top: 4px;
}
.label-hint { font-size: 11px; color: var(--gray400); font-weight: 400; margin-left: 4px; }

.geo-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: monospace;
  font-size: 13px;
}

.geo-preset-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.preset-label { font-size: 13px; color: var(--gray600); font-weight: 600; }
.btn-preset {
  background: var(--gray100);
  border: 1.5px solid var(--gray200);
  border-radius: 99px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: var(--navy);
}
.btn-preset:hover, .btn-preset.active {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}

.geo-right-col { display: flex; flex-direction: column; gap: 16px; }

.geo-map-canvas {
  height: 320px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #e8f0fe;
  position: relative;
}
.geo-map-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--gray400); gap: 8px;
}
.geo-map-hint { font-size: 12px; color: var(--gray400); margin-top: 8px; text-align: center; }

/* ── Live Test Panel ────────────────────────────────── */
.geo-test-idle {
  text-align: center; padding: 20px;
  color: var(--gray400);
}
.geo-test-idle i { font-size: 28px; margin-bottom: 8px; display: block; opacity: .4; }

.geo-test-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.geo-tc {
  background: var(--gray50);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
  border: 1.5px solid var(--gray100);
  transition: all .3s;
}
.geo-tc i:first-child { color: var(--purple); font-size: 16px; }
.geo-tc span { font-size: 12px; color: var(--gray600); }
.geo-tc strong { font-size: 14px; color: var(--navy); }
.geo-tc.pass { border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.05); }
.geo-tc.fail { border-color: rgba(239,68,68,.3);  background: rgba(239,68,68,.05); }
.geo-tc.warn { border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.05); }
.gtc-spin { font-size: 12px; color: var(--gray400); }

/* ── Audit Log ───────────────────────────────────────── */
.audit-stats-row {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.audit-stat {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  flex: 1; min-width: 100px;
}
.audit-stat i { font-size: 16px; }
.audit-stat span { font-size: 22px; font-weight: 800; }
.audit-stat small { font-size: 11px; font-weight: 400; color: inherit; opacity: .7; margin-left: auto; }
.audit-stat.green  { background: rgba(34,197,94,.1); color: #16a34a; }
.audit-stat.yellow { background: rgba(245,158,11,.1); color: #d97706; }
.audit-stat.red    { background: rgba(239,68,68,.1);  color: #dc2626; }
.audit-stat.blue   { background: rgba(59,130,246,.1); color: #2563eb; }

.badge-full    { background: rgba(34,197,94,.12); color: #16a34a; }
.badge-partial { background: rgba(245,158,11,.12); color: #d97706; }
.badge-failed  { background: rgba(239,68,68,.12);  color: #dc2626; }

/* ── Button: disabled state ─────────────────────────── */
.btn-clock:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
  .geo-config-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .geo-coord-row { grid-template-columns: 1fr; }
  .geo-test-checks { grid-template-columns: 1fr; }
  .audit-stats-row { grid-template-columns: 1fr 1fr; }
}

/* ── Geofence Proximity Banner ───────────────────────── */
.geo-banner { background: var(--card); border: 1.5px solid var(--gray100); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); overflow: hidden; }
.geo-banner-inner { display: flex; align-items: center; gap: 14px; }
.geo-pulse { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; animation: pulse 2s infinite; }
.geo-pulse.pulse-green  { background: var(--green); }
.geo-pulse.pulse-red    { background: var(--red); }
.geo-pulse.pulse-yellow { background: var(--yellow); }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(1.3)} }
.geo-banner-text { flex: 1; }
.geo-banner-text strong { display: block; font-size: .95rem; color: var(--navy); }
.geo-banner-text span { font-size: .82rem; color: var(--gray600); }
.geo-banner-badge span { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; letter-spacing: .05em; }
.geo-badge-ok   { background: rgba(34,197,94,.15); color: #16a34a; }
.geo-badge-warn { background: rgba(244,112,58,.15); color: var(--orange); }
.geo-distance-bar { height: 4px; background: var(--gray100); border-radius: 2px; margin-top: 10px; }
.geo-distance-fill { height: 4px; background: var(--green); border-radius: 2px; transition: width .8s ease, background .5s; }

/* ── Location Verification Panel ────────────────────── */
.location-verify-panel { background: var(--card); border: 1.5px solid rgba(155,61,232,.3); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; box-shadow: 0 4px 20px rgba(155,61,232,.12); }
.lv-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.lv-shield { font-size: 2rem; color: var(--purple); flex-shrink: 0; }
.lv-header > div { flex: 1; }
.lv-header strong { font-size: 1.1rem; color: var(--navy); display: block; }
.lv-header p { font-size: .85rem; color: var(--gray600); margin: 2px 0 0; }
.lv-close { background: none; border: none; cursor: pointer; color: var(--gray400); font-size: 1.1rem; padding: 4px 8px; margin-left: auto; }
.lv-close:hover { color: var(--navy); }
.lv-checks { display: grid; gap: 10px; margin-bottom: 20px; }
.lv-check { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1.5px solid var(--gray100); border-radius: var(--radius-sm); transition: all .3s; }
.lv-check.check-ok   { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.05); }
.lv-check.check-fail { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.05); }
.lv-check.check-warn { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.05); }
.lvc-icon { width: 34px; height: 34px; background: rgba(155,61,232,.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--purple); flex-shrink: 0; }
.lvc-info { flex: 1; }
.lvc-info strong { font-size: .88rem; color: var(--navy); display: block; }
.lvc-info span { font-size: .8rem; color: var(--gray600); }
.lvc-status { font-size: 1.1rem; }
.lv-result { text-align: center; padding: 20px; border-radius: var(--radius-sm); border: 1.5px solid var(--gray100); }
.lv-result-icon { margin-bottom: 10px; }
.lv-result-message { font-size: .95rem; color: var(--navy); margin-bottom: 16px; line-height: 1.5; }
.lv-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── Mini Map ────────────────────────────────────────── */
.mini-map { border-radius: 10px; overflow: hidden; min-height: 200px; background: #1E1B2E; }
.mini-map-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; color: var(--gray400); gap: 8px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 0 2px; font-size: .8rem; color: var(--gray600); }
.map-legend-item { display: flex; align-items: center; gap: 6px; }
.map-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-dot.campus { background: #3B82F6; }
.map-dot.you    { background: #22C55E; }
.map-dot.fence  { background: #9B3DE8; border: 2px dashed #9B3DE8; background: transparent; }

/* ── Timeline enhancements ───────────────────────────── */
.tl-flag-tag { display: inline-block; font-size: .7rem; font-weight: 700; background: rgba(244,112,58,.15); color: var(--orange); padding: 1px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle; }
.tl-flagged { border-left-color: var(--orange) !important; }
.tl-icon-warn { background: rgba(244,112,58,.1) !important; color: var(--orange) !important; }

/* ── Geofence test states ────────────────────────────── */
.geo-test-success { text-align:center; padding:18px; background:rgba(34,197,94,.07); border-radius:var(--radius-sm); display:flex; align-items:center; gap:14px; }
.geo-test-fail    { text-align:center; padding:18px; background:rgba(244,112,58,.07); border-radius:var(--radius-sm); display:flex; align-items:center; gap:14px; }
.geo-test-success p, .geo-test-fail p { margin:0; text-align:left; font-size:.9rem; color:var(--navy); line-height:1.5; }
.gtc-ok   { border-color: rgba(34,197,94,.4)  !important; background: rgba(34,197,94,.05)  !important; }
.gtc-fail { border-color: rgba(239,68,68,.4)  !important; background: rgba(239,68,68,.05)  !important; }
.gtc-na   { border-color: rgba(245,158,11,.3) !important; background: rgba(245,158,11,.04) !important; }

/* ── Audit log table badges ──────────────────────────── */
.audit-badge { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:20px; font-size:.75rem; font-weight:700; }
.audit-badge.full    { background:rgba(34,197,94,.12); color:#16a34a; }
.audit-badge.partial { background:rgba(245,158,11,.12); color:#d97706; }
.audit-badge.failed  { background:rgba(239,68,68,.12); color:#dc2626; }
.student-id-chip { font-size:.74rem; font-weight:700; background:rgba(155,61,232,.1); color:var(--purple); padding:2px 7px; border-radius:6px; }
.wifi-ok   { color:#16a34a; font-size:.82rem; }
.wifi-none { color:var(--gray400); font-size:.82rem; }

/* ── Leaflet map override for dark theme ─────────────── */
#geoMap { height: 320px !important; border-radius: 10px; background: #1E1B2E; }
.leaflet-popup-content-wrapper { background: var(--navy); color: white; border-radius: 10px; }
.leaflet-popup-tip { background: var(--navy); }
.leaflet-popup-content { color: white; font-size: 13px; }
