/* ==========================================================================
   BCIC Swiss — Attendance Portal
   Design system: indigo + soft surfaces + glass top bar
   ========================================================================== */

:root {
  /* Brand */
  --primary:        #4F46E5;
  --primary-600:    #4338CA;
  --primary-50:     #EEF2FF;

  /* Status */
  --success:        #10B981;
  --success-50:     #D1FAE5;
  --success-700:    #047857;
  --danger:         #EF4444;
  --danger-50:      #FEE2E2;
  --danger-700:     #B91C1C;
  --warning:        #F59E0B;
  --warning-50:     #FEF3C7;
  --warning-700:    #B45309;
  --info:           #3B82F6;
  --info-50:        #DBEAFE;
  --info-700:       #1D4ED8;

  /* Surfaces */
  --bg:             #F8FAFC;
  --card:           #FFFFFF;
  --ink:            #0F172A;
  --ink-2:          #334155;
  --muted:          #64748B;
  --muted-2:        #94A3B8;
  --border:         #E5E7EB;
  --border-2:       #F1F5F9;

  /* Effects */
  --shadow-sm:      0 1px 2px rgba(15,23,42,.04);
  --shadow:         0 4px 24px rgba(15,23,42,.06);
  --shadow-lg:      0 20px 60px rgba(15,23,42,.12);
  --radius:         16px;
  --radius-sm:      10px;
  --radius-lg:      22px;
  --t:              220ms cubic-bezier(.22,.61,.36,1);
}

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* ==========================================================================
   LOGIN
   ========================================================================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at top left,  rgba(79,70,229,.25), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(16,185,129,.18), transparent 50%),
    linear-gradient(135deg, #EEF2FF 0%, #F8FAFC 60%, #ECFEFF 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(79,70,229,.08) 0, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(16,185,129,.08) 0, transparent 40%);
  pointer-events: none;
}
.login-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.6);
  animation: cardIn .5s var(--t) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.brand { text-align: center; margin-bottom: 28px; }
.brand-logo, a img.brand-logo, a img.topbar-logo {
  transition: transform .15s ease, filter .15s ease, opacity .15s ease;
}
a:hover img.brand-logo,
a:hover img.topbar-logo { transform: scale(1.04); filter: brightness(1.08); }
.brand-logo {
  display: block;
  max-width: 200px;
  height: auto;
  margin: 0 auto 16px auto;
  filter: drop-shadow(0 4px 12px rgba(79,70,229,.15));
}
.brand h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.brand p  { color: var(--muted); font-size: 13px; margin-top: 2px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.form-control::placeholder { color: var(--muted-2); }
.form-control:hover { border-color: #C7CCD6; }
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,.12);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  transition: transform .08s ease, background var(--t), box-shadow var(--t), opacity var(--t);
  cursor: pointer;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(79,70,229,.35); }
