
/* ═══ LIGHT THEME — sky-to-indigo gradient ═══ */
body.ent-mode{
  --ent-pdd:#F8FAFC;
  --ent-pd:#F1F5F9;
  --ent-p:#0EA5E9;
  --ent-pl:#38BDF8;
  --ent-sky:#0EA5E9;
  --ent-cyan:#0891B2;
  --ent-bg:#F0F9FF;
  --ent-bg2:#FFFFFF;
  --ent-card:#FFFFFF;
  --ent-bd:#E0F2FE;
  --ent-bd2:#BAE6FD;
  --ent-t1:#0F172A;
  --ent-t2:#334155;
  --ent-t3:#64748B;
  --ent-t4:#94A3B8;
}

/* Sidebar — LIGHT theme (white/sky) */
body.ent-mode .sidebar{
  background:#FFFFFF!important;
  border-left:1px solid #E0F2FE!important;
  box-shadow:1px 0 0 rgba(14,165,233,.04)!important;
}
body.ent-mode .sb-logo{
  background:#fff!important;
  border:1px solid #E8EDF3!important;border-bottom:1px solid #E8EDF3!important;
}
body.ent-mode .sb-logo-icon{
  background:linear-gradient(135deg,#2563EB,#0EA5E9)!important;
  border:none!important;
  box-shadow:0 6px 16px -4px rgba(37,99,235,.45)!important;
}
body.ent-mode .sb-logo-text{color:#0F172A!important;font-weight:800!important}
body.ent-mode .sb-logo-sub{color:#0EA5E9!important;font-weight:600!important}

.ent-sb-sec{
  color:#64748B!important;
}
.ent-sb-sec::after{
  background:#E0F2FE!important;
}

.ent-sb-item{
  color:#475569!important;
}
.ent-sb-item .ent-sb-icon{
  opacity:.9!important;
}
.ent-sb-item:hover{
  background:#F0F9FF!important;
  color:#0F172A!important;
}
.ent-sb-item.active{
  background:linear-gradient(90deg,rgba(14,165,233,.12),rgba(99,102,241,.08))!important;
  color:#0F172A!important;
  font-weight:700!important;
}
.ent-sb-item.active::before{
  background:linear-gradient(180deg,#0EA5E9,#6366F1)!important;
  width:3px!important;
}
.ent-sb-item.active .ent-sb-icon{
  color:#0EA5E9;
}

.ent-sb-badge.dim{background:#F1F5F9!important;color:#64748B!important}

/* Users submenu — light theme */
.ent-users-sub{
  background:#F8FAFC!important;
  border:1px solid #E0F2FE!important;
}
.ent-users-sub .ent-sb-sub-item{
  color:#64748B!important;
}
.ent-users-sub .ent-sb-sub-item:hover{
  background:#F0F9FF!important;
  color:#0F172A!important;
}
.ent-users-sub .ent-sb-sub-item.active{
  background:rgba(14,165,233,.15)!important;
  color:#0EA5E9!important;
}
.ent-users-sub .sub-count{
  background:#E0F2FE!important;
  color:#0369A1!important;
}

/* Sidebar footer — light */
body.ent-mode .sb-footer{
  background:#F8FAFC!important;
  border-top:1px solid #E0F2FE!important;
}
body.ent-mode .sb-uname{color:#0F172A!important;font-weight:700!important}
body.ent-mode .sb-urole{color:#64748B!important}
body.ent-mode .sb-av{
  background:linear-gradient(135deg,#0EA5E9,#6366F1)!important;
  box-shadow:0 3px 10px rgba(14,165,233,.3)!important;
}
body.ent-mode .pts{
  background:rgba(245,158,11,.12)!important;
  color:#B45309!important;
  border:1px solid rgba(245,158,11,.25)!important;
}
body.ent-mode .sb-logout{
  background:rgba(220,38,38,.08)!important;
  color:#DC2626!important;
  border-color:rgba(220,38,38,.15)!important;
}
body.ent-mode .sb-logout:hover{
  background:#DC2626!important;color:#fff!important;border-color:#DC2626!important;
}

/* Topbar — light */
body.ent-mode .topbar{
  background:#FFFFFF!important;
  border-bottom:1px solid #E0F2FE!important;
}

.ent-school-pill{
  background:linear-gradient(135deg,#F0F9FF,#E0F2FE)!important;
  border:1px solid #BAE6FD!important;
  color:#0369A1!important;
}
.ent-school-pill:hover{
  background:#BAE6FD!important;border-color:#7DD3FC!important;
}
.ent-school-pill.ent-sp-locked{
  background:#F8FAFC!important;
  border-color:#E0F2FE!important;
  color:#475569!important;
}

.ent-system-status{
  background:#F0F9FF!important;
  border:1px solid #BAE6FD!important;
}
.ent-sys-item{color:#475569!important}
.ent-sys-item b{color:#0F172A!important}
.ent-sys-divider{background:#BAE6FD!important}

/* Content background */
body.ent-mode .content{
  background:#F0F9FF!important;
}

/* Hero — LIGHT version (sky to indigo) */
body.ent-mode .ent-hero{
  background:linear-gradient(135deg,#38BDF8 0%,#0EA5E9 35%,#6366F1 100%)!important;
  border:1px solid rgba(255,255,255,.2)!important;
  box-shadow:0 12px 28px -10px rgba(14,165,233,.4)!important;
}
body.ent-mode .ent-hero::before{
  background:radial-gradient(circle,rgba(255,255,255,.25),transparent 60%)!important;
}

/* KPI cards on light bg */
body.ent-mode .ent-kpi{
  background:#FFFFFF!important;
  border:1px solid #E0F2FE!important;
  box-shadow:0 1px 3px rgba(14,165,233,.04)!important;
}
body.ent-mode .ent-kpi:hover{
  box-shadow:0 10px 24px -8px rgba(14,165,233,.18), 0 4px 8px -4px rgba(14,165,233,.08)!important;
}

/* Panels light */
body.ent-mode .ent-panel{
  background:#FFFFFF!important;
  border:1px solid #E0F2FE!important;
  box-shadow:0 1px 3px rgba(14,165,233,.04)!important;
}
body.ent-mode .ent-panel-hd{
  background:linear-gradient(180deg,#F0F9FF,#FFFFFF)!important;
  border-bottom:1px solid #E0F2FE!important;
}

/* Quick buttons */
.ent-quick-btn{
  background:#FFFFFF!important;
  border:1px solid #BAE6FD!important;
  color:#0369A1!important;
}
.ent-quick-btn:hover{
  background:#0EA5E9!important;
  color:#fff!important;
  border-color:#0EA5E9!important;
}
.ent-quick-btn.primary{
  background:linear-gradient(135deg,#0EA5E9,#6366F1)!important;
  color:#fff!important;
  border:none!important;
  box-shadow:0 4px 10px rgba(14,165,233,.3);
}
.ent-quick-btn.primary:hover{
  background:linear-gradient(135deg,#0284C7,#4F46E5)!important;
  box-shadow:0 6px 14px rgba(14,165,233,.4);
}

.ent-mini-btn{color:#475569!important;border-color:#E0F2FE!important}
.ent-mini-btn:hover, .ent-mini-btn.active{
  background:#0EA5E9!important;color:#fff!important;border-color:#0EA5E9!important;
}

/* Table */
.ent-table thead th{
  background:#F0F9FF!important;
  color:#0369A1!important;
  border-bottom:1px solid #BAE6FD!important;
}
.ent-table tbody td{
  border-bottom:1px solid #E0F2FE!important;
}
.ent-table tbody tr:hover{
  background:#F0F9FF!important;
}

/* Bar/Line chart colors — use sky */
.ent-bar-fill{
  background:linear-gradient(180deg,#0EA5E9,#38BDF8)!important;
}

/* Old banner classes (for legacy pages) — soften */
body.ent-mode .banner{
  background:linear-gradient(135deg,#38BDF8,#0EA5E9 50%,#6366F1)!important;
  color:#fff!important;
}

/* Page title in topbar */
body.ent-mode .tb-title{
  color:#0F172A!important;
  font-weight:800!important;
}

/* ─── BUILD PAGES STYLES — for newly created pages ─── */
.bp-page{display:flex;flex-direction:column;gap:16px}
.bp-hero{
  background:linear-gradient(135deg,#38BDF8,#0EA5E9 50%,#6366F1)!important;
  color:#fff;border-radius:14px;padding:18px 22px;
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
  position:relative;overflow:hidden;
  box-shadow:0 12px 28px -10px rgba(14,165,233,.4);
}
.bp-hero::before{
  content:"";position:absolute;inset:auto -10% -50% auto;
  width:280px;height:280px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.25),transparent 60%);
}
.bp-hero-l{position:relative;z-index:1}
.bp-hero-l h1{font-size:20px;font-weight:800;margin:0 0 4px;letter-spacing:-.3px}
.bp-hero-l p{font-size:12.5px;opacity:.85;margin:0}
.bp-hero-r{position:relative;z-index:1;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.bp-hero-stat{
  background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.2);
  border-radius:10px;padding:7px 14px;text-align:center;backdrop-filter:blur(8px);
}
.bp-hero-stat b{display:block;font-size:18px;font-weight:800;font-family:'Tajawal',Cairo;line-height:1.1}
.bp-hero-stat span{font-size:10.5px;opacity:.85;font-weight:600}

.bp-toolbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;
  background:#fff;border:1px solid #E0F2FE;border-radius:12px;padding:10px 14px;
}
.bp-search{
  flex:1;min-width:200px;
  display:flex;align-items:center;gap:8px;
  background:#F0F9FF;border:1px solid #BAE6FD;border-radius:8px;
  padding:0 12px;height:34px;
}
.bp-search input{flex:1;background:none;border:none;outline:none;font-family:'Cairo';font-size:12.5px;color:#0F172A}
.bp-search input::placeholder{color:#94A3B8}

.bp-filter{
  display:inline-flex;align-items:center;gap:5px;
  padding:6px 11px;border-radius:7px;
  background:#F0F9FF;border:1px solid #BAE6FD;
  font-family:'Cairo';font-size:12px;font-weight:700;color:#0369A1;
  cursor:pointer;transition:all .15s;
}
.bp-filter:hover{background:#BAE6FD}
.bp-filter.active{background:#0EA5E9;color:#fff;border-color:#0EA5E9}

.bp-grid{display:grid;gap:14px}
.bp-grid.cols-2{grid-template-columns:repeat(2,1fr)}
.bp-grid.cols-3{grid-template-columns:repeat(3,1fr)}
.bp-grid.cols-4{grid-template-columns:repeat(4,1fr)}
@media(max-width:1100px){.bp-grid.cols-3,.bp-grid.cols-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.bp-grid{grid-template-columns:1fr!important}}

.bp-card{
  background:#fff;border:1px solid #E0F2FE;border-radius:12px;
  padding:14px;display:flex;flex-direction:column;gap:8px;
  transition:all .15s;cursor:pointer;
}
.bp-card:hover{
  transform:translateY(-2px);
  border-color:#BAE6FD;
  box-shadow:0 10px 20px -6px rgba(14,165,233,.15);
}
.bp-card-hd{display:flex;align-items:center;gap:10px}
.bp-card-ic{
  width:38px;height:38px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  font-size:18px;flex-shrink:0;
}
.bp-card-title{flex:1;font-size:13.5px;font-weight:800;color:#0F172A;line-height:1.3}
.bp-card-sub{font-size:11.5px;color:#64748B;margin-top:1px}
.bp-card-foot{
  display:flex;align-items:center;justify-content:space-between;
  margin-top:auto;padding-top:8px;border-top:1px dashed #E0F2FE;
  font-size:11px;color:#64748B;
}

.bp-list{
  background:#fff;border:1px solid #E0F2FE;border-radius:12px;overflow:hidden;
}
.bp-list-hd{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;background:linear-gradient(180deg,#F0F9FF,#fff);
  border-bottom:1px solid #E0F2FE;gap:10px;flex-wrap:wrap;
}
.bp-list-title{font-size:13px;font-weight:800;color:#0F172A;display:flex;align-items:center;gap:8px}
.bp-row{
  display:flex;align-items:center;gap:12px;
  padding:11px 16px;border-bottom:1px solid #F0F9FF;
  transition:background .12s;
}
.bp-row:hover{background:#F8FAFC}
.bp-row:last-child{border-bottom:none}
.bp-row-ic{
  width:34px;height:34px;border-radius:9px;
  display:flex;align-items:center;justify-content:center;
  font-size:15px;flex-shrink:0;
}
.bp-row-c{flex:1;min-width:0}
.bp-row-t{font-size:13px;font-weight:700;color:#0F172A;line-height:1.3}
.bp-row-s{font-size:11px;color:#64748B;margin-top:2px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bp-row-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.bp-row-btn{
  padding:5px 10px;font-family:'Cairo';font-size:11px;font-weight:700;
  background:#F0F9FF;border:1px solid #BAE6FD;color:#0369A1;
  border-radius:6px;cursor:pointer;transition:all .15s;
}
.bp-row-btn:hover{background:#0EA5E9;color:#fff;border-color:#0EA5E9}
.bp-row-btn.primary{background:#0EA5E9;color:#fff;border-color:#0EA5E9}
.bp-row-btn.primary:hover{background:#0284C7}
.bp-row-btn.danger{background:#FEF2F2;color:#DC2626;border-color:#FECACA}
.bp-row-btn.danger:hover{background:#DC2626;color:#fff}

.bp-stat{
  background:#fff;border:1px solid #E0F2FE;border-radius:12px;padding:14px;
  display:flex;align-items:center;gap:12px;
}
.bp-stat-ic{
  width:42px;height:42px;border-radius:11px;
  display:flex;align-items:center;justify-content:center;
  font-size:19px;flex-shrink:0;
}
.bp-stat-c{flex:1}
.bp-stat-v{font-size:22px;font-weight:800;color:#0F172A;font-family:'Tajawal';line-height:1}
.bp-stat-l{font-size:11.5px;color:#64748B;font-weight:600;margin-top:2px}

.bp-tabs{
  display:flex;gap:4px;background:#F0F9FF;border:1px solid #BAE6FD;
  border-radius:9px;padding:3px;margin-bottom:12px;
}
.bp-tab{
  flex:1;padding:8px 12px;text-align:center;
  font-family:'Cairo';font-size:12.5px;font-weight:700;
  color:#475569;background:transparent;border:none;cursor:pointer;
  border-radius:6px;transition:all .15s;
}
.bp-tab:hover{color:#0369A1}
.bp-tab.active{background:#fff;color:#0EA5E9;box-shadow:0 1px 4px rgba(14,165,233,.15)}

.bp-empty{
  background:#fff;border:1px dashed #BAE6FD;border-radius:12px;
  padding:36px 20px;text-align:center;color:#64748B;
}
.bp-empty-ic{font-size:48px;margin-bottom:8px;opacity:.5}

.bp-progress-line{
  display:flex;flex-direction:column;gap:4px;width:100%;
}
.bp-progress-bar{
  width:100%;height:6px;background:#F0F9FF;border-radius:99px;overflow:hidden;
}
.bp-progress-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#0EA5E9,#38BDF8)}
.bp-progress-fill.ok{background:linear-gradient(90deg,#10B981,#34D399)}
.bp-progress-fill.warn{background:linear-gradient(90deg,#F59E0B,#FBBF24)}
.bp-progress-fill.no{background:linear-gradient(90deg,#EF4444,#F87171)}

/* Calendar / schedule pill */
.bp-day-card{
  background:#fff;border:1px solid #E0F2FE;border-radius:10px;
  padding:10px;text-align:center;
}
.bp-day-card.today{
  background:linear-gradient(135deg,#0EA5E9,#6366F1);color:#fff;border:none;
}
.bp-day-name{font-size:11px;font-weight:700;opacity:.7}
.bp-day-card.today .bp-day-name{opacity:.95}
.bp-day-num{font-size:22px;font-weight:800;font-family:'Tajawal';margin-top:2px}
