/* dashboard.css (complete master file; overwrite existing) */

/* Import Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root{
  --sidebar-width:260px;
  --header-height:72px;
  --max-width:1280px;

  /* Color tokens (dark = default) */
  --bg: #061024;
  --sidebar-bg: linear-gradient(180deg,#071428,#061524);
  --header-bg: rgba(6,16,36,0.8); /* updated from transparent */
  --card-bg: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  --surface: #071428;
  --muted: #94a3b8;
  --text: #e6eef8;
  --primary: #7c59ff;
  --primary-600: #5b40d6;
  --border: rgba(255,255,255,0.04);
  --success: #10b981;
  --danger: #ef4444;

  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;

  --shadow: 0 8px 30px rgba(2,6,23,0.55);
}

/* Reset & base */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background:linear-gradient(180deg,#051022 0%, #061024 150px);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-size:14px;
  line-height:1.4;
}

/* Remove default button styles globally */
button{background:transparent;border:none;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;}

/* App shell */
.app{min-height:100vh;}

/* ---------------- Sidebar ---------------- */
.sidebar{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  width:var(--sidebar-width);
  padding:22px;
  background:var(--sidebar-bg);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  gap:18px;
  z-index:40;
}

/* Logo */
.logo{display:flex;align-items:center;gap:12px}
.logo span.logo-icon{
  width:48px;height:48px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;
  color:#fff;font-weight:800;font-size:18px;
  background:linear-gradient(135deg,var(--primary),#9b7aff);
  box-shadow:0 8px 26px rgba(92,59,255,0.12);
}
.logo .logo-text{display:flex;flex-direction:column}
.logo .title{font-weight:800;font-size:16px}
.logo .subtitle{font-size:12px;color:var(--muted)}

/* Nav */
.nav{display:flex;flex-direction:column;gap:14px;margin-top:18px}
.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:12px;
  border-radius:14px;
  text-align:left;
  font-weight:700;
  color:var(--text);
  background:transparent;
  border:1px solid transparent;
  transition:all .16s ease;
  cursor:pointer;
}
.nav-item span.nav-icon{
  width:42px;height:42px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,0.02);
  color:rgba(255,255,255,0.9);
  font-size:18px;
  transition:all .16s ease;
}
.nav-item .nav-label{flex:1;opacity:0.95}

/* hover */
.nav-item:hover{
  transform:translateY(-3px);
  background:rgba(255,255,255,0.02);
  box-shadow:0 12px 26px rgba(2,6,23,0.45);
}

/* active */
.nav-item.active{
  background:linear-gradient(90deg,var(--primary),var(--primary-600));
  box-shadow:0 16px 40px rgba(92,59,255,0.18);
  color:#fff;
  transform:none;
}
.nav-item.active span.nav-icon{background:rgba(255,255,255,0.12);color:#fff}

/* Sidebar bottom */
.sidebar-bottom{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.profile-card{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px;
  border-radius:12px;
  background:linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.profile-card span.avatar{
  width:44px;height:44px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--primary);color:#fff;font-weight:800;
}
.profile-card .info .name{font-weight:700}
.profile-card .info .email{font-size:12px;color:var(--muted)}
#logout{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:10px;
  color:var(--danger);
  font-weight:700;
}
#logout:hover{background:rgba(239,68,68,0.06)}

/* ---------------- Header & Main ---------------- */
.main{
  margin-left:var(--sidebar-width);
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.header{
  height:var(--header-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 28px;
  position:sticky;
  top:0;
  z-index:100; /* raised */
  background:var(--header-bg);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-bottom:1px solid rgba(255,255,255,0.06);
  box-shadow:0 6px 20px rgba(2,6,23,0.45);
}
.header .left{display:flex;align-items:center;gap:18px}
#page-title{font-size:20px;font-weight:800;color:var(--text)}
.daterange button{
  padding:8px 10px;border-radius:10px;
  background:rgba(255,255,255,0.02);
  border:1px solid rgba(255,255,255,0.03);
  color:var(--text);font-weight:700;
}
.search input{
  width:380px;padding:10px 12px;border-radius:12px;border:1px solid rgba(255,255,255,0.03);
  background:transparent;color:var(--text);
}
.header .right{display:flex;align-items:center;gap:12px}
.avatar-mini{
  width:36px;height:36px;border-radius:10px;
  background:linear-gradient(135deg,var(--primary),var(--primary-600));
  display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;
}

/* ---------------- Content ---------------- */
.content{padding:28px;max-width:var(--max-width);margin:0 auto;width:100%}

/* KPI grid (3 per row) */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr); /* was 5/6 */
  gap:18px;
  margin-bottom:22px;
}

  

.kpi{
  background:var(--card-bg);
  padding:18px;border-radius:12px;border:1px solid rgba(255,255,255,0.02);
  box-shadow:0 8px 26px rgba(2,6,23,0.35);
  display:flex;flex-direction:column;gap:12px;
}
.kpi .kpi-row{display:flex;align-items:center;justify-content:space-between}
.kpi .muted{color:var(--muted);font-size:13px}
.kpi .value{font-size:28px;font-weight:800}
.kpi .spark{height:32px;background:linear-gradient(90deg, rgba(0,0,0,0.25), transparent);border-radius:6px}

/* Charts grid */
.charts-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.card{
  background:var(--card-bg);
  border-radius:14px;padding:18px;border:1px solid rgba(255,255,255,0.02);
  box-shadow:0 8px 30px rgba(2,6,23,0.35);
}
.chart-placeholder{height:320px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:var(--muted)}

/* Row cards (two smaller cards below) */
.row-cards{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}
.card-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.pill{display:inline-block;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,0.02);color:var(--text);font-weight:700}

