/* ── RESET & BASE ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: 'Figtree', sans-serif;
  background: #0a0a0f;
  color: #e2e8f0;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── APP SHELL ─────────────────────────────────────────────────────────────── */
#app {
  height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: #0f0f17;
}

/* ── SCREENS ───────────────────────────────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }

/* ── LOGIN SCREEN ──────────────────────────────────────────────────────────── */
.login-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .3;
}
.orb1 { width: 300px; height: 300px; top: -100px; left: -80px; background: #6366f1; }
.orb2 { width: 200px; height: 200px; bottom: 100px; right: -50px; background: #ec4899; }
.orb3 { width: 150px; height: 150px; top: 200px; right: 30px; background: #38bdf8; opacity: .2; }

.login-content {
  position: relative;
  z-index: 1;
  padding: 48px 24px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
}
/* ── LOGIN LOGO ─────────────────────────────────────────────────────────────── */
.login-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 32px;
}
.login-logo-img {
  width: 220px;
  height: auto;
  object-fit: contain;
  margin-bottom: 2px;
  background: transparent;
}
.login-tagline {
  font-size: 19px;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 4px;
  margin-bottom: 0;
  margin-left: 2px;
  font-weight: 600;
}
.login-card {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 24px;
  padding: 24px;
  flex: 1;
}
.login-card h2 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
}
.login-sub { font-size: 13px; color: #475569; margin-bottom: 20px; }
.employee-select-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.emp-select-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0f0f17;
  border: 1px solid #1e1e2e;
  border-radius: 14px;
  padding: 10px 14px;
  transition: all .15s;
  color: #e2e8f0;
  text-align: left;
}
.emp-select-btn:hover { border-color: #6366f1; background: #1a1a2e; }
.esb-info { flex: 1; }
.esb-name { font-size: 14px; font-weight: 600; color: #f1f5f9; }
.esb-shift { font-size: 11px; color: #475569; font-family: 'DM Mono', monospace; margin-top: 1px; }
.esb-arrow { font-size: 18px; color: #374151; }
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #374151;
  font-size: 12px;
  margin: 16px 0;
}
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: #1e1e2e; }
.btn-manager {
  width: 100%;
  background: #161622;
  border: 1px solid #6366f130;
  border-radius: 14px;
  padding: 12px;
  color: #a5b4fc;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s;
}
.btn-manager:hover { background: #1a1a2e; border-color: #6366f1; }
.mgr-icon { font-size: 16px; }

/* ── MANAGER LOGIN ─────────────────────────────────────────────────────────── */
#manager-login-screen {
  background: #0f0f17;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #1e1e2e;
}
.back-btn {
  background: none;
  border: none;
  color: #6366f1;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
}
.topbar-title { font-size: 15px; font-weight: 700; color: #f1f5f9; }
.manager-login-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mgr-logo {
  font-size: 48px;
  color: #6366f1;
  margin-bottom: 16px;
}
.manager-login-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 8px;
}
.mgr-sub { font-size: 13px; color: #475569; margin-bottom: 32px; }
.pin-display {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  padding: 12px 20px;
  background: #161622;
  border-radius: 16px;
  border: 1px solid #1e1e2e;
}
.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #374151;
  transition: all .2s;
}
.pin-dot.filled { background: #6366f1; border-color: #6366f1; }
.pin-display.shake { animation: shake .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 240px;
  margin-bottom: 16px;
}
.pin-key {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 14px;
  height: 56px;
  font-size: 20px;
  font-weight: 700;
  color: #e2e8f0;
  font-family: 'Syne', sans-serif;
  transition: all .1s;
}
.pin-key:active { background: #1e1e2e; transform: scale(.95); }
.pin-clear { font-size: 18px; color: #ef4444; }
.pin-enter { background: #6366f1; color: white; border-color: #6366f1; font-size: 15px; }
.pin-hint { font-size: 11px; color: #374151; margin-top: 4px; }

/* ── EMPLOYEE SCREEN ───────────────────────────────────────────────────────── */
.emp-header {
  background: #0f0f17;
  padding: 48px 20px 16px;
  border-bottom: 1px solid #1e1e2e;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.emp-greeting { font-size: 12px; color: #475569; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.emp-name {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.5px;
}
.logout-btn {
  background: transparent;
  border: 1px solid #ef444440;
  color: #ef4444;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.logout-btn:hover {
  background: #ef444415;
  border-color: #ef4444;
}
.emp-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: none;
}
.emp-body::-webkit-scrollbar { display: none; }

/* Employee Home */
.emp-home-view { display: flex; flex-direction: column; gap: 14px; padding-bottom: 80px; }
.today-date-card {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 20px;
  padding: 16px 20px;
}
.today-day { font-size: 12px; color: #475569; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.today-full {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 2px;
}
.today-shift {
  font-size: 12px;
  color: #6366f1;
  font-family: 'DM Mono', monospace;
  margin-top: 6px;
  background: #6366f110;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #6366f120;
}

.status-row { display: flex; align-items: center; gap: 10px; }
.live-dot { color: #22c55e; font-size: 11px; font-weight: 700; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.clock-section { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.clock-btn {
  width: 100%;
  padding: 18px;
  border-radius: 20px;
  border: none;
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all .2s;
  letter-spacing: .5px;
}
.clock-in-btn { background: #22c55e; color: #000; }
.clock-in-btn:hover { background: #16a34a; transform: scale(1.01); }
.clock-out-btn { background: #ef4444; color: white; }
.clock-out-btn:hover { background: #dc2626; transform: scale(1.01); }
.clock-btn:disabled { opacity: .5; transform: none !important; }
.clock-icon { font-size: 20px; }
.geo-note { font-size: 11px; color: #374151; text-align: center; }

.clocked-in-card {
  width: 100%;
  background: #22c55e0f;
  border: 1px solid #22c55e20;
  border-radius: 16px;
  padding: 16px 20px;
  text-align: center;
}
.ci-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 1px; }
.ci-time { font-family: 'DM Mono', monospace; font-size: 28px; font-weight: 600; color: #22c55e; }
.ci-duration { font-size: 12px; color: #6b7280; margin-top: 4px; }

.done-card {
  width: 100%;
  background: #161622;
  border: 1px solid #6366f130;
  border-radius: 20px;
  padding: 20px;
  text-align: center;
}
.done-icon { font-size: 32px; color: #6366f1; }
.done-title { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: #f1f5f9; margin: 4px 0; }
.done-times { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'DM Mono', monospace; font-size: 14px; color: #9ca3af; }
.done-sep { color: #374151; }
.done-duration { font-size: 13px; color: #6366f1; margin-top: 8px; font-weight: 600; }

.leave-notice {
  width: 100%;
  background: #f472b60f;
  border: 1px solid #f472b620;
  border-radius: 16px;
  padding: 16px 20px;
  text-align: center;
  font-size: 14px;
  color: #f472b6;
  font-weight: 600;
}

.emp-quick-stats {
  display: flex;
  gap: 10px;
}
.qs-item {
  flex: 1;
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
}
.qs-val { font-family: 'DM Mono', monospace; font-size: 24px; font-weight: 600; color: #6366f1; line-height: 1; }
.qs-label { font-size: 10px; color: #475569; margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

.btn-leave-request {
  width: 100%;
  background: #161622;
  border: 1px solid #6366f130;
  border-radius: 14px;
  padding: 13px;
  color: #a5b4fc;
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
}
.btn-leave-request:hover { background: #1a1a2e; border-color: #6366f1; }

/* ── MANAGER SCREEN ────────────────────────────────────────────────────────── */
.mgr-header {
  background: #0f0f17;
  padding: 48px 20px 14px;
  border-bottom: 1px solid #1e1e2e;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.mgr-header-title {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.5px;
}
.mgr-header-sub { color: #6366f1; }
.mgr-date { font-size: 11px; color: #475569; margin-top: 2px; }
.mgr-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 0;
  scrollbar-width: none;
}
.mgr-body::-webkit-scrollbar { display: none; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.stat-card {
  background: #161622;
  border: 1px solid;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}
.stat-val { font-family: 'DM Mono', monospace; font-size: 24px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 9px; color: #6b7280; margin-top: 3px; text-transform: uppercase; letter-spacing: .5px; }

/* Emp Row */
.emp-row {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.emp-row:hover { border-color: #374151; }
.emp-row-info { flex: 1; min-width: 0; }
.emp-row-name { font-size: 14px; font-weight: 600; color: #f1f5f9; }
.emp-row-role { font-size: 11px; color: #475569; font-family: 'DM Mono', monospace; }
.emp-row-times { font-size: 11px; color: #6b7280; margin-top: 2px; font-family: 'DM Mono', monospace; }
.row-actions { display: flex; gap: 4px; margin-top: 4px; }

.live-header {
  font-size: 11px;
  font-weight: 700;
  color: #22c55e;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-divider { height: 1px; background: #1e1e2e; margin: 12px 0; }

/* Mark cards */
.mark-card {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}
.date-picker-row { margin-bottom: 14px; }
.date-pick { max-width: 200px; }
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: #0f0f17;
  color: #6b7280;
  border: 1px solid #1e1e2e;
  transition: all .1s;
  cursor: pointer;
}
.chip:hover { border-color: #374151; color: #9ca3af; }
.chip-active { font-weight: 700; }

.time-btn {
  flex: 1;
  background: #0f0f17;
  border: 1px solid #1e1e2e;
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  font-family: 'DM Mono', monospace;
}
.time-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Leave cards */
.leave-card {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-left: 3px solid;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}
.lc-type { font-size: 14px; font-weight: 600; color: #f1f5f9; margin-bottom: 2px; }
.lc-dates { font-size: 12px; color: #6b7280; font-family: 'DM Mono', monospace; }
.lc-reason { font-size: 11px; color: #475569; font-style: italic; margin-top: 4px; }

.leave-mgr-card {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-left: 3px solid;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.lmc-name { font-size: 14px; font-weight: 700; color: #f1f5f9; }
.lmc-type { font-size: 13px; color: #9ca3af; }
.lmc-dates { font-size: 11px; color: #6b7280; font-family: 'DM Mono', monospace; margin-top: 2px; }
.lmc-reason { font-size: 11px; color: #475569; font-style: italic; margin-top: 4px; }
.leave-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-approve { flex: 1; padding: 9px; background: #052e16; color: #22c55e; border: 1px solid #22c55e30; border-radius: 10px; font-size: 13px; font-weight: 700; }
.btn-reject { flex: 1; padding: 9px; background: #2d0000; color: #ef4444; border: 1px solid #ef444430; border-radius: 10px; font-size: 13px; font-weight: 700; }
.pending-header { color: #f59e0b !important; }

/* Reports */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 8px;
}
.month-btn {
  background: #0f0f17;
  border: 1px solid #1e1e2e;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  color: #9ca3af;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.month-label { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: #f1f5f9; }
.work-days-note { font-size: 11px; color: #374151; margin-bottom: 12px; }
.report-card {
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}
.progress-bar { height: 4px; background: #1e1e2e; border-radius: 99px; margin-bottom: 10px; overflow: hidden; }
.progress-fill { height: 4px; border-radius: 99px; transition: width .4s; }
.report-stats { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.rs-item { font-size: 12px; color: #6b7280; }

/* History */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #161622;
  border: 1px solid #1e1e2e;
  border-radius: 12px;
  padding: 10px 12px;
}
.hist-date { text-align: center; min-width: 32px; }
.hist-day { font-size: 9px; color: #475569; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.hist-num { font-family: 'DM Mono', monospace; font-size: 18px; font-weight: 700; color: #9ca3af; line-height: 1; }
.hist-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hist-times { font-size: 11px; color: #6b7280; font-family: 'DM Mono', monospace; }
.hist-duration { font-size: 10px; color: #475569; }

/* ── BOTTOM NAV ────────────────────────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  background: #0f0f17;
  border-top: 1px solid #1e1e2e;
  padding: 8px 4px 20px;
  position: relative;
  z-index: 10;
}
.nav-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 12px;
  transition: all .15s;
  color: #374151;
}
.nav-item.active { background: #1a1a2e; color: #a5b4fc; }
.nav-icon { font-size: 18px; line-height: 1; }
.nav-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* ── AVATAR ────────────────────────────────────────────────────────────────── */
.avatar {
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'Syne', sans-serif;
  flex-shrink: 0;
}

/* ── BADGE ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid;
  white-space: nowrap;
  text-transform: capitalize;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── TAGS ──────────────────────────────────────────────────────────────────── */
.intern-tag {
  font-size: 9px;
  font-weight: 700;
  background: #a78bfa15;
  color: #a78bfa;
  border: 1px solid #a78bfa30;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 4px;
}

/* ── MINI BUTTONS ──────────────────────────────────────────────────────────── */
.mini-btn {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: none;
}
.mini-btn.green { background: #052e16; color: #22c55e; }
.mini-btn.red { background: #2d0000; color: #ef4444; }

/* ── SECTION HEADERS ───────────────────────────────────────────────────────── */
.section-header {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.sub-header {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.empty-state {
  text-align: center;
  color: #374151;
  font-size: 13px;
  padding: 32px 16px;
}

/* ── FORMS ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 12px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #0f0f17;
  border: 1px solid #1e1e2e;
  border-radius: 10px;
  padding: 10px 12px;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #6366f1; }
.form-select { appearance: none; }
.form-textarea { resize: none; }

/* ── MODAL ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #161622;
  width: 100%;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px;
  border-top: 1px solid #1e1e2e;
  max-height: 90dvh;
  overflow-y: auto;
}
.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  margin-bottom: 4px;
}
.modal-msg { font-size: 13px; color: #6b7280; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.btn-primary {
  flex: 1;
  padding: 12px;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
}
.btn-secondary {
  flex: 1;
  padding: 12px;
  background: #1e1e2e;
  color: #9ca3af;
  border: 1px solid #374151;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}

/* Detail modal */
.detail-time-row { display: flex; align-items: flex-end; gap: 12px; background: #0f0f17; border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.detail-time-item { flex: 1; }
.dt-label { font-size: 10px; color: #475569; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.dt-val { font-family: 'DM Mono', monospace; font-size: 16px; font-weight: 600; color: #f1f5f9; }

/* ── TOAST ─────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e1e2e;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 99px;
  border: 1px solid #374151;
  white-space: nowrap;
  opacity: 0;
  transition: all .25s;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #052e16; border-color: #22c55e40; color: #22c55e; }
.toast.error { background: #2d0000; border-color: #ef444440; color: #ef4444; }
.toast.warn { background: #2d1a00; border-color: #f59e0b40; color: #f59e0b; }

/* ── SPINNER ───────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── INSTALL BANNER ────────────────────────────────────────────────────────── */
#install-banner {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: #1a1a2e;
  border-top: 1px solid #6366f140;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 300;
  font-size: 13px;
  color: #a5b4fc;
}
#install-btn {
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
#dismiss-install { background: none; border: none; color: #374151; margin-left: auto; }

/* ── SAFE AREA ─────────────────────────────────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .emp-header, .mgr-header { padding-top: max(48px, env(safe-area-inset-top)); }
}

/* ── PHONE LOGIN ───────────────────────────────────────────────────────────── */
.phone-input-row {
  display: flex;
  align-items: center;
  background: #0f0f17;
  border: 1.5px solid #1e1e2e;
  border-radius: 14px;
  padding: 0 14px;
  margin-bottom: 14px;
  transition: border-color .15s;
}
.phone-input-row:focus-within { border-color: #6366f1; }
.phone-prefix {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  color: #6366f1;
  font-weight: 600;
  padding-right: 10px;
  border-right: 1px solid #1e1e2e;
  margin-right: 10px;
  line-height: 48px;
}
.phone-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  color: #f1f5f9;
  padding: 14px 0;
  letter-spacing: 2px;
}
.phone-field::placeholder { color: #374151; letter-spacing: 0; font-size: 13px; font-family: 'Figtree', sans-serif; }
.btn-continue {
  width: 100%;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  transition: all .15s;
  letter-spacing: .3px;
}
.btn-continue:hover { background: #4f46e5; transform: scale(1.01); }

/* ── REGISTER SCREEN ───────────────────────────────────────────────────────── */
.register-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 80px;
  scrollbar-width: none;
}
.register-body::-webkit-scrollbar { display: none; }
.reg-logo { font-size: 48px; text-align: center; margin-bottom: 12px; }
.register-body h2 {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #f1f5f9;
  text-align: center;
  margin-bottom: 6px;
}
.register-body .mgr-sub { text-align: center; margin-bottom: 24px; }
.reg-list { display: flex; flex-direction: column; gap: 8px; }

/* ── EMP PIN SCREEN ────────────────────────────────────────────────────────── */
.emp-pin-avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.emp-pin-avatar-wrap .avatar {
  border-radius: 18px !important;
  font-size: 20px !important;
}

/* ── INSTALL MODAL ─────────────────────────────────────────────────────────── */
#install-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity .3s ease;
}
#install-modal.visible { opacity: 1; }
#install-modal.visible .install-modal-card { transform: translateY(0); }

.install-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.install-modal-card {
  position: relative;
  width: 100%;
  background: #13131f;
  border-top: 1px solid #1e1e2e;
  border-radius: 24px 24px 0 0;
  padding: 28px 24px 40px;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  z-index: 1;
}
.install-modal-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.install-modal-logo img {
  width: 100px;
  height: auto;
}
.install-modal-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #f1f5f9;
  text-align: center;
  margin: 0 0 6px;
}
.install-modal-sub {
  text-align: center;
  color: #64748b;
  font-size: 14px;
  margin: 0 0 24px;
}
.install-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
}
.step-icon {
  min-width: 26px;
  height: 26px;
  background: #6366f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  font-family: 'Syne', sans-serif;
}
.step-share-icon {
  font-size: 16px;
  display: inline-block;
  transform: rotate(0deg);
}
.install-warning {
  background: #1e1a00;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #fbbf24;
  margin-top: 4px;
}
.install-btn-primary {
  width: 100%;
  background: #6366f1;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 14px;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  transition: background .15s;
}
.install-btn-primary:hover { background: #4f46e5; }
.install-btn-dismiss {
  width: 100%;
  background: transparent;
  border: 1px solid #1e1e2e;
  border-radius: 14px;
  padding: 13px;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  color: #475569;
  transition: color .15s;
}
.install-btn-dismiss:hover { color: #94a3b8; }

/* ── INSTALL APP BUTTON ────────────────────────────────────────────────────── */
.btn-install-app {
  width: 100%;
  background: transparent;
  border: 1px dashed #2d2d4a;
  border-radius: 14px;
  padding: 12px;
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  color: #6366f1;
  margin-top: 10px;
  transition: all .15s;
  letter-spacing: .2px;
}
.btn-install-app:hover {
  background: #1a1a2e;
  border-color: #6366f1;
}

/* ── MULTI-SESSION ─────────────────────────────────────────────────────────── */
.ci-total { font-size:12px;color:#6366f1;margin-top:4px;font-family:'DM Mono',monospace; }
.sessions-card { background:#0f0f17;border:1px solid #1e1e2e;border-radius:14px;padding:14px;margin:12px 0; }
.sessions-title { font-size:11px;color:#475569;text-transform:uppercase;letter-spacing:1px;margin-bottom:10px; }
.session-row { display:flex;align-items:center;gap:8px;font-size:13px;color:#94a3b8;padding:4px 0;border-bottom:1px solid #1e1e2e; }
.session-row:last-child { border-bottom:none; }
.session-num { font-size:10px;background:#1e1e2e;color:#6366f1;padding:2px 6px;border-radius:6px;font-family:'DM Mono',monospace; }
.session-dur { margin-left:auto;font-family:'DM Mono',monospace;color:#6366f1;font-size:12px; }
.session-total { margin-top:10px;font-size:13px;font-weight:700;color:#f1f5f9;text-align:right;font-family:'DM Mono',monospace; }

/* ── TOOLS TAB ─────────────────────────────────────────────────────────────── */
.tools-card {
  display:flex;align-items:center;gap:14px;
  background:#13131f;border:1px solid #1e1e2e;border-radius:16px;
  padding:16px;margin-bottom:10px;cursor:pointer;transition:background .15s;
}
.tools-card:hover { background:#1a1a2e; }
.tool-icon { font-size:24px;width:44px;height:44px;background:#1e1e2e;border-radius:12px;display:flex;align-items:center;justify-content:center; }
.tool-info { flex:1; }
.tool-title { font-size:15px;font-weight:700;color:#f1f5f9;margin-bottom:2px; }
.tool-desc { font-size:12px;color:#475569;line-height:1.4; }

/* ── FILTER STAT CARDS ─────────────────────────────────────────────────────── */
.stat-card {
  cursor: pointer;
  position: relative;
  transition: all .15s;
  user-select: none;
}
.stat-card:hover { transform: scale(1.03); }
.stat-card-active { transform: scale(1.03); }
.stat-filter-dot {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
.filter-clear {
  font-size: 11px;
  color: #6366f1;
  font-weight: 600;
  margin-left: 8px;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
}
.pending-banner {
  background: #2d1a00;
  border: 1px solid #f59e0b40;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: #f59e0b;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .15s;
}
.pending-banner:hover { background: #3d2500; }

/* ── STATS GRID (5 cards) ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stats-grid .stat-card {
  padding: 10px 6px;
}
.stats-grid .stat-val {
  font-size: 20px;
}
.stats-grid .stat-label {
  font-size: 9px;
}

/* ── SALARY BURN CARDS ─────────────────────────────────────────────────────── */
.salary-burn-card {
  background: #13131f;
  border: 1px solid #1e1e2e;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
}
.burn-total-card {
  background: linear-gradient(135deg, #2d0000, #1a0000);
  border: 1px solid #ef444430;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  text-align: center;
}

/* ── FORM INPUT (time picker fix) ──────────────────────────────────────────── */
input[type="time"].form-input {
  color-scheme: dark;
}
input[type="number"].form-input {
  -moz-appearance: textfield;
}
input[type="number"].form-input::-webkit-outer-spin-button,
input[type="number"].form-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* ── REPORTS: SALARY BURN ──────────────────────────────────────────────────── */
.burn-summary {
  background: linear-gradient(135deg, #2d0a0a, #1a0000);
  border: 1px solid #ef444440;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.burn-label { font-size: 12px; color: #ef4444; font-weight: 600; margin-bottom: 4px; }
.burn-amount { font-size: 28px; font-weight: 800; color: #ef4444; font-family: 'DM Mono', monospace; }
.burn-sub { font-size: 11px; color: #6b7280; margin-top: 4px; }
.burn-row {
  font-size: 12px; color: #6b7280; margin-top: 8px;
  padding-top: 8px; border-top: 1px solid #1e1e2e;
}
.compoff-row {
  font-size: 12px; color: #22c55e; margin-top: 8px;
  padding-top: 8px; border-top: 1px solid #1e1e2e;
}

/* ── WORKING DAYS SETTER ───────────────────────────────────────────────────── */
.workdays-row {
  display: flex; align-items: center; gap: 10px;
  background: #0f0f17; border: 1px solid #1e1e2e;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
}
.workdays-input {
  background: #1a1a2e; border: 1px solid #2a2a3e; color: #f1f5f9;
  border-radius: 8px; padding: 6px 10px; width: 60px;
  font-size: 15px; font-family: 'DM Mono', monospace; text-align: center;
}
.workdays-save {
  background: #6366f1; color: white; border: none;
  border-radius: 8px; padding: 6px 14px; font-size: 13px;
  font-family: 'Figtree', sans-serif; font-weight: 600; cursor: pointer;
}

/* ── FORM GROUPS (onboarding) ──────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── ANNOUNCEMENTS ─────────────────────────────────────────────────────────── */
.announcement-card {
  display: flex; align-items: flex-start; gap: 10px;
  background: #0f0f17; border-radius: 14px;
  border-left: 3px solid #6366f1; padding: 12px 14px; margin-bottom: 10px;
}
.ann-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.ann-body { flex: 1; }
.ann-title { font-size: 14px; font-weight: 700; color: #f1f5f9; margin-bottom: 3px; }
.ann-msg { font-size: 13px; color: #94a3b8; margin-bottom: 4px; line-height: 1.4; }
.ann-meta { font-size: 11px; color: #475569; }

/* ── EMPLOYEE PROFILE STATS ─────────────────────────────────────────────────── */
.profile-stat-card {
  background: #0f0f17; border-radius: 12px; padding: 12px;
  text-align: center; border: 1px solid #1e1e2e;
}
.ps-val { font-size: 22px; font-weight: 800; color: #f1f5f9; font-family: 'DM Mono', monospace; line-height: 1.1; }
.ps-label { font-size: 11px; color: #6b7280; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── MODAL SCROLL FIX ───────────────────────────────────────────────────────── */
.modal-box { max-height: 88vh; overflow-y: auto; }

/* ── MONTH NAVIGATOR (History) ─────────────────────────────────────────────── */
.month-nav { display:flex; align-items:center; justify-content:space-between; background:#0f0f17; border-radius:12px; padding:10px 14px; }
.month-btn  { background:#1e1e2e; border:1px solid #2d2d44; color:#f1f5f9; border-radius:8px; width:36px; height:36px; font-size:18px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.month-label { font-size:15px; font-weight:700; color:#f1f5f9; }
.hist-summary { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.hs-item { flex:1; min-width:60px; background:#0f0f17; border-radius:10px; padding:10px 8px; text-align:center; }
.hs-item span { font-size:22px; font-weight:800; display:block; font-family:'DM Mono',monospace; }
.hs-item div  { font-size:10px; color:#6b7280; margin-top:2px; text-transform:uppercase; letter-spacing:.5px; }

/* ── LEAVE BALANCE ─────────────────────────────────────────────────────────── */
.leave-balance-wrap { background:#0f0f17; border-radius:14px; padding:14px; margin-bottom:16px; }
.leave-balance-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.lb-card { background:#1a1a2e; border-radius:10px; padding:12px 10px; display:flex; flex-direction:column; gap:4px; }
.lb-icon { font-size:18px; }
.lb-name { font-size:11px; color:#6b7280; text-transform:uppercase; letter-spacing:.5px; }
.lb-count { font-size:22px; font-weight:800; font-family:'DM Mono',monospace; }
.lb-bar { height:4px; background:#1e1e2e; border-radius:2px; overflow:hidden; margin-top:2px; }

/* ── HOLIDAY CARD ──────────────────────────────────────────────────────────── */
.mini-btn.red { background:#2d000015; border-color:#ef444430; color:#ef4444; }
.mini-btn.red:hover { background:#ef444415; }
