/* ==========================================================================
   SANGKI · Auth screens — Minimal Dark Hi-Tech
   Shared by login / register / password reset / reset-confirm
   Brand: black (#0B0B0C) + yellow (#FFE500), Outfit display + Inter body
   ========================================================================== */

:root {
    --black:      #0B0B0C;
    --panel:      #121214;
    --panel-2:    #17171A;
    --line:       rgba(255, 255, 255, 0.08);
    --line-soft:  rgba(255, 255, 255, 0.05);
    --ink:        #F4F4F5;
    --ink-mute:   rgba(244, 244, 245, 0.58);
    --ink-faint:  rgba(244, 244, 245, 0.34);
    --yellow:     #FFE500;
    --yellow-dim: #E6CE00;
    --danger:     #FF6B6B;
    --success:    #86EFAC;
    --font-display: 'Outfit', sans-serif;
    --font-body:    'Inter', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Atmospheric background ---------- */
.bg-fx {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bg-fx::before {
    content: "";
    position: absolute;
    inset: -2px;
    background-image:
        linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
        linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 100%);
}
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
}
.glow.g1 {
    width: 460px; height: 460px;
    top: -140px; left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255,229,0,0.30), transparent 62%);
    animation: drift 14s ease-in-out infinite alternate;
}
.glow.g2 {
    width: 380px; height: 380px;
    bottom: -160px; right: -80px;
    background: radial-gradient(circle, rgba(255,229,0,0.12), transparent 60%);
    animation: drift2 16s ease-in-out infinite alternate;
    animation-delay: -6s;
}
@keyframes drift {
    from { transform: translate(-50%, 0) scale(1); }
    to   { transform: translate(-50%, 26px) scale(1.08); }
}
@keyframes drift2 {
    from { transform: translate(0, 0); }
    to   { transform: translate(-24px, -18px); }
}

/* ---------- Shell + card ---------- */
.auth {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 424px;
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card {
    position: relative;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 40px 34px 34px;
    box-shadow:
        0 40px 80px -30px rgba(0,0,0,0.9),
        0 0 0 1px rgba(255,255,255,0.02) inset,
        0 1px 0 rgba(255,255,255,0.06) inset;
}
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 22px; right: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,229,0,0.55), transparent);
}

/* ---------- Brand ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}
.brand .mark {
    display: inline-grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--yellow);
    color: #0B0B0C;
    font-size: 15px;
    box-shadow: 0 0 24px rgba(255,229,0,0.45);
}

.headline {
    margin: 26px 0 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.headline .dot { color: var(--yellow); }
.subhead {
    margin: 0 0 26px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-mute);
}
.subhead .em { color: var(--ink); font-weight: 600; }

/* ---------- Messages ---------- */
.msg {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.45;
    padding: 11px 13px;
    border-radius: 12px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}
.msg i { margin-top: 1px; }
.msg.success { color: var(--success); border-color: rgba(134,239,172,0.25); }
.msg.error, .msg.danger { color: var(--danger); border-color: rgba(255,107,107,0.28); }
.msg.warning { color: var(--yellow); border-color: rgba(255,229,0,0.28); }
.msg.info { color: var(--ink); }

/* ---------- Fields ---------- */
.field { margin-bottom: 16px; }
.field label.lbl {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--ink-mute);
    margin-bottom: 8px;
}
.control { position: relative; display: flex; align-items: center; }
.control i.lead {
    position: absolute;
    left: 15px;
    font-size: 16px;
    color: var(--ink-faint);
    transition: color 0.2s ease;
    pointer-events: none;
}
.control input {
    width: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    background: #0E0E10;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 14px 16px 14px 44px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
/* fields without a leading icon (e.g. name columns) */
.control.bare input { padding-left: 16px; }
.control input::placeholder { color: var(--ink-faint); }
.control input:hover { border-color: rgba(255,255,255,0.16); }
.control input:focus {
    background: #101012;
    border-color: rgba(255,229,0,0.7);
    box-shadow: 0 0 0 3px rgba(255,229,0,0.14);
}
.control:focus-within i.lead { color: var(--yellow); }

.btn-eye {
    position: absolute;
    right: 8px;
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border: 0;
    background: transparent;
    color: var(--ink-faint);
    cursor: pointer;
    border-radius: 9px;
    transition: color 0.15s ease, background 0.15s ease;
}
.btn-eye:hover { color: var(--ink); background: rgba(255,255,255,0.05); }

.control input.invalid { border-color: rgba(255,107,107,0.7); }
.err {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    font-size: 12.5px;
    color: var(--danger);
}

/* two-column row (e.g. last name / first name) */
.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ---------- Options / checks ---------- */
.options {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin: 6px 0 22px;
}
.checks { display: grid; gap: 10px; }
.check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--ink-mute);
    cursor: pointer;
    user-select: none;
}
.check.top { align-items: flex-start; }
.check input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 18px; height: 18px;
    margin-top: 1px;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 6px;
    background: #0E0E10;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.check input:checked { background: var(--yellow); border-color: var(--yellow); }