/* Most popular list (right panel) */
.popular-list{display:flex;flex-direction:column;gap:12px}
.popular-item{
  display:flex;align-items:center;gap:12px;background:transparent;padding:12px;border-radius:10px;border:1px solid rgba(255,255,255,0.01);
}
.popular-item .rank{
  width:28px;height:28px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.02);font-weight:800;
}
.popular-item .meta{flex:1}
.popular-item .meta .title{font-weight:800}
.popular-item .meta .sub{font-size:12px;color:var(--muted)}

/* Recent students/payments placeholder area */
.recent-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:12px;border-bottom:1px solid rgba(255,255,255,0.03);text-align:left;color:var(--text)}
.table th{color:var(--muted);font-weight:700;font-size:13px}

/* small utility */
.small-muted{color:var(--muted);font-size:13px}

/* -------- Responsive -------- */
@media (max-width:1200px){
  :root{--sidebar-width:220px}
  .kpi-grid{grid-template-columns:repeat(3,1fr)}
  .search input{width:260px}
}
@media (max-width:900px){
  :root{--sidebar-width:200px}
  .kpi-grid{grid-template-columns:repeat(2,1fr)}
  .search input{width:180px}
  .charts-grid{grid-template-columns:1fr}
}
@media (max-width:720px){
  .sidebar{
    position:relative;width:100%;height:auto;flex-direction:row;align-items:center;padding:12px;border-right:none;border-bottom:1px solid rgba(255,255,255,0.02);
  }
  .logo .logo-text .title{display:none}
  .nav{flex-direction:row;gap:8px;overflow:auto}
  .main{margin-left:0}
  .content{padding:12px}
}

/* ---------------- Light theme overrides ---------------- */
body.light{
  --bg:#f3f7fb;
  --sidebar-bg: linear-gradient(180deg,#ffffff,#fbfdff);
  --header-bg: rgba(255,255,255,0.9); /* updated from transparent */
  --card-bg: #ffffff;
  --surface:#ffffff;
  --muted:#6b7280;
  --text:#0f1724;
  --primary:#7159F5;
  --primary-600:#5b40d6;
  --border:#e6eef8;
  --shadow: 0 6px 18px rgba(11,20,50,0.06);
  background:var(--bg);
}

/* targeted overrides for light so elements using hard-coded dark values flip correctly */
body.light .sidebar{ background:var(--sidebar-bg); border-right:1px solid var(--border) }
body.light .nav-item{ color:var(--text); background:transparent; box-shadow:none }
body.light .nav-item:hover{ background:rgba(17,24,39,0.03); box-shadow:var(--shadow); transform:translateY(-2px) }
body.light .nav-item span.nav-icon{ background:rgba(113,89,245,0.06); color:var(--primary) }
body.light .nav-item.active{ background:linear-gradient(90deg,var(--primary),var(--primary-600)); color:#fff; box-shadow:0 8px 22px rgba(113,89,245,0.12) }
body.light .nav-item.active span.nav-icon{ background: rgba(255,255,255,0.12); color:#fff }
body.light .profile-card{ background:var(--bg) }
body.light .header{ border-bottom:1px solid var(--border); background:var(--header-bg); box-shadow:0 6px 16px rgba(11,20,50,0.06) }
body.light .search input{ background:var(--surface); border:1px solid var(--border); color:var(--text) }
body.light .card{ background:var(--card-bg); border:1px solid var(--border); box-shadow:var(--shadow) }

/* Tabs inside card heading */
.tabbar {
  display: flex;
  gap: 10px;
}
.tabbar .tab {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all .2s ease;
}
.tabbar .tab:hover {
  background: rgba(0,0,0,0.04);
}
.tabbar .tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tabpane { display: none; }
.tabpane.active { display: block; }

/* --- Icon sizing for inline SVGs --- */
.nav-item .nav-icon .ico {
  width: 20px;
  height: 20px;
  display: block;
}

.logo img {
  width: 36px;
  height: auto;
}


/* ===== Donut card layout fix (use space, no overlap/scroll) ===== */

/* Let the placeholder grow with its contents (legend) */
.row-cards .card .chart-placeholder{
  height: auto;           /* remove fixed 320px height */
  min-height: 220px;
  display: block;         /* we’ll control layout with .donut-wrap */
  padding: 8px 6px 12px;  /* give it a bit of breathing room */
}

/* Two-column layout: donut left, legend right */
.donut-wrap{
  display: grid;
  grid-template-columns: 240px 1fr;  /* chart fixed width, legend fills */
  align-items: center;
  gap: 18px;
}

/* Make sure the canvas has a predictable size and never floats upward */
#enrollDonut{
  width: 220px !important;
  height: 220px !important;
  display: block;
  margin: 0 auto;         /* centers the donut in its column */
  position: relative;
  top: 0;
}

/* Legend: no internal scrollbars */
#donutLegend{
  max-height: none;
  overflow: visible;
  line-height: 1.3;
}

/* Ensure the heading never overlaps the chart */
.row-cards .card .card-heading{
  margin-bottom: 10px;    /* already set, but keep a hard guarantee */
  position: relative;
  z-index: 1;
}

/* Responsive tweaks */
@media (max-width: 1100px){
  .donut-wrap{ grid-template-columns: 200px 1fr; }
  #enrollDonut{ width: 200px !important; height: 200px !important; }
}
@media (max-width: 780px){
  .donut-wrap{ grid-template-columns: 1fr; }
  #donutLegend{ margin-top: 8px; }
}


/* ===== Donut card layout fix (use space, no overlap/scroll) ===== */

/* Let the placeholder grow with its contents (legend) */
.row-cards .card .chart-placeholder{
  height: auto;           /* remove fixed 320px height */
  min-height: 220px;
  display: block;         /* we’ll control layout with .donut-wrap */
  padding: 8px 6px 12px;  /* give it a bit of breathing room */
  overflow: visible;
}

/* Two-column layout: donut left, legend right */
.donut-wrap{
  display: grid;
  grid-template-columns: 240px 1fr;  /* chart fixed width, legend fills */
  align-items: center;
  gap: 18px;
  align-content: center;
}

/* Chart column centers the canvas */
.donut-wrap .chart-column{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:220px;
}

/* Legend column stacks items and centers them vertically */
.donut-wrap .legend-column{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:8px;
  min-width:0; /* allow text truncation if needed */
}

/* Make sure the canvas has a predictable size and never floats upward */
#enrollDonut{
  width:220px !important;
  height:220px !important;
  display:block;
  margin:0;
  position:relative;
  top:0;
}

