:root{
  --sp-blue:#2563eb;
  --sp-blue-dark:#0b2a66;
  --sp-sky:#38bdf8;
  --sp-indigo:#7c3aed;
  --sp-green:#16a34a;
  --sp-orange:#f97316;
  --sp-red:#dc2626;
  --sp-slate:#0f172a;
  --sp-muted:#64748b;
  --sp-border:#dbe6f5;
  --sp-bg:#f5f9ff;
  --sp-card:#ffffff;
  --sp-shadow:0 18px 45px rgba(15,23,42,.10);
  --sp-shadow-soft:0 10px 28px rgba(37,99,235,.10);
}

/* Global portal polish */
.schoolpro-frontend-nav,
.schoolpro-user-dashboard,
.schoolpro-portal-shell,
.schoolpro-portal-card,
.schoolpro-login-card,
.schoolpro-register-card,
.schoolpro-dashboard-login-notice,
.schoolpro-dashboard-status-notice,
.schoolpro-notice{
  box-sizing:border-box;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}
.schoolpro-user-dashboard *,
.schoolpro-portal-shell *,
.schoolpro-frontend-nav *{box-sizing:border-box;}

/* Login and registration landing page */
.schoolpro-portal-shell{
  max-width:1240px!important;
  margin:34px auto!important;
  padding:28px!important;
  display:grid!important;
  grid-template-columns:minmax(300px,.88fr) minmax(420px,1.12fr)!important;
  gap:28px!important;
  border-radius:32px!important;
  background:
    radial-gradient(circle at 8% 12%, rgba(56,189,248,.22), transparent 24%),
    radial-gradient(circle at 92% 4%, rgba(37,99,235,.18), transparent 25%),
    linear-gradient(135deg,#eef7ff 0%,#ffffff 45%,#eff6ff 100%)!important;
  border:1px solid rgba(37,99,235,.12)!important;
  box-shadow:var(--sp-shadow)!important;
  overflow:hidden;
  position:relative;
}
.schoolpro-portal-shell:before{
  content:"";
  position:absolute;
  left:-120px;bottom:-170px;width:420px;height:420px;border-radius:50%;
  background:linear-gradient(135deg,rgba(37,99,235,.25),rgba(56,189,248,.08));
  pointer-events:none;
}
.schoolpro-portal-hero{position:relative;z-index:1;padding:22px 18px 22px 22px;color:#102a5c;}
.schoolpro-portal-brand{display:flex;align-items:center;gap:10px;font-weight:900;color:#0b3b91;font-size:22px;margin-bottom:44px;}
.schoolpro-brand-icon{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:16px;background:linear-gradient(135deg,#2563eb,#38bdf8);color:#fff;box-shadow:0 10px 25px rgba(37,99,235,.24);}
.schoolpro-portal-hero h1{font-size:48px!important;line-height:1.03!important;margin:0 0 14px!important;letter-spacing:-1.4px;color:#081d4f!important;}
.schoolpro-portal-hero p{font-size:17px!important;line-height:1.7!important;margin:0 0 22px!important;color:#2c4a7c!important;max-width:520px;}
.schoolpro-persona-list{display:grid;gap:12px;margin:24px 0 26px;}
.schoolpro-persona-list div{display:grid;grid-template-columns:52px 1fr;gap:0 14px;align-items:center;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.72);border:1px solid rgba(37,99,235,.10);box-shadow:0 8px 24px rgba(15,23,42,.05);backdrop-filter:blur(10px);}
.schoolpro-persona-list span{grid-row:span 2;width:44px;height:44px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#fff;font-size:24px;box-shadow:0 6px 18px rgba(37,99,235,.12);}
.schoolpro-persona-list strong{font-size:16px;color:#08245c;}
.schoolpro-persona-list small{font-size:13px;color:#526988;line-height:1.35;}
.schoolpro-portal-trust{display:inline-flex;flex-wrap:wrap;gap:4px;align-items:center;padding:13px 16px;border-radius:18px;background:#fff;color:#0b3b91;font-weight:800;box-shadow:0 10px 28px rgba(37,99,235,.12);}
.schoolpro-portal-forms{position:relative;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:0;background:#fff;border:1px solid rgba(37,99,235,.12);border-radius:28px;box-shadow:0 18px 50px rgba(15,23,42,.13);overflow:hidden;}
.schoolpro-login-card,.schoolpro-register-card{
  border:0!important;border-radius:0!important;box-shadow:none!important;padding:34px!important;background:#fff!important;
}
.schoolpro-login-card{border-right:1px solid #e5edf8!important;}
.schoolpro-login-card h2,.schoolpro-register-card h2{font-size:25px!important;letter-spacing:-.4px;color:#071a45!important;margin:0 0 8px!important;}
.schoolpro-login-card p,.schoolpro-register-card p{color:#52637d!important;}
.schoolpro-login-card input,.schoolpro-register-card input,.schoolpro-register-card select,.schoolpro-register-card textarea{
  min-height:46px!important;border:1px solid #d7e2f1!important;border-radius:14px!important;background:#fbfdff!important;padding:12px 14px!important;box-shadow:inset 0 1px 0 rgba(15,23,42,.02)!important;
}
.schoolpro-login-card input:focus,.schoolpro-register-card input:focus,.schoolpro-register-card select:focus,.schoolpro-register-card textarea:focus{
  outline:none!important;border-color:#2563eb!important;box-shadow:0 0 0 4px rgba(37,99,235,.12)!important;background:#fff!important;
}
.schoolpro-login-card button,.schoolpro-register-card button[type="submit"],#schoolpro-reg-next{
  border-radius:14px!important;background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;box-shadow:0 12px 24px rgba(37,99,235,.24)!important;transition:.2s ease!important;
}
.schoolpro-login-card button:hover,.schoolpro-register-card button[type="submit"]:hover,#schoolpro-reg-next:hover{transform:translateY(-1px);box-shadow:0 16px 30px rgba(37,99,235,.3)!important;}
#schoolpro-reg-back{border-radius:14px!important;background:#f8fafc!important;}
.schoolpro-step-pill{box-shadow:0 6px 18px rgba(37,99,235,.14);}
.schoolpro-step-pill.active{background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;}
#schoolpro-parent-ward-fields{background:#f8fbff!important;border-color:#c7d8f2!important;}

/* Portal navigation */
.schoolpro-frontend-nav{
  max-width:1220px!important;
  margin:18px auto 18px!important;
  padding:10px!important;
  border:1px solid rgba(37,99,235,.12)!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 14px 35px rgba(15,23,42,.08)!important;
  backdrop-filter:blur(12px);
  gap:10px!important;
}
.schoolpro-frontend-nav a,
.schoolpro-nav-link{
  display:inline-flex!important;align-items:center!important;gap:8px!important;
  padding:11px 15px!important;border-radius:15px!important;text-decoration:none!important;font-weight:850!important;
  background:#f1f6ff!important;color:#0a2e67!important;border:1px solid transparent!important;transition:.2s ease!important;
}
.schoolpro-frontend-nav a:hover{background:#e7f0ff!important;transform:translateY(-1px);}
.schoolpro-frontend-nav a.is-active,
.schoolpro-frontend-nav a[style*="background:#2563eb"]{
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;color:#fff!important;box-shadow:0 10px 24px rgba(37,99,235,.24)!important;
}
.schoolpro-nav-icon{font-size:16px;}

/* Dashboards */
.schoolpro-user-dashboard{
  max-width:1220px!important;
  margin:26px auto 38px!important;
  color:#0f172a!important;
}
.schoolpro-user-dashboard>div:first-of-type{
  position:relative;overflow:hidden;
  padding:30px!important;border:0!important;border-radius:26px!important;
  background:linear-gradient(135deg,#2563eb 0%,#0ea5e9 62%,#38bdf8 100%)!important;
  color:#fff!important;box-shadow:var(--sp-shadow)!important;margin-bottom:22px!important;
}
.schoolpro-user-dashboard>div:first-of-type:before{
  content:"";position:absolute;right:-80px;top:-120px;width:360px;height:360px;border-radius:50%;background:rgba(255,255,255,.14);
}
.schoolpro-user-dashboard>div:first-of-type:after{
  content:"✦  ✧  ✦";position:absolute;right:90px;bottom:24px;color:rgba(255,255,255,.35);font-size:34px;letter-spacing:18px;
}
.schoolpro-user-dashboard>div:first-of-type img{border:5px solid rgba(255,255,255,.82)!important;box-shadow:0 15px 36px rgba(2,6,23,.18)!important;}
.schoolpro-user-dashboard>div:first-of-type h2{color:#fff!important;font-size:34px!important;letter-spacing:-.7px!important;}
.schoolpro-user-dashboard>div:first-of-type p{color:rgba(255,255,255,.90)!important;}
.schoolpro-user-dashboard>div:first-of-type a{background:rgba(255,255,255,.18)!important;color:#fff!important;border:1px solid rgba(255,255,255,.28)!important;backdrop-filter:blur(8px);}
.schoolpro-dashboard-role-student>div:first-of-type{background:linear-gradient(135deg,#2563eb 0%,#0ea5e9 65%,#22c55e 120%)!important;}
.schoolpro-dashboard-role-parent>div:first-of-type{background:linear-gradient(135deg,#0f766e 0%,#2563eb 80%)!important;}
.schoolpro-dashboard-role-teacher>div:first-of-type{background:linear-gradient(135deg,#1d4ed8 0%,#7c3aed 75%)!important;}
.schoolpro-dashboard-role-staff>div:first-of-type{background:linear-gradient(135deg,#334155 0%,#2563eb 90%)!important;}

/* Summary strips and panels */
.schoolpro-user-dashboard>div:not(:first-of-type),
.schoolpro-dashboard-attendance{
  border:1px solid rgba(37,99,235,.10)!important;border-radius:22px!important;background:#fff!important;box-shadow:var(--sp-shadow-soft)!important;
}
.schoolpro-user-dashboard h3{color:#0b2a66!important;letter-spacing:-.25px;}
.schoolpro-user-dashboard table{border-radius:16px!important;overflow:hidden;background:#fff;}
.schoolpro-user-dashboard th{background:#f5f9ff!important;color:#0b2a66!important;font-weight:850!important;}
.schoolpro-user-dashboard td,.schoolpro-user-dashboard th{border-color:#e8eef8!important;}
.schoolpro-user-dashboard strong{color:#071a45;}

/* Quick access cards */
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a,
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"]>div{
  position:relative;overflow:hidden;border:1px solid rgba(37,99,235,.10)!important;border-radius:22px!important;background:#fff!important;box-shadow:0 12px 30px rgba(15,23,42,.08)!important;transition:.22s ease!important;min-height:150px;
}
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a:before,
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"]>div:before{
  content:"";position:absolute;right:-36px;top:-36px;width:96px;height:96px;border-radius:50%;background:linear-gradient(135deg,rgba(37,99,235,.14),rgba(14,165,233,.06));
}
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a:hover{transform:translateY(-4px);box-shadow:0 18px 42px rgba(37,99,235,.14)!important;border-color:rgba(37,99,235,.25)!important;}
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a div:first-child,
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"]>div div:first-child{
  width:46px;height:46px;display:flex;align-items:center;justify-content:center;border-radius:16px;background:linear-gradient(135deg,#eff6ff,#dbeafe);box-shadow:0 8px 18px rgba(37,99,235,.12);font-size:24px!important;
}
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a:nth-child(2) div:first-child{background:linear-gradient(135deg,#fff7ed,#fed7aa);}
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a:nth-child(3) div:first-child{background:linear-gradient(135deg,#f0fdf4,#bbf7d0);}
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a:nth-child(4) div:first-child{background:linear-gradient(135deg,#faf5ff,#ddd6fe);}
.schoolpro-user-dashboard h3+div[style*="grid-template-columns"] a:nth-child(5) div:first-child{background:linear-gradient(135deg,#ecfeff,#a5f3fc);}

/* Mini summary cards: admission/section/class/session */
.schoolpro-user-dashboard div[style*="repeat(auto-fit,minmax(190px,1fr))"]>div,
.schoolpro-user-dashboard div[style*="repeat(auto-fit,minmax(130px,1fr))"]>div{
  border:1px solid rgba(37,99,235,.10)!important;border-radius:18px!important;background:linear-gradient(180deg,#ffffff,#f8fbff)!important;box-shadow:0 8px 20px rgba(37,99,235,.06)!important;
}
.schoolpro-dashboard-attendance div[style*="repeat(auto-fit,minmax(130px,1fr))"]>div:nth-child(1){background:#ecfdf5!important;color:#065f46!important;}
.schoolpro-dashboard-attendance div[style*="repeat(auto-fit,minmax(130px,1fr))"]>div:nth-child(2){background:#fff1f2!important;color:#9f1239!important;}
.schoolpro-dashboard-attendance div[style*="repeat(auto-fit,minmax(130px,1fr))"]>div:nth-child(3){background:#fff7ed!important;color:#9a3412!important;}
.schoolpro-dashboard-attendance div[style*="repeat(auto-fit,minmax(130px,1fr))"]>div:nth-child(4){background:#eff6ff!important;color:#1e40af!important;}

/* Buttons across frontend shortcodes */
.schoolpro-user-dashboard a[style*="background:#2563eb"],
.schoolpro-user-dashboard button,
.schoolpro-portal-card a[style*="background:#2563eb"]{
  border-radius:14px!important;background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;box-shadow:0 10px 22px rgba(37,99,235,.18)!important;
}
.schoolpro-user-dashboard input,.schoolpro-user-dashboard select,.schoolpro-user-dashboard textarea,
.schoolpro-portal-shell input,.schoolpro-portal-shell select,.schoolpro-portal-shell textarea{
  border-radius:14px!important;border:1px solid #d7e2f1!important;
}

/* Role-specific small visual accents */
.schoolpro-dashboard-role-student h3:before{content:"🎒 ";}
.schoolpro-dashboard-role-parent h3:before{content:"👨‍👩‍👧 ";}
.schoolpro-dashboard-role-teacher h3:before{content:"🧑‍🏫 ";}
.schoolpro-dashboard-role-staff h3:before{content:"🏢 ";}
.schoolpro-dashboard-attendance h3:before{content:"✅ "!important;}

/* Frontend module pages */
.schoolpro-user-dashboard+*,
.schoolpro-frontend-nav+div,
.schoolpro-frontend-nav+section{
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif!important;
}
.schoolpro-frontend-nav+div[style*="max-width"],
.schoolpro-frontend-nav+section[style*="max-width"]{
  border-radius:24px!important;border:1px solid rgba(37,99,235,.10)!important;box-shadow:var(--sp-shadow-soft)!important;
}

@media (max-width:1024px){
  .schoolpro-portal-shell{grid-template-columns:1fr!important;padding:18px!important;}
  .schoolpro-portal-forms{grid-template-columns:1fr!important;}
  .schoolpro-login-card{border-right:0!important;border-bottom:1px solid #e5edf8!important;}
  .schoolpro-portal-hero h1{font-size:40px!important;}
}
@media (max-width:720px){
  .schoolpro-portal-shell{margin:18px 12px!important;border-radius:22px!important;}
  .schoolpro-portal-hero{padding:16px 10px!important;}
  .schoolpro-portal-hero h1{font-size:32px!important;}
  .schoolpro-portal-forms{border-radius:22px!important;}
  .schoolpro-login-card,.schoolpro-register-card{padding:24px!important;}
  .schoolpro-frontend-nav{margin:12px!important;border-radius:18px!important;overflow-x:auto;flex-wrap:nowrap!important;}
  .schoolpro-frontend-nav a{white-space:nowrap;}
  .schoolpro-user-dashboard{margin:16px 12px 26px!important;}
  .schoolpro-user-dashboard>div:first-of-type{padding:22px!important;border-radius:22px!important;}
  .schoolpro-user-dashboard>div:first-of-type h2{font-size:26px!important;}
}
