/* ==========================================================================
   Auth Module Styles - Modern, Ultra-Clean & Responsive Design
   Strictly separated from Blade templates (No inline styles or scripts)
   ========================================================================== */

/* Ambient Lighting & Body Polish */
body {
    background: radial-gradient(circle at 15% 20%, rgba(var(--primary-rgb), 0.22) 0%, transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(var(--primary-rgb), 0.16) 0%, transparent 45%),
                linear-gradient(135deg, #090e17 0%, #0f172a 50%, #1e293b 100%) !important;
}

/* Enhanced Auth Card Elevation & Top Accent */
.auth-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 28px;
    padding: 2.75rem 2.25rem;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.15), 0 0 1px 1px rgba(226, 232, 240, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent, #f59e0b));
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
}

/* Auth Header & Icon Badge */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.04));
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 20px -4px rgba(var(--primary-rgb), 0.2);
}

.auth-icon-badge svg {
    width: 26px;
    height: 26px;
}

.login-title {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--secondary, #0f172a);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.login-subtitle {
    color: #64748b;
    font-size: 0.925rem;
    margin: 0;
    line-height: 1.55;
    font-weight: 500;
}

/* Form Field Styling */
.auth-field-group {
    margin-bottom: 1.5rem;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.form-label-row .form-label {
    margin-bottom: 0;
}

.label-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
}

/* Modern Mobile Input Wrapper */
.mobile-input-wrapper {
    display: flex;
    align-items: stretch;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.mobile-input-wrapper:focus-within {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.14);
}

.mobile-prefix-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.1rem;
    background: #f1f5f9;
    border-right: 1.5px solid #e2e8f0;
    user-select: none;
    transition: background-color 0.2s;
}

.mobile-input-wrapper:focus-within .mobile-prefix-pill {
    background: rgba(var(--primary-rgb), 0.06);
    border-right-color: rgba(var(--primary-rgb), 0.25);
}

.flag-icon {
    display: block;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.prefix-code {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary, #0f172a);
    letter-spacing: 0.02em;
}

.mobile-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 0.95rem 1.1rem !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    color: var(--secondary, #0f172a) !important;
    outline: none !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

.mobile-input::placeholder {
    color: #94a3b8;
    font-weight: 450;
    letter-spacing: 0.04em;
}

/* Primary Submit Button */
.btn-auth-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #ea580c));
    border: none;
    border-radius: 14px;
    padding: 1.05rem 1.5rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 20px -2px rgba(var(--primary-rgb), 0.4);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.5rem;
    box-sizing: border-box;
}

.btn-auth-primary svg {
    transition: transform 0.2s ease;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -2px rgba(var(--primary-rgb), 0.55);
}

.btn-auth-primary:hover svg {
    transform: translateX(4px);
}

.btn-auth-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.35);
}

/* Security Trust Footer */
.auth-security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.25rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
}

.auth-security-notice svg {
    color: #10b981;
    flex-shrink: 0;
}

/* Alert Styling */
.session-status-alert {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.45;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.45;
}

.alert-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   OTP Verification View Styles
   ========================================================================== */

/* Masked Mobile Pill Badge */
.mobile-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    margin-top: 0.65rem;
}

.mobile-pill-number {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--secondary, #0f172a);
    letter-spacing: 0.05em;
}

.mobile-pill-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.25rem;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.mobile-pill-edit:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

/* 6-Digit OTP Boxes Grid */
.otp-boxes-wrapper {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0 1rem 0;
}

.otp-digit-box {
    width: 50px;
    height: 58px;
    text-align: center;
    font-size: 1.65rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--secondary, #0f172a);
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.otp-digit-box:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.16);
    transform: translateY(-2px);
}

.otp-digit-box.filled {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* OTP Countdown Timer */
.otp-timer-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 1.25rem 0 1.5rem 0;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
}

.otp-timer-card svg {
    color: #94a3b8;
}

.timer-countdown {
    color: var(--primary);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.timer-countdown.timer-expired {
    color: #ef4444;
}

/* Actions */
.otp-actions-wrapper {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.btn-resend-otp {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    transition: all 0.2s ease;
    text-decoration: underline;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-resend-otp:hover {
    color: var(--primary-dark);
}

.btn-resend-otp:disabled {
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: none;
    opacity: 0.65;
    pointer-events: none;
}

.back-to-login-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.back-to-login-link:hover {
    color: var(--secondary, #0f172a);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 22px;
    }

    .login-title {
        font-size: 1.6rem;
    }

    .otp-boxes-wrapper {
        gap: 6px;
    }

    .otp-digit-box {
        width: 44px;
        height: 52px;
        font-size: 1.4rem;
        border-radius: 10px;
    }

    .mobile-prefix-pill {
        padding: 0 0.85rem;
    }

    .mobile-input {
        font-size: 0.975rem !important;
        padding: 0.85rem 0.95rem !important;
    }
}
