:root{
  --bg:#0b1220;
  --surface:#0f1a2e;
  --card:#0f1a2e;
  --text:#eaf0ff;
  --muted:#a9b4d0;
  --line: rgba(255,255,255,.10);
  --brand:#4f8cff;
  --brand2:#34d399;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --radius: 18px;
  --container: 1120px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(79,140,255,.20), transparent 60%),
              radial-gradient(900px 500px at 90% 0%, rgba(52,211,153,.15), transparent 55%),
              var(--bg);
  color:var(--text);
}

a{color:inherit; text-decoration:none}
img{max-width:100%; display:block}

.container{
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.muted{color:var(--muted)}
.link{color:var(--text); opacity:.9}
.link:hover{opacity:1; text-decoration:underline}

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background: rgba(255,255,255,.03);
  font-size:12px;
  font-weight:600;
}

.skip-link{
  position:absolute; left:-999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto;
  padding:10px 12px; background:#111; border-radius:10px; z-index:9999;
}

.site-header{position:sticky; top:0; z-index:50; backdrop-filter: blur(10px)}
.topbar{
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.18);
}
.topbar__inner{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 0;
}
.topbar__left{display:flex; gap:10px; align-items:center}
.topbar__right{display:flex; gap:14px; align-items:center}
.topbar .muted{font-size:13px}

.navwrap{
  border-bottom:1px solid var(--line);
  background: rgba(15,26,46,.45);
}
.navwrap__inner{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 0;
}

.brand{display:flex; gap:12px; align-items:center}
.brand__logo{width:42px; height:42px; border-radius:12px; background: rgba(255,255,255,.05)}
.brand__title{font-weight:800; letter-spacing:.2px}
.brand__subtitle{font-size:12px; color:var(--muted)}

.nav{
  display:flex; align-items:center; gap:14px;
}
.nav__link{
  padding:10px 12px;
  border-radius:12px;
  color: rgba(234,240,255,.92);
}
.nav__link:hover{background: rgba(255,255,255,.05)}
.nav__cta{
  padding:10px 14px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(79,140,255,.95), rgba(52,211,153,.85));
  color:#07101f;
  font-weight:800;
}

.nav-toggle{
  display:none;
  width:44px; height:44px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius:14px;
  cursor:pointer;
}
.nav-toggle__bar{
  display:block; width:18px; height:2px;
  background: rgba(234,240,255,.9);
  margin:4px auto;
}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0}

/* Hero */
.hero{padding:34px 0 18px}
.hero__grid{display:grid; gap:18px}
.hero__copy{
  border:1px solid var(--line);
  background: rgba(15,26,46,.55);
  border-radius: var(--radius);
  padding:22px;
  box-shadow: var(--shadow);
}
.kicker{color:var(--muted); font-weight:600; font-size:13px}
.hero h1{margin:10px 0 8px; font-size:30px; line-height:1.15}
.lead{margin:0; color:rgba(234,240,255,.86); line-height:1.65}

.hero__actions{display:flex; gap:12px; margin-top:16px; flex-wrap:wrap}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  font-weight:700;
}
.btn--primary{
  background: rgba(79,140,255,.95);
  color:#081225;
  border-color: rgba(79,140,255,.25);
}
.btn--ghost{
  background: rgba(255,255,255,.03);
}

.hero__stats{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}
.stat{
  border:1px solid var(--line);
  border-radius: 16px;
  padding:12px;
  background: rgba(255,255,255,.03);
}
.stat__num{font-size:20px; font-weight:800}
.stat__label{font-size:12px; color:var(--muted); margin-top:4px}

.hero__media{
  position:relative;
  border-radius: var(--radius);
  overflow:hidden;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow);
}
.hero__img{width:100%; height:360px; object-fit:cover; opacity:.92}
.hero__card{
  position:absolute;
  left:14px; right:14px; bottom:14px;
}

/* Sections */
.section{padding:26px 0}
.section--alt{
  background: rgba(255,255,255,.03);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.section__head{
  display:flex; justify-content:space-between; align-items:flex-end;
  margin-bottom:14px; gap:12px;
}
.section h2{margin:0; font-size:20px}

.grid{display:grid; gap:14px}
.grid--3{grid-template-columns: 1fr}
.grid--4{grid-template-columns: 1fr 1fr;}

/* Cards */
.card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15,26,46,.55);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card__media{
  height:150px;
  background: linear-gradient(135deg, rgba(79,140,255,.25), rgba(52,211,153,.18));
}
.card__body{padding:14px}
.meta{font-size:12px; color:var(--muted); margin-bottom:8px}
.card__h3{margin:0 0 6px; font-size:16px; line-height:1.35}
.card__h3 a:hover{text-decoration:underline}

