:root{
  --bg:#030814;
  --panel:rgba(8,18,33,.72);
  --panel-strong:rgba(8,18,33,.86);
  --text:#f5f8ff;
  --muted:#9facbf;
  --line:rgba(149,184,230,.17);
  --line-strong:rgba(170,205,255,.25);
  --cyan:#55d6ff;
  --blue:#3387ff;
  --green:#41f0bd;
  --copper:#ffad6a;
  --radius-xl:34px;
  --radius-lg:22px;
  --shadow:0 34px 100px rgba(0,0,0,.48);
  --ease:cubic-bezier(.2,.8,.2,1);
}

*{box-sizing:border-box}
html{min-height:100%}
body{
  margin:0;
  min-height:100vh;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 18% 16%,rgba(58,138,255,.14),transparent 34%),
    radial-gradient(circle at 82% 18%,rgba(65,240,189,.08),transparent 30%),
    radial-gradient(circle at 50% 110%,rgba(97,75,255,.10),transparent 34%),
    linear-gradient(180deg,#071426 0%,#030814 72%);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background-image:radial-gradient(rgba(160,195,255,.10) 1px,transparent 1px);
  background-size:28px 28px;
  opacity:.13;
  mask-image:linear-gradient(180deg,#000,transparent 78%);
}

a{color:inherit;text-decoration:none}
button,input{font:inherit}

.portal-shell{
  position:relative;
  width:min(1480px,calc(100vw - 56px));
  min-height:100vh;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(380px,500px);
  gap:28px;
  align-items:center;
  padding:44px 0;
  transition:opacity .22s var(--ease),filter .22s var(--ease);
}

body.checking-session .portal-shell{
  opacity:0;
  filter:blur(8px);
  pointer-events:none;
}

.brand-panel,.auth-card{
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-xl);
  background:
    linear-gradient(135deg,rgba(255,255,255,.05),rgba(255,255,255,.015)),
    radial-gradient(circle at 18% 18%,rgba(85,214,255,.10),transparent 38%),
    radial-gradient(circle at 86% 28%,rgba(65,240,189,.06),transparent 34%),
    var(--panel);
  box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter:blur(24px) saturate(1.15);
}

.brand-panel::before,.auth-card::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius:inherit;
  background:linear-gradient(120deg,rgba(255,255,255,.09),transparent 24%,transparent 70%,rgba(85,214,255,.08));
  opacity:.62;
}

.brand-panel{
  min-height:660px;
  padding:38px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.brand,.brand-copy,.portal-benefits,.auth-card > *{position:relative;z-index:1}

.brand{
  width:fit-content;
  display:flex;
  align-items:center;
  gap:12px;
  font-size:1.18rem;
  font-weight:950;
  letter-spacing:-.04em;
}

.brand-mark{
  width:42px;
  height:42px;
  border-radius:15px;
  display:grid;
  place-items:center;
  color:white;
  background:linear-gradient(135deg,rgba(42,132,255,.95),rgba(85,214,255,.82));
  box-shadow:0 18px 44px rgba(38,128,255,.28),inset 0 1px 0 rgba(255,255,255,.34);
}

.eyebrow{
  display:inline-flex;
  width:fit-content;
  align-items:center;
  gap:8px;
  padding:8px 13px;
  border-radius:999px;
  border:1px solid rgba(120,210,255,.22);
  background:rgba(120,210,255,.075);
  color:#9feaff;
  font-size:.75rem;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.brand-copy h1{
  max-width:840px;
  margin:22px 0 18px;
  font-size:clamp(4rem,7.4vw,7.45rem);
  line-height:.9;
  letter-spacing:-.085em;
  font-weight:900;
  text-wrap:balance;
  text-shadow:0 20px 54px rgba(0,0,0,.42);
}

.brand-copy p{
  max-width:700px;
  margin:0;
  color:var(--muted);
  font-size:1.14rem;
  line-height:1.7;
}

.portal-benefits{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.portal-benefits article{
  min-height:128px;
  padding:18px;
  border:1px solid rgba(149,184,230,.14);
  border-radius:20px;
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012));
}

.portal-benefits span{
  display:block;
  color:#79e6ff;
  font-size:.76rem;
  font-weight:950;
  margin-bottom:14px;
  letter-spacing:.14em;
}

.portal-benefits strong{
  display:block;
  margin-bottom:8px;
  font-size:1rem;
  letter-spacing:-.035em;
}

.portal-benefits small{
  color:#8fa0b8;
  line-height:1.5;
}

.auth-panel{display:grid;gap:16px}
.auth-card{padding:30px}

.auth-heading{margin-bottom:24px}
.auth-heading h2{
  margin:17px 0 7px;
  font-size:clamp(2.1rem,4.2vw,3.3rem);
  line-height:.96;
  letter-spacing:-.075em;
}
.auth-heading p{margin:0;color:var(--muted);line-height:1.5}

.tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:22px;
  padding:6px;
  border:1px solid rgba(149,184,230,.13);
  border-radius:18px;
  background:rgba(1,8,18,.44);
}