/* Legend: no internal scrollbars */
#donutLegend{
  max-height:none;
  overflow:visible;
  line-height:1.3;
  padding:0 4px;
}

/* Ensure the heading never overlaps the chart */
.row-cards .card .card-heading{
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

/* Responsive tweaks */
@media (max-width: 1100px){
  .donut-wrap{ grid-template-columns: 200px 1fr; }
  #enrollDonut{ width: 200px !important; height: 200px !important; }
}
@media (max-width: 780px){
  .donut-wrap{ grid-template-columns: 1fr; }
  .donut-wrap .legend-column{ margin-top: 8px; justify-content:flex-start; align-items:flex-start; }
  #donutLegend{ margin-top: 8px; }
  #enrollDonut{ width:200px !important; height:200px !important; }
  .row-cards .card .chart-placeholder{ padding-bottom: 12px; }
}




/* Mini pill button variant */
.pill.mini{ padding:6px 12px; border-radius:999px; font-weight:700; border:1px solid var(--border); background:rgba(255,255,255,0.02); }
body.light .pill.mini{ background:#fff; }
.pill.mini:hover{ filter:brightness(1.05); }
.pill.outline{ background:transparent; border:1px solid var(--border); }
.recent-date{ padding:6px 10px; border:1px solid var(--border); border-radius:8px; background:transparent; color:var(--text); }




/* ===== Enhanced Category Donut styling (fills space, crisper text) ===== */
.row-cards .card .chart-placeholder{
  height:auto;
  min-height:240px;
  display:block;
  padding:8px 6px 12px;
  overflow:visible;
}
.donut-wrap{
  display:grid;
  grid-template-columns:300px 1fr;
  align-items:center;
  gap:20px;
}
.donut-wrap .chart-column{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:240px;
}
.donut-wrap .legend-column{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}
#enrollDonut{
  width:280px !important;
  height:280px !important;
  display:block;
}
#donutLegend{
  line-height:1.35;
  font-size:15px;
}
#donutLegend .legend-total{
  font-weight:800;
  font-size:16px;
  margin-bottom:10px;
}
#donutLegend .legend-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:8px 0;
  border-bottom:1px dashed var(--border);
}
#donutLegend .legend-row:last-child{ border-bottom:none; }
#donutLegend .legend-left{ display:inline-flex; align-items:center; gap:10px; min-width:0; }
#donutLegend .legend-dot{ width:10px; height:10px; border-radius:999px; flex:0 0 10px; }
#donutLegend .legend-title{ font-weight:700; white-space:normal; }
#donutLegend .legend-count strong{ font-size:16px; font-weight:800; margin-right:4px; }
#donutLegend .legend-count .small-muted{ font-size:12px; }

@media (max-width:1100px){
  .donut-wrap{ grid-template-columns:260px 1fr; }
  #enrollDonut{ width:240px !important; height:240px !important; }
}
@media (max-width:780px){
  .donut-wrap{ grid-template-columns:1fr; }
  #donutLegend{ margin-top:8px; }
  #enrollDonut{ width:220px !important; height:220px !important; }
}

















/* === Compact "Most Popular Courses" card === */
:root{
  --popular-max-h: 420px;   /* tweak if you want shorter/taller */
  --popular-bar-h: 6px;     /* progress bar height */
}

/* limit the list height + enable smooth scrolling */
.popular-list{
  max-height: var(--popular-max-h);
  overflow: auto;
  padding-right: 6px;     /* room for scrollbar */
  margin-right: -6px;
  gap: 10px;              /* tighter rows */
  scrollbar-width: thin;
}
.popular-list::-webkit-scrollbar{ width: 6px; }
.popular-list::-webkit-scrollbar-thumb{
  background: var(--border);
  border-radius: 999px;
}

/* tighter items */
.popular-list .popular-item{
  padding: 8px 10px;
  gap: 10px;
}
.popular-list .rank{
  width: 22px; height: 22px;
  font-size: 12px;
}
.popular-list .meta .title{ font-size: 14px; line-height: 1.25; }
.popular-list .meta .sub{ font-size: 12px; }

/* shrink the inline bars (override inline 8px heights) */
.popular-list .meta > div[style*="height:8px"]{ height: var(--popular-bar-h) !important; }
.popular-list .meta > div[style*="height:8px"] > div{ height: var(--popular-bar-h) !important; }