.btn-primary:hover:not(:disabled) { background: var(--primary-600); box-shadow: 0 6px 18px rgba(79,70,229,.45); }
.btn-success { background: var(--success); color: #fff; box-shadow: 0 4px 14px rgba(16,185,129,.3); }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-danger  { background: var(--danger);  color: #fff; box-shadow: 0 4px 14px rgba(239,68,68,.3); }
.btn-danger:hover:not(:disabled)  { background: #DC2626; }
.btn-ghost   { background: #fff; color: var(--ink-2); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: var(--muted-2); }
.btn-block   { width: 100%; }
.btn-sm       { padding: 8px 14px; font-size: 13px; border-radius: 8px; }

.report-view,
.report-mode {
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  border: 1.2px solid var(--border);
  transition: background .2s var(--t), color .2s var(--t), border-color .2s var(--t);
}

.report-view.active,
.report-mode.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.report-view:not(.active):hover,
.report-mode:not(.active):hover {
  background: rgba(79,70,229,.06);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: alertIn .25s var(--t);
}
@keyframes alertIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.alert-error   { background: var(--danger-50);  color: var(--danger-700);  border-color: #FCA5A5; }
.alert-success { background: var(--success-50); color: var(--success-700); border-color: #6EE7B7; }
.alert-info    { background: var(--info-50);    color: var(--info-700);    border-color: #93C5FD; }

.hint {
  text-align: center;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.hint code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--ink-2);
}

/* ==========================================================================
   APP SHELL (employee + admin)
   ========================================================================== */
.app {
  max-width: 1100px;
  width: min(1100px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 28px;
}
@media (max-width: 900px) {
  .app {
    padding-left: 16px;
    padding-right: 16px;
  }
}
@media (max-width: 640px) {
  .app {
    padding-left: 10px;
    padding-right: 10px;
  }
}
.admin-wrap { max-width: 1100px; margin: 0 auto; width: min(1100px,100%); }

/* ---------- Top bar (glass) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
}
.topbar-logo {
  height: 32px;
  width: auto;
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.topbar-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.hamburger {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  transition: background var(--t);
}
.hamburger:hover { background: var(--bg); }
.hamburger svg { width: 22px; height: 22px; }

.topbar-right { display: flex; align-items: center; gap: 6px; }
.avatar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t);
}
.avatar-btn:hover { background: var(--primary-50); border-color: var(--primary-50); }
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8B5CF6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.avatar-role {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

/* ==========================================================================
   HAMBURGER DRAWER
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 290px;
  max-width: 86vw;
  background: #fff;
  z-index: 100;
  transform: translateX(-100%);
  transition: transform 280ms cubic-bezier(.22,.61,.36,1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, var(--primary), #6366F1 60%, #8B5CF6);
  color: #fff;
}
.drawer-head .drawer-logo { height: 28px; filter: brightness(0) invert(1); margin-bottom: 14px; }
.drawer-user { display: flex; align-items: center; gap: 12px; }
.drawer-user .avatar { background: rgba(255,255,255,.22); backdrop-filter: blur(8px); }
.drawer-user .name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.drawer-user .role { font-size: 12px; opacity: .85; }

.drawer-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.drawer-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  padding: 14px 12px 6px;
}
.drawer-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  text-align: left;
}
.drawer-item:hover { background: var(--bg); }
.drawer-item.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.drawer-item.active .drawer-ico { color: var(--primary); }
.drawer-item.danger { color: var(--danger); }
.drawer-item.danger:hover { background: var(--danger-50); }
.drawer-ico {
  width: 20px; height: 20px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.drawer-item:hover .drawer-ico { color: var(--ink); }

.drawer-divider { height: 1px; background: var(--border); margin: 8px 12px; }

.drawer-foot { padding: 12px 16px 18px; font-size: 11px; color: var(--muted-2); text-align: center; }

/* ==========================================================================
   PAGE CONTENT
   ========================================================================== */
.content {
  padding: 18px;
  max-width: 1100px;
  margin: 0 auto;
}
.page { display: none; animation: pageIn .3s var(--t) both; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.page-header .page-meta {
  min-width: 240px;
  flex: 1;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.control-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.card.grid-responsive {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .content { padding: 16px; }
  .topbar { padding: 12px 14px; }
  .card { padding: 16px; }
  .control-row { flex-direction: column; align-items: stretch; }
  .control-row > * { width: 100%; }
}

@media (max-width: 640px) {
  .content { padding: 14px; }
  .topbar { padding: 12px 12px; }
  .drawer { width: min(100%, 340px); }
  .page-title { font-size: 20px; }
  .page-sub { font-size: 12px; }
  .card { padding: 14px; }
  .btn { width: 100%; }
  .button-row { flex-direction: column; align-items: stretch; }
  .report-filters { flex-direction: column; align-items: stretch; }
  .report-filters > div { width: 100% !important; }
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 4px;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---------- Card ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-2);
}
.card h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }

/* ---------- Clock (home hero) ---------- */
.hero {
  position: relative;
  padding: 26px 22px 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at top right, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, var(--primary) 0%, #6366F1 50%, #8B5CF6 100%);
  color: #fff;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(79,70,229,.28);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15) 0, transparent 50%);
  pointer-events: none;
}
.hero-greet { font-size: 14px; opacity: .9; font-weight: 500; }
.hero-name  { font-size: 22px; font-weight: 700; margin-top: 2px; letter-spacing: -.01em; }
.hero-time  { font-size: 44px; font-weight: 800; margin-top: 14px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-date  { font-size: 13px; opacity: .9; margin-top: 2px; }

/* ---------- Action card (sign in / sign out) ---------- */
.action-card { text-align: center; padding: 28px 22px; }
.action-card h3 { font-size: 17px; font-weight: 700; }
.action-card p  { color: var(--muted); font-size: 13px; margin: 4px 0 22px; }

.btn-big {
  width: 100%;
  padding: 22px 24px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: .01em;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .12s ease, box-shadow var(--t), background var(--t);
}
.btn-big:active { transform: scale(.98); }
.btn-big:disabled { opacity: .55; cursor: not-allowed; }
.btn-signin {
  background: linear-gradient(135deg, var(--success), #14B8A6);
  box-shadow: 0 10px 24px rgba(16,185,129,.35);
}
.btn-signin:hover:not(:disabled) { box-shadow: 0 14px 30px rgba(16,185,129,.45); }
.btn-signout {
  background: linear-gradient(135deg, var(--danger), #F43F5E);
  box-shadow: 0 10px 24px rgba(239,68,68,.35);
}
.btn-signout:hover:not(:disabled) { box-shadow: 0 14px 30px rgba(239,68,68,.45); }
.btn-big.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255,255,255,.5);
  animation: pulse 2s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(255,255,255,.5); }
  70%  { box-shadow: 0 0 0 18px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0   rgba(255,255,255,0); }
}

.today-info {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.today-info b { color: var(--ink); font-weight: 700; }

/* ---------- Status pill ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1;
}
.status-present    { background: var(--success-50); color: var(--success-700); }
.status-late       { background: var(--warning-50); color: var(--warning-700); }
.status-half       { background: var(--info-50);    color: var(--info-700); }
.status-absent     { background: var(--danger-50);  color: var(--danger-700); }
.status-leave      { background: #EDE9FE;            color: #5B21B6; }
.status-active     { background: var(--success-50); color: var(--success-700); }
.status-inactive   { background: #F1F5F9;            color: var(--muted); }
.status-home_office{ background: var(--info-50);    color: var(--info-700); }
.status-pending    { background: #F1F5F9;            color: #475569; }
.status-approved   { background: var(--success-50); color: var(--success-700); }
.status-rejected   { background: var(--danger-50);  color: var(--danger-700); }

/* ---------- Admin detail panels ---------- */
.ed-stats,
.ed-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.ed-period-stats {
  align-items: stretch;
}
.ed-tile {
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.ed-tile-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}
.ed-tile-lbl {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.ed-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.ed-mode-tabs,
.ed-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ed-mode,
.ed-view-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s var(--t), border-color .2s var(--t), color .2s var(--t);
}
.ed-mode.active,
.ed-view-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.ed-calendar,
.ed-year-grid,
.ed-cal-grid {
  width: 100%;
}
.ed-cal-title {
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--ink);
}
.ed-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.ed-cal-hdr,
.ed-cal-cell {
  min-height: 88px;
  padding: 10px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border-2);
}
.ed-cal-hdr {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.ed-cal-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ed-cal-cell.pad {
  background: transparent;
  border-color: transparent;
}
.ed-cal-num {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.ed-cal-status {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: capitalize;
}
.ed-cal-times {
  font-size: 12px;
  color: var(--muted);
}
.ed-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  margin-top: 14px;
  color: var(--muted);
}
.ed-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ed-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.ed-list-table {
  width: 100%;
  border-collapse: collapse;
}
.ed-summary-card {
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ed-summary-card.ed-summary-wide {
  grid-column: span 1;
}
.ed-summary-month {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ed-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-2);
}
.ed-summary-row.total {
  border-bottom: none;
  font-weight: 700;
  color: var(--ink);
}
.ed-leave-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
}
.ed-leave-row:last-child { border-bottom: none; }
.ed-leave-row span.status-pill { margin-top: 8px; }

/* ---------- Larger modals ---------- */
.modal-lg { max-width: 900px; }
.modal-body { padding: 0; }

/* ---------- Table wrapper ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Report calendar responsive ---------- */
#reportCalendar .calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#reportCalendar .day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
#reportCalendar .day-cell {
  min-height: 90px;
}
#reportCalendar .day-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
#reportCalendar .day-cell-empty { min-height: 90px; }
#reportCalendar .day-note { color: var(--muted); font-size: 12px; }

/* ---------- Small screen tweaks ---------- */
@media (max-width: 900px) {
  .ed-filters { flex-direction: column; align-items: stretch; }
  .ed-filters > * { min-width: 100%; }
  .ed-cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  #reportCalendar .day-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ed-cal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-cal-hdr, .ed-cal-cell { min-height: 80px; }
  .ed-filters, .ed-mode-tabs, .ed-view-tabs { width: 100%; }
  .ed-mode, .ed-view-tab { flex: 1 1 auto; text-align: center; }
  #reportCalendar .day-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #reportCalendar .day-cell { min-height: 84px; }
}

/* ---------- Stats grid ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  transition: transform var(--t), box-shadow var(--t);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat .n { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.stat .l { font-size: 11px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat.green .n { color: var(--success); }
.stat.amber .n { color: var(--warning); }
.stat.indigo .n{ color: var(--primary); }
.stat.rose .n  { color: var(--danger); }

/* ---------- List rows ---------- */
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-2);
  gap: 12px;
}
.list-row:last-child { border-bottom: none; }
.list-row .left  { font-size: 14px; color: var(--ink); font-weight: 500; }
.list-row .right { font-size: 13px; color: var(--muted); text-align: right; }
.list-row .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Admin ---------- */
.kpi {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
}
.kpi.green::before  { background: var(--success); }
.kpi.amber::before  { background: var(--warning); }
.kpi.rose::before   { background: var(--danger); }
.kpi.indigo::before { background: var(--primary); }
.kpi .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; }
.kpi .val { font-size: 28px; font-weight: 800; margin-top: 4px; color: var(--ink); letter-spacing: -.01em; }
.kpi .delta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}
.table th {
  background: var(--bg);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .05em;
  position: sticky; top: 0;
}
.table tbody tr { transition: background var(--t); }
.table tbody tr:hover { background: rgba(79,70,229,.04); }
.table .emp-name b { color: var(--ink); }
.table .emp-name small { color: var(--muted); }

