/* ═══════════════════════════════════════════════════════════════
   EduFlow ERP — Dashboard CSS v2.1
   Elementor-aware height | Scroll-friendly | Mobile-first
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&display=swap');

:root {
  --ef-primary:       #4F46E5;
  --ef-primary-dark:  #3730A3;
  --ef-primary-lt:    #EEF2FF;
  --ef-secondary:     #818CF8;
  --ef-success:       #10B981;
  --ef-danger:        #EF4444;
  --ef-warning:       #F59E0B;
  --ef-teal:          #0D9488;
  --ef-purple:        #8B5CF6;
  --ef-slate-50:      #F8FAFC;
  --ef-slate-100:     #F1F5F9;
  --ef-slate-200:     #E2E8F0;
  --ef-slate-300:     #CBD5E1;
  --ef-slate-400:     #94A3B8;
  --ef-slate-500:     #64748B;
  --ef-slate-600:     #475569;
  --ef-slate-700:     #334155;
  --ef-slate-800:     #1E293B;
  --ef-slate-900:     #0F172A;
  --ef-sidebar-w:     240px;
  --ef-radius:        14px;
  --ef-radius-sm:     8px;
  --ef-radius-lg:     20px;
  --ef-shadow:        0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --ef-shadow-md:     0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.05);
  --ef-shadow-lg:     0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --ef-shadow-xl:     0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ─── RESET & BASE ─── */
.ef-sc-wrap {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ef-slate-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
  line-height: 1.5;
}
.ef-sc-wrap *, .ef-sc-wrap *::before, .ef-sc-wrap *::after { box-sizing: border-box; }
.ef-sc-wrap a { text-decoration: none; }
.ef-sc-wrap button { font-family: inherit; }
.ef-sc-wrap img { max-width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD SHELL
   KEY FIX: No min-height:100vh — use height:100% so it respects
   the Elementor container height set by the user.
   overflow:hidden on shell so internal scroll works cleanly.
═══════════════════════════════════════════════════════════════ */
.ef-dash-shell {
  display: flex;
  /* height inherits from Elementor container — DO NOT force 100vh */
  height: 100%;
  min-height: 500px;           /* absolute floor so it never collapses */
  background: var(--ef-slate-50);
  position: relative;
  overflow: hidden;             /* clip children, let them scroll internally */
  /* Professional card: rounded corners + light stroke + subtle lift */
  border-radius: 18px;
  border: 1px solid var(--ef-slate-200);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   KEY FIX: height:100% (matches shell) instead of 100vh.
   overflow-y:auto so its own nav scrolls if items overflow.
   position:sticky removed — use normal flow inside the flex shell.
═══════════════════════════════════════════════════════════════ */
.ef-sidebar {
  width: var(--ef-sidebar-w);
  min-width: var(--ef-sidebar-w);
  background: #fff;
  /* Right border acts as divider stroke */
  border-right: 1px solid var(--ef-slate-200);
  display: flex;
  flex-direction: column;
  /* Matches shell height exactly — grows/shrinks with content */
  align-self: stretch;
  height: auto;
  min-height: 100%;
  /* Sidebar itself scrolls if nav items overflow */
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  /* Match shell radius on left side */
  border-radius: 18px 0 0 18px;
}

.ef-sidebar-logo {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--ef-slate-100);
  flex-shrink: 0;               /* logo never shrinks */
}

.ef-sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--ef-primary), var(--ef-secondary));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(79,70,229,0.25);
}

.ef-sidebar-logo-text {
  font-size: 17px; font-weight: 800;
  color: var(--ef-slate-900); letter-spacing: -0.3px; white-space: nowrap;
}
.ef-sidebar-logo-text span { color: var(--ef-primary); }

.ef-sidebar-nav {
  padding: 10px 10px 20px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.ef-sidebar-section {
  padding: 14px 10px 5px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--ef-slate-400);
}

.ef-sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: 10px;
  text-decoration: none !important;
  color: var(--ef-slate-600);
  font-weight: 500; font-size: 14px;
  transition: all 0.15s ease;
  white-space: nowrap; overflow: hidden;
  border: 1px solid transparent;
}
.ef-sidebar-item:hover {
  background: var(--ef-slate-50);
  color: var(--ef-slate-800);
  border-color: var(--ef-slate-200);
}
.ef-sidebar-item.active {
  background: var(--ef-primary-lt);
  color: var(--ef-primary);
  font-weight: 700;
  border-color: rgba(79,70,229,0.15);
}