/* optional: slightly smaller heading helper text */
.card .card-heading .small-muted{
  font-size: 12px;
}










#donutLegend{ line-height:1.35; font-size:15px; }
#donutLegend .legend-total{ font-weight:800; font-size:16px; margin-bottom:10px; }

#donutLegend .legend-row{
  display:grid;
  grid-template-columns: 1fr auto; /* left grows, right hugs */
  align-items:center;
  gap:14px;
  padding:6px 0;
  border-bottom:1px dashed var(--border);
}
#donutLegend .legend-row:last-child{ border-bottom:none; }

#donutLegend .legend-left{ display:flex; align-items:center; gap:10px; min-width:0; }
#donutLegend .legend-dot{ width:10px; height:10px; border-radius:999px; flex:0 0 10px; }
#donutLegend .legend-title{ font-weight:700; white-space:normal; overflow:hidden; text-overflow:ellipsis; }

#donutLegend .legend-count{ white-space:nowrap; text-align:right; }
#donutLegend .legend-count strong{
  display:inline-block; min-width: 28px; text-align:right; font-size:16px; font-weight:800; margin-right:6px;
}
#donutLegend .legend-count .small-muted{ font-size:12px; }





/* === KPI v2 (3+3 layout, big numbers, purple icon chips) === */
.kpi-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr)); /* 3 per row */
  gap:18px;
  margin-bottom:22px;
}

.kpi.card{
  position:relative;
  padding:64px 20px 20px;   /* top room for the chip */
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--card-bg);
  box-shadow:var(--shadow);
  min-height:160px;
}

/* main number & labels */
.kpi .value{
  font-size:34px;           /* bigger like the screenshot */
  line-height:1.15;
  font-weight:800;
}
.kpi .muted{ font-size:13px; }

/* % change in top-right (red for negative, green default) */
.kpi .delta{
  position:absolute;
  top:12px; right:12px;
  font-weight:700;
  color:var(--success);
}
.kpi .delta.negative{ color:var(--danger); }

/* hide the old spark strip, if present */
.kpi .spark{ display:none; }

/* icon chip background (light purple rounded square) */
.kpi::before{
  content:"";
  position:absolute;
  top:16px; left:16px;
  width:48px; height:48px;
  border-radius:14px;
  background: rgba(113,89,245,.12); /* light brand tint */
}

/* icon graphic (SVG as bg) */
.kpi::after{
  content:"";
  position:absolute;
  top:16px; left:16px;
  width:48px; height:48px;
  background-position:center;
  background-repeat:no-repeat;
  background-size:26px 26px;
}

/* 1) Users */
.kpi-grid .kpi:nth-child(1)::after{
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237159F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<circle cx='10' cy='7' r='4'/>\
<path d='M16 20v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/>\
<path d='M17 3a4 4 0 0 1 0 8'/>\
<path d='M22 20v-2a4 4 0 0 0-3-3.87'/>\
</svg>");
}

/* 2) Book */
.kpi-grid .kpi:nth-child(2)::after{
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237159F5' stroke-width='2' stroke-linejoin='round'>\
<path d='M7 3h13v16H7a2.5 2.5 0 1 0 0 5h13'/>\
<path d='M7 3v16'/>\
</svg>");
}

/* 3) Rupee */
.kpi-grid .kpi:nth-child(3)::after{
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<text x='12' y='16' text-anchor='middle' font-size='18' font-weight='700' font-family='Poppins,Arial' fill='%237159F5'>₹</text>\
</svg>");
}

/* 4) New Enrollments (user-plus) */
.kpi-grid .kpi:nth-child(4)::after{
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237159F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<circle cx='9' cy='7' r='4'/>\
<path d='M15 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2'/>\
<path d='M19 8v6'/>\
<path d='M16 11h6'/>\
</svg>");
}

/* 5) Calendar */
.kpi-grid .kpi:nth-child(5)::after{
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237159F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<rect x='3' y='4' width='18' height='16' rx='2'/>\
<path d='M16 2v4'/>\
<path d='M8 2v4'/>\
<path d='M3 10h18'/>\
</svg>");
}

/* 6) (If you add a 6th KPI later) — choose any icon */
.kpi-grid .kpi:nth-child(6)::after{
  background-image:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237159F5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<rect x='3' y='3' width='18' height='18' rx='3'/>\
<path d='M8 12h8'/>\
</svg>");
}

/* responsive: 2 per row on tablets, 1 per row on phones */
@media (max-width:900px){
  .kpi-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width:580px){
  .kpi-grid{ grid-template-columns: 1fr; }
}

/* recent-classes eye button */
.eye-btn { color: #2f6bff; background: transparent; border: 1px solid var(--border); padding: 6px 8px; border-radius: 10px; }
.eye-btn:hover { filter: brightness(1.05); }


/* EMI eye button */
.eye-btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px; border-radius:10px; border:1px solid var(--border);
  background:transparent;
}
.eye-btn svg { width:20px; height:20px; display:block; }




/* === EMI modal button tweaks === */

