:root {
    --primary: #FF8F00;
    --primary-gradient: linear-gradient(135deg, #FF8F00 0%, #FF6D00 100%);
    --bg-color: #F8F9FD;
    --card-bg: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-muted: #8E8E93;
    --border-color: #E5E5EA;
    --success: #34C759;
    --danger: #FF3B30;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', 'Open Sans', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 143, 0, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 109, 0, 0.05) 0%, transparent 40%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

.auth-title {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 16px 45px 16px 20px;
    background: #F5F7FA;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-control:focus {
    outline: none;
    background: #FFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 143, 0, 0.1);
}

.input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #B0B0B5;
    font-size: 18px;
    transition: color 0.3s;
}

.form-control:focus+.input-icon {
    color: var(--primary);
}

.toggle-password {
    cursor: pointer;
}

.toggle-password:hover {
    color: var(--text-dark);
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #D1D1D6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

input[type="checkbox"] {
    display: none;
}

input[type="checkbox"]:checked+.checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 143, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:active {
    transform: scale(0.98);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    margin-left: 5px;
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #10B981;
}

.toast.error {
    background: #EF4444;
}

/* Loader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loader-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E5EA;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Country Selector Override */
.country-select select {
    appearance: none;
    padding-left: 45px;
}

.country-flag {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 15px;
    z-index: 2;
    pointer-events: none;
}

/* Alerts */
.alert {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: fadeInDown 0.3s ease;
}

.alert-error {
    background: #FEF2F2;
    color: #EF4444;
    border-color: #FEE2E2;
}

.alert-success {
    background: #F0FDF4;
    color: #10B981;
    border-color: #DCFCE7;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}