/* =====================================================
   SmartCaptur — Compact Light Theme Authentication
   ===================================================== */

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.15);
    --secondary: #818cf8;
    --accent: #0ea5e9;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --border-light: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --input-bg: #ffffff;
}

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

.login-body {
    min-height: 100vh;
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    color: var(--text-main);
}

/* Background mesh */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-light);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0, transparent 50%),
        radial-gradient(at 100% 100%, rgba(103, 232, 249, 0.05) 0, transparent 50%);
}

/* ── Auth Container (Increased Width) ── */
.auth-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    z-index: 10;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 24px;
    /* Reduced padding */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-section {
    text-align: center;
    margin-bottom: 12px;
}

.logo-section img {
    height: 60px;
    /* Increased back slightly as per request */
    width: auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 20px;
    /* Reduced header size */
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

/* Password Toggle Style */
.password-toggle {
    position: absolute;
    right: 16px;
    left: auto !important;
    /* Forces it to the right */
    color: #94a3b8;
    cursor: pointer;
    font-size: 14px;
    z-index: 5;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary);
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
    /* Reduced text size */
}

/* ── Hidden Tabs (Using links instead) ── */
.auth-tabs {
    display: none;
}

/* ── Forms ── */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 12px;
    /* Reduced gap */
}

.auth-form.active {
    display: flex;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    /* Slightly smaller label */
    font-weight: 600;
    color: #475569;
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 14px;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 44px 11px 44px;
    /* Thinner inputs */
    background: var(--input-bg);
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    /* Sleeker button */
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.btn-submit:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 500;
}

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

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px;
    background: white;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.google-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ── Toggle Link ── */
.toggle-group {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.toggle-link {
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    margin-left: 4px;
}

.toggle-link:hover {
    text-decoration: underline;
}

/* ── Modal (Compact) ── */
.otp-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.otp-modal.active {
    display: flex;
}

.otp-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 380px;
    /* Slimmer modal */
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.otp-card h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.otp-card p {
    font-size: 13px;
    color: var(--text-muted);
}

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

.otp-input {
    width: 40px;
    height: 50px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    outline: none;
}

.otp-input:focus {
    border-color: var(--primary);
    background: white;
}

.timer {
    font-size: 14px;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 24px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

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