/* make the close “X” bolder/bigger */
.emi-card .emi-close{
  font-weight: 900;
  font-size: 22px;          /* bump size */
  line-height: 1;
  color: var(--text, #0f1724);
  border-radius: 8px;
}
.emi-card .emi-close:hover{ filter: brightness(1.1); }

/* make the Download PDF button red with white text */
.emi-card .emi-actions .emi-btn[data-emi="pdf"]{
  background: #ef4444;      /* red */
  color: #fff;              /* white text */
  border-color: #ef4444;
}
.emi-card .emi-actions .emi-btn[data-emi="pdf"]:hover{
  filter: brightness(1.05);
}
.emi-card .emi-actions .emi-btn[data-emi="pdf"]:focus{
  outline: 2px solid rgba(239,68,68,.5);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(239,68,68,.25);
}





/* --- Sticky headers for Recent tables --- */
.table-wrap {
  position: relative;               /* ensure stacking context for sticky header */
  overflow: auto;                   /* you already set this inline; keeping here too */
}

.table thead th {
  position: sticky;
  top: 0;                           /* stick to top of the scroll container */
  z-index: 5;                       /* above rows */
  background: var(--surface, #fff); /* match card surface (works in light/dark) */
  box-shadow: 0 1px 0 var(--border, #e6eef8); /* subtle line under header */
}

/* Optional (looks nicer but not required) */
.table thead th {
  backdrop-filter: saturate(120%) blur(2px);  /* slight frosted look */
}

/* Students table: scrolling + sticky header */
#studentsTableWrap .table-wrap{
  max-height: 70vh;     /* vertical scroll */
  overflow: auto;       /* vertical + horizontal scroll */
}

#studentsTableWrap .table{
  min-width: 1200px;    /* enables horizontal scroll when needed */
}

/* header sticks while scrolling (works with the .table-wrap above) */
#studentsTableWrap .table thead th{
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface, #fff);
  box-shadow: 0 1px 0 var(--border, #e6eef8);
}


/* --- Recent Classes: scrolling + sticky header --- */
#recent-classes .table-wrap{
  max-height: 420px;   /* vertical scroll like payments */
  overflow: auto;      /* vertical + horizontal scroll */
}

#recent-classes .table{
  min-width: 1000px;   /* enable horizontal scroll when columns overflow */
}

/* keep header visible while scrolling (works for both recent tables) */
#recent-classes thead th,
#recent-payments thead th,
.table thead th{
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface, #fff);
  box-shadow: 0 1px 0 var(--border, #e6eef8);
  /* optional: subtle glass look */
  backdrop-filter: saturate(120%) blur(2px);
}



/* ===== SHINY TAB BUTTON STYLE (for both Recent Classes & Payments) ===== */
.tabbar .tab.shiny {
  position: relative;
  overflow: hidden;
  border: none !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 16px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  box-shadow: 0 6px 16px rgba(37,99,235,0.25);
  transition: all 0.25s ease;
}

/* subtle hover / active brightening */
.tabbar .tab.shiny:hover,
.tabbar .tab.shiny.active {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

/* force active state to NEVER turn white */
.tabbar .tab.shiny.active {
  background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
  color: #fff !important;
  border-color: transparent !important;
}

/* animated shine sweep */
.tabbar .tab.shiny::before {
  content: "";
  position: absolute;
  inset: -30% -20%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 30%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0) 70%
  );
  transform: skewX(-20deg) translateX(-120%);
  animation: shineSweep 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shineSweep {
  0%   { transform: skewX(-20deg) translateX(-120%); }
  55%  { transform: skewX(-20deg) translateX(120%); }
  100% { transform: skewX(-20deg) translateX(120%); }
}

/* Make sure base tab.active rule can’t override this */
.tabbar .tab.active.shiny { background: inherit !important; color: inherit !important; }



/* ==== Dashboard: Recent tabs -> inactive white, active blue ==== */
.card .tabbar .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);
}
.card .tabbar .tab.shiny::before{ display: none; } /* no shine when inactive */

.card .tabbar .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);
}
.card .tabbar .tab.shiny.active::before{ display: block; } /* shine only on active */



/* ==== Sidebar: animated shine on all nav tabs ==== */
.nav-item { position: relative; overflow: hidden; } /* keep your current look */
.nav-item.shiny::before{
  content:"";
  position:absolute;
  inset:-40% -30%;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 35%,
    rgba(255,255,255,0.5) 50%,
    rgba(255,255,255,0) 65%
  );
  transform: skewX(-20deg) translateX(-120%);
  animation: shineSweep 2.6s ease-in-out infinite;
  pointer-events:none;
  opacity:.65;             /* toned for dark */
}
body.light .nav-item.shiny::before{ opacity:.45; }  /* a bit softer in light */

/* Boost visibility on active item (same gradient blue stays intact) */
.nav-item.shiny.active::before{
  animation-duration: 1.9s;
  opacity:.85;
}

/* Optional: pause sweep until hover for inactive items */
.nav-item.shiny:not(.active)::before{ animation-play-state: paused; }
.nav-item.shiny:not(.active):hover::before{ animation-play-state: running; }


/* ========== LOGOUT — final override ========== */

/* sidebar bottom wrapper: match left padding of menu list */
.sidebar-bottom{
  padding: 0 0 20px 24px;              /* ⬅️ same left inset as other items */
}

/* reset conflicting old rules for this button */
.sidebar-bottom #logout{
  display:inline-flex !important;
  align-items:center !important;
  gap:12px !important;
  background:transparent !important;
  border:none !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  width:auto !important;
  cursor:pointer;
  text-transform:none !important;
  letter-spacing:.01em !important;
  color:#0f172a !important;            /* default dark text */
  transform: translateX(0);
  transition: color .18s ease, transform .18s ease, opacity .18s ease;
}

/* text label (so icon doesn’t inherit red) */
#logout .lo-text{
  color:#0f172a !important;
  font-weight:700;
}

