/* ===========================================
   Login / Register Page — EzyCommerce
   Uses design tokens from index.css
   =========================================== */

body.auth-page {
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

body.auth-page::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108,92,231,0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

body.auth-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,206,201,0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Auth Container */
.auth-container {
    background: rgba(255,255,255,0.97);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: authSlideUp 0.5s cubic-bezier(0.4,0,0.2,1);
}

@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Auth Header */
.auth-header {
    background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
    color: #fff;
    padding: 32px 32px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.auth-header p {
    font-size: 15px;
    opacity: 0.85;
    font-weight: 400;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #E8ECF1;
    background: #FAFBFD;
}

.auth-tab {
    flex: 1;
    padding: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #636E72;
    position: relative;
    transition: color 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.auth-tab:hover {
    color: #6C5CE7;
}

.auth-tab.active {
    color: #6C5CE7;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6C5CE7, #A29BFE);
    border-radius: 3px 3px 0 0;
}

/* Auth Content */
.auth-content {
    padding: 32px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: authFadeIn 0.4s ease;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2D3436;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 13px 16px;
    border-radius: 10px;
    border: 1.5px solid #E8ECF1;
    background: #F7F8FC;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #2D3436;
    transition: all 0.25s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #6C5CE7;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(108,92,231,0.1);
}

/* Password Field */
.password-field {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #636E72;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #6C5CE7;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #636E72;
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: #6C5CE7;
}

.forgot-password {
    color: #6C5CE7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #5A4BD1;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
    color: #fff;
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,92,231,0.4);
}

.btn:disabled {
    background: #E8ECF1;
    color: #B2BEC3;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 24px;
    color: #636E72;
    font-size: 14px;
}

.form-footer a {
    color: #6C5CE7;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Password Requirements */
.password-requirements {
    background: #F7F8FC;
    border: 1px solid #E8ECF1;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #636E72;
}

.password-requirements p {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2D3436;
}

.password-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.password-requirements li {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.password-requirements i {
    font-size: 8px;
}

.requirement-met {
    color: #00B894;
}

.requirement-met i {
    font-size: 12px;
}

.requirement-not-met {
    color: #B2BEC3;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #fff;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease, toastFadeOut 0.4s ease 2.6s forwards;
    min-width: 300px;
    max-width: 400px;
}

.toast-success { border-left: 4px solid #00B894; }
.toast-error { border-left: 4px solid #FF6B6B; }
.toast-warning { border-left: 4px solid #FDCB6E; }

.toast-icon { font-size: 20px; flex-shrink: 0; }
.toast-success .toast-icon { color: #00B894; }
.toast-error .toast-icon { color: #FF6B6B; }
.toast-warning .toast-icon { color: #FDCB6E; }

.toast-content { flex: 1; }
.toast-message { font-size: 14px; color: #636E72; }

.toast-close {
    background: none;
    border: none;
    color: #B2BEC3;
    cursor: pointer;
    font-size: 18px;
    padding: 2px;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* Responsive */
@media (max-width: 480px) {
    body.auth-page { padding: 16px; }
    .auth-container { max-width: 100%; border-radius: 16px; }
    .auth-header { padding: 24px 20px 20px; }
    .auth-header h1 { font-size: 22px; }
    .auth-content { padding: 24px 20px; }
    .form-options { flex-direction: column; align-items: flex-start; gap: 12px; }
}