/* css/attendance_report.css — clean white modern styling
   Matches your theme tokens and uses primary #4F46E5 in light mode */

:root {
  --ar-primary: #4F46E5;
  --ar-border: #E2E8F0;
  --ar-muted: #64748B;
  --ar-text: #0F172A;
  --ar-bg: #FFFFFF;
  --ar-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.light .ar-page { background: var(--ar-bg); }
body.light .ar-title { color: var(--ar-text); }
body.light .ar-sub { color: var(--ar-muted); }
body.light .ar-head { border-bottom: 1px solid var(--ar-border); }
body.light .ar-date input { background: #fff; border: 1px solid var(--ar-border); color: var(--ar-text); }
body.light .ar-export-btn { background: var(--ar-primary); color: #fff; }
body.light .ar-table th, 
body.light .ar-table td { color: var(--ar-text); border-bottom: 1px solid var(--ar-border); }

/* Card wrapper */
.ar-page.card {
  border-radius: 14px;
  border: 1px solid var(--ar-border);
  background: var(--ar-bg);
  box-shadow: var(--ar-shadow);
  padding: 16px;
}

/* Header */
.ar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ar-border);
}
.ar-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}
.ar-sub {
  font-size: 13px;
  color: var(--ar-muted);
}

/* Header actions: date + export */
.ar-head-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.ar-date {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--ar-border); border-radius: 10px; background: #fff;
}
.ar-date-ico { opacity: .8; }
.ar-date input {
  border: none; outline: none; font-weight: 600;
  background: transparent;
}
.ar-export-btn {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 8px 14px; border-radius: 10px; border: none;
  background: var(--ar-primary); color: #fff; font-weight: 700;
  box-shadow: 0 6px 16px rgba(79,70,229,.25);
}
.ar-export-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Tabs (reuse shiny style from dashboard.css) */
.ar-tabs { display:flex; gap:10px; margin-top:14px; }

/* Table */
.ar-table-wrap { margin-top: 12px; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--ar-border); }
.ar-table { width: 100%; border-collapse: collapse; }
.ar-table thead th { position: sticky; top: 0; background: #fff; z-index: 2; padding: 12px; font-weight: 700; font-size: 13px; color: var(--ar-muted); border-bottom: 1px solid var(--ar-border); }
.ar-table td { padding: 12px; border-bottom: 1px solid var(--ar-border); }

/* Status badges */
.ar-badge {
  display: inline-flex; gap: 8px; align-items: center;
  padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px;
}
.ar-badge svg { width: 16px; height: 16px; display: block; }
.ar-badge--green { background: #ECFDF5; color: #16A34A; border: 1px solid #BBF7D0; }
.ar-badge--red   { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

/* Empty state */
.ar-empty { text-align: center; padding: 48px 12px; color: var(--ar-muted); }
.ar-empty__icon { margin: 0 auto 10px; width: 64px; height: 64px; color: var(--ar-primary); opacity: .6; }
.ar-empty__icon svg { width: 100%; height: 100%; display: block; }
.ar-empty__title { font-weight: 800; color: var(--ar-text); margin-bottom: 6px; }
.ar-empty__sub { font-size: 13px; }

/* Responsive */
@media (max-width: 720px) {
  .ar-head { flex-direction: column; align-items: stretch; }
  .ar-head-actions { justify-content: space-between; }
}



/* ---- Attendance tabs: active = blue gradient, inactive = white ---- */
.ar-tabs .tab.shiny{
    /* base = inactive look */
    background:#fff !important;
    color:#0F172A !important;
    border:1px solid #E2E8F0 !important;
    box-shadow: 0 6px 16px rgba(79,70,229,.08);
  }
  
  .ar-tabs .tab.shiny::before{ display:none; }            /* no shine when inactive */
  
  .ar-tabs .tab.shiny.active{
    background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
    color:#fff !important;
    border-color: transparent !important;
    box-shadow: 0 8px 18px rgba(37,99,235,.28);
  }
  .ar-tabs .tab.shiny.active::before{ display:block; }    /* shine only when active */

  

  /* Make export icon match other stroked icons */
.ar-export-btn .ico{
    width: 20px;
    height: 20px;
    display: block;
    stroke: currentColor;
  }
  


  /* ===== Attendance Report — Pagination ===== */
.ar-pager{
    display:flex; align-items:center; justify-content:center;
    gap:12px; margin:12px 0 4px;
  }
  .pg-btn{
    min-width:40px; height:36px; border-radius:10px; font-weight:800;
    border:1px solid var(--border); background:var(--card-bg); cursor:pointer;
    transition:transform .15s ease, box-shadow .2s ease, background .2s ease;
  }
  .pg-btn:disabled{ opacity:.5; cursor:not-allowed; transform:none }
  .pg-btn:not(:disabled):hover{ transform:translateY(-1px); box-shadow:0 6px 14px rgba(0,0,0,.08) }
  .pg-info{ font-weight:700; color:var(--muted-strong, #334155) }
  
/* ===== Empty state: minimal, no animation/colors ===== */
.ar-empty-cell { padding: 24px; }

.ar-empty-3d{
  /* keep same class name so no JS change needed */
  position: relative;
  border: 1px solid var(--ar-border);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  background: #fff;             /* plain white */
  box-shadow: none;             /* no glow */
}

/* simple neutral text */
.ar-empty-3d h4{
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ar-text);
}
.ar-empty-3d p{
  margin: 0;
  font-size: 12px;
  color: var(--ar-muted);
  font-weight: 500;
}

/* kill the animations & graphics */
.ar-orbit,
.ar-blob{ display: none !important; }

/* (optional) if any keyframes still exist, ensure they don't run */
.ar-empty-3d *,
.ar-empty-3d { animation: none !important; }

  
  /* Table & badges (kept consistent) */
  .ar-badge{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;font-weight:700}
  .ar-badge--green{background:rgba(16,185,129,.12);color:#10b981}
  .ar-badge--red{background:rgba(239,68,68,.12);color:#ef4444}
  
  /* Header / controls (if not already in your main CSS) */
  .ar-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
  .ar-head-actions{display:flex;align-items:center;gap:10px}
  .ar-date{display:flex;align-items:center;gap:8px}
  #arDate{padding:8px 10px;border-radius:10px;border:1px solid var(--border)}
  .ar-export-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border);border-radius:10px;font-weight:700}
  .tabbar{display:flex;gap:10px;margin:10px 0 14px}
  .tabbar .tab{padding:6px 12px;border-radius:8px;font-weight:700;border:1px solid var(--border);color:var(--muted)}
  .tabbar .tab.active{background:var(--primary);color:#fff;border-color:var(--primary)}
  



  /* Make the table area scrollable */
.ar-table-wrap{
    max-height: 70vh;           /* adjust if you want taller/shorter */
    overflow: auto;             /* internal scroll so header can stick */
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg, #fff);
  }
  
  /* Sticky table header */
  .ar-table thead th{
    position: sticky;
    top: 0;                     /* sticks to top of the scroll container */
    z-index: 5;
    background: var(--card-bg, #fff);
    box-shadow: inset 0 -1px 0 var(--border);
  }
  
  /* Optional: nicer look while stuck */
  .ar-table thead{
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.04));
  }
  