/* File: auth/login.css - Premium Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #6a11cb;
    --primary-light: #8b5cf6;
    --primary-grad: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    --primary-grad-hover: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    --bg: #f8fafc;
    --card: #ffffff;
    --text-main: #0f172a;
    --text-sub: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px -4px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.08), 0 20px 40px -12px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 8px 32px -4px rgba(106, 17, 203, 0.25);
    --radius-xl: 28px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(106, 17, 203, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 117, 252, 0.06) 0px, transparent 50%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    -webkit-font-smoothing: antialiased;
}

/* ==================== WRAPPER ==================== */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    animation: slideUpFade 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }

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

/* ==================== CARD ==================== */
.form-container {
    background: var(--card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-grad);
}

.form-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* ==================== HEADER ==================== */
.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.icon-circle {
    width: 64px;
    height: 64px;
    background: var(--primary-grad);
    color: #ffffff;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
    box-shadow: var(--shadow-glow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-circle:hover {
    transform: rotate(8deg) scale(1.1);
    box-shadow: 0 12px 40px -8px rgba(106, 17, 203, 0.4);
}

h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
    font-weight: 500;
}

/* ==================== AUTH ACTIONS ==================== */
.auth-actions {
    width: 100%;
    margin-top: 0.5rem;
}

.google-btn {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: #ffffff;
    color: var(--text-main);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.google-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

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

.google-icon {
    width: 20px;
    height: 20px;
}

/* ==================== MESSAGE AREA ==================== */
.message-area {
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: all 0.3s ease;
}

.message-area.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.message-area.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.message-area.info {
    background: #f8fafc;
    color: var(--text-sub);
    border: 1px solid var(--border);
}

.message-area:empty {
    display: none;
}

/* ==================== SWITCH AUTH ==================== */
.switch-auth {
    width: 100%;
    text-align: center;
    margin-top: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.04) 0%, rgba(37, 117, 252, 0.04) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(106, 17, 203, 0.1);
}

.switch-auth p {
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 500;
    line-height: 1.5;
}

/* ==================== FOOTER ==================== */
.login-footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    width: 100%;
}

.back-link {
    text-decoration: none;
    color: var(--text-sub);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
}

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

/* ==================== AUTH TABS ==================== */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 0.35rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-md) - 4px);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}

.auth-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
}

.auth-tab.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.auth-tab i {
    font-size: 1.1rem;
}

/* ==================== AUTH PANELS ==================== */
.auth-panel {
    display: none;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.auth-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* ==================== DELEGATED FORM ==================== */
.delegated-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

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

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-sub);
    font-size: 1.1rem;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background: var(--card);
    transition: all 0.25s ease;
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(106, 17, 203, 0.1);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-sub);
}

/* ==================== PRIMARY BUTTON ==================== */
.primary-btn {
    width: 100%;
    padding: 0.9rem 1.25rem;
    background: var(--primary-grad);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
}

.primary-btn:hover {
    background: var(--primary-grad-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

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

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    h2 {
        font-size: 1.35rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .icon-circle {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .auth-tab {
        padding: 0.65rem 0.75rem;
        font-size: 0.8rem;
    }

    .auth-tab i {
        font-size: 1rem;
    }
}