.ef-si-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

/* ─── SIDEBAR OVERLAY (mobile) ─── */
.ef-sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 99; backdrop-filter: blur(2px);
}
.ef-sidebar-overlay.active { display: block; }

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   KEY FIX: flex:1 + height:100% + overflow-y:auto
   This is the ONLY scrolling region — content scrolls here,
   not the whole page. Elementor sets the outer height.
═══════════════════════════════════════════════════════════════ */
.ef-main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--ef-slate-50);
  /* Allow vertical scroll within the container */
  overflow-y: auto;
  overflow-x: hidden;
  /* full height of the shell */
  height: 100%;
  /* Match shell radius on right side */
  border-radius: 0 18px 18px 0;
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   KEY FIX: position:sticky + top:0 sticks to top of
   .ef-main-content scroll container, not the page.
═══════════════════════════════════════════════════════════════ */
.ef-topbar {
  height: 60px;
  background: #fff;
  border-bottom: 1px solid var(--ef-slate-200);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;                       /* sticks inside .ef-main-content */
  z-index: 98;
  flex-shrink: 0;               /* never compress */
  box-shadow: 0 1px 0 var(--ef-slate-100);
  /* Match shell top-right corner */
  border-radius: 0 18px 0 0;
}

.ef-topbar-left { display: flex; align-items: center; gap: 12px; }

.ef-sidebar-toggle {
  display: none;
  background: none;
  border: 1px solid var(--ef-slate-200);
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 18px; color: var(--ef-slate-600);
  cursor: pointer; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.ef-sidebar-toggle:hover { background: var(--ef-slate-100); color: var(--ef-slate-800); }

.ef-topbar-title { font-size: 16px; font-weight: 700; color: var(--ef-slate-900); }

.ef-topbar-right { display: flex; align-items: center; gap: 10px; position: relative; }

.ef-topbar-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--ef-slate-50); border: 1px solid var(--ef-slate-200);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 17px; position: relative;
  transition: all 0.15s; user-select: none;
}
.ef-topbar-btn:hover { background: var(--ef-primary-lt); border-color: var(--ef-primary); }

.ef-topbar-notif {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px;
  background: var(--ef-danger); border-radius: 50%; border: 1.5px solid #fff;
}

.ef-topbar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ef-primary), var(--ef-secondary));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; cursor: pointer; overflow: hidden;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
  user-select: none; transition: all 0.15s;
}
.ef-topbar-avatar:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(79,70,229,0.3); }

/* ═══════════════════════════════════════════════════════════════
   PAGE BODY
   Grows to fill remaining space in .ef-main-content.
   Padding-bottom accounts for mobile bottom nav (60px).
═══════════════════════════════════════════════════════════════ */
.ef-page-body {
  padding: 24px;
  flex: 1;
  width: 100%;
  overflow-x: hidden;
}

