/* ============================================
   Step Town Supermarket — Login Page Styles
   Inspired by ira-motors.com/login
   ============================================ */

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

body.login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    background: #0a0a1a;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* ---- Left Panel — Brand ---- */
.login-brand-panel {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 40%, #16213e 100%);
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200,134,10,0.12) 0%, transparent 60%);
    animation: floatGlow 8s ease-in-out infinite;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(218,165,32,0.08) 0%, transparent 60%);
    animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.1); }
}

/* Animated grid lines */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(200,134,10,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200,134,10,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    from { transform: translate(0, 0); }
    to { transform: translate(60px, 60px); }
}

/* Floating particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(200,134,10,0.3);
    border-radius: 50%;
    animation: float var(--duration, 6s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    50% { transform: translateY(calc(var(--ty, -100px))) translateX(calc(var(--tx, 50px))); opacity: 0.8; }
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.brand-logo {
    width: 160px;
    height: 160px;
    margin: 0 auto 32px;
    animation: logoFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(200,134,10,0.2));
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.brand-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, var(--primary-300, #fde047) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-content .tagline {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
    font-style: italic;
}

.brand-features {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.brand-feature:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(6px);
    border-color: rgba(200,134,10,0.2);
}

.brand-feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(200,134,10,0.2), rgba(200,134,10,0.05));
    color: #DAA520;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand-feature-text h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.brand-feature-text p {
    color: rgba(255,255,255,0.4);
    font-size: 0.78rem;
}

/* ---- Right Panel — Login Form ---- */
.login-form-panel {
    width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.login-form-panel::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(200,134,10,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
}

.login-mobile-logo {
    display: none;
    margin-bottom: 32px;
    text-align: center;
}

.login-mobile-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

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

.login-form-header .welcome-text {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.login-form-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.login-form-header p {
    color: #94a3b8;
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 22px;
    position: relative;
}

.login-form .form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.login-form .input-wrapper {
    position: relative;
}

.login-form .input-wrapper i.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    transition: color 0.2s;
    z-index: 1;
}

.login-form .form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.25s ease;
    outline: none;
}

.login-form .form-input:focus {
    border-color: #C8860A;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(200,134,10,0.08);
}

.login-form .form-input:focus + i,
.login-form .form-input:focus ~ i.input-icon {
    color: #C8860A;
}

.login-form .input-wrapper .toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1.05rem;
    padding: 4px;
    transition: color 0.2s;
    z-index: 1;
}

.login-form .input-wrapper .toggle-password:hover {
    color: #64748b;
}

.login-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #C8860A;
    cursor: pointer;
}

.remember-me span {
    font-size: 0.82rem;
    color: #64748b;
    font-weight: 500;
}

.forgot-link {
    font-size: 0.82rem;
    color: #C8860A;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #a16207;
}

.login-btn {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, #C8860A, #a16207);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #a16207, #854d0e);
    box-shadow: 0 8px 25px rgba(200,134,10,0.35);
    transform: translateY(-2px);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn .spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.login-btn.loading .spinner {
    display: block;
}

.login-btn.loading .btn-text {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.login-footer {
    margin-top: 36px;
    text-align: center;
}

.login-footer p {
    font-size: 0.8rem;
    color: #94a3b8;
}

.login-footer .system-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

.login-footer .system-badge i {
    color: #C8860A;
    font-size: 0.8rem;
}

/* ---- Error/Toast on Login ---- */
.login-alert {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: fadeInDown 0.3s ease;
}

.login-alert.error {
    display: flex;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.login-alert.success {
    display: flex;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .login-brand-panel {
        padding: 40px;
    }
    
    .brand-logo {
        width: 130px;
        height: 130px;
    }
    
    .brand-content h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-brand-panel {
        display: none;
    }
    
    .login-form-panel {
        width: 100%;
        min-height: 100vh;
        padding: 40px 24px;
    }
    
    .login-mobile-logo {
        display: block;
    }
    
    .login-form-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 32px 20px;
    }
    
    .login-form-wrapper {
        max-width: 100%;
    }
    
    .login-form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

/* ============================================
   PASSWORD RECOVERY & OTP VERIFICATION STYLES
   ============================================ */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: #C8860A;
    transform: translateX(-4px);
}

.auth-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.15), rgba(200, 134, 10, 0.25));
    border: 1px solid rgba(218, 165, 32, 0.3);
    color: #C8860A;
    font-size: 1.6rem;
    margin-bottom: 18px;
    box-shadow: 0 8px 20px rgba(200, 134, 10, 0.15);
    animation: iconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* OTP Digits Grid */
.otp-group {
    margin: 24px 0 16px;
    text-align: center;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 16px 0;
}

.otp-box {
    width: 52px;
    height: 62px;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Outfit', 'Inter', monospace;
    text-align: center;
    color: #0f172a;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    caret-color: #C8860A;
}

.otp-box:focus {
    outline: none;
    border-color: #C8860A;
    box-shadow: 0 0 0 4px rgba(200, 134, 10, 0.18), 0 4px 12px rgba(200, 134, 10, 0.12);
    transform: translateY(-2px);
    background: #fffdf5;
}

.otp-box.filled {
    border-color: #DAA520;
    background: #fffdfa;
}

@media (max-width: 420px) {
    .otp-inputs {
        gap: 6px;
    }
    .otp-box {
        width: 42px;
        height: 52px;
        font-size: 1.4rem;
        border-radius: 10px;
    }
}

/* Countdown & Resend */
.otp-timer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.otp-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-weight: 600;
}

.otp-countdown.expiring {
    color: #ef4444;
    animation: pulse 1s infinite;
}

.otp-countdown .timer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.otp-countdown.expiring .timer-dot {
    background: #ef4444;
}

.resend-btn {
    background: none;
    border: none;
    color: #C8860A;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.resend-btn:hover:not(:disabled) {
    background: rgba(200, 134, 10, 0.1);
    text-decoration: underline;
}

.resend-btn:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}



/* Password Strength Meter */
.password-strength-wrapper {
    margin: -8px 0 16px;
}

.strength-bar-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    background: #ef4444;
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 10px;
}

.strength-badge {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strength-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 0.74rem;
    color: #64748b;
}

.strength-rule {
    display: flex;
    align-items: center;
    gap: 6px;
}

.strength-rule i {
    font-size: 0.7rem;
    color: #cbd5e1;
    transition: color 0.2s ease;
}

.strength-rule.met {
    color: #065f46;
}

.strength-rule.met i {
    color: #10b981;
}

.strength-rule.unmet {
    color: #64748b;
}