input[type="date"], input[type="month"], input[type="time"], select {
  padding: 10px 12px;
  font-size: 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
}
input[type="date"]:focus, input[type="month"]:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s var(--t);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s var(--t);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h3 { font-size: 18px; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  transition: background var(--t), color var(--t);
}
.modal-close:hover { background: var(--bg); color: var(--ink); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 420px;
}
.toast {
  background: #0F172A;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn .25s var(--t);
}
.toast.success { background: var(--success-700); }
.toast.error   { background: var(--danger-700); }
.toast.info    { background: var(--info-700); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 13px;
}
.empty .ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-2);
  margin-bottom: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .content { padding: 14px; }
  .stats { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .table th, .table td { padding: 10px 8px; font-size: 13px; }
  .hero-time { font-size: 34px; }
  .topbar-logo { height: 26px; }
  .avatar-name, .avatar-role { display: none; }
  .topbar { flex-wrap: wrap; justify-content: center; gap: 12px; }
  .topbar .user { width: 100%; justify-content: space-between; }
  .drawer { width: min(100%, 320px); }
  .drawer-nav { padding: 12px 8px 18px; }
  .drawer-item { justify-content: flex-start; padding: 12px 14px; }
  .card { padding: 16px; }
  .btn { width: 100%; }
  .btn:not(.btn-block) { justify-content: center; }
  .form-control { padding: 12px 14px; }
  .report-filters { flex-direction: column; align-items: stretch; }
  .report-filters > div { width: 100% !important; }
}
@media (min-width: 600px) {
  .admin-wrap { padding: 18px; }
}
@media (min-width: 900px) {
  .admin-wrap { padding: 24px; }
  .grid-3 { grid-template-columns: repeat(4, 1fr); }
}