/* ─── HERO BANNER ─── */
.ef-student-hero {
  background: linear-gradient(135deg, #4338CA 0%, #6D28D9 50%, #7C3AED 100%);
  border-radius: var(--ef-radius-lg);
  padding: 28px 32px;
  color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(79,70,229,0.3);
  position: relative; overflow: hidden;
}
.ef-student-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; background: rgba(255,255,255,0.06); border-radius: 50%;
}
.ef-student-hero::after {
  content: ''; position: absolute; bottom: -40px; right: 200px;
  width: 120px; height: 120px; background: rgba(255,255,255,0.04); border-radius: 50%;
}
.ef-student-info { display: flex; align-items: center; gap: 20px; position: relative; z-index: 1; }
.ef-student-avatar {
  width: 64px; height: 64px; border-radius: 18px;
  background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; overflow: hidden; flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.ef-student-name { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 4px; }
.ef-student-sub { font-size: 14px; opacity: 0.8; font-weight: 500; }
.ef-hero-stats { display: flex; gap: 12px; position: relative; z-index: 1; flex-shrink: 0; }
.ef-hero-stat-chip {
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 14px; padding: 14px 20px; text-align: center; min-width: 90px;
  backdrop-filter: blur(4px); transition: background 0.15s;
}
.ef-hero-stat-chip:hover { background: rgba(255,255,255,0.22); }
.ef-hero-stat-chip .num { font-size: 20px; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.ef-hero-stat-chip .lbl { font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }

/* ─── STATS GRID ─── */
.ef-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px;
}
.ef-stat-card {
  background: #fff; border-radius: var(--ef-radius); padding: 20px;
  display: flex; justify-content: space-between; align-items: flex-start;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); border: 1px solid var(--ef-slate-200);
  transition: all 0.2s ease;
}
.ef-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.10);
  border-color: rgba(79,70,229,0.25);
}
.ef-stat-card-info { flex: 1; }
.ef-stat-card-label { font-size: 11px; font-weight: 700; color: var(--ef-slate-400); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 8px; }
.ef-stat-card-num { font-size: 26px; font-weight: 800; color: var(--ef-slate-900); line-height: 1; margin-bottom: 10px; }
.ef-stat-card-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ef-stat-card-icon.blue   { background: #EFF6FF; }
.ef-stat-card-icon.green  { background: #ECFDF5; }
.ef-stat-card-icon.amber  { background: #FFFBEB; }
.ef-stat-card-icon.purple { background: #F5F3FF; }

/* ─── EXAM BANNER ─── */
.ef-xbanner {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px solid #FDE68A; border-radius: var(--ef-radius);
  padding: 20px 24px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.ef-xbanner-ic { width: 44px; height: 44px; background: #FEF3C7; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 1.5px solid #FDE68A; flex-shrink: 0; }
.ef-xbanner-ll { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #D97706; margin-bottom: 3px; }
.ef-xbanner-nm { font-size: 16px; font-weight: 800; color: var(--ef-slate-900); }
.ef-xbanner-dt { font-size: 13px; color: var(--ef-slate-500); margin-top: 2px; }

/* ─── SECTION HEADER ─── */
.ef-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; margin-top: 28px; }
.ef-section-title { font-size: 15px; font-weight: 700; color: var(--ef-slate-700); }

/* ─── QUICK ACCESS GRID ─── */
.ef-qa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.ef-qa-item {
  background: #fff; padding: 20px 14px; border-radius: var(--ef-radius);
  text-align: center; text-decoration: none !important;
  border: 1px solid var(--ef-slate-200);
  transition: all 0.2s ease; display: block; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ef-qa-item:hover {
  border-color: rgba(79,70,229,0.35);
  box-shadow: 0 4px 16px rgba(79,70,229,0.12);
  transform: translateY(-2px);
  background: #FAFAFE;
}
.ef-qa-icon {
  font-size: 26px; height: 40px; width: 40px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; border-radius: 10px;
}
.ef-qa-icon.c1 { background: var(--ef-primary-lt); }
.ef-qa-icon.c2 { background: #ECFDF5; }
.ef-qa-label { font-size: 13px; font-weight: 600; color: var(--ef-slate-700); line-height: 1.3; }

/* ─── SHARED CARD ─── */
.ef-sc-card {
  background: #fff; border-radius: var(--ef-radius);
  border: 1px solid var(--ef-slate-200);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05), 0 0 0 1px rgba(0,0,0,0.02);
  overflow: hidden; margin-bottom: 20px;
  transition: box-shadow 0.18s;
}
.ef-sc-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.03);
}
.ef-sc-card-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--ef-slate-100); flex-wrap: wrap; gap: 10px; }
.ef-sc-card-title { font-size: 15px; font-weight: 700; color: var(--ef-slate-900); display: flex; align-items: center; gap: 8px; }
.ef-sc-card-body { padding: 20px; }
.ef-icon { font-size: 16px; }

/* ─── TABLE ─── */
.ef-sc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ef-sc-table { width: 100%; border-collapse: collapse; min-width: 500px; }
.ef-sc-table th { text-align: left; padding: 10px 16px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--ef-slate-400); background: var(--ef-slate-50); border-bottom: 1px solid var(--ef-slate-200); white-space: nowrap; }
.ef-sc-table td { padding: 14px 16px; font-size: 13px; color: var(--ef-slate-600); border-bottom: 1px solid var(--ef-slate-100); vertical-align: middle; }
.ef-sc-table tbody tr:last-child td { border-bottom: none; }
.ef-sc-table tbody tr:hover td { background: var(--ef-slate-50); }

/* ─── BADGES ─── */
.ef-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; line-height: 1.6; white-space: nowrap; }
.ef-badge-green  { background: #DCFCE7; color: #15803D; }
.ef-badge-red    { background: #FEE2E2; color: #B91C1C; }
.ef-badge-amber  { background: #FEF3C7; color: #B45309; }
.ef-badge-slate  { background: var(--ef-slate-100); color: var(--ef-slate-600); }
.ef-badge-purple { background: #F3E8FF; color: #7E22CE; }
.ef-badge-teal   { background: #CCFBF1; color: #0F766E; }
.ef-badge-accent { background: var(--ef-primary-lt); color: var(--ef-primary); }

/* ─── BUTTONS ─── */
.ef-pay-btn {
  background: var(--ef-primary); color: #fff !important;
  padding: 9px 18px; border-radius: 9px;
  font-weight: 700; font-size: 13px; text-decoration: none !important;
  transition: all 0.18s ease; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(79,70,229,0.20);
}
.ef-pay-btn:hover {
  background: var(--ef-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79,70,229,0.30);
}
.ef-pay-btn:active { transform: translateY(0); box-shadow: none; }

.ef-pay-btn-sm {
  padding: 5px 12px; font-size: 12px; border-radius: 7px;
  box-shadow: none;
}
.ef-pay-btn-sm:hover { transform: none; box-shadow: 0 2px 8px rgba(79,70,229,0.25); }

.ef-btn-secondary {
  background: #fff; color: var(--ef-slate-700) !important;
  padding: 9px 18px; border-radius: 9px;
  font-weight: 600; font-size: 13px; text-decoration: none !important;
  transition: all 0.18s; border: 1px solid var(--ef-slate-200); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.ef-btn-secondary:hover {
  background: var(--ef-slate-50);
  border-color: var(--ef-slate-300);
  color: var(--ef-slate-900) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.ef-btn {
  background: var(--ef-primary); color: #fff !important;
  padding: 9px 18px; border-radius: 9px;
  font-weight: 700; font-size: 13px; text-decoration: none !important;
  transition: all 0.18s; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
  box-shadow: 0 1px 3px rgba(79,70,229,0.20);
}
.ef-btn:hover {
  background: var(--ef-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79,70,229,0.28);
}
.ef-btn:active { transform: translateY(0); }

.ef-btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--ef-primary), var(--ef-secondary));
  color: #fff; padding: 13px 24px; border-radius: 10px;
  font-weight: 700; font-size: 15px; border: none; cursor: pointer;
  font-family: inherit; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 2px 8px rgba(79,70,229,0.22);
}
.ef-btn-submit:hover {
  opacity: 0.93;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79,70,229,0.32);
}
.ef-btn-submit:active { transform: translateY(0); }

/* ─── PROFILE ─── */
.ef-profile-banner { background: linear-gradient(135deg, #4338CA 0%, #6D28D9 100%); padding: 28px 28px 56px; position: relative; color: #fff; }
.ef-profile-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -0.3px; }
.ef-profile-sub { font-size: 13px; opacity: 0.85; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ef-profile-avatar { position: absolute; bottom: -40px; right: 28px; width: 80px; height: 80px; border-radius: 20px; background: rgba(255,255,255,0.2); border: 3px solid rgba(255,255,255,0.5); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; overflow: hidden; backdrop-filter: blur(4px); }
.ef-profile-body { padding: 56px 24px 24px; }
.ef-profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.ef-profile-label { font-size: 10px; font-weight: 700; color: var(--ef-slate-400); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.ef-profile-value { font-size: 14px; font-weight: 600; color: var(--ef-slate-800); word-break: break-word; }

/* ─── ATTENDANCE ─── */
.ef-att-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--ef-slate-100); flex-wrap: wrap; gap: 12px; }
.ef-att-month { font-size: 15px; font-weight: 700; color: var(--ef-slate-900); display: flex; align-items: center; gap: 8px; }
.ef-month-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ef-month-nav select { padding: 7px 10px; border: 1px solid var(--ef-slate-200); border-radius: 8px; font-size: 13px; font-family: inherit; color: var(--ef-slate-700); background: #fff; cursor: pointer; outline: none; }
.ef-month-nav select:focus { border-color: var(--ef-primary); }
.ef-month-nav button { padding: 7px 14px; background: var(--ef-primary); color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background 0.15s; }
.ef-month-nav button:hover { background: var(--ef-primary-dark); }

.ef-stats-row { display: flex; gap: 0; border-bottom: 1px solid var(--ef-slate-100); }
.ef-stat-box { flex: 1; text-align: center; padding: 16px 10px; border-right: 1px solid var(--ef-slate-100); }
.ef-stat-box:last-child { border-right: none; }
.ef-stat-num { font-size: 22px; font-weight: 800; color: var(--ef-slate-900); line-height: 1; margin-bottom: 4px; }
.ef-stat-lbl { font-size: 11px; font-weight: 600; color: var(--ef-slate-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── FEES ─── */
.ef-fees-summary { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--ef-slate-100); }
.ef-fees-box { padding: 20px; text-align: center; border-right: 1px solid var(--ef-slate-100); }
.ef-fees-box:last-child { border-right: none; }
.ef-fees-icon { font-size: 22px; margin-bottom: 6px; }
.ef-fees-amount { font-size: 22px; font-weight: 800; color: var(--ef-slate-900); margin-bottom: 4px; line-height: 1; }
.ef-fees-label { font-size: 11px; font-weight: 600; color: var(--ef-slate-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── TABS ─── */
.ef-fees-tabs { display: flex; border-bottom: 1px solid var(--ef-slate-200); padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; background: #fff; }
.ef-fees-tab {
  padding: 12px 16px; border: none; background: none;
  font-size: 13px; font-weight: 600; color: var(--ef-slate-500);
  cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.ef-fees-tab:hover { color: var(--ef-primary); background: none; }
.ef-fees-tab.active {
  color: var(--ef-primary);
  border-bottom-color: var(--ef-primary);
  background: none;
}
.ef-fees-tab-pane { display: none; }
.ef-fees-tab-pane.active { display: block; }

/* ─── SALARY SLIP ─── */
.ef-slip { border: 1px solid var(--ef-slate-200); border-radius: var(--ef-radius); margin-bottom: 14px; overflow: hidden; transition: box-shadow 0.15s; }
.ef-slip:hover { box-shadow: var(--ef-shadow-md); }
.ef-slip-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--ef-slate-50); border-bottom: 1px solid var(--ef-slate-100); flex-wrap: wrap; gap: 10px; }
.ef-slip-period { font-size: 14px; font-weight: 700; color: var(--ef-slate-800); }
.ef-slip-net { font-size: 20px; font-weight: 800; color: var(--ef-primary); }
.ef-slip-rows { padding: 16px 20px; }
.ef-slip-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--ef-slate-100); font-size: 13px; }
.ef-slip-row:last-child { border-bottom: none; }
.ef-slip-row-key { color: var(--ef-slate-500); }
.ef-slip-row-val { font-weight: 600; color: var(--ef-slate-800); }
.ef-slip-row.deduct .ef-slip-row-key { color: var(--ef-danger); }
.ef-slip-row.deduct .ef-slip-row-val { color: var(--ef-danger); }
.ef-slip-row.total { padding-top: 12px; margin-top: 4px; border-top: 1.5px solid var(--ef-slate-200); border-bottom: none; }
.ef-slip-row.total .ef-slip-row-key { font-weight: 800; font-size: 14px; color: var(--ef-slate-900); }
.ef-slip-row.total .ef-slip-row-val { font-weight: 800; font-size: 16px; color: var(--ef-primary); }

/* ─── NOTICES ─── */
.ef-notice-item { background: #fff; border: 1px solid var(--ef-slate-200); border-radius: var(--ef-radius-sm); padding: 14px 16px; margin-bottom: 10px; transition: all 0.15s; }
.ef-notice-item:hover { border-color: var(--ef-primary); box-shadow: var(--ef-shadow-md); }
.ef-notice-item.type-exam    { border-left: 3px solid var(--ef-primary); }
.ef-notice-item.type-holiday { border-left: 3px solid var(--ef-success); }
.ef-notice-item.type-event   { border-left: 3px solid var(--ef-purple); }
.ef-notice-item.type-fee     { border-left: 3px solid var(--ef-warning); }
.ef-notice-title { font-size: 14px; font-weight: 700; color: var(--ef-slate-900); }
.ef-notice-meta { font-size: 11px; color: var(--ef-slate-400); margin-top: 4px; }
.ef-notice-toggle-btn { font-size: 11px; color: var(--ef-primary); font-weight: 600; margin-top: 6px; cursor: pointer; }

/* ─── MODAL ─── */
.ef-modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.55); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.ef-modal-container { background: #fff; border-radius: var(--ef-radius-lg); width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--ef-shadow-xl); animation: ef-modal-in 0.25s cubic-bezier(0.4,0,0.2,1); }
@keyframes ef-modal-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.ef-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--ef-slate-200); }
.ef-modal-body { padding: 24px; }
.ef-modal-footer { padding: 16px 24px; border-top: 1px solid var(--ef-slate-200); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.ef-close { width: 32px; height: 32px; border: none; background: var(--ef-slate-100); border-radius: 8px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ef-slate-500); line-height: 1; transition: all 0.15s; }
.ef-close:hover { background: var(--ef-slate-200); color: var(--ef-slate-800); }

/* ─── FORM ELEMENTS ─── */
.ef-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ef-field label { display: block; font-size: 12px; font-weight: 700; color: var(--ef-slate-500); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.ef-field input,.ef-field select,.ef-field textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--ef-slate-200); border-radius: 9px; font-size: 14px; font-family: inherit; color: var(--ef-slate-800); background: #fff; outline: none; transition: border-color 0.15s; -webkit-appearance: none; }
.ef-field input:focus,.ef-field select:focus,.ef-field textarea:focus { border-color: var(--ef-primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

/* ─── SCHOOL STATS ─── */
.ef-school-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.ef-school-stat-card { background: #fff; border-radius: var(--ef-radius); padding: 20px 16px; text-align: center; border: 1px solid var(--ef-slate-200); box-shadow: var(--ef-shadow); transition: all 0.2s; }
.ef-school-stat-card:hover { transform: translateY(-2px); box-shadow: var(--ef-shadow-md); }
.ef-school-stat-icon { font-size: 28px; margin-bottom: 8px; }
.ef-school-stat-num { font-size: 26px; font-weight: 800; color: var(--ef-slate-900); margin-bottom: 4px; }
.ef-school-stat-lbl { font-size: 12px; font-weight: 600; color: var(--ef-slate-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── LOGIN FORM ─── */
.ef-login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--ef-slate-50); }
.ef-login-card { background: #fff; border-radius: var(--ef-radius-lg); width: 100%; max-width: 420px; box-shadow: var(--ef-shadow-xl); border: 1px solid var(--ef-slate-200); overflow: hidden; }
.ef-login-head { background: linear-gradient(135deg, #4338CA, #6D28D9); padding: 32px 32px 28px; text-align: center; color: #fff; }
.ef-login-head h3 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.ef-login-head p { font-size: 14px; opacity: 0.8; margin: 0; }
.ef-login-body { padding: 28px 32px 32px; }
.ef-login-msg { padding: 12px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.ef-login-msg.error { background: #FEE2E2; color: #B91C1C; }
.ef-login-msg.success { background: #DCFCE7; color: #15803D; }
.ef-form-field { margin-bottom: 16px; }
.ef-form-field label { display: block; font-size: 12px; font-weight: 700; color: var(--ef-slate-500); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.4px; }
.ef-form-field input[type="text"],.ef-form-field input[type="password"],.ef-form-field input[type="email"] { width: 100%; padding: 11px 14px; border: 1.5px solid var(--ef-slate-200); border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--ef-slate-800); background: #fff; outline: none; transition: border-color 0.15s; -webkit-appearance: none; }
.ef-form-field input[type="text"]:focus,.ef-form-field input[type="password"]:focus { border-color: var(--ef-primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }

/* ─── ALERTS ─── */
.ef-sc-alert { padding: 14px 16px; border-radius: var(--ef-radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.ef-sc-alert.info    { background: var(--ef-primary-lt); color: var(--ef-primary); }
.ef-sc-alert.success { background: #DCFCE7; color: #15803D; }
.ef-sc-alert.warn    { background: #FEF3C7; color: #B45309; }

/* ─── EMPTY STATE ─── */
.ef-sc-empty { text-align: center; padding: 48px 20px; color: var(--ef-slate-400); }
.ef-empty-icon { font-size: 40px; margin-bottom: 12px; }
.ef-sc-empty p { font-size: 14px; font-weight: 500; color: var(--ef-slate-400); margin: 0; }

/* ─── CONTENT GRID ─── */
.ef-content-grid { display: grid; gap: 20px; }

/* ─── RESULT SUMMARY ─── */
.ef-result-summary { display: grid; grid-template-columns: repeat(3, 1fr); padding: 20px; gap: 20px; border-bottom: 1px solid var(--ef-slate-100); }
.ef-result-box { text-align: center; }
.ef-result-box-num { font-size: 24px; font-weight: 800; color: var(--ef-slate-900); margin-bottom: 4px; line-height: 1; }
.ef-result-box-lbl { font-size: 11px; font-weight: 600; color: var(--ef-slate-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── ACCORDION ─── */
.ef-accordion-item { border: 1.5px solid var(--ef-slate-200); border-radius: var(--ef-radius); margin-bottom: 10px; overflow: hidden; transition: box-shadow 0.15s; }
.ef-accordion-item:hover { box-shadow: var(--ef-shadow-md); }
.ef-accordion-header { padding: 16px 20px; background: #fff; display: flex; justify-content: space-between; align-items: center; cursor: pointer; flex-wrap: wrap; gap: 10px; }
.ef-accordion-content { display: none; border-top: 1px solid var(--ef-slate-100); background: #fff; }

/* ─── DROPDOWN ANIMATION ─── */
.ef-dropdown { animation: ef-fade-slide 0.18s cubic-bezier(0.4,0,0.2,1); }
@keyframes ef-fade-slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════════
   MOBILE NAV
   KEY FIX: position:absolute inside .ef-sc-wrap (not fixed to
   viewport) so it stays within the Elementor container.
   Use position:sticky + bottom for container-relative sticking.
═══════════════════════════════════════════════════════════════ */
.ef-mobile-nav {
  display: none;
  /* Stick to bottom of the scroll container */
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--ef-slate-200);
  z-index: 97;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.ef-mobile-nav-inner { display: flex; align-items: stretch; }
.ef-mobile-nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 10px 4px; text-decoration: none !important; color: var(--ef-slate-400); font-size: 10px; font-weight: 600; transition: all 0.15s; min-height: 58px; }
.ef-mobile-nav-btn.active { color: var(--ef-primary); }
.ef-mobile-nav-btn.active .ef-mnb-icon { background: var(--ef-primary-lt); }
.ef-mnb-icon { font-size: 20px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; transition: background 0.15s; }

/* ═══════════════════════════════════════════════════════════════
   ELEMENTOR COMPATIBILITY
═══════════════════════════════════════════════════════════════ */

/* The Elementor widget wraps everything in .elementor-widget-shortcode.
   Make the wrap fill the widget's height fully. */
.elementor-widget-shortcode .ef-sc-wrap { margin: 0; display: block; }

/* When Elementor sets a height on the section/container,
   propagate it down through the widget chain */
.elementor-widget-shortcode,
.elementor-widget-container { height: 100%; }

/* Prevent Elementor from overriding overflow */
.ef-sc-wrap .ef-dash-shell,
.ef-sc-wrap .ef-sc-card { position: relative; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET  ≤1024px
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* Sidebar slides off-canvas — must use fixed to escape the
     container and cover the full viewport on mobile */
  .ef-sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100vh !important;   /* full viewport when open as drawer */
    width: var(--ef-sidebar-w);
    transform: translateX(-100%);
    z-index: 101;
    box-shadow: none;
    border-radius: 0;           /* no radius when off-canvas drawer */
  }
  .ef-sidebar.ef-sidebar-open {
    transform: translateX(0);
    box-shadow: var(--ef-shadow-xl);
  }

  /* Show hamburger */
  .ef-sidebar-toggle { display: flex; }

  .ef-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ef-hero-stats { display: none; }
  .ef-content-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE  ≤768px
   IMPROVED: proper spacing for bottom nav, better card stacking
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Shell switches to column layout on mobile */
  .ef-dash-shell {
    flex-direction: column;
    border-radius: 12px;        /* slightly smaller radius on mobile */
  }

  /* Sidebar hidden — drawer only */
  .ef-sidebar { display: none; }
  .ef-sidebar.ef-sidebar-open { display: flex; }

  /* Topbar */
  .ef-topbar { padding: 0 16px; height: 56px; border-radius: 12px 12px 0 0; }
  .ef-topbar-btn { display: none; }
  .ef-topbar-title { font-size: 15px; }

  /* Page body — bottom padding = mobile nav height + safe area */
  .ef-page-body { padding: 16px 14px 76px; }

  /* Show mobile nav */
  .ef-mobile-nav { display: block; }

  /* Hero */
  .ef-student-hero { padding: 18px 18px; border-radius: var(--ef-radius); flex-direction: column; align-items: flex-start; gap: 16px; }
  .ef-student-info { gap: 14px; }
  .ef-student-name { font-size: 18px; }
  .ef-student-avatar { width: 50px; height: 50px; font-size: 20px; border-radius: 14px; }
  .ef-hero-stats { display: flex; width: 100%; gap: 8px; }
  .ef-hero-stat-chip { flex: 1; min-width: 0; padding: 10px 8px; border-radius: 10px; }
  .ef-hero-stat-chip .num { font-size: 16px; }
  .ef-hero-stat-chip .lbl { font-size: 9px; }

  /* Stats grid — 2 columns */
  .ef-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
  .ef-stat-card { padding: 14px; }
  .ef-stat-card-num { font-size: 22px; }
  .ef-stat-card-icon { width: 36px; height: 36px; font-size: 16px; border-radius: 10px; }

  /* Quick access — 3 cols on mobile */
  .ef-qa-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .ef-qa-item { padding: 14px 8px; }
  .ef-qa-icon { font-size: 22px; width: 36px; height: 36px; }
  .ef-qa-label { font-size: 11px; }

  /* Fees */
  .ef-fees-amount { font-size: 16px; }
  .ef-fees-box { padding: 14px 10px; }

  /* Attendance stats */
  .ef-stats-row { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ef-stat-box { min-width: 68px; padding: 12px 6px; }
  .ef-stat-num { font-size: 18px; }

  /* Results */
  .ef-result-summary { padding: 12px; gap: 8px; }
  .ef-result-box-num { font-size: 18px; }

  /* Forms */
  .ef-form-grid { grid-template-columns: 1fr; }
  .ef-profile-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

  /* Exam banner */
  .ef-xbanner { padding: 14px 16px; }

  /* Section header */
  .ef-section-header { margin-top: 20px; margin-bottom: 12px; }

  /* Card head — keep row on mobile */
  .ef-sc-card-head { padding: 14px 16px; }

  /* School stats */
  .ef-school-stats { grid-template-columns: repeat(2, 1fr); }

  /* Tables — scroll on mobile */
  .ef-sc-table-wrap { -webkit-overflow-scrolling: touch; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE  ≤480px
═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .ef-stats-grid { grid-template-columns: 1fr 1fr; }
  .ef-qa-grid { grid-template-columns: repeat(2, 1fr); }

  /* Hero stats wrap below name */
  .ef-hero-stats { gap: 6px; }
  .ef-hero-stat-chip { padding: 8px 6px; }

  .ef-fees-summary { overflow-x: auto; }
  .ef-fees-box { min-width: 90px; padding: 14px 10px; }

  .ef-profile-grid { grid-template-columns: 1fr; }

  .ef-modal-container { max-height: 88vh; }

  .ef-login-card { border-radius: var(--ef-radius); }
  .ef-login-body { padding: 20px; }
  .ef-login-head { padding: 24px 20px 20px; }

  .ef-page-body { padding: 12px 10px 76px; }
}

/* ─── OVERFLOW PROTECTION ─── */
.ef-main-content, .ef-page-body { overflow-x: hidden; }