/* GetSocials auth pages. Tokens match the dashboard design. */
:root{
  --bg:#f5f6f8; --panel:#ffffff; --sidebar:#14161b; --ink:#14161b;
  --ink-soft:#6b7280; --ink-faint:#9aa1ac; --line:#eceef1;
  --brand:#ff5a1f; --brand-dark:#d6420f; --brand-tint:#fff1ea;
  --success:#16a34a; --danger:#dc2626;
  --radius-lg:18px; --radius-md:14px; --radius-sm:10px;
  --shadow:0 1px 2px rgba(20,22,27,.04), 0 8px 24px rgba(20,22,27,.05);
}
*{box-sizing:border-box; margin:0; padding:0;}
body{font-family:'Inter',-apple-system,BlinkMacSystemFont,sans-serif; background:var(--bg); color:var(--ink); -webkit-font-smoothing:antialiased;}
a{color:inherit; text-decoration:none;}
button{font-family:inherit; cursor:pointer; border:none; background:none;}
svg{display:block;}

.auth-shell{display:grid; grid-template-columns:minmax(360px,44%) 1fr; min-height:100vh;}

/* ---------- Brand (same as dashboard) ---------- */
.brand{display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.15rem; letter-spacing:-.01em;}
.brand-mark{
  width:32px; height:32px; border-radius:9px;
  background:linear-gradient(135deg,var(--brand),var(--brand-dark));
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:800; color:#fff; flex-shrink:0;
}
.brand-text > span{color:var(--brand);}

/* ---------- Brand panel: ember gradient with soft circles (same family as the wallet card) ---------- */
.auth-side{position:sticky; top:0; height:100vh; overflow:hidden; color:#fff; padding:36px 44px;
  display:flex; flex-direction:column; justify-content:center; gap:30px;}