/* gradient icon chip stays like your design */
#logout .lo-chip{
  width:28px; height:28px; flex:0 0 28px;
  border-radius:999px;
  display:inline-flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#20d3f3 0%, #7a61ff 55%, #ff7bd6 100%);
  box-shadow:0 6px 14px rgba(122,97,255,.18);
}
#logout .lo-chip svg{
  width:18px; height:18px; display:block;
  stroke:#fff; fill:none; stroke-width:2.6;
  stroke-linecap:round; stroke-linejoin:round;
}

/* hover: only text turns red + tiny slide, icon unchanged */
.sidebar-bottom #logout:hover .lo-text{
  color:#ef4444 !important;            /* 🔴 red text */
}
.sidebar-bottom #logout:hover{
  transform: translateX(4px);
  opacity:.95;
}

/* active + keyboard focus */
.sidebar-bottom #logout:active{ transform: translateX(0); opacity:1; }
.sidebar-bottom #logout:focus-visible{
  outline:2px solid rgba(239,68,68,.45);
  outline-offset:3px;
}

/* make sure any legacy .ico inside logout is hidden */
#logout .ico{ display:none !important; }




/*Alert Styel*/

/* ===== Notification Bell ===== */
.notif-bell{
  position: fixed; top: 18px; right: 24px; z-index: 60;
  width: 42px; height: 42px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  background:#fff; color:#0f172a; border:1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(2,6,23,.08);
}
.notif-bell .bell{ width:24px; height:24px }
.notif-bell .badge{
  position:absolute; top:-6px; right:-6px; min-width:22px; height:22px;
  padding:0 6px; border-radius:999px; background:#ef4444; color:#fff;
  font-weight:800; font-size:12px; display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 18px rgba(239,68,68,.4);
}

/* Jump only when .attn is present */
.notif-bell.attn{ animation: nbounce 1.25s ease-in-out infinite }
@keyframes nbounce{
  0%,100%{ transform: translateY(0) }
  50%{ transform: translateY(-6px) }
}

