/* =====================================================
   AUTH PAGES STYLING - PREMIUM DESIGN
   Modern, Clean & Professional Look
   ===================================================== */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --secondary: #EC4899;
    --accent: #06B6D4;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --dark: #1E293B;
    --gray-900: #0F172A;
    --gray-700: #334155;
    --gray-500: #64748B;
    --gray-400: #94A3B8;
    --gray-200: #E2E8F0;
    --gray-100: #F1F5F9;
    --white: #FFFFFF;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;

    /* Beautiful gradient background */
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #334155 100%);
}

/* Animated background shapes */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s ease-in-out infinite;
    z-index: 0;
}

body::before {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(236, 72, 153, 0.3) 100%);
    top: -200px;
    right: -200px;
}

body::after {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(99, 102, 241, 0.2) 100%);
    bottom: -150px;
    left: -150px;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-header h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.auth-header p {
    font-size: 15px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Message Box */
.message-box {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-box.success {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    color: #047857;
    border: 1px solid #A7F3D0;
}

.message-box.error {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.message-box.info {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}

/* Form */
.auth-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--dark);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input:hover {
    border-color: var(--gray-400);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.error-message {
    display: block;
    color: var(--danger);
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
}

.info-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 8px;
}

/* Form Row */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Links */
.link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    margin-top: 12px;
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

/* Button Loading */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.auth-footer p {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Role Selection */
.role-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.role-option {
    padding: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--white);
}

.role-option:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.role-option.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.role-option input {
    display: none;
}

.role-option .role-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.role-option .role-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

/* OTP Input */
.otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.otp-input {
    width: 50px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    padding: 0 16px;
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 500;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    color: var(--gray-700);
}

.social-btn:hover {
    border-color: var(--gray-400);
    background: var(--gray-100);
}

/* Responsive */
@media (max-width: 520px) {
    .auth-box {
        padding: 36px 24px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 30px;
    }

    .btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .role-selector {
        grid-template-columns: 1fr;
    }
}