.check input:checked::after {
    content: "";
    position: absolute;
    left: 5px; top: 1.5px;
    width: 5px; height: 9px;
    border: solid #0B0B0C;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.check input:focus-visible { box-shadow: 0 0 0 3px rgba(255,229,0,0.2); }
.check a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--yellow); }
.check a:hover { color: var(--yellow); }

.forgot {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-mute);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.forgot:hover { color: var(--yellow); }

/* ---------- Buttons ---------- */
.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15.5px;
    letter-spacing: 0.01em;
    color: #0B0B0C;
    background: var(--yellow);
    border: 0;
    border-radius: 13px;
    padding: 15px 20px;
    cursor: pointer;
    box-shadow: 0 10px 30px -8px rgba(255,229,0,0.5);
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.15s ease;
}
.btn-submit:hover {
    background: #FFEC33;
    box-shadow: 0 14px 38px -8px rgba(255,229,0,0.62);
}
.btn-submit:active { transform: translateY(1px) scale(0.995); }

.btn-outline {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--ink-mute);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 13px 20px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn-outline:hover { color: var(--ink); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.03); }

/* ---------- Resend (verification) ---------- */
.resend {
    margin-top: 18px;
    padding: 15px;
    border-radius: 14px;
    border: 1px solid rgba(255,229,0,0.24);
    background: rgba(255,229,0,0.05);
}
.resend h6 {
    margin: 0 0 3px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--yellow);
    display: flex; align-items: center; gap: 7px;
}
.resend p { margin: 0 0 11px; font-size: 12.5px; color: var(--ink-mute); line-height: 1.5; }
.btn-resend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--yellow);
    background: transparent;
    border: 1px solid rgba(255,229,0,0.4);
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-resend:hover { background: rgba(255,229,0,0.12); }

/* ---------- State (invalid link, etc.) ---------- */
.state { text-align: center; }
.state .state-icon {
    display: inline-grid;
    place-items: center;
    width: 66px; height: 66px;
    margin: 6px auto 20px;
    border-radius: 18px;
    font-size: 30px;
    background: rgba(255,107,107,0.1);
    color: var(--danger);
    border: 1px solid rgba(255,107,107,0.25);
}
.state h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    margin: 0 0 10px;
}
.state p { font-size: 14px; color: var(--ink-mute); line-height: 1.6; margin: 0 0 24px; }
.state .actions { display: grid; gap: 10px; }

/* ---------- Footer ---------- */
.foot {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
    text-align: center;
    font-size: 14px;
    color: var(--ink-mute);
}
.foot a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    margin-left: 5px;
    border-bottom: 2px solid var(--yellow);
    padding-bottom: 1px;
    transition: color 0.15s ease;
}
.foot a:hover { color: var(--yellow); }

.home-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 12.5px;
    color: var(--ink-faint);
    text-decoration: none;
    transition: color 0.15s ease;
}
.home-link:hover { color: var(--ink-mute); }

/* ---------- Submit spacing helper ---------- */
.mt-form { margin-top: 6px; }

@media (max-width: 480px) {
    .card { padding: 32px 22px 26px; border-radius: 18px; }
    .headline { font-size: 26px; }
    .grid2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .auth, .glow { animation: none; }
}
