:root{
  --bg-deep:#050811!important;
  --bg-card:#0b101d!important;
  --bg-elevated:#10182a!important;
  --border:rgba(205,216,255,.12)!important;
  --border-hover:rgba(156,171,255,.32)!important;
  --accent:#5c74ff!important;
  --accent-cyan:#9cabff!important;
  --text-primary:#eef1f8!important;
  --text-secondary:#a6afc3!important;
  --text-muted:#69748c!important;
  --radius:2px!important;
  --radius-sm:2px!important;
  --glow:none!important;
}
body{font-family:'Manrope',sans-serif!important;background:#050811!important}
[data-aos]{opacity:1!important;transform:none!important}
body::before{opacity:.025!important;filter:saturate(.7)}
.portal-landing::before{
  opacity:.46!important;
  filter:saturate(.72) contrast(1.08)!important;
  background-position:center 42%!important;
}
.portal-landing::after{
  background:linear-gradient(90deg,rgba(5,8,17,.96) 0%,rgba(5,8,17,.82) 48%,rgba(5,8,17,.52) 100%)!important;
}
h1,h2,h3,h4,.page-header h1,.metric-value,.auth-title,.auth-card-title{font-family:'Newsreader',serif!important;font-weight:400!important;letter-spacing:-.03em!important}
.sidebar{background:rgba(5,8,17,.97)!important;padding:28px 18px!important}
.sidebar-brand{font-family:'Newsreader',serif!important;font-weight:400!important;font-size:27px!important}
.sidebar-nav a,.sidebar-logout,.btn,button.btn{border-radius:2px!important}
.sidebar-nav a.active{background:rgba(92,116,255,.1)!important;color:#9cabff!important;border-left-color:#5c74ff!important}
.main{padding:38px 44px!important}
.metric-card,.card,.auth-card,.feature-card,.price-card,.cta-box,.panel,.table-wrap{border-radius:2px!important;background:#0b101d!important;box-shadow:none!important}
.metric-card:hover,.card:hover,.feature-card:hover,.price-card:hover{transform:none!important;box-shadow:none!important}
input,select,textarea{border-radius:2px!important;background:#070b14!important}
.btn,button.btn,.btn-primary,.nav-cta,.price-btn{
  border-radius:2px!important;
  background:#5c74ff!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1;
  visibility:visible;
  line-height:1.35;
  box-shadow:none!important;
}
.btn-ghost,button.btn-ghost{
  background:transparent!important;
  border:1px solid rgba(156,171,255,.45)!important;
  color:#b8c2ff!important;
}
.btn-danger,button.btn-danger{
  background:rgba(248,81,73,.08)!important;
  border:1px solid rgba(248,81,73,.38)!important;
  color:#ff8b86!important;
}
.btn:hover,button.btn:hover,.btn-ghost:hover,button.btn-ghost:hover,.btn-danger:hover,button.btn-danger:hover{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
.btn-secondary{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
.btn:focus-visible,button.btn:focus-visible,.btn-primary:focus-visible,.btn-secondary:focus-visible,.nav-cta:focus-visible,.price-btn:focus-visible{
  outline:3px solid rgba(184,194,255,.72)!important;
  outline-offset:3px;
}
.btn:disabled,button.btn:disabled,.btn[aria-disabled="true"]{
  opacity:.5!important;
  cursor:not-allowed!important;
}
.main.full{padding:0!important;min-height:100vh}
.auth-container{max-width:1080px!important;margin:0 auto!important;padding:5rem 5%!important;display:grid;grid-template-columns:.9fr 1.1fr;gap:4rem;align-items:center;text-align:left!important}
.auth-container>.hero-banner{grid-column:1;grid-row:1/5;width:100%!important;min-height:580px;object-fit:cover;border-radius:2px!important;margin:0!important;filter:saturate(.75) contrast(1.05)}
.auth-title,.auth-subtitle,.auth-card,.auth-footer{grid-column:2}
.auth-title{font-size:clamp(2.8rem,5vw,4.5rem)!important;line-height:.98;margin:0!important}
.auth-subtitle{font-size:14px!important;color:#a6afc3!important;margin:0 0 1.25rem!important}
.auth-card{padding:2rem!important}
.auth-footer{text-align:left!important}

/* Public portal landing */
.nav,.hero,.features,.pricing,.cta,.footer{position:relative;z-index:1}
.nav{max-width:none!important;padding:1.15rem 6%!important;background:rgba(5,8,17,.88);border-bottom:1px solid var(--border);position:sticky!important;top:0}
.nav-brand span{font-family:'Newsreader',serif;font-size:25px!important;font-weight:400!important}
.nav-cta{padding:12px 22px!important}
.hero{max-width:1180px!important;text-align:left!important;margin:0!important;padding:9rem 7% 7rem!important;min-height:720px;display:flex;flex-direction:column;justify-content:center}
.hero-badge{border-radius:2px!important;text-transform:uppercase;letter-spacing:.16em;font-size:10px!important;background:rgba(8,12,23,.72)!important}
.hero h1{font-size:clamp(4rem,8vw,7.5rem)!important;line-height:.92!important;max-width:1050px}
.hero h1 span{background:none!important;-webkit-text-fill-color:#f3f0e8!important;color:#f3f0e8!important;font-style:italic}
.hero p{margin:0 0 2.5rem!important;max-width:680px!important;font-size:1.08rem!important;color:#bdc5d5!important}
.hero-buttons{justify-content:flex-start!important}
.btn-primary,.btn-secondary{border-radius:2px!important}
.features,.pricing{max-width:1180px!important;padding:7rem 6%!important}
.features-title,.pricing-title,.cta h2{font-family:'Newsreader',serif!important;font-weight:400!important;font-size:clamp(2.8rem,5vw,4.8rem)!important;letter-spacing:-.035em}
.features-title,.features-sub,.pricing-title{text-align:left!important}
.features-sub{max-width:600px}
.features-grid,.pricing-grid{gap:1px!important;background:var(--border);border:1px solid var(--border)}
.feature-card,.price-card{border:0!important}
.footer{background:#050811}
/* Responsive app shell: prevent horizontal overflow in installed/PWA windows. */
html,body{overflow-x:hidden;max-width:100%;}
.main{min-width:0;overflow-x:hidden;}
.card,.panel,.table-wrap{max-width:100%;}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
input,select,textarea,button{max-width:100%;font-size:16px;}
@media(max-width:768px){
  .main{padding:78px 18px 28px!important}
  .auth-container{grid-template-columns:1fr!important;padding:4rem 5%!important;gap:1.5rem}
  .auth-container>.hero-banner{display:none!important}
  .auth-title,.auth-subtitle,.auth-card,.auth-footer{grid-column:1}
  .hero{padding:6rem 5% 4rem!important}
  .hero{min-height:640px}
  .hero h1{font-size:clamp(3.3rem,16vw,5rem)!important}
  .features,.pricing{padding:5rem 5%!important}
  .main{padding:70px 12px 24px!important;}
  .page-header h1{font-size:clamp(1.35rem,7vw,2rem)!important;}
  .metrics-row{grid-template-columns:1fr 1fr!important;}
  .form-grid{grid-template-columns:1fr!important;}
  .card{overflow:hidden;}
  .table-wrap table{min-width:680px;}
  .btn,button.btn{white-space:normal;line-height:1.2;}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