.auth-side > .brand{position:absolute; top:36px; left:44px; z-index:1;}
.auth-side-bg{position:absolute; inset:0; background:radial-gradient(120% 80% at 90% 0%, #ff7a3d 0%, transparent 55%), linear-gradient(140deg,#2b1109 0%,#6b1e08 48%,#d6420f 100%);}
.auth-side-bg i{position:absolute; border-radius:50%;}
.auth-side-bg i:nth-child(1){width:360px; height:360px; right:-120px; top:-120px; background:rgba(255,180,130,.16);}
.auth-side-bg i:nth-child(2){width:240px; height:240px; left:-90px; bottom:-80px; background:rgba(255,120,60,.18);}
.auth-side-bg i:nth-child(3){width:110px; height:110px; right:16%; bottom:14%; background:rgba(255,220,190,.10);}
.auth-side-copy, .auth-demo, .auth-feats{position:relative; z-index:1;}
.auth-side-copy h1{font-size:2.05rem; line-height:1.08; letter-spacing:-.035em; font-weight:800; max-width:15ch;}
.auth-side-copy p{font-size:.98rem; color:rgba(255,255,255,.8); margin-top:14px; max-width:38ch; line-height:1.55;}
.auth-demo{width:min(100%, 360px); background:#fff; color:var(--ink); border-radius:18px; padding:14px; box-shadow:0 26px 50px -20px rgba(0,0,0,.6);}
.auth-demo-head{display:flex; align-items:center; gap:10px; padding-bottom:10px; margin-bottom:8px; border-bottom:1px solid #eceef1;}
.auth-demo-head div{flex:1; min-width:0;}
.auth-demo-head strong{display:block; font-size:.88rem;}
.auth-demo-head span{display:block; font-size:.72rem; color:#9aa1ac;}
.auth-demo-head em{font-style:normal; font-size:.7rem; font-weight:800; color:#16a34a; background:#ecfdf3; padding:4px 9px; border-radius:999px;}
.auth-demo-row{display:grid; grid-template-columns:70px 1fr; align-items:center; background:#f5f6f8; border-radius:10px; padding:8px 10px; margin-top:6px;}
.auth-demo-row span{font-size:.7rem; color:#9aa1ac; font-weight:600;}
.auth-demo-row code{font:600 .82rem ui-monospace,SFMono-Regular,Menlo,monospace;}
.auth-feats{list-style:none; display:flex; flex-direction:column; gap:12px;}
.auth-feats li{display:flex; align-items:center; gap:10px; font-size:.9rem; font-weight:600; color:rgba(255,255,255,.92);}
.auth-feats svg{width:18px; height:18px; color:#ffc29e;}
svg.hi, svg.lu{display:block; flex-shrink:0;}
.auth-mobile-head{display:none;}

/* ---------- Form side ---------- */
.auth-main{display:flex; align-items:center; justify-content:center; padding:40px 24px;}
.auth-card{width:100%; max-width:420px; background:var(--panel); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:36px 32px;}
.brand-mobile{display:none; margin-bottom:26px;}

.auth-title{font-size:1.45rem; font-weight:700; letter-spacing:-.01em; margin-bottom:6px;}
.auth-sub{font-size:.9rem; color:var(--ink-soft); margin-bottom:24px; line-height:1.5;}

.auth-form{display:flex; flex-direction:column;}
.auth-form label:not(.check){font-size:.82rem; font-weight:600; margin:0 0 7px; color:var(--ink);}
.auth-form input[type=email], .auth-form input[type=text], .auth-form input[type=password]{
  width:100%; font:inherit; font-size:.92rem; color:var(--ink);
  background:var(--bg); border:1px solid var(--line); border-radius:11px;
  padding:12px 14px; margin-bottom:16px; outline:none; transition:.15s;
}
.auth-form input:focus{border-color:var(--brand); background:var(--panel); box-shadow:0 0 0 3px var(--brand-tint);}
.auth-form input.is-invalid, .input-wrap.is-invalid input{border-color:var(--danger);}

.input-wrap{position:relative;}
.input-wrap input{padding-right:46px !important;}
.pw-toggle{position:absolute; right:6px; top:6px; width:34px; height:34px; border-radius:8px; color:var(--ink-faint); display:flex; align-items:center; justify-content:center;}
.pw-toggle:hover{color:var(--ink); background:var(--line);}
.pw-toggle svg{width:17px; height:17px;}
.pw-toggle.on{color:var(--brand);}

.field-error{font-size:.78rem; color:var(--danger); margin:-10px 0 14px;}
.field-hint{font-size:.76rem; color:var(--ink-faint); margin:-10px 0 14px;}

.form-row{display:flex; align-items:center; justify-content:space-between; gap:12px; margin:2px 0 22px; flex-wrap:wrap;}
.check{display:flex; align-items:flex-start; gap:9px; font-size:.83rem; color:var(--ink-soft); cursor:pointer; line-height:1.4;}
.check input{width:16px; height:16px; margin-top:1px; accent-color:var(--brand); flex-shrink:0;}
.check-terms{margin:4px 0 20px;}
.check-terms.is-invalid{color:var(--danger);}
.check-terms + .field-error{margin-top:-14px;}

.link{color:var(--brand); font-weight:600; font-size:.85rem;}
.link:hover{color:var(--brand-dark); text-decoration:underline;}

.btn-primary, .btn-outline{
  display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
  font-size:.93rem; font-weight:600; padding:13px 18px; border-radius:12px; transition:.15s;
}
.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand-dark)); color:#fff;}
.btn-primary:hover{filter:brightness(1.05); box-shadow:0 8px 20px rgba(255,90,31,.28);}
.btn-primary[disabled]{opacity:.7; cursor:wait;}
.btn-outline{border:1px solid var(--line); color:var(--ink); background:var(--panel);}
.btn-outline:hover{border-color:var(--danger); color:var(--danger);}

.auth-switch{text-align:center; font-size:.86rem; color:var(--ink-soft); margin-top:22px;}

.alert{font-size:.85rem; line-height:1.5; border-radius:11px; padding:12px 14px; margin-bottom:18px;}
.alert-error{background:#fef2f2; color:#b91c1c; border:1px solid #fecaca;}
.alert-success{background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0;}
.alert-info{background:var(--brand-tint); color:var(--brand-dark); border:1px solid #ffd9c7;}

/* ---------- Profile stub ---------- */
.profile-head{display:flex; align-items:center; gap:14px; margin-bottom:18px;}
.profile-head img{border-radius:50%;}
.profile-head .auth-sub{margin-bottom:0;}
.profile-meta{display:flex; flex-direction:column; gap:10px; margin-bottom:22px;}
.profile-meta div{display:flex; justify-content:space-between; font-size:.87rem; padding-bottom:10px; border-bottom:1px solid var(--line);}
.profile-meta dt{color:var(--ink-soft);}
.profile-meta dd{font-weight:600;}

/* ---------- Mobile ---------- */
@media (max-width:900px){
  .auth-shell{grid-template-columns:minmax(0,1fr);}
  .auth-side{display:none;}
  .auth-mobile-head{display:block; position:relative; overflow:hidden; color:#fff; padding:26px 20px 64px;}
  .auth-mobile-head .brand{position:relative; z-index:1;}
  .auth-mobile-head p{position:relative; z-index:1; margin-top:10px; font-size:.92rem; color:rgba(255,255,255,.82);}
  .auth-main{align-items:flex-start; padding:0 16px 32px; margin-top:-44px; position:relative; z-index:2;}
  .auth-card{padding:28px 22px;}
}

/* ---------- Dark theme (follows the choice made in the app) ---------- */
html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0e1014; --panel:#161920; --ink:#eceef2; --ink-soft:#a3a9b5; --ink-faint:#6f7684;
  --line:#252a33; --brand-tint:#2b1a12; --success:#22c55e;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}
html[data-theme="dark"] .alert-error{background:rgba(220,38,38,.12); color:#fca5a5; border-color:rgba(220,38,38,.35);}
html[data-theme="dark"] .alert-success{background:rgba(34,197,94,.12); color:#86efac; border-color:rgba(34,197,94,.3);}
html[data-theme="dark"] .alert-info{background:rgba(255,90,31,.1); color:#ffb08f; border-color:rgba(255,90,31,.3);}
html[data-theme="dark"] .auth-card{border:1px solid var(--line);}

/* brand name on the orange panel: keep "Socials" readable */
.auth-side .brand-text > span, .auth-mobile-head .brand-text > span{color:#ffc29e;}
.auth-side .brand-mark, .auth-mobile-head .brand-mark{background:#fff; color:var(--brand);}

/* ---------- Auth UX helpers ---------- */
.caps-note{display:flex; align-items:center; gap:6px; font-size:.76rem; font-weight:600; color:#b45309; margin:-10px 0 14px;}
.caps-note::before{content:"\21EA"; font-size:.9rem;}
html[data-theme="dark"] .caps-note{color:#fbbf24;}

.email-tip{font-size:.8rem; color:var(--ink-soft); margin:-10px 0 14px;}
.email-tip button{font:inherit; font-weight:700; color:var(--brand); text-decoration:underline; text-underline-offset:2px; padding:0;}

.pw-meter{margin:-8px 0 16px; display:none;}
.pw-meter.is-active{display:block;}
.pw-bars{display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin-bottom:9px;}
.pw-bars i{height:4px; border-radius:2px; background:var(--line); transition:background .2s;}
.pw-meter[data-score="0"] .pw-bars i.on, .pw-meter[data-score="1"] .pw-bars i.on{background:#ef4444;}
.pw-meter[data-score="2"] .pw-bars i.on{background:#f59e0b;}
.pw-meter[data-score="3"] .pw-bars i.on{background:#22c55e;}
.pw-meter[data-score="4"] .pw-bars i.on{background:#16a34a;}
.pw-rules{list-style:none; display:flex; flex-wrap:wrap; gap:4px 14px;}
.pw-rules li{display:flex; align-items:center; gap:6px; font-size:.76rem; color:var(--ink-faint); transition:color .2s;}
.pw-rules li::before{content:""; width:14px; height:14px; border-radius:50%; border:1.5px solid currentColor; box-sizing:border-box; flex-shrink:0;}
.pw-rules li.ok{color:var(--success);}
.pw-rules li.ok::before{border:none; background:currentColor url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/10px no-repeat;}

.pw-match{font-size:.78rem; font-weight:600; margin:-10px 0 14px; min-height:0;}
.pw-match:empty{display:none;}
.pw-match.ok{color:var(--success);}
.pw-match.no{color:var(--ink-soft);}

.btn-primary .spin{width:16px; height:16px; border-radius:50%; border:2px solid rgba(255,255,255,.35); border-top-color:#fff; animation:auth-spin .7s linear infinite;}
@keyframes auth-spin{to{transform:rotate(360deg);}}
.btn-primary[disabled]:not([aria-busy]){opacity:.55; cursor:not-allowed;}
@media (prefers-reduced-motion:reduce){ .btn-primary .spin{animation-duration:2s;} }
.auth-form input:focus-visible{outline:none;}
.check input:focus-visible{outline:2px solid var(--brand); outline-offset:2px;}
