:root{
  --portal-sidebar-width:290px;
  --portal-primary:#0b2a5b;
  --portal-primary-2:#123a79;
  --portal-primary-deep:#081d3a;
  --portal-secondary:#12345a;
  --portal-accent:#d92332;
  --portal-accent-strong:#b61825;
  --portal-success:#0f8a5f;
  --portal-success-soft:rgba(15,138,95,.10);
  --portal-gold:#d4af37;
  --portal-gold-soft:rgba(212,175,55,.12);
  --portal-bg:#eef4f9;
  --portal-bg-2:#f7fbff;
  --portal-surface:#ffffff;
  --portal-surface-soft:#f8fbfd;
  --portal-border:#dde7f0;
  --portal-border-strong:#c7d6e5;
  --portal-muted:#5e7188;
  --portal-text:#122033;
  --portal-heading:#09264a;
  --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(135deg,#081d3a 0%, #0b2a5b 36%, #0f8a5f 72%, #d92332 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,.22), transparent 30%),radial-gradient(circle at 88% 14%, rgba(217,35,50,.18), transparent 26%),linear-gradient(135deg,#081d3a 0%, #0b2a5b 34%, #123a79 62%, #0f8a5f 82%, #d92332 100%);
  --portal-gradient-accent:linear-gradient(135deg,#d92332 0%, #b61825 100%);
}
html{scroll-behavior:smooth;overflow-x:hidden}
body{
  background:
    radial-gradient(circle at top left, rgba(11,42,91,.04), transparent 24%),
    radial-gradient(circle at right 10%, rgba(15,138,95,.05), transparent 28%),
    linear-gradient(180deg,var(--portal-bg-2) 0%,var(--portal-bg) 100%) !important;
  color:var(--portal-text);
  min-height:100vh;
  overflow-x:hidden !important;
  display:block !important;
  width:100%;
  max-width:100%;
  font-family:'Poppins', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-text-size-adjust:100%;
}
body.portal-sidebar-open,body.portal-tour-open{overflow:hidden !important}
*,*::before,*::after{box-sizing:border-box}
img,svg,video{max-width:100%;height:auto}
*{scrollbar-width:thin;scrollbar-color:#c2cfde transparent}
.main-content,
body .main-content{
  margin-left:var(--portal-sidebar-width) !important;
  width:calc(100% - var(--portal-sidebar-width)) !important;
  max-width:calc(100% - var(--portal-sidebar-width)) !important;
  min-height:100vh;
  padding:32px clamp(18px,3vw,42px) 40px !important;
  box-sizing:border-box;
  position:relative;
}
.main-content > *{max-width:100%}
.main-content .row > [class*="col-"]{min-width:0}
.main-content .container,.main-content .container-fluid{padding-left:0;padding-right:0;max-width:100%}
a{word-break:break-word}
.page-header,.profile-header{margin-bottom:24px}
.page-header .breadcrumb,.profile-header .breadcrumb{background:transparent;margin-bottom:12px;padding:0}
.page-header .breadcrumb-item a,.profile-header .breadcrumb-item a{color:var(--portal-primary);text-decoration:none;font-weight:700}
.page-header .breadcrumb-item.active,.profile-header .breadcrumb-item.active{color:var(--portal-muted)}
.page-header h1,.page-title,.profile-header h1{color:var(--portal-heading) !important;font-weight:800 !important;letter-spacing:-.03em;margin-bottom:8px;line-height:1.08}
.page-header p,.page-subtitle,.profile-header p,.lead.text-muted{color:var(--portal-muted) !important}
.profile-header{
  display:flex;align-items:center;gap:16px;padding:24px 26px;border-radius:24px;
  background:var(--portal-gradient-hero);box-shadow:var(--portal-shadow);color:#fff;position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.10)
}
.profile-header::before,.portal-hero::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));pointer-events:none}
.profile-header h1,.profile-header p{color:#fff !important;position:relative;z-index:1}
.profile-header .text-muted{color:rgba(255,255,255,.84)!important}
.profile-avatar-large{width:84px;height:84px;border-radius:50%;object-fit:cover;border:3px solid rgba(255,255,255,.76);box-shadow:0 10px 28px rgba(0,0,0,.24);flex:0 0 84px}
.portal-hero{
  position:relative;
  background:var(--portal-gradient-hero);
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--portal-radius-lg);
  color:#fff;
  box-shadow:var(--portal-shadow);
  padding:28px 30px;
  overflow:hidden;
}
.portal-hero::after{content:"";position:absolute;inset:auto -70px -100px auto;width:250px;height:250px;border-radius:50%;background:radial-gradient(circle, rgba(217,35,50,.18), transparent 72%);pointer-events:none}
.portal-hero > *{position:relative;z-index:1}
.portal-hero h1,.portal-hero h2,.portal-hero h3,.portal-hero .lead,.portal-hero p,.portal-hero .text-primary-blue{color:#fff !important;text-shadow:0 2px 14px rgba(0,0,0,.12)}
.portal-hero .text-white-50,.portal-hero .text-muted{color:rgba(255,255,255,.88)!important}
.portal-chip{display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.16);color:#fff;font-size:.82rem;font-weight:800;letter-spacing:.02em;border:1px solid rgba(255,255,255,.16);backdrop-filter:blur(6px)}
.portal-chip.text-dark{color:var(--portal-heading)!important}.portal-chip.bg-light{background:#fff!important}.portal-chip.bg-warning-subtle{background:rgba(255,255,255,.95)!important;color:var(--portal-heading)!important}
.portal-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}
.portal-stat{background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border:1px solid var(--portal-border);box-shadow:var(--portal-shadow-soft);border-radius:20px;padding:20px 20px 18px;min-width:0}
.portal-stat-label{color:var(--portal-muted);font-size:.78rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;margin-bottom:8px}
.portal-stat-value{color:var(--portal-heading);font-size:1.62rem;line-height:1.12;font-weight:900;letter-spacing:-.03em;overflow-wrap:anywhere}
.card,.application-card,.glass-card,.portal-card,.pricing-card{border:1px solid var(--portal-border) !important;border-radius:var(--portal-radius) !important;box-shadow:var(--portal-shadow-card) !important;background:rgba(255,255,255,.98) !important;overflow:hidden}
.pricing-card{padding:2rem 1.65rem !important}
.card-header,.application-card-header,.portal-card-header,.pricing-card .plan-name{background:linear-gradient(180deg,#fff 0%,#f8fbfe 100%) !important;border-bottom:1px solid var(--portal-border) !important;color:var(--portal-heading) !important;font-weight:800 !important;padding:16px 20px !important}
.application-card-body,.card-body,.accordion-body,.pricing-card .feature-list{padding:22px}
.application-card-footer,.card-footer{background:linear-gradient(180deg,#ffffff 0%,#f7fafc 100%) !important;border-top:1px solid var(--portal-border) !important;padding:16px 20px !important}
.table,.list-group-item,.accordion-item{--bs-border-color:var(--portal-border)}
.table thead th{background:#f5f9fc;color:var(--portal-heading);font-size:.82rem;text-transform:uppercase;letter-spacing:.04em;border-bottom-width:1px}
.table td,.table th{vertical-align:middle}.table>:not(caption)>*>*{padding:.95rem .9rem}
.table-responsive{border-radius:16px;overflow:auto;border:1px solid var(--portal-border);background:#fff}
.list-group-item{padding:16px 18px;background:transparent}
.portal-soft-note,.alert,.portal-inline-kv,.summary-row,.detail-item,.dynamic-entry,.alert-upgrade{border-radius:16px}
.alert{border-width:1px;box-shadow:0 6px 16px rgba(8,29,58,.04)}
.alert-upgrade{background:linear-gradient(135deg, rgba(11,42,91,.06) 0%, rgba(15,138,95,.10) 100%);border:1px solid rgba(15,138,95,.22);padding:16px 18px}
.portal-soft-note{background:linear-gradient(180deg,#f8fbfd 0%,#f3f8fb 100%);border:1px solid var(--portal-border);padding:16px 18px;color:var(--portal-muted)}
.portal-inline-kv,.summary-row{display:flex;justify-content:space-between;gap:18px;padding:12px 0;border-bottom:1px solid var(--portal-border)}
.summary-row:last-child,.portal-inline-kv:last-child{border-bottom:none}
.summary-row dt,.portal-inline-kv strong{color:var(--portal-muted);font-weight:700}
.summary-row dd,.portal-inline-kv span{margin:0;color:var(--portal-heading);font-weight:800;text-align:right}
.details-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}
.detail-item,.dynamic-entry{background:linear-gradient(180deg,#f9fcfe 0%,#f5f9fc 100%);border:1px solid var(--portal-border);border-radius:16px;padding:14px 16px}
.detail-item strong{display:block;color:var(--portal-muted);font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}.detail-item span{font-weight:800;color:var(--portal-heading);overflow-wrap:anywhere}
.payment-method-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px}
.payment-method-card input{position:absolute;opacity:0;pointer-events:none}
.payment-method-card .inner,.form-check.border.rounded-3,.pricing-card.highlight,.feature-list li,.nav-tabs .nav-link{transition:all .2s ease}
.payment-method-card .inner{display:block;border:1px solid var(--portal-border);border-radius:18px;background:#fff;padding:16px;min-height:108px}
.payment-method-card input:checked + .inner,.payment-method-card .inner:hover,.form-check.border.rounded-3:hover{border-color:rgba(217,35,50,.35);box-shadow:0 0 0 4px rgba(217,35,50,.08);transform:translateY(-1px)}
.portal-list-clean,.feature-list{list-style:none;padding:0;margin:0}.portal-list-clean li,.feature-list li{padding:0 0 12px 26px;position:relative;color:var(--portal-muted);line-height:1.55}
.portal-list-clean li::before,.feature-list li::before{content:"•";position:absolute;left:8px;top:-2px;color:var(--portal-accent);font-size:1.2rem;font-weight:800}.feature-list li i{display:none}
.pricing-card.highlight{border-color:rgba(217,35,50,.28)!important;box-shadow:0 18px 42px rgba(217,35,50,.10)!important}.badge-popular{box-shadow:0 10px 18px rgba(217,35,50,.2)}
.nav-tabs{gap:8px;border-bottom:none !important}.nav-tabs .nav-link{border:none !important;border-radius:12px !important;color:var(--portal-heading) !important;background:#f4f8fc !important;font-weight:800 !important;padding:.85rem 1rem !important}.nav-tabs .nav-link.active{background:linear-gradient(135deg,var(--portal-primary) 0%,var(--portal-success) 100%) !important;color:#fff !important;box-shadow:0 10px 22px rgba(8,29,58,.16)}.tab-content>.tab-pane{padding-top:10px}
.dropdown-menu,.modal-content{border-radius:16px!important;box-shadow:var(--portal-shadow)!important}
.btn{border-radius:14px !important;font-weight:800 !important;letter-spacing:.01em;box-shadow:none;min-height:46px}
.btn-danger,.btn-primary,.btn-submit{background:var(--portal-gradient-accent) !important;border-color:transparent !important;color:#fff !important}
.btn-success{background:linear-gradient(135deg,var(--portal-success) 0%, #0a6b49 100%) !important;border-color:transparent !important;color:#fff !important}
.btn-danger:hover,.btn-primary:hover,.btn-submit:hover,.btn-success:hover{filter:brightness(.97)}
.btn-outline-primary,.btn-outline-danger,.btn-outline-success{color:var(--portal-heading)!important;border-color:#cfd8e3!important;background:#fff!important}.btn-outline-primary:hover,.btn-outline-danger:hover,.btn-outline-success:hover{background:var(--portal-primary)!important;color:#fff!important;border-color:var(--portal-primary)!important}
.btn-outline-dark{border-color:#d0d7e2!important;color:var(--portal-heading)!important}.btn-light{background:#fff!important;border-color:var(--portal-border)!important}
.form-control,.form-select,.form-check-input,input[type="date"],input[type="time"],input[type="file"]{border-radius:14px !important;border-color:#d3deea !important;min-height:48px;box-shadow:none !important;color:var(--portal-text) !important;background:#fff !important;max-width:100%}
.form-control::placeholder,textarea::placeholder{color:#8ba0b6 !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);margin-bottom:.45rem}.form-text{color:var(--portal-muted)!important}.form-select option,select option{color:var(--portal-text) !important;background:#fff !important}.badge{font-weight:800;letter-spacing:.02em}.text-primary-blue{color:var(--portal-heading)!important}.text-muted{color:var(--portal-muted)!important}.page-header .text-muted,.card .text-muted,.application-card .text-muted{color:#566b84!important}
select option, .form-select option { white-space:normal; }
.portal-tour-fab{position:fixed;right:18px;bottom:140px;z-index:1095;display:inline-flex;align-items:center;gap:10px;padding:14px 16px;border:none;border-radius:999px;background:linear-gradient(135deg,var(--portal-primary) 0%,var(--portal-success) 68%,var(--portal-accent) 100%);color:#fff;font-weight:800;box-shadow:0 18px 36px rgba(8,29,58,.25);transition:opacity .22s ease, transform .22s ease}
body.portal-tour-open .portal-tour-fab{opacity:0;pointer-events:none;transform:translateY(18px)}
body.portal-tour-open .nac-helpfab,
body.portal-tour-open df-messenger{opacity:0!important;pointer-events:none!important}
.portal-tour-fab .fa-solid{color:#fff}
.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(72vh,520px);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;position:sticky;bottom:-16px;background:#fff;padding-top:12px}.portal-tour-actions .btn{padding:.6rem .95rem!important;min-height:42px}
[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-tour-progress{font-size:.8rem;color:var(--portal-muted);font-weight:800}.portal-section-anchor{scroll-margin-top:90px}
.portal-kpi-pill{display:inline-flex;align-items:center;gap:.55rem;padding:.55rem .85rem;border-radius:999px;background:var(--portal-success-soft);color:var(--portal-success);font-size:.82rem;font-weight:800}
.portal-next-step{display:flex;align-items:flex-start;gap:12px;padding:16px 18px;border:1px solid var(--portal-border);border-radius:18px;background:linear-gradient(180deg,#fff 0%,#f8fbfd 100%)}
.portal-next-step i{color:var(--portal-success);font-size:1.05rem;margin-top:3px}
.portal-stagebar{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}
.portal-stagebar .stage{position:relative;padding:14px 16px;border:1px solid var(--portal-border);border-radius:18px;background:#fff;min-height:100px}
.portal-stagebar .stage.is-complete{border-color:rgba(15,138,95,.26);background:linear-gradient(180deg,rgba(15,138,95,.05),#fff)}
.portal-stagebar .stage.is-active{border-color:rgba(217,35,50,.26);background:linear-gradient(180deg,rgba(217,35,50,.05),#fff);box-shadow:0 10px 22px rgba(217,35,50,.06)}
.portal-stagebar .stage-label{font-size:.75rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:var(--portal-muted);margin-bottom:6px}
.portal-stagebar .stage-title{font-weight:800;color:var(--portal-heading);margin-bottom:4px}
.portal-stagebar .stage-note{font-size:.9rem;color:var(--portal-muted);line-height:1.45}
.portal-empty{padding:36px 20px;text-align:center;color:var(--portal-muted)}
.portal-empty i{font-size:2.5rem;color:rgba(11,42,91,.45);margin-bottom:12px;display:block}
code{color:var(--portal-accent-strong)}
@media (max-width:1199.98px){.portal-hero{padding:24px 22px}}
@media (max-width:991.98px){
  body .main-content,.main-content{margin-left:0!important;width:100%!important;max-width:100%!important;padding:84px 14px 34px!important}
  .portal-hero,.profile-header{padding:22px 18px;border-radius:22px}
  .portal-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .portal-tour-fab{right:14px;bottom:132px;padding:12px 14px;font-size:.92rem}
  .application-card-header,.application-card-footer,.card-header,.card-footer{padding:14px 16px!important}
  .card-body,.application-card-body,.accordion-body{padding:18px!important}
  .summary-row,.portal-inline-kv{gap:10px}
  .portal-sidebar{width:min(88vw,var(--portal-sidebar-width))!important}
  .mobile-toggler{top:14px!important;left:14px!important}
  .portal-stagebar{grid-template-columns:1fr 1fr}
}
@media (max-width:767.98px){
  .profile-header{flex-direction:column;align-items:flex-start}
  .application-card-header{flex-direction:column;align-items:flex-start;gap:10px}
  .application-card-footer .btn,.card-footer .btn,.portal-tour-actions .d-flex,.main-content .btn.w-100{width:100%}
  .main-content .btn.btn-lg{width:100%}
  .pricing-card{padding:1.5rem 1.25rem!important}
  .plan-price{font-size:2.25rem!important}
  .portal-stagebar{grid-template-columns:1fr}
  .portal-inline-kv,.summary-row{flex-direction:column;align-items:flex-start}
  .summary-row dd,.portal-inline-kv span{text-align:left}
}
@media (max-width:575.98px){
  .portal-stat-grid{grid-template-columns:1fr}
  .card-body,.application-card-body{padding:16px!important}
  .page-header h1,.page-title,.profile-header h1{font-size:1.66rem!important}
  .portal-hero p.lead{font-size:1rem!important}
  .portal-tour-popover{left:12px!important;right:12px!important;top:auto!important;bottom:calc(env(safe-area-inset-bottom, 0px) + 12px)!important;max-width:none;width:auto;max-height:min(58vh,440px);padding:16px 14px 14px;border-radius:20px}
  .portal-tour-actions{flex-direction:column;align-items:stretch;bottom:auto;padding-top:10px}
  .portal-tour-actions > .d-flex{width:100%;display:grid!important;grid-template-columns:1fr 1fr 1fr;gap:10px}
  .portal-tour-progress{text-align:center}
  .profile-avatar-large{width:72px;height:72px;flex-basis:72px}
  .form-check.border.rounded-3{padding:14px!important}
  .portal-tour-fab{bottom:calc(env(safe-area-inset-bottom, 0px) + 126px)!important;right:12px;left:auto;max-width:calc(100vw - 24px)}
  .table>:not(caption)>*>*{padding:.82rem .72rem}
  .portal-chip{font-size:.76rem;padding:7px 11px}
}
/* Strong overrides for legacy pages still carrying old desktop shell rules */
body{display:block!important;margin:0!important;padding:0!important}
body > .sidebar:not(.portal-sidebar){display:none!important}
.sidebar.portal-sidebar{position:fixed!important;left:0;top:0;bottom:0;z-index:1040!important}
.main-content{float:none!important}
.main-content .row,.main-content .container,.main-content .container-fluid{max-width:100%}


body.portal-switch-open{overflow:hidden!important}
body.portal-switch-open .sidebar.portal-sidebar,
body.portal-switch-open .portal-sidebar{z-index:1030!important}
body.portal-switch-open .mobile-toggler.portal-shell-toggler{z-index:1025!important}
body.portal-switch-open .portal-sidebar-backdrop{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.main-content,.main-content *{max-width:100%}
.main-content .card,.main-content .application-card,.main-content .portal-card,.main-content .pricing-card,.main-content .alert,.main-content .table-responsive{min-width:0}
.main-content .btn{white-space:normal}
.main-content .form-control,.main-content .form-select,.main-content textarea{max-width:100%}
#portalSwitchModal{z-index:1095}
#portalSwitchModal .modal-dialog{margin:1rem auto}
#portalSwitchModal .modal-content{border-radius:22px;overflow:hidden}
@media (max-width:991.98px){
  .main-content,.main-content > .container,.main-content > .container-fluid{overflow-x:clip}
  .main-content .form-control,.main-content .form-select,.main-content textarea{font-size:16px!important}
  .main-content .row{--bs-gutter-x:1rem}
}
@media (max-width:767.98px){
  #portalSwitchModal .modal-dialog{margin:.7rem}
  #portalSwitchModal .modal-header{padding:18px 18px 10px!important}
  #portalSwitchModal .modal-body{padding:14px!important}
  #portalSwitchModal .modal-title{font-size:1.1rem!important;line-height:1.2}
  #portalSwitchModal .portal-switch-kicker{font-size:.7rem!important;letter-spacing:.09em!important}
}
