:root{
  --portal-sidebar-width:290px;
  --sidebar-w:var(--portal-sidebar-width);
  --portal-primary:#081d3a;
  --portal-primary-2:#0b2a5b;
  --portal-secondary:#123a79;
  --portal-success:#0f8a5f;
  --portal-accent:#d92332;
  --portal-gold:#d4af37;
  --portal-bg:#eef4f9;
  --portal-bg-2:#f7fbff;
  --portal-surface:#ffffff;
  --portal-surface-soft:#f8fbfd;
  --portal-border:#dde7f0;
  --portal-border-strong:#c6d5e3;
  --portal-muted:#5f748c;
  --portal-text:#132235;
  --portal-heading:#0b2140;
  --portal-shadow:0 24px 60px rgba(8,29,58,.14);
  --portal-shadow-soft:0 16px 36px rgba(8,29,58,.08);
  --portal-shadow-card:0 12px 28px rgba(8,29,58,.07);
  --portal-radius:20px;
  --portal-radius-lg:26px;
  --portal-gradient-main:linear-gradient(180deg,#081d3a 0%, #0b2a5b 40%, #123a79 70%, #0f8a5f 100%);
  --portal-gradient-hero:radial-gradient(circle at top right, rgba(255,255,255,.18), transparent 28%), radial-gradient(circle at 18% 115%, rgba(15,138,95,.20), transparent 30%), radial-gradient(circle at 90% 12%, rgba(217,35,50,.16), transparent 26%), linear-gradient(135deg,#081d3a 0%, #0b2a5b 32%, #123a79 62%, #0f8a5f 82%, #d92332 100%);
  --portal-gradient-accent:linear-gradient(135deg,#d92332 0%, #a51622 100%);
}
html{scroll-behavior:smooth;overflow-x:hidden}
body.portal-shell{
  background:
    radial-gradient(circle at top left, rgba(11,42,91,.05), transparent 24%),
    radial-gradient(circle at right 12%, rgba(15,138,95,.05), transparent 28%),
    linear-gradient(180deg,var(--portal-bg-2) 0%,var(--portal-bg) 100%) !important;
  color:var(--portal-text);
  font-family:'Inter','Poppins',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  min-height:100vh;
  overflow-x:hidden !important;
  margin:0;
  -webkit-text-size-adjust:100%;
}
body.portal-sidebar-open,
body.portal-tour-open,
body.portal-switch-open{overflow:hidden !important}
*,*::before,*::after{box-sizing:border-box}
img,svg,video{max-width:100%;height:auto}
.portal-topbar{
  position:sticky;
  top:0;
  z-index:1022;
  backdrop-filter:blur(14px);
  background:rgba(255,255,255,.88);
  border-bottom:1px solid rgba(8,29,58,.08);
  box-shadow:0 8px 20px rgba(8,29,58,.04);
}
.portal-topbar .navbar-brand{
  font-weight:900;
  letter-spacing:-.02em;
  color:var(--portal-heading) !important;
}
.portal-topbar .brand-lockup{
  display:flex;
  align-items:center;
  gap:.9rem;
}
.brand-mark{
  width:42px;height:42px;border-radius:14px;
  display:grid;place-items:center;
  background:var(--portal-gradient-hero);
  color:#fff;font-size:1.08rem;
  box-shadow:0 10px 22px rgba(8,29,58,.16);
}
.topbar-profile{
  display:flex;align-items:center;gap:.8rem;
  padding:.35rem .45rem .35rem .35rem;
  border:1px solid rgba(8,29,58,.08);
  border-radius:999px;background:#fff;
  box-shadow:0 10px 24px rgba(8,29,58,.06);
}
.topbar-avatar{
  width:38px;height:38px;border-radius:50%;
  object-fit:cover;border:2px solid rgba(8,29,58,.08);
  background:#f3f7fb;
}
.topbar-meta{display:flex;flex-direction:column;line-height:1.1}
.topbar-meta strong{font-size:.92rem;color:var(--portal-heading)}
.topbar-meta span{font-size:.75rem;color:var(--portal-muted)}
.topbar-pill{
  display:inline-flex;align-items:center;gap:.45rem;
  padding:.55rem .8rem;border-radius:999px;
  background:#fff;border:1px solid rgba(8,29,58,.08);
  color:var(--portal-heading);font-weight:700;
  text-decoration:none;box-shadow:0 10px 24px rgba(8,29,58,.05);
}
.topbar-pill:hover{color:var(--portal-primary)}
.portal-shell-toggler{
  border:none !important;
  width:46px;height:46px;border-radius:16px !important;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--portal-gradient-main) !important;color:#fff !important;
  box-shadow:0 14px 30px rgba(8,29,58,.18);
}
.app-shell{
  display:flex;
  min-height:calc(100vh - 72px);
}
.app-content{
  position:relative;
  min-width:0;
  flex:1 1 auto;
  width:100%;
  max-width:100%;
  min-height:calc(100vh - 72px);
  margin-left:var(--portal-sidebar-width);
  padding:26px clamp(18px,3vw,40px) 40px;
}
.app-content > *{max-width:100%}
.app-content .container,
.app-content .container-fluid{max-width:100%;padding-left:0;padding-right:0}
.app-content .row > [class*="col-"]{min-width:0}
.page-header,.profile-header,.hero-gradient,.hero-section,.portal-hero,.apply-hero,.app-details-header{
  border-radius:var(--portal-radius-lg) !important;
  overflow:hidden;
}
.hero-gradient,.hero-section,.portal-hero,.apply-hero{
  background:var(--portal-gradient-hero) !important;
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
  box-shadow:var(--portal-shadow);
  position:relative;
}
.hero-gradient::before,.hero-section::before,.portal-hero::before,.apply-hero::before{
  content:"";
  position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0));
  pointer-events:none;
}
.hero-gradient > *, .hero-section > *, .portal-hero > *, .apply-hero > *{position:relative;z-index:1}
.hero-gradient h1,.hero-gradient h2,.hero-gradient h3,
.hero-section h1,.hero-section h2,.hero-section h3,
.portal-hero h1,.portal-hero h2,.portal-hero h3,
.apply-hero h1,.apply-hero h2,.apply-hero h3{color:#fff !important;font-weight:900}
.hero-gradient p,.hero-section p,.portal-hero p,.apply-hero p,.hero-gradient .text-muted,.hero-section .text-muted,.portal-hero .text-muted,.apply-hero .text-muted{color:rgba(255,255,255,.92)!important}
.card,.card-x,.application-card,.portal-card,.pricing-card,.msg-shell,.app-card,.app-details-header,.helper-card,.filter-card,.sticky-toolbar,.count-dot,.wallet-balance-card,.timeline,
.form-check.border.rounded-3{
  border:1px solid var(--portal-border) !important;
  border-radius:var(--portal-radius) !important;
  box-shadow:var(--portal-shadow-card) !important;
}
.card,.card-x,.application-card,.portal-card,.pricing-card,.msg-shell,.app-card,.app-details-header,.helper-card,.filter-card,.sticky-toolbar,.timeline{background:rgba(255,255,255,.98)!important}
.card-header,.application-card-header,.portal-card-header,.card-footer,.application-card-footer{
  background:linear-gradient(180deg,#ffffff 0%,#f8fbfe 100%) !important;
  border-color:var(--portal-border) !important;
}
.card-title,h1,h2,h3,h4,h5,h6{color:var(--portal-heading)}
.table-responsive{border:1px solid var(--portal-border);border-radius:18px;overflow:auto;background:#fff}
.table thead th{background:#f4f9fc;color:var(--portal-heading);font-size:.82rem;text-transform:uppercase;letter-spacing:.04em}
.table td,.table th{vertical-align:middle}
.btn{border-radius:14px !important;font-weight:800 !important;letter-spacing:.01em}
.btn-primary,.btn-submit{
  background:var(--portal-gradient-main) !important;
  border-color:transparent !important;
  color:#fff !important;
  box-shadow:0 12px 24px rgba(8,29,58,.16);
}
.btn-success{background:linear-gradient(135deg,var(--portal-success),#0c6d4b)!important;border-color:transparent!important}
.btn-danger{background:var(--portal-gradient-accent)!important;border-color:transparent!important}
.btn-outline-primary,.btn-outline-secondary,.btn-outline-success,.btn-outline-dark{
  background:#fff !important;
  border-color:var(--portal-border-strong) !important;
  color:var(--portal-heading) !important;
}
.btn-outline-primary:hover,.btn-outline-secondary:hover,.btn-outline-success:hover,.btn-outline-dark:hover{
  background:var(--portal-primary)!important;color:#fff!important;border-color:var(--portal-primary)!important;
}
.form-control,.form-select,.form-check-input,input[type="date"],input[type="time"],input[type="file"],textarea{
  border-radius:14px !important;
  border-color:#d2deea !important;
  min-height:48px;
  box-shadow:none !important;
  background:#fff !important;
}
.form-control:focus,.form-select:focus,.form-check-input:focus{
  border-color:#7d9abb !important;
  box-shadow:0 0 0 .2rem rgba(18,58,121,.08) !important;
}
textarea.form-control{min-height:120px}
.form-label{font-weight:800;color:var(--portal-heading)}
.form-text,.text-muted{color:var(--portal-muted) !important}
.badge{font-weight:800;letter-spacing:.02em}
.nav-tabs .nav-link,.nav-pills .nav-link{
  border-radius:14px !important;
  font-weight:700;
}
.nav-tabs .nav-link.active,.nav-pills .nav-link.active{
  background:#eef5ff !important;
  color:var(--portal-primary) !important;
  border-color:rgba(18,58,121,.18) !important;
}
.sidebar-link,.sidebar-link:link,.sidebar-link:visited{
  text-decoration:none;
}
.portal-sidebar-backdrop{
  position:fixed;inset:0;z-index:1035;
  background:rgba(7,19,38,.52);
  backdrop-filter:blur(3px);
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .24s ease, visibility .24s ease;
}
.portal-sidebar-backdrop.show{opacity:1;visibility:visible;pointer-events:auto}
.portal-sidebar{
  position:fixed;
  inset:0 auto 0 0;
  width:var(--portal-sidebar-width);
  max-width:calc(100vw - 22px);
  height:100dvh;
  display:flex;flex-direction:column;
  background:var(--portal-gradient-main);
  color:#fff;
  box-shadow:10px 0 36px rgba(8,29,58,.24);
  border-right:1px solid rgba(255,255,255,.10);
  z-index:1040;
  transform:translateX(0);
  transition:transform .28s ease;
  overflow:hidden;
}
.portal-sidebar::before{
  content:"";
  position:absolute;inset:0;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.16), transparent 30%),
    radial-gradient(circle at 16% 118%, rgba(15,138,95,.24), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0));
  pointer-events:none;
}
.sidebar-header,.sidebar-scroll,.sidebar-footer-note{position:relative;z-index:1}
.sidebar-header{
  padding:calc(20px + env(safe-area-inset-top, 0px)) 20px 18px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.sidebar-header-top{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px;
}
.sidebar-brand{
  display:flex;align-items:center;gap:.9rem;
  color:#fff;text-decoration:none;
}
.sidebar-brand-logo{
  width:48px;height:48px;border-radius:16px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 10px 24px rgba(0,0,0,.16);
  font-size:1.15rem;
}
.sidebar-brand-copy strong{display:block;font-size:1rem;font-weight:900;color:#fff}
.sidebar-brand-copy span{display:block;font-size:.78rem;color:rgba(255,255,255,.80)}
.sidebar-close{
  display:none;
  width:42px;height:42px;flex:0 0 42px;
  align-items:center;justify-content:center;
  border-radius:14px;border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.10);color:#fff;
}
.sidebar-client-card{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.10);
  border-radius:22px;
  padding:16px;
  backdrop-filter:blur(10px);
  box-shadow:0 16px 34px rgba(0,0,0,.14);
}
.sidebar-client-top{display:flex;align-items:center;gap:12px}
.sidebar-avatar{
  width:54px;height:54px;border-radius:18px;flex:0 0 54px;
  object-fit:cover;border:2px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.18);
}
.sidebar-initials{
  width:54px;height:54px;border-radius:18px;display:grid;place-items:center;
  background:rgba(255,255,255,.16);border:2px solid rgba(255,255,255,.22);
  font-weight:900;font-size:1rem;
}
.sidebar-client-name{font-size:1rem;font-weight:900;color:#fff;line-height:1.2}
.sidebar-client-sub{font-size:.8rem;color:rgba(255,255,255,.84)}
.sidebar-membership{
  margin-top:12px;
  display:inline-flex;align-items:center;gap:.45rem;
  padding:.42rem .7rem;border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.18);
  font-size:.75rem;font-weight:800;color:#fff;
}
.sidebar-action-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}
.sidebar-quick-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  min-height:48px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.12);
  color:#fff;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 12px 24px rgba(0,0,0,.10);
}
.sidebar-quick-btn:hover,.sidebar-quick-btn:focus{background:rgba(255,255,255,.18);color:#fff}
.sidebar-scroll{
  flex:1 1 auto;
  overflow:auto;
  padding:16px 14px 20px;
}
.sidebar-section-label{
  color:rgba(255,255,255,.64);
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin:16px 8px 10px;
}
.sidebar-link{
  display:flex;align-items:center;gap:12px;
  min-height:48px;
  padding:12px 14px;
  border-radius:16px;
  color:rgba(255,255,255,.92);
  transition:background .18s ease, transform .18s ease, color .18s ease;
}
.sidebar-link i{
  width:18px;text-align:center;font-size:1rem;opacity:.95;
}
.sidebar-link:hover{
  background:rgba(255,255,255,.10);
  color:#fff;
  transform:translateX(1px);
}
.sidebar-link.active{
  background:rgba(255,255,255,.16);
  color:#fff;
  box-shadow:0 14px 26px rgba(0,0,0,.10);
  border:1px solid rgba(255,255,255,.14);
}
.sidebar-footer-note{
  padding:14px 20px calc(16px + env(safe-area-inset-bottom,0px));
  border-top:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.72);
  font-size:.78rem;
}
.portal-switch-modal{
  border:none !important;
  border-radius:24px !important;
  overflow:hidden;
  box-shadow:0 32px 80px rgba(8,29,58,.26);
}
.portal-switch-modal .modal-header{
  background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);
  padding:1.35rem 1.4rem 1rem;
}
.portal-switch-kicker{
  display:inline-flex;align-items:center;gap:.45rem;
  padding:.36rem .72rem;border-radius:999px;
  background:#eef5ff;color:var(--portal-primary);
  font-size:.74rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;
  margin-bottom:.7rem;
}
.portal-switch-card{
  height:100%;
  border:1px solid rgba(8,29,58,.08);
  border-radius:22px;
  background:#fff;
  padding:1rem;
  display:flex;flex-direction:column;justify-content:space-between;gap:1rem;
  box-shadow:0 14px 28px rgba(8,29,58,.05);
}
.portal-switch-card.is-current{
  background:linear-gradient(180deg,#f7fbff 0%,#eef5ff 100%);
  border-color:rgba(18,58,121,.18);
}
.portal-switch-card .portal-switch-meta{
  display:flex;justify-content:space-between;align-items:flex-start;gap:12px;
}
.portal-switch-card .badge-current{
  display:inline-flex;align-items:center;
  padding:.4rem .7rem;border-radius:999px;
  background:var(--portal-heading);color:var(--portal-gold);
  font-weight:900;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;
}
.portal-tour-fab{
  position:fixed;right:18px;bottom:128px;z-index:1095;
  display:inline-flex;align-items:center;gap:10px;
  padding:14px 16px;border:none;border-radius:999px;
  background:var(--portal-gradient-main);color:#fff;
  font-weight:900;box-shadow:0 18px 36px rgba(8,29,58,.25);
}

df-messenger{
  position:fixed !important;
  right:18px !important;
  left:auto !important;
  bottom:16px !important;
  z-index:1090 !important;
  --df-messenger-chat-window-width:min(92vw, 390px);
  --df-messenger-chat-window-height:min(72vh, 560px);
  --df-messenger-chat-border-radius:22px;
}
.portal-tour-backdrop{
  position:fixed;inset:0;z-index:1098;
  background:rgba(9,20,39,.56);
  backdrop-filter:blur(3px);
  display:none;
}
.portal-tour-backdrop.show{display:block}
.portal-tour-popover{
  position:fixed;z-index:1100;
  max-width:min(390px,calc(100vw - 28px));
  background:#fff;color:var(--portal-text);
  border-radius:22px;
  box-shadow:0 28px 70px rgba(8,29,58,.30);
  border:1px solid rgba(8,29,58,.08);
  padding:18px 18px 16px;
  display:none;
  max-height:min(58vh,400px);
  overflow:auto;
}
.portal-tour-popover.show{display:block}
.portal-tour-step{font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;color:var(--portal-accent);margin-bottom:8px}
.portal-tour-title{font-size:1.05rem;font-weight:900;color:var(--portal-heading);margin-bottom:8px}
.portal-tour-body{font-size:.94rem;color:var(--portal-muted);line-height:1.55}
.portal-tour-actions{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:16px}
.portal-tour-progress{font-size:.8rem;color:var(--portal-muted);font-weight:800}
[data-tour-active="true"]{
  position:relative;
  z-index:1099 !important;
  box-shadow:0 0 0 4px rgba(15,138,95,.95),0 0 0 9px rgba(255,255,255,.88),0 22px 54px rgba(8,29,58,.22) !important;
  border-radius:18px !important;
}
.portal-section-anchor{scroll-margin-top:110px}
.msg-shell{min-height:560px}
.msg-left{border-right:1px solid var(--portal-border) !important}
.msg-right{background:#f6f8fc !important}
.wallet-balance-card{background:var(--portal-gradient-main)!important;color:#fff!important;border:none!important}
.wallet-balance-card .card-title,.wallet-balance-card .card-text,.wallet-balance-card h1,.wallet-balance-card h2,.wallet-balance-card h3,.wallet-balance-card h4,.wallet-balance-card h5{color:#fff!important}
.timeline{background:#fff}
#schoolsMap{min-height:470px}
.sticky-toolbar{position:sticky;top:92px;z-index:1014}
#filter-bar{top:92px !important}
body.portal-switch-open .portal-sidebar,
body.portal-switch-open .portal-sidebar-backdrop{z-index:1030 !important}
body.portal-switch-open df-messenger,
body.portal-switch-open .portal-tour-fab,
body.portal-tour-open df-messenger,
body.portal-tour-open .portal-tour-fab,
body.portal-chat-open .portal-tour-fab{opacity:0 !important;pointer-events:none !important}
.main-content,.app-content,.app-content *{max-width:100%}
@media (max-width:1199.98px){
  .app-content{margin-left:0;padding:22px 14px 32px}
  .portal-sidebar{transform:translateX(-102%)}
  body.portal-sidebar-open .portal-sidebar{transform:translateX(0)}
  .sidebar-close{display:inline-flex}
}
@media (max-width:991.98px){
  .portal-topbar .navbar-brand span{display:none}
  .topbar-meta{display:none}
  .topbar-pill{padding:.55rem .72rem}
  .topbar-pill .label{display:none}
  .msg-shell{height:auto !important;min-height:0 !important}
  .msg-left,.msg-right{min-height:360px}
  .app-content .table>:not(caption)>*>*{padding:.82rem .72rem}
  .sticky-toolbar,#filter-bar{top:80px !important}
}
@media (max-width:767.98px){
  .app-content{padding:20px 12px 28px}
  .portal-topbar .container-fluid{padding-left:12px!important;padding-right:12px!important}
  .topbar-profile{padding:.3rem .4rem .3rem .3rem}
  .topbar-avatar{width:34px;height:34px}
  .sidebar-action-grid{grid-template-columns:1fr}
  .portal-tour-popover{
    left:12px !important;right:12px !important;top:auto !important;
    bottom:calc(env(safe-area-inset-bottom,0px) + 12px) !important;
    width:auto;max-width:none;max-height:min(58vh,440px);padding:16px 14px 14px;border-radius:20px;
  }
  .portal-tour-actions{flex-direction:column;align-items:stretch}
  .portal-tour-fab{bottom:calc(env(safe-area-inset-bottom,0px) + 112px) !important;right:12px;left:auto;max-width:calc(100vw - 24px)}
  df-messenger{right:12px !important;bottom:12px !important;left:auto !important;--df-messenger-chat-window-width:min(94vw,360px);--df-messenger-chat-window-height:min(68vh,520px);} 
  .hero-gradient,.hero-section,.portal-hero,.apply-hero,.app-details-header{border-radius:22px !important}
  .sidebar-brand-copy strong{font-size:.96rem}
}
@media (max-width:575.98px){
  .portal-topbar .brand-mark{width:38px;height:38px;border-radius:13px}
  .portal-shell-toggler{width:42px;height:42px;border-radius:14px !important}
  .portal-switch-modal .modal-dialog{margin:.7rem}
  .portal-switch-modal .modal-title{font-size:1.08rem!important;line-height:1.2}
  .portal-switch-modal .modal-header{padding:1.05rem 1rem .85rem}
  .portal-switch-modal .modal-body{padding:1rem!important}
  .portal-tour-fab{font-size:.9rem;padding:12px 14px}
}


.form-check-input{background-color:#fff !important;}
.form-check.form-switch .form-check-input{width:2.5em;height:1.35em;}
.form-switch .form-check-input:checked{background-color:var(--portal-primary)!important;border-color:var(--portal-primary)!important;}
select.form-select, .btn-outline-secondary, .btn-outline-primary{backdrop-filter:none;}

@media (min-width:768px){
  .portal-tour-popover{min-width:320px}
}