/* ===== Alert Panel ===== */
.alert-panel{
  position: fixed; right: 24px; top: 74px; width: 720px; max-width: 92vw;
  background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  box-shadow: 0 24px 48px rgba(2,6,23,.12); padding:14px; z-index: 60;
}
.ap-head{ display:grid; grid-template-columns:auto auto 1fr auto auto; gap:10px; align-items:center; }
.ap-head .ttl{ font-weight:800; font-size:18px }
.ap-head .meta{ color:#64748b; font-size:13px }
.ap-btn{ padding:8px 12px; border-radius:10px; border:1px solid #e5e7eb; background:#fff; font-weight:700 }
.ap-btn[disabled]{ opacity:.5; cursor:not-allowed }

.ap-list{ display:flex; flex-direction:column; gap:12px; margin-top:12px; max-height:60vh; overflow:auto }

/* Item styles */
.ap-item{
  position:relative; border:1px solid #fecaca; background:#fee2e2; border-radius:12px; padding:12px;
}
.ap-item .row1{ display:flex; align-items:center; gap:10px; margin-bottom:6px }
.ap-item .row1 .ic{ width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center }
.ap-item .title{ font-weight:800 }
.ap-item .meta{ display:flex; gap:12px; color:#64748b; font-size:12px; margin-top:8px; flex-wrap:wrap }
.ap-item .close{ position:absolute; top:8px; right:10px; opacity:.7 }

/* empty state */
.ap-empty{ padding:16px; color:#64748b; text-align:center }
@media (max-width:720px){ .alert-panel{ right:12px; left:12px; width:auto } }









/**************  ALERTS — POLISHED UI  **************/
.notif-bell{
  position: fixed; top: 18px; right: 24px; z-index: 70;
  width: 44px; height: 44px; border-radius: 14px;
  display:none; /* shown only on Dashboard via JS */
  align-items:center; justify-content:center;
  background:#ffffff; color:#0f172a; border:1px solid #e6e9ee;
  box-shadow: 0 12px 28px rgba(2,6,23,.10);
  transition: transform .2s ease, box-shadow .2s ease;
}
.notif-bell:hover{ transform: translateY(-1px); box-shadow: 0 16px 34px rgba(2,6,23,.14); }
.notif-bell .bell{ width:24px; height:24px }
.notif-bell .badge{
  position:absolute; top:-6px; right:-6px; min-width:22px; height:22px;
  padding:0 6px; border-radius:999px; background:#ef4444; color:#fff;
  font-weight:800; font-size:12px; display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 18px rgba(239,68,68,.4);
}

/* Halo pulse & subtle float when there are UNREAD alerts */
.notif-bell.attn::before{
  content:""; position:absolute; inset:-6px; border-radius:16px;
  background: radial-gradient(closest-side, rgba(239,68,68,.22), transparent 70%);
  animation: haloPulse 1.6s ease-in-out infinite;
}
@keyframes haloPulse{
  0%,100%{ opacity:.35; transform: scale(.98) }
  50%{ opacity:.7; transform: scale(1.02) }
}

/* Badge pop whenever the count changes */
.badge.pop{ animation: badgePop .32s cubic-bezier(.2,.9,.2,1) }
@keyframes badgePop{
  0%{ transform: scale(.6); opacity:.6 }
  60%{ transform: scale(1.15); opacity:1 }
  100%{ transform: scale(1) }
}

/* Panel: glassy slide-in */
.alert-panel{
  position: fixed; right: 24px; top: 74px; width: 760px; max-width: 92vw;
  background: rgba(255,255,255,.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border:1px solid rgba(230,233,238,.9); border-radius:16px;
  box-shadow: 0 28px 56px rgba(2,6,23,.16); padding:14px; z-index: 70;
  transform-origin: top right;
  transform: translateY(-8px) scale(.98); opacity:0;
  transition: transform .22s ease, opacity .22s ease;
}
.alert-panel.open{ transform: translateY(0) scale(1); opacity:1; }

.ap-head{ display:grid; grid-template-columns:auto auto 1fr auto auto; gap:10px; align-items:center; }
.ap-head .ttl{ font-weight:900; font-size:18px }
.ap-head .meta{ color:#64748b; font-size:13px }
.ap-btn{
  padding:8px 12px; border-radius:10px; border:1px solid #e6e9ee; background:#fff; font-weight:700;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ap-btn:hover{ transform: translateY(-1px); box-shadow: 0 8px 18px rgba(2,6,23,.08) }
.ap-btn[disabled]{ opacity:.5; cursor:not-allowed }
.ap-list{ display:flex; flex-direction:column; gap:12px; margin-top:12px; max-height:60vh; overflow:auto }

/* Alert card with gradient stripe and icon chip */
.ap-item{
  position:relative; border:1px solid #f9c8c8; border-radius:14px; padding:12px 12px 12px 16px;
  background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
  box-shadow: 0 10px 24px rgba(239,68,68,.08);
}
.ap-item::before{
  content:""; position:absolute; left:-1px; top:-1px; bottom:-1px; width:6px;
  border-radius:14px 0 0 14px; background: linear-gradient(180deg, #ef4444, #f97316);
}
.ap-item .row1{ display:flex; align-items:center; gap:10px; margin-bottom:6px }
.ap-item .row1 .ic{
  width:26px; height:26px; border-radius:9px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:900;
  box-shadow: 0 6px 14px rgba(239,68,68,.25);
}
.ap-item .title{ font-weight:900 }
.ap-item .meta{ display:flex; gap:12px; color:#64748b; font-size:12px; margin-top:8px; flex-wrap:wrap }
.ap-item .close{ position:absolute; top:8px; right:10px; opacity:.7; font-weight:900 }
.ap-item.new{ animation: cardIn .35s cubic-bezier(.2,.8,.2,1) }
@keyframes cardIn{
  0%{ transform: translateY(6px); opacity:0 }
  100%{ transform: translateY(0); opacity:1 }
}

.ap-empty{ padding:18px; color:#64748b; text-align:center }
@media (max-width:720px){ .alert-panel{ right:12px; left:12px; width:auto } }


/*-------------Test Reports-------------*/

/* ===== Test Reports (list + detail) ===== */
.tr-page.card { padding:18px; border-radius:14px; }

.tr-head { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.tr-head .ttl { font-size:22px; font-weight:800; }
.tr-searchbar {
  display:flex; align-items:center; gap:10px; margin-top:10px;
}
.tr-searchbar input {
  flex:1; height:40px; border-radius:10px; padding:0 12px;
  border:1px solid var(--border); background:#fff; color:var(--text);
}
.tr-list { display:flex; flex-direction:column; gap:14px; margin-top:14px; }
.tr-item {
  display:flex; align-items:center; gap:14px;
  padding:14px; border-radius:12px;
  background: linear-gradient(180deg,#ffffff,#fbfdff);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tr-item:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11,20,50,.08); }
.tr-doc { width:44px; height:44px; border-radius:12px;
  display:inline-flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg,#7159F5,#8b74ff); color:#fff; }
.tr-title { font-weight:800; }
.tr-sub { color:#64748b; font-size:13px; }
.tr-meta { display:flex; gap:14px; color:#64748b; font-size:13px; margin-top:4px; align-items:center; flex-wrap:wrap; }
.tr-badge { font-size:12px; font-weight:800; padding:4px 10px; border-radius:999px; }
.tr-badge.yellow { background:#fef3c7; color:#b45309; border:1px solid #fde68a; }
.tr-badge.green  { background:#dcfce7; color:#065f46; border:1px solid #bbf7d0; }

.tr-back { margin-bottom:10px; display:inline-flex; gap:8px; align-items:center; color:#2563eb; font-weight:700; }
.tr-grid { display:grid; grid-template-columns: repeat(6,1fr); gap:14px; margin:10px 0 18px; }
.tr-kpi { background:#fff; border:1px solid var(--border); border-radius:12px; padding:12px; }
.tr-kpi .lab { color:#64748b; font-size:12px; }
.tr-kpi .val { font-weight:900; font-size:20px; margin-top:4px; }

.tr-table .table { width:100%; }
.tr-actions { display:flex; gap:8px; justify-content:flex-end; }
.tr-btn {
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:10px; border:1px solid var(--border);
  background:#fff; font-weight:700; cursor:pointer;
}
.tr-btn.view { color:#1d4ed8; }
.tr-btn.dl   { color:#0f172a; }

/* modal */
.tr-modal {
  position: fixed; inset:0; display:none; align-items:center; justify-content:center;
  background: rgba(15,23,42,.35); z-index: 120;
}
.tr-modal.open { display:flex; }
.tr-modal-card {
  width:min(680px,92vw); background:#fff; border:1px solid var(--border);
  border-radius:14px; padding:16px; box-shadow: 0 24px 56px rgba(2,6,23,.18);
}
.tr-modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.tr-close { font-weight:900; }





/* ===== Collections Header (top metrics) ===== */
.collect-header{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.collect-header .metric.card{
  position:relative;
  border-radius:14px;
  border:1px solid var(--border);
  background: linear-gradient(180deg,#ffffff, #fbfdff);
  box-shadow: var(--shadow);
  padding:14px;
  overflow:hidden;
  animation: fadeInUp .35s ease both;
}

.collect-header .metric .m-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
}
.collect-header .metric .label{
  font-size:12px; font-weight:600; color:#64748b; letter-spacing:.02em;
}
.collect-header .metric .value{
  margin-top:4px;
  font-size:28px; font-weight:900; color:#0f172a;
  opacity:0; transform: translateY(4px);
  animation: valuePop .45s .15s cubic-bezier(.2,.9,.2,1) forwards;
}
.collect-header .metric .m-sub{
  margin-top:6px; font-size:12px; color:#6b7280;
}

/* icon chip */
.collect-header .metric .m-ico{
  flex:0 0 auto;
  width:44px; height:44px; border-radius:12px;
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.collect-header .metric .m-ico .ico{ width:22px; height:22px; display:block; }

/* tone accents */
.collect-header .metric[data-tone="indigo"] .m-ico{ background:linear-gradient(135deg,#6366f1,#4f46e5); }
.collect-header .metric[data-tone="teal"]   .m-ico{ background:linear-gradient(135deg,#14b8a6,#0d9488); }
.collect-header .metric[data-tone="emerald"].m-ico{ background:linear-gradient(135deg,#10b981,#059669); }
/* fix selector typo: */
.collect-header .metric[data-tone="emerald"] .m-ico{ background:linear-gradient(135deg,#10b981,#059669); }

/* progress */
.collect-header .metric .m-prog{
  margin-top:10px; height:6px; border-radius:999px;
  background:#eef2f7; overflow:hidden;
}
.collect-header .metric .m-prog .bar{
  height:100%; width:0%;
  background: linear-gradient(90deg,#4f46e5,#7c59ff);
  border-radius:999px;
  transition: width .6s cubic-bezier(.2,.9,.2,1);
}
.collect-header .metric[data-tone="teal"] .m-prog .bar{
  background: linear-gradient(90deg,#0ea5e9,#14b8a6);
}
.collect-header .metric[data-tone="emerald"] .m-prog .bar{
  background: linear-gradient(90deg,#34d399,#10b981);
}

/* animations */
@keyframes fadeInUp{
  from{ opacity:0; transform:translateY(6px); }
  to  { opacity:1; transform:translateY(0); }
}
@keyframes valuePop{
  0%  { opacity:0; transform: translateY(4px) scale(.98); }
  100%{ opacity:1; transform: translateY(0) scale(1); }
}

/* responsive */
@media (max-width: 980px){
  .collect-header{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .collect-header{ grid-template-columns: 1fr; }
}



/* Section titles */
.dash-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 24px 0 12px 4px;
  letter-spacing: 0.2px;
}

/* Equalize card sizes */
.collect-header .metric.card,
.kpi-grid .kpi.card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Consistent spacing between sections */
.collect-header,
.kpi-grid,
.charts-grid,
.row-cards,
.card {
  margin-bottom: 28px;
}

/* --- Section titles (Dashboard) --- */
.dash-section-title{
  margin: 8px 0 14px;
  font-weight: 800;          /* bold */
  font-size: 22px;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: .2px;
}

@media (max-width:900px){
  .dash-section-title{ font-size:20px; }
}


/* --- Daily Collection Summary : soft rise-in + stagger --- */
.collect-header .metric.card{
  opacity:0; transform: translateY(8px);
  animation: cardRise .38s ease-out forwards;
  will-change: transform, opacity;
}
.collect-header .metric.card:nth-child(1){ animation-delay:.05s; }
.collect-header .metric.card:nth-child(2){ animation-delay:.12s; }
.collect-header .metric.card:nth-child(3){ animation-delay:.19s; }

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

/* tiny progress bar ease */
.collect-header .m-prog .bar{
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}

/* ==== Recent Payments – Blue CTA buttons with shine splash ==== */
#recentApply,
#viewAllPaymentsBtn,
#recentPaymentsPager button[data-act="export-range"] {
  position: relative;
  overflow: hidden;              /* so shine stays inside */
  border-radius: 999px;
  padding: 8px 20px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
  background: linear-gradient(120deg, #2563eb, #4f46e5);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* hover / active states */
#recentApply:hover,
#viewAllPaymentsBtn:hover,
#recentPaymentsPager button[data-act="export-range"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.6);
}
#recentApply:active,
#viewAllPaymentsBtn:active,
#recentPaymentsPager button[data-act="export-range"]:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

/* moving shine "splash" every 3 seconds */
#recentApply::after,
#viewAllPaymentsBtn::after,
#recentPaymentsPager button[data-act="export-range"]::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -30%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.85),
    transparent
  );
  transform: translateX(-220%);
  opacity: 0;
  pointer-events: none;
  animation: recentBtnSplash 3s infinite;
}

@keyframes recentBtnSplash {
  0%, 80% {
    transform: translateX(-220%);
    opacity: 0;
  }
  88% {
    opacity: 1;
  }
  100% {
    transform: translateX(260%);
    opacity: 0;
  }
}
/* === Disable all shine / splash animations on buttons & tabs === */

/* Kill shiny sweep on Recent tabs */
.tabbar .tab.shiny::before,
.card .tabbar .tab.shiny::before{
  display: none !important;
  animation: none !important;
}

/* Kill shiny sweep on sidebar nav items */
.nav-item.shiny::before{
  display: none !important;
  animation: none !important;
}

/* Kill blue CTA splash on Recent Payments buttons */
#recentApply::after,
#viewAllPaymentsBtn::after,
#recentPaymentsPager button[data-act="export-range"]::after{
  display: none !important;
  animation: none !important;
}