.card__title{font-weight:800; margin-bottom:8px}
.list{margin:0; padding-left:18px; color:rgba(234,240,255,.92)}
.list a{opacity:.95}
.list a:hover{opacity:1; text-decoration:underline}

/* Tiles */
.tile{
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:14px;
  background: rgba(15,26,46,.55);
  box-shadow: var(--shadow);
}
.tile__icon{font-size:22px}
.tile__title{margin-top:8px; font-weight:800}
.tile__desc{margin-top:4px; font-size:13px}

/* Footer */
.site-footer{
  margin-top:24px;
  border-top:1px solid var(--line);
  background: rgba(0,0,0,.20);
}
.footer__grid{
  display:grid; gap:16px;
  padding:22px 0;
}
.footer__title{font-weight:900; margin-bottom:10px}
.footer__list{margin:0; padding:0; list-style:none; display:grid; gap:8px}
.footer__list a{opacity:.9}
.footer__list a:hover{opacity:1; text-decoration:underline}
.footer__bottom{
  border-top:1px solid var(--line);
  padding:14px 0;
}

/* Responsive */
@media (min-width: 920px){
  .hero__grid{grid-template-columns: 1.2fr .8fr; align-items:stretch}
  .hero h1{font-size:40px}
  .grid--3{grid-template-columns: repeat(3, minmax(0,1fr))}
  .grid--4{grid-template-columns: repeat(4, minmax(0,1fr))}
  .footer__grid{grid-template-columns: 1.3fr .7fr .7fr}
}

/* Mobile nav */
@media (max-width: 920px){
  .nav-toggle{display:inline-block}
  .nav{
    position:absolute;
    left:0; right:0;
    top:100%;
    display:none;
    flex-direction:column;
    gap:6px;
    padding:12px;
    border-bottom:1px solid var(--line);
    background: rgba(15,26,46,.92);
  }
  .nav.is-open{display:flex}
  .nav__link, .nav__cta{width:100%; text-align:left}
}

/* =========================
   Auth / Login (REVISED)
   ========================= */
.auth{padding:28px 0}
.auth__grid{
  display:grid;
  gap:16px;
  align-items:start;
}

/* Brand box */
.auth__brand{
  display:flex;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15,26,46,.55);
  box-shadow: var(--shadow);
  padding:16px;
}
.auth__logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background: rgba(255,255,255,.05);
  object-fit: cover;
}
.auth__title{font-weight:900; font-size:16px}

/* Info card */
.auth__info{display:none}
.auth__info .card__body{padding:14px}

/* Form card */
.auth__card{overflow:visible}
.auth__card .card__body{padding:16px}
.auth__head{margin-bottom:12px}
.auth__h1{margin:0 0 4px; font-size:26px}

/* Form */
.form{display:grid; gap:12px}
.form__grid{display:grid; gap:12px}

.field{display:grid; gap:6px}
.field__label{font-size:13px; color:var(--muted); font-weight:600}
.field__input{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline: none;
}
.field__input:focus{border-color: rgba(79,140,255,.55)}

/* Password row: prevent squishing */
.field__row{
  display:flex;
  gap:10px;
  align-items:stretch;
}
.field__row .field__input{
  flex:1 1 auto;
  min-width:0;
}
.field__toggle{
  flex:0 0 auto;
  padding:0 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: rgba(234,240,255,.9);
  cursor:pointer;
  white-space:nowrap;
}

/* Meta */
.form__meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.check{
  display:inline-flex;
  gap:8px;
  align-items:center;
  color: rgba(234,240,255,.92);
}
.check input{width:16px; height:16px}

.btn--block{width:100%}

/* Alerts */
.alert{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px 12px;
  margin: 10px 0;
}
.alert--error{
  border-color: rgba(255,255,255,.10);
  background: rgba(255,75,75,.12);
}

.auth__foot{margin:6px 0 0; font-size:12px}

/* Desktop */
@media (min-width: 920px){
  .auth__grid{grid-template-columns: 1fr 1fr}
  .auth__info{display:block}
}

/* Nav logout button (keep) */
.nav__form{margin:0; padding:0}
.nav__cta--ghost{
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  color: rgba(234,240,255,.92);
}
.nav__cta--ghost:hover{
  background: rgba(255,255,255,.06);
}
