/* ══════════════════════════════════════════════════════════════
   GasheAI — Auth Pages "Ethiopian Highlands" (V5.6)
   ══════════════════════════════════════════════════════════════ */

:root {
    --brand-dark: #051a0a;
    --brand-green: #013d1f;
    --brand-gold: #FCDD09;
    --brand-red: #DA121A;
    --brand-text: #f1f5f9;
    --brand-muted: #9cb3a0;
    --brand-success: #22c55e;
    --input-bg: #022610;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(145deg, #051a0a 0%, #013d1f 50%, #011a0a 100%);
    color: var(--brand-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

/* Background Decorative Orbs */
body::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0, 128, 0, 0.15) 0%, transparent 70%);
    top: -100px; right: -100px;
    border-radius: 50%;
    z-index: 0;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: rgba(1, 29, 11, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(252, 221, 9, 0.15);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: fadeInUp 0.6s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}
.auth-logo {
    width: 80px; height: 80px; max-width: 80px; max-height: 80px;
    margin: 0 auto 12px;
    display: block;
    object-fit: contain;
    border-radius: 16px;
    filter: drop-shadow(0 0 10px rgba(252, 221, 9, 0.3));
}
.auth-header > a { display: inline-block; }
.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--brand-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.auth-subtitle { color: var(--brand-muted); font-size: 0.95rem; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; color: var(--brand-muted); }

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.78rem;
    color: rgba(156, 179, 160, 0.7);
    line-height: 1.4;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-input:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(252, 221, 9, 0.1);
    background: rgba(1, 38, 16, 0.8);
}
.form-input.error { border-color: var(--brand-red); }

/* ─── Phone Input with Fixed Prefix ────────────────── */
.phone-input-group {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: rgba(252, 221, 9, 0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: var(--brand-gold);
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    user-select: none;
}

.phone-input {
    border-radius: 0 12px 12px 0 !important;
    letter-spacing: 1px;
    font-size: 1.05rem !important;
}

/* ─── Select Dropdown ───────────────────────────────── */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%239cb3a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* ─── Buttons ───────────────────────────────────────── */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--brand-gold);
    color: #000;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(252, 221, 9, 0.2);
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(252, 221, 9, 0.4); }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Error & Success Messages ──────────────────────── */
.error-message {
    color: var(--brand-red);
    font-size: 0.82rem;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(218, 18, 26, 0.08);
    border: 1px solid rgba(218, 18, 26, 0.2);
    border-radius: 10px;
    display: none;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}
.error-message.show { display: flex; }

.success-message {
    color: var(--brand-success);
    font-size: 0.85rem;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 10px;
    display: none;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.success-message.show { display: flex; }
.success-icon { flex-shrink: 0; font-size: 1rem; }

.redirect-notice {
    text-align: center;
    color: var(--brand-muted);
    font-size: 0.82rem;
    margin-top: 16px;
    animation: pulse 1.5s infinite;
}

/* ─── Forgot Password Link ──────────────────────────── */
.form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.forgot-link {
    font-size: 0.85rem;
    color: var(--brand-gold);
    font-weight: 500;
    transition: color 0.2s;
}
.forgot-link:hover {
    color: #fff;
    text-decoration: underline;
}

/* ─── OTP Digit Inputs ──────────────────────────────── */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-digit {
    width: 46px;
    height: 54px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--input-bg);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #fff;
    outline: none;
    transition: all 0.2s;
    caret-color: var(--brand-gold);
}
.otp-digit:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(252, 221, 9, 0.15);
    background: rgba(1, 38, 16, 0.8);
}
.otp-digit::placeholder { color: rgba(255,255,255,0.15); }

/* ─── Step Indicator (Reset Password) ───────────────── */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
    font-size: 0.85rem;
}

.step-done {
    color: var(--brand-success);
    font-weight: 600;
}
.step-done::before {
    content: '';
}

.step-active {
    color: var(--brand-gold);
    font-weight: 700;
}

/* ─── Footer ────────────────────────────────────────── */
.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--brand-muted);
}
.form-footer a { color: var(--brand-gold); font-weight: 600; }
.form-footer a:hover { text-decoration: underline; }

/* ─── Password Toggle ───────────────────────────────── */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--brand-muted);
    padding: 4px;
    transition: color 0.2s;
}
.password-toggle:hover { color: #fff; }
.input-icon-wrapper { position: relative; }

/* ─── Password Strength ─────────────────────────────── */
.strength-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}
.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-gold);
    transition: width 0.3s, background 0.3s;
}
.strength-text {
    color: var(--brand-muted);
    font-size: 0.78rem;
    margin-top: 4px;
    display: block;
}

/* ─── Animations ────────────────────────────────────── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; }
    .otp-digit { width: 40px; height: 48px; font-size: 1.2rem; }
    .otp-input-group { gap: 6px; }
    /* V6.1: Better touch targets */
    .form-input {
        min-height: 44px;
        font-size: 16px !important; /* Prevents iOS zoom */
    }
    .btn-submit {
        min-height: 48px;
    }
}

@media (max-width: 400px) {
    body { padding: 16px; }
    .auth-card { padding: 24px 16px; border-radius: 20px; }
    .auth-logo { width: 64px; height: 64px; max-width: 64px; max-height: 64px; margin-bottom: 8px; }
    .auth-title { font-size: 1.5rem; }
    .auth-subtitle { font-size: 0.85rem; }
    .form-input { padding: 12px 14px; font-size: 0.95rem; }
    .btn-submit { padding: 12px; font-size: 0.95rem; }
    .otp-digit { width: 36px; height: 44px; font-size: 1.1rem; }
    .otp-input-group { gap: 5px; }
}
