/* ============================================
   Modern Authentication UI Styles
   Enhanced gray-blue gradient theme with glassmorphism
   ============================================ */

/* ========== CSS Variables ========== */
:root {
    /* Enhanced Gray-Blue Gradient Colors */
    --auth-gradient-start: #e8eef5;
    --auth-gradient-mid: #c8d5e8;
    --auth-gradient-end: #b8c9e0;
    
    /* Accent Colors */
    --auth-primary: #5a7ba6;
    --auth-primary-hover: #4a6b96;
    --auth-primary-light: #7a9bc6;
    
    /* Neutrals */
    --auth-white: #ffffff;
    --auth-light: #f8f9fa;
    --auth-gray: #6c757d;
    --auth-dark: #2c3e50;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(90, 123, 166, 0.15);
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

/* ========== Background Gradients ========== */
.auth-background {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--auth-gradient-start) 0%, var(--auth-gradient-mid) 50%, var(--auth-gradient-end) 100%);
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: subtle-rotate 30s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes subtle-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== Glass Cards ========== */
.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 3rem;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 1;
}

.auth-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px 0 rgba(90, 123, 166, 0.2);
}

.auth-card-compact {
    padding: 2rem;
}

/* ========== Form Elements ========== */
.auth-input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--auth-dark);
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    background: var(--auth-white);
    transition: var(--transition-smooth);
    outline: none;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(90, 123, 166, 0.1);
    transform: scale(1.01);
}

.auth-input::placeholder {
    color: #adb5bd;
}

/* ========== Buttons ========== */
.auth-button {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.auth-button-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-hover) 100%);
    color: var(--auth-white);
    box-shadow: 0 4px 12px rgba(90, 123, 166, 0.3);
}

.auth-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 123, 166, 0.4);
}

.auth-button-primary:active {
    transform: translateY(0);
}

.auth-button-secondary {
    background: var(--auth-white);
    color: var(--auth-primary);
    border: 2px solid var(--auth-primary);
}

.auth-button-secondary:hover {
    background: var(--auth-primary);
    color: var(--auth-white);
}

.auth-button-text {
    background: transparent;
    color: var(--auth-primary);
    padding: 0.5rem 1rem;
}

.auth-button-text:hover {
    background: rgba(90, 123, 166, 0.1);
}

.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== Tabs ========== */
.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(90, 123, 166, 0.1);
}

.auth-tab {
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--auth-gray);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    border-bottom: 3px solid transparent;
}

.auth-tab:hover {
    color: var(--auth-primary);
}

.auth-tab.active {
    color: var(--auth-primary);
    border-bottom-color: var(--auth-primary);
}

.auth-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--auth-primary);
    transition: var(--transition-smooth);
}

.auth-tab.active::after {
    width: 100%;
}

/* ========== Headings & Text ========== */
.auth-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--auth-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subheading {
    font-size: 1rem;
    color: var(--auth-gray);
    text-align: center;
    margin-bottom: 2rem;
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* ========== Alerts & Messages ========== */
.auth-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeInScale 0.3s ease;
}

.auth-alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.auth-alert-error {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.auth-alert-info {
    background: rgba(0, 123, 255, 0.1);
    color: #004085;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

/* ========== Logo ========== */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
    transition: var(--transition-smooth);
}

.auth-logo img:hover {
    transform: scale(1.05);
}

/* ========== Divider ========== */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--auth-gray);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(90, 123, 166, 0.2);
}

.auth-divider span {
    padding: 0 1rem;
}

/* ========== Social Links ========== */
.auth-social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.auth-social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-white);
    color: var(--auth-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(90, 123, 166, 0.15);
}

.auth-social-link:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 12px rgba(90, 123, 166, 0.25);
    background: var(--auth-primary);
    color: var(--auth-white);
}

/* ========== Verification Code Input ========== */
.auth-code-input {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.auth-code-digit {
    width: 50px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    background: var(--auth-white);
    transition: var(--transition-smooth);
    outline: none;
}

.auth-code-digit:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(90, 123, 166, 0.1);
    transform: scale(1.05);
}

/* ========== Countdown Timer ========== */
.auth-timer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--auth-gray);
    margin: 1rem 0;
}

.auth-timer-value {
    font-weight: 600;
    color: var(--auth-primary);
    font-size: 1.125rem;
}

/* ========== Animations ========== */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-fade-in {
    animation: fadeIn 0.4s ease;
}

.auth-scale-in {
    animation: fadeInScale 0.3s ease;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .auth-heading {
        font-size: 1.5rem;
    }
    
    .auth-button {
        width: 100%;
        padding: 1rem;
    }
    
    .auth-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }
    
    .auth-tab.active {
        border-left-color: var(--auth-primary);
        border-bottom-color: transparent;
    }
    
    .auth-code-digit {
        width: 44px;
        height: 54px;
        font-size: 1.25rem;
    }
    
    .auth-social-links {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-heading {
        font-size: 1.25rem;
    }
    
    .auth-code-digit {
        width: 40px;
        height: 48px;
        font-size: 1.125rem;
    }
}

/* ========== Touch-Friendly (Mobile) ========== */
@media (hover: none) and (pointer: coarse) {
    .auth-button,
    .auth-social-link,
    .auth-tab {
        min-height: 44px;
        min-width: 44px;
    }
    
    .auth-input {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}

/* ========== Utility Classes ========== */
.auth-text-center {
    text-align: center;
}

.auth-mb-1 {
    margin-bottom: 0.5rem;
}

.auth-mb-2 {
    margin-bottom: 1rem;
}

.auth-mb-3 {
    margin-bottom: 1.5rem;
}

.auth-mt-2 {
    margin-top: 1rem;
}

.auth-mt-3 {
    margin-top: 1.5rem;
}

.auth-w-full {
    width: 100%;
}

.auth-hidden {
    display: none;
}