.tabs button{
  min-height:48px;
  border:0;
  border-radius:14px;
  background:transparent;
  color:var(--muted);
  font-weight:950;
  cursor:pointer;
  transition:background .2s var(--ease),color .2s var(--ease),box-shadow .2s var(--ease);
}

.tabs button.active{
  color:#fff;
  background:linear-gradient(135deg,rgba(85,214,255,.12),rgba(65,240,189,.07));
  box-shadow:inset 0 0 0 1px rgba(120,210,255,.22);
}

.status{
  margin-bottom:16px;
  padding:13px 14px;
  border-radius:15px;
  border:1px solid rgba(255,173,106,.28);
  background:rgba(255,173,106,.09);
  color:#ffd3aa;
  line-height:1.45;
}

label{
  display:block;
  margin:14px 0 8px;
  color:#dbe9ff;
  font-size:.92rem;
  font-weight:850;
}

input{
  width:100%;
  min-height:54px;
  border:1px solid rgba(149,184,230,.18);
  border-radius:16px;
  background:rgba(1,8,18,.64);
  color:#fff;
  padding:0 15px;
  outline:none;
  transition:border-color .2s var(--ease),box-shadow .2s var(--ease),background .2s var(--ease);
}

input:focus{
  border-color:rgba(85,214,255,.56);
  box-shadow:0 0 0 4px rgba(85,214,255,.10);
  background:rgba(3,13,28,.78);
}

.submit-btn{
  width:100%;
  min-height:58px;
  margin-top:22px;
  border:0;
  border-radius:17px;
  background:linear-gradient(135deg,#55d6ff,#2f6dff);
  color:#fff;
  font-weight:950;
  box-shadow:0 18px 46px rgba(48,118,255,.27),inset 0 1px 0 rgba(255,255,255,.25);
  cursor:pointer;
  transition:transform .18s var(--ease),filter .18s var(--ease),box-shadow .18s var(--ease);
}

.submit-btn:hover{transform:translateY(-1px);filter:brightness(1.06);box-shadow:0 24px 56px rgba(48,118,255,.32),inset 0 1px 0 rgba(255,255,255,.32)}
.submit-btn:disabled{opacity:.62;cursor:wait;transform:none}

.auth-links{
  display:flex;
  justify-content:center;
  margin-top:18px;
  color:#9fdfff;
  font-weight:850;
}

.register-only{display:none}
body.is-register .register-only{display:block}

.session-check{
  position:fixed;
  left:50%;
  top:50%;
  z-index:20;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:46px;
  padding:0 16px;
  border:1px solid rgba(149,184,230,.14);
  border-radius:999px;
  background:rgba(3,10,22,.72);
  color:#b9c8da;
  transform:translate(-50%,-50%);
  backdrop-filter:blur(18px);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s var(--ease);
}
body.checking-session .session-check{opacity:1}
.loader-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:var(--cyan);
  box-shadow:0 0 18px rgba(85,214,255,.7);
  animation:pulse 1s ease-in-out infinite;
}
@keyframes pulse{50%{transform:scale(.72);opacity:.55}}

@media(max-width:980px){
  .portal-shell{grid-template-columns:1fr;align-items:start;padding:28px 0;width:min(760px,calc(100vw - 28px))}
  .brand-panel{min-height:auto;gap:42px}
  .portal-benefits{grid-template-columns:1fr}
}

@media(max-width:560px){
  .brand-panel,.auth-card{border-radius:24px;padding:22px}
  .brand-copy h1{font-size:3.2rem}
  .tabs{grid-template-columns:1fr}
}

.portal-shell--single{width:min(1040px,calc(100vw - 36px));}
.auth-links{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;}
.status.is-error{border-color:rgba(248,113,113,.35);color:#fecaca;background:rgba(127,29,29,.22);}
button:disabled{opacity:.62;cursor:not-allowed;}


/* AutoByte 1.3.43 typography density pass
   Purpose: keep all titles in the same zero-letter-spacing system as the index hero,
   reduce oversized workspace headings, and keep cards compact/premium. */
:where(h1,h2,h3,h4,h5,h6,
  .hero-title,.section-title,.card-title,.tool-title,.tool-heading,
  .admin-hero-copy h1,.template-editor-title-block h1,
  .topbar h1,.tool-hero h2,.reader-identity-copy h2,
  .continue-card h2,.overview-intelligence-card h2,
  .mail-system-panel h2,.template-studio-hero h1,
  .template-browser-head h2,.email-preview-card h2){
  letter-spacing:0 !important;
}

/* Portal/login/reset title normalization. */
.portal-card h1,.portal-hero h1,.reset-card h1,.auth-card h1{font-size:clamp(34px,4vw,54px) !important;line-height:1 !important;letter-spacing:0 !important;}
.portal-card h2,.auth-card h2,.reset-card h2{font-size:28px !important;line-height:1.08 !important;letter-spacing:0 !important;}
