/* =============================================================
   Tatakas — Auth Pages
   Used by: login, register, forgot-password, reset-password
   ============================================================= */

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

:root {
    --bg:        #0D0F14;
    --surface:   #13161D;
    --panel:     #181C26;
    --border:    rgba(255,255,255,0.07);
    --border-hi: rgba(255,255,255,0.14);
    --gold:      #C9A84C;
    --gold-dim:  rgba(201,168,76,0.12);
    --gold-glow: rgba(201,168,76,0.25);
    --text:      #F0EDE6;
    --muted:     #8A8880;
    --danger:    #E05555;
    --success:   #3DAA7A;
    --radius:    14px;
    --radius-sm: 8px;
}

html, body {
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

/* ── Two-column layout (login / register) ── */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 520px;
}

.auth-layout--narrow { grid-template-columns: 1fr 480px; }

/* Brand panel */
.auth-brand {
    position: relative;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    overflow: hidden;
}

.brand-geo { position: absolute; inset: 0; pointer-events: none; }
.brand-geo svg { width: 100%; height: 100%; }

.brand-logo { position: relative; display: flex; align-items: center; gap: 10px; z-index: 1; }

.brand-logo-mark {
    width: 38px; height: 38px;
    background: var(--gold);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}

.brand-logo-mark svg { width: 22px; height: 22px; }

.brand-name {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    letter-spacing: -0.3px;
    color: var(--text);
}

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

.brand-tagline {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(26px, 2.8vw, 44px);
    line-height: 1.18;
    letter-spacing: -0.5px;
    color: var(--text);
    margin-bottom: 20px;
}

.brand-tagline em { font-style: italic; color: var(--gold); }

.brand-desc {
    font-size: 15px;
    color: var(--muted);
    max-width: 380px;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Stats (login brand panel) */
.brand-stats { display: flex; gap: 32px; }

.stat-item { display: flex; flex-direction: column; gap: 2px; }

.stat-value {
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

/* Feature list (register brand panel) */
.feature-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 0; }

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

.feature-icon {
    width: 28px; height: 28px;
    background: var(--gold-dim);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.feature-icon svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 2; }

.feature-text { font-size: 14px; color: var(--muted); }
.feature-text strong { color: var(--text); font-weight: 500; }

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

/* Form panel */
.auth-form-panel {
    background: var(--panel);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 52px;
    border-left: 1px solid var(--border);
}

.form-header { margin-bottom: 30px; }
.form-header--lg { margin-bottom: 36px; }

.form-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 10px;
    display: block;
}

.form-title {
    font-family: 'DM Serif Display', serif;
    font-size: 28px;
    letter-spacing: -0.4px;
    color: var(--text);
    margin-bottom: 6px;
}

.form-title--lg { font-size: 30px; }

.form-subtitle { font-size: 14px; color: var(--muted); }

/* ── Card-centered layout (forgot-password / reset-password) ── */
.auth-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    position: relative;
    overflow: hidden;
}

.bg-geo { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-geo svg { width: 100%; height: 100%; }

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: var(--panel);
    border: 1px solid var(--border-hi);
    border-radius: 18px;
    padding: 52px 48px;
}

.auth-card--narrow { max-width: 460px; }

.card-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }

.icon-spot {
    width: 64px; height: 64px;
    background: var(--gold-dim);
    border: 1px solid rgba(201,168,76,0.2);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
}

.icon-spot svg { width: 30px; height: 30px; stroke: var(--gold); fill: none; stroke-width: 1.8; }

.form-desc { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 32px; }

/* ── Form elements ── */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field--lg { margin-bottom: 20px; }
.field--xl { margin-bottom: 24px; }

.field-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--muted);
    text-transform: uppercase;
}

.field-wrap { position: relative; display: flex; align-items: center; }

.field-icon {
    position: absolute;
    left: 14px;
    color: var(--muted);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.field-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.field-input {
    width: 100%;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    padding: 0 14px 0 42px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input--lg { height: 50px; padding-left: 44px; padding-right: 48px; }

.field-input::placeholder { color: #4A4A52; }
.field-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.field-input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(224,85,85,0.12); }

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-password:hover { color: var(--text); }
.toggle-password svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.field-hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.field-hint strong { color: var(--gold); }

.field-error {
    font-size: 12px;
    color: var(--danger);
    display: flex;
    align-items: center;
    gap: 5px;
}

.field-error svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }

.field-error--block { display: block; margin-top: -10px; margin-bottom: 14px; }

/* ── Password strength ── */
.strength-bar { display: flex; gap: 4px; margin-top: 4px; }

.strength-segment {
    flex: 1; height: 3px;
    border-radius: 2px;
    background: var(--border-hi);
    transition: background 0.3s;
}

.strength-segment.active-weak   { background: var(--danger); }
.strength-segment.active-fair   { background: #E09A40; }
.strength-segment.active-good   { background: #C9A84C; }
.strength-segment.active-strong { background: var(--success); }

.strength-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Remember me / Terms ── */
.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.checkbox-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox-wrap input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.checkbox-wrap span { font-size: 13px; color: var(--muted); }

.terms-wrap { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.terms-wrap input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--gold);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}
.terms-wrap span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.terms-wrap a { color: var(--gold); text-decoration: none; }
.terms-wrap a:hover { opacity: 0.75; }

/* ── Buttons ── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    background: var(--gold);
    color: #0D0F14;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover { opacity: 0.9; box-shadow: 0 4px 20px var(--gold-glow); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    height: 44px;
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    margin-top: 12px;
}

.btn-ghost:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.04);
}

.btn-ghost svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Links ── */
.link-gold { font-size: 13px; color: var(--gold); text-decoration: none; transition: opacity 0.2s; }
.link-gold:hover { opacity: 0.75; }

/* ── Alerts ── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-danger  { background: rgba(224,85,85,0.1);  border: 1px solid rgba(224,85,85,0.25);  color: #F4A0A0; }
.alert-success { background: rgba(61,170,122,0.1); border: 1px solid rgba(61,170,122,0.25); color: #7DCFB0; }
.alert svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; fill: currentColor; }

/* ── Form footnote ── */
.form-footnote { margin-top: 28px; text-align: center; font-size: 13px; color: var(--muted); }
.form-footnote a { color: var(--gold); text-decoration: none; }
.form-footnote a:hover { opacity: 0.75; }

/* ── Success state ── */
.success-state { text-align: center; }

.success-icon {
    width: 72px; height: 72px;
    background: rgba(61,170,122,0.1);
    border: 1px solid rgba(61,170,122,0.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg { width: 34px; height: 34px; stroke: var(--success); fill: none; stroke-width: 2; }

.success-title {
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    color: var(--text);
    margin-bottom: 10px;
}

.success-desc { font-size: 14px; color: var(--muted); line-height: 1.65; margin-bottom: 28px; }

.success-desc strong { color: var(--text); }

.hint-box {
    background: var(--surface);
    border: 1px solid var(--border-hi);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
    text-align: left;
}

.hint-box strong {
    color: var(--text);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Card footer ── */
.card-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.card-footer a { color: var(--gold); text-decoration: none; }
.card-footer a:hover { opacity: 0.75; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-layout,
    .auth-layout--narrow { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-form-panel { padding: 48px 32px; }
}

@media (max-width: 520px) {
    .auth-card { padding: 40px 24px; }
}

@media (max-width: 480px) {
    .field-row { grid-template-columns: 1fr; }
    .auth-form-panel { padding: 36px 20px; }
}