/* =============================================================
 * Attendance Reminder Banner (notifier.js)
 * ============================================================= */
.bcic-notif-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  z-index: 9999;
  width: min(420px, calc(100% - 24px));
  pointer-events: none;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2);
}
.bcic-notif-banner.show {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.bcic-notif-card {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(79, 70, 229, .35), 0 4px 12px rgba(0,0,0,.15);
}
.bcic-notif-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  animation: bcic-bell-ring 1.6s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes bcic-bell-ring {
  0%, 100% { transform: rotate(0deg); }
  20%      { transform: rotate(-14deg); }
  40%      { transform: rotate(12deg); }
  60%      { transform: rotate(-8deg); }
  80%      { transform: rotate(4deg); }
}
.bcic-notif-body {
  flex: 1;
  min-width: 0;
}
.bcic-notif-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: .2px;
}
.bcic-notif-msg {
  font-size: 12.5px;
  opacity: .92;
  line-height: 1.35;
}
.bcic-notif-action {
  background: #fff;
  color: #4F46E5;
  border: 0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s;
}
.bcic-notif-action:hover { transform: scale(1.04); }
.bcic-notif-close {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.85);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.bcic-notif-close:hover { color: #fff; }

/* Reminder settings panel (in Profile) */
.reminder-settings {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #E5E7EB);
}
.reminder-row:last-child { border-bottom: 0; }
.reminder-row label {
  font-size: 13.5px;
  color: var(--ink, #0F172A);
  font-weight: 500;
}
.reminder-row small {
  display: block;
  color: var(--muted, #64748B);
  font-size: 11.5px;
  margin-top: 2px;
}
.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #CBD5E1;
  border-radius: 999px;
  transition: background .2s;
  cursor: pointer;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider { background: #4F46E5; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

.reminder-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.reminder-time input[type=number] {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
}

/* ============================================================
   Install-app section (login page only)
   ============================================================ */
.install-wrap {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.install-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted, #64748B);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 4px 0 2px;
}
.install-divider::before,
.install-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border, #E5E7EB);
}

.btn-install,
.btn-install-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  border: 0;
  text-decoration: none;
}
.btn-install {
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(79,70,229,.28);
}
.btn-install:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(79,70,229,.34);
}
.btn-install:active { transform: translateY(0); }
.btn-install:disabled { opacity: .75; cursor: default; }
.btn-install .install-ico { flex: 0 0 auto; }

.btn-install-secondary {
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
}
.btn-install-secondary:hover { background: #E2E8F0; color: #0F172A; }

.install-help {
  text-align: left;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 10px;
}
.install-help[open] { padding-bottom: 14px; }
.install-help-title {
  font-weight: 600;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.install-help-title::-webkit-details-marker { display: none; }
.install-help-title::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #4F46E5;
}
.install-help ol {
  margin: 10px 0 4px 0;
  padding-left: 18px;
}
.install-help li { margin-bottom: 4px; }

.install-secondary-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 1px dashed #CBD5E1;
  color: #475569;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.install-secondary-link:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #94A3B8;
}

@media (max-width: 380px) {
  .install-help { font-size: 12px; padding: 10px 14px; }
}

/* ============================================================
   Visibility helpers
   Use [hidden] or .hidden — both hide the element completely.
   `display: none` (not `visibility: hidden`) so it takes no space.
   ============================================================ */
[hidden],
.hidden {
  display: none !important;
}

/* ============================================================
   REPORT PAGE — mobile-first redesign
   ============================================================ */
.report-page {
  background: var(--bg, #F8FAFC);
  min-height: 100vh;
  padding-bottom: 32px;
}

/* --- Topbar (clean, app-style) --- */
.report-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 12px rgba(79,70,229,.18);
}
.topbar-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
  transition: background .15s;
}
.topbar-back:hover { background: rgba(255,255,255,.25); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title-main {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title-sub {
  font-size: 12px;
  opacity: .85;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.topbar-icon:hover { background: rgba(255,255,255,.25); }

/* --- Main column --- */
.report-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
}

/* --- Filters --- */
.report-filters {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

/* Segmented control (Month / Range / Year) */
.seg {
  display: inline-flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 10px;
  gap: 2px;
  margin-bottom: 12px;
}
.seg-btn {
  border: 0;
  background: transparent;
  color: var(--muted, #64748B);
  font-weight: 600;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.seg-btn.active {
  background: #fff;
  color: var(--primary, #4F46E5);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.filter-cell label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted, #64748B);
  margin-bottom: 5px;
}
.filter-cell .form-control {
  padding: 9px 11px;
  font-size: 14px;
}
@media (max-width: 480px) {
  .filter-row { grid-template-columns: 1fr; }
}

/* --- KPI strip (horizontal scroll) --- */
.kpi-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin: 0 -16px 14px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}
.kpi-strip::-webkit-scrollbar { display: none; }
.kpi {
  flex: 0 0 auto;
  min-width: 86px;
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.kpi:hover { border-color: var(--primary, #4F46E5); }
.kpi.active {
  border-color: var(--primary, #4F46E5);
  background: linear-gradient(135deg, rgba(79,70,229,.08) 0%, rgba(99,102,241,.04) 100%);
  box-shadow: 0 4px 12px rgba(79,70,229,.18);
}
.kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink, #0F172A);
  line-height: 1.1;
}
.kpi-label {
  font-size: 11px;
  color: var(--muted, #64748B);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.kpi-sub {
  font-size: 10px;
  color: var(--primary, #4F46E5);
  font-weight: 600;
  margin-top: 2px;
}

/* --- Tabs (Records / Calendar / Leaves / Holidays) --- */
.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border, #E5E7EB);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #64748B);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tab.active {
  color: var(--primary, #4F46E5);
  border-bottom-color: var(--primary, #4F46E5);
}
.tab-count {
  font-size: 11px;
  color: var(--muted, #64748B);
  margin-left: 4px;
}

/* --- Tab panes --- */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted, #64748B);
  font-size: 13px;
}

/* --- Record list (cards) --- */
.record-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.record {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.record-date {
  flex: 0 0 auto;
  width: 44px;
  text-align: center;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 6px 4px;
  border: 1px solid var(--border, #E5E7EB);
}
.record-day {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink, #0F172A);
  line-height: 1;
}
.record-mon {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted, #64748B);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}
.record-body {
  flex: 1;
  min-width: 0;
}
.record-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.record-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #0F172A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.record-meta {
  font-size: 11px;
  color: var(--muted, #64748B);
  margin-bottom: 6px;
}
.record-times {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-2, #334155);
}
.record-times b { color: var(--ink, #0F172A); font-weight: 700; }

/* --- Status pill (compact) --- */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex: 0 0 auto;
}
.status-pill.status-present    { background: #D1FAE5; color: #047857; }
.status-pill.status-late       { background: #FEF3C7; color: #B45309; }
.status-pill.status-home_office{ background: #DBEAFE; color: #1D4ED8; }
.status-pill.status-leave      { background: #FEE2E2; color: #B91C1C; }
.status-pill.status-absent     { background: #E5E7EB; color: #4B5563; }

/* --- Calendar --- */
.calendar-grid { display: flex; flex-direction: column; gap: 16px; }
.cal-month {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 14px;
}
.cal-month-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #0F172A);
  margin-bottom: 10px;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.cal-weekdays > div {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted, #64748B);
  text-transform: uppercase;
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-cell {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid var(--border, #E5E7EB);
  padding: 3px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.cal-cell.empty { background: transparent; border: 0; }
.cal-cell.dim   { opacity: .25; }
.cal-cell.has-data { background: #fff; border-color: var(--border-2, #E2E8F0); }
.cal-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2, #334155);
}
.cal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: auto;
}
.cal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
}
.cal-chip.s-present    { background: #22C55E; }
.cal-chip.s-late       { background: #F59E0B; }
.cal-chip.s-home_office{ background: #3B82F6; }
.cal-chip.s-leave      { background: #EF4444; }
.cal-chip.s-absent     { background: #6B7280; }

/* --- Leaves --- */
.leaves-list, .holidays-list { display: flex; flex-direction: column; gap: 8px; }
.leave-card {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 12px;
}
.leave-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.leave-emp { font-size: 13px; font-weight: 700; color: var(--ink, #0F172A); }
.leave-dept { font-size: 11px; color: var(--muted, #64748B); margin-top: 2px; }
.leave-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex: 0 0 auto;
}
.leave-pill.casual { background: #DBEAFE; color: #1D4ED8; }
.leave-pill.sick   { background: #FEE2E2; color: #B91C1C; }
.leave-pill.other  { background: #F3E8FF; color: #7E22CE; }
.leave-card-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--ink-2, #334155);
  padding: 8px 0;
  border-top: 1px dashed var(--border, #E5E7EB);
}
.leave-range { font-weight: 600; }
.leave-days  { color: var(--muted, #64748B); }
.leave-reason {
  font-size: 12px;
  color: var(--muted, #64748B);
  font-style: italic;
  margin-top: 6px;
}
.leave-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.leave-dates span {
  background: var(--bg, #F8FAFC);
  border: 1px solid var(--border, #E5E7EB);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10px;
  color: var(--ink-2, #334155);
  font-weight: 600;
}

/* --- Holidays --- */
.holiday-card {
  background: #fff;
  border: 1px solid var(--border, #E5E7EB);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.holiday-date {
  flex: 0 0 auto;
  width: 50px;
  text-align: center;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border-radius: 10px;
  padding: 8px 4px;
}
.holiday-day { font-size: 20px; font-weight: 800; color: #92400E; line-height: 1; }
.holiday-mon { font-size: 10px; font-weight: 700; color: #B45309; text-transform: uppercase; margin-top: 2px; }
.holiday-body { flex: 1; min-width: 0; }
.holiday-name { font-size: 14px; font-weight: 700; color: var(--ink, #0F172A); }
.holiday-weekday { font-size: 12px; color: var(--muted, #64748B); margin-top: 2px; }
