/* =========================================================
   SMC auth pages — login, register, forgot, reset
   Same palette and form controls as the landing page
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Sora:wght@500;600;700;800&display=swap');

:root {
    --ink: #070b18;
    --ink-2: #0e1428;
    --ink-3: #182040;
    --red: #e3263b;
    --red-2: #ff6a3d;
    --blue: #3f7cf4;
    --blue-2: #6aa6ff;
    --green: #2ee59d;
    --text: #eef1ff;
    --muted: #9aa3c7;
    --line: rgba(255, 255, 255, .09);
    --glass: rgba(255, 255, 255, .04);
    --grad: linear-gradient(135deg, var(--red) 0%, var(--red-2) 100%);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --display: 'Sora', 'Inter', system-ui, sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.auth {
    font-family: var(--font);
    color: var(--text);
    background: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow-x: hidden;
}
a { color: var(--blue-2); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; line-height: 1.15; }

/* ---------- Brand panel ---------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    background:
        radial-gradient(60% 50% at 10% 10%, rgba(63, 124, 244, .28), transparent 70%),
        radial-gradient(55% 45% at 90% 95%, rgba(227, 38, 59, .26), transparent 70%),
        linear-gradient(160deg, #0b1124 0%, #070b18 100%);
    border-right: 1px solid var(--line);
}
.auth-brand::after {
    /* faint grid */
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent);
    mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent);
    pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo img { height: 76px; width: auto; max-width: 100%; display: block; }
.auth-pitch h1 { font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 800; margin-bottom: 16px; }
.auth-pitch h1 span {
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-pitch p { color: var(--muted); max-width: 440px; margin: 0; font-size: 1.02rem; }
.auth-steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; max-width: 440px; }
.auth-steps li {
    display: flex; gap: 14px; align-items: center;
    padding: 14px 16px; border-radius: 16px;
    background: var(--glass); border: 1px solid var(--line);
    color: #cfd5ef; font-size: 14.5px;
    animation: up .7s var(--ease) both;
}
.auth-steps li:nth-child(2) { animation-delay: .08s; }
.auth-steps li:nth-child(3) { animation-delay: .16s; }
.auth-steps b {
    flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
    font: 700 14px var(--display); color: #fff; background: var(--grad);
}
.auth-copy { color: rgba(154, 163, 199, .7); font-size: 12.5px; }
.auth-copy b { color: #cfd5ef; font-weight: 600; }
.auth-copy-m { display: none; }

/* ---------- Form side ---------- */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 48px);
    position: relative;
}
.auth-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    border-radius: 26px;
    padding: clamp(26px, 4vw, 40px);
    background: linear-gradient(180deg, rgba(20, 27, 52, .85), rgba(14, 20, 40, .85));
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
    animation: up .7s var(--ease) both;
}
.auth-card.wide { max-width: 560px; }
.auth-card::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: conic-gradient(from var(--angle, 0deg), transparent 0 60%, var(--red-2), var(--blue-2), transparent 90%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: rotate-border 6s linear infinite;
}
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.auth-card h2 { font-size: 1.7rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 26px; font-size: .95rem; }
.auth-back {
    position: absolute; top: clamp(16px, 3vw, 28px); right: clamp(16px, 4vw, 48px);
    font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
}
.auth-back:hover { color: #fff; }

/* floating-label fields */
.field { position: relative; margin-bottom: 16px; }
.field input {
    width: 100%; height: 56px; padding: 22px 48px 8px 16px;
    border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04); color: #fff;
    font: 500 15px var(--font); outline: none;
    transition: border-color .25s, background .25s, box-shadow .25s;
}
.field label {
    position: absolute; left: 16px; top: 18px; font-size: 15px; color: var(--muted);
    pointer-events: none; transition: all .2s var(--ease);
}
.field input:focus, .field input:not(:placeholder-shown) { border-color: rgba(106, 166, 255, .6); background: rgba(255, 255, 255, .06); }
.field input:focus { box-shadow: 0 0 0 4px rgba(63, 124, 244, .18); }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: 9px; font-size: 11.5px; color: var(--blue-2); font-weight: 600; letter-spacing: .02em; }
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #141b34 inset; caret-color: #fff; }
.field .eye {
    position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 10px;
    border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.field .eye:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.field .eye svg { width: 20px; height: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.hint { color: var(--muted); font-size: 13px; margin: -4px 0 18px; display: flex; gap: 8px; align-items: flex-start; }
.hint svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--blue-2); }

.row-between { display: flex; justify-content: flex-end; align-items: center; margin: 4px 0 22px; font-size: 14px; }
.row-between a { font-weight: 500; }

/* buttons */
.btn {
    position: relative; overflow: hidden; width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font: 600 16px/1 var(--font);
    padding: 17px 24px; border-radius: 14px; border: 0; cursor: pointer;
    background: var(--grad); color: #fff;
    box-shadow: 0 10px 30px -10px rgba(227, 38, 59, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .3s var(--ease), box-shadow .3s;
}
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(227, 38, 59, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .shine {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn:hover .shine { transform: translateX(120%); }
.btn[disabled] { opacity: .7; cursor: progress; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 15px; border-radius: 14px; background: #fff; color: #1f2333; font-weight: 600; font-size: 15px;
    transition: transform .3s var(--ease), box-shadow .3s;
}
.google:hover { color: #1f2333; transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(255, 255, 255, .35); }
.google img { width: 20px; height: 20px; }
.note { text-align: center; margin: 22px 0 0; color: var(--muted); font-size: 14.5px; }
.note a { color: #fff; font-weight: 600; background: linear-gradient(var(--red-2), var(--red-2)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.note a:hover { background-size: 100% 2px; }

/* messages */
.msg {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: 14px; margin: 0 0 20px; font-size: 14.5px;
    animation: pop .45s var(--ease) both;
}
.msg svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }
.msg.error { background: rgba(227, 38, 59, .12); border: 1px solid rgba(227, 38, 59, .35); color: #ffb3bc; }
.msg.info { background: rgba(63, 124, 244, .12); border: 1px solid rgba(63, 124, 244, .35); color: #c4d8ff; }
.msg.ok { background: rgba(46, 229, 157, .1); border: 1px solid rgba(46, 229, 157, .35); color: #a8f5d4; }
.msg a { color: #fff; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    body.auth { grid-template-columns: 1fr; }
    .auth-brand { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; gap: 0; }
    .auth-brand .auth-pitch, .auth-brand .auth-copy { display: none; }
    body.auth { grid-template-rows: auto 1fr; }
    .auth-main { flex-direction: column; justify-content: flex-start; align-items: center; }
    .auth-copy-m { display: block; text-align: center; margin-top: 28px; }
    .auth-logo img { height: 48px; }
    .auth-main { align-items: flex-start; padding-top: 60px; }
    .auth-back { top: 18px; }
}
@media (max-width: 520px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .auth-card { padding: 24px 18px; border-radius: 22px; }
}

@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rotate-border { to { --angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

/* creator credit */
.auth-copy a.credit b { color: #cfd5ef; background: linear-gradient(var(--red-2), var(--red-2)) 0 100% / 0 1px no-repeat; transition: color .2s, background-size .35s var(--ease); }
.auth-copy a.credit:hover b { color: #fff; background-size: 100% 1px; }
