/* ================================================================
   MulikaScans — Auth Pages (Login, Register, Forgot Password)
   Clean split-panel layout, no cards
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #060e1e;
    --panel:    #080f20;
    --border:   #162035;
    --border-2: #1e2d45;
    --text:     #e2e8f0;
    --muted:    #64748b;
    --muted-2:  #3d5470;
    --cyan:     #22d3ee;
    --cyan-dim: rgba(34,211,238,.08);
    --red:      #ef4444;
    --green:    #22c55e;
    --font: "Inter", "Segoe UI", system-ui, sans-serif;
}

html { font-size: 15px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    display: flex;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ================================================================
   SPLIT LAYOUT
   ================================================================ */

.auth-split {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── Left brand panel ────────────────────────────────────────── */
.auth-brand-panel {
    width: 420px;
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 36px;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: .35;
    pointer-events: none;
}

.auth-brand-top { position: relative; z-index: 1; }

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--cyan-dim);
    border: 1px solid rgba(34,211,238,.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 18px;
}

.auth-logo-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    color: var(--text);
}

.auth-logo-name span { color: var(--cyan); }

.auth-brand-heading {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 10px;
}

.auth-brand-sub {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 22px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--cyan-dim);
    border: 1px solid rgba(34,211,238,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

.auth-feature-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.auth-feature-text span {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: var(--muted-2);
}

.auth-brand-footer a { color: var(--muted); }
.auth-brand-footer a:hover { color: var(--cyan); }

/* ── Right form area ─────────────────────────────────────────── */
.auth-form-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 40px;
    overflow-y: auto;
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
}

/* ── Back link ───────────────────────────────────────────────── */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 28px;
    text-decoration: none;
    transition: color .15s;
}

.auth-back:hover { color: var(--cyan); text-decoration: none; }

/* ── Page heading ────────────────────────────────────────────── */
.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ── Center icon (forgot password) ──────────────────────────── */
.auth-center-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 28px;
}

.auth-icon-circle {
    width: 64px;
    height: 64px;
    background: var(--cyan-dim);
    border: 1px solid rgba(34,211,238,.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    font-size: 26px;
    margin-bottom: 16px;
}

/* ── Error block ─────────────────────────────────────────────── */
.auth-err {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.2);
    color: #fca5a5;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-err i { margin-top: 1px; flex-shrink: 0; }

/* ── Field groups ────────────────────────────────────────────── */
.auth-field-group { margin-bottom: 18px; }

.auth-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}

.auth-field-group label,
.auth-field-header label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 7px;
}

.auth-field-header label { margin-bottom: 0; }

.auth-forgot {
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}

.auth-forgot:hover { color: var(--cyan); }

/* ── Input with icon ─────────────────────────────────────────── */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    color: var(--muted-2);
    font-size: 13px;
    transition: color .15s;
    pointer-events: none;
    z-index: 1;
}

.auth-input-wrap:focus-within .auth-input-icon { color: var(--cyan); }

.auth-input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 44px;
    background: var(--panel);
    border: 1.5px solid var(--border-2);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.auth-input-wrap input::placeholder { color: var(--muted-2); }

.auth-input-wrap input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34,211,238,.1);
}

.pw-toggle {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--muted-2);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color .15s;
    line-height: 1;
}

.pw-toggle:hover { color: var(--text); }

/* password strength */
.pw-strength-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.pw-strength {
    flex: 1;
    height: 3px;
    background: var(--border-2);
    border-radius: 2px;
    overflow: hidden;
}

.pw-strength-bar {
    height: 100%;
    width: 0;
    transition: width .3s, background .3s;
    border-radius: 2px;
}

.pw-strength-label {
    font-size: 11px;
    font-weight: 600;
    min-width: 64px;
    text-align: right;
}

.auth-hint {
    font-size: 12px;
    color: var(--muted-2);
    margin-top: 5px;
}

/* ── Remember me ─────────────────────────────────────────────── */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    margin-bottom: 20px;
    -webkit-user-select: none;
    user-select: none;
}

.auth-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--cyan);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Submit button ───────────────────────────────────────────── */
.auth-btn {
    width: 100%;
    height: 48px;
    background: var(--cyan);
    color: #03091a;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s;
    margin-bottom: 20px;
    letter-spacing: .2px;
}

.auth-btn:hover { background: #38bdf8; }

/* ── Divider ─────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted-2);
    letter-spacing: .8px;
    margin-bottom: 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-2);
}

/* ── Alt buttons ─────────────────────────────────────────────── */
.auth-alt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-alt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    border: 1.5px solid var(--border-2);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    background: transparent;
    text-decoration: none;
    transition: border-color .15s, color .15s;
}

.auth-alt-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    text-decoration: none;
}

/* ── Footer text links ───────────────────────────────────────── */
.auth-link {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-link a { color: var(--cyan); font-weight: 500; }
.auth-link a:hover { text-decoration: underline; }

.auth-link--spaced { margin-bottom: 20px; }
.auth-back-link { margin-top: 12px; }

/* ── Resend form ─────────────────────────────────────────────── */
.resend-form { display: inline; }

.resend-link {
    background: transparent;
    border: none;
    color: var(--cyan);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    font-family: var(--font);
    text-decoration: underline;
}

/* ── Sent state ──────────────────────────────────────────────── */
.auth-sent-wrap { text-align: center; padding: 16px 0; }

.auth-sent-icon {
    width: 64px;
    height: 64px;
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.25);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 26px;
    margin: 0 auto 20px;
}

.auth-subheading {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.auth-em { color: var(--text); }

.auth-sent-note {
    font-size: 13px;
    color: var(--muted-2);
}

/* optional label helper */
.auth-optional {
    color: var(--muted-2);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 820px) {
    .auth-split { flex-direction: column; }

    .auth-brand-panel {
        width: 100%;
        padding: 20px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .auth-brand-heading { font-size: 20px; }
    .auth-features { display: none; }
    .auth-brand-sub { margin-bottom: 0; }

    .auth-form-area { padding: 32px 24px; justify-content: flex-start; }
    .auth-alt-row { grid-template-columns: 1fr; }
}
