/* ============================================
   AUTH PAGES STYLES (Sign In & Sign Up)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent any weird layout issues */
html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide header and footer on auth pages */
.modern-header,
.modern-footer,
.scroll-to-top,
header,
footer,
nav:not(.auth-container nav) {
    display: none !important;
}

/* Auth Page Wrapper */
body {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px !important;
    padding-top: 40px !important;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* Auth Container */
.auth-container {
    max-width: 500px;
    width: 100%;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
    overflow: visible;
    animation: slideUp 0.6s ease-out;
    margin: 0;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Auth Header */
.auth-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 40px 30px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-header::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%);
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Auth Body */
.auth-body {
    padding: 40px 30px;
}

/* Form Styles */
.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 6px;
    display: none;
}

.form-error.active {
    display: block;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Links */
.form-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.forgot-password {
    text-align: right;
    margin-top: 8px;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    margin-top: 24px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--text-light);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 16px;
}

/* Social Login */
.social-login {
    margin-bottom: 24px;
}

.btn-google {
    width: 100%;
    padding: 14px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-dark);
}

.btn-google:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    padding: 20px 30px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Benefits Box (for Signup) */
.benefits-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
    border: 2px solid #bfdbfe;
    position: relative;
    overflow: hidden;
}

.benefits-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
}

.benefits-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.benefits-title .material-icons {
    font-size: 24px;
    color: var(--primary-color);
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 0.9375rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.benefits-list li:last-child {
    margin-bottom: 0;
}

.benefit-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    margin-top: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.benefit-icon .material-icons {
    font-size: 16px;
}

/* Alert Messages */
.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

/* Loading State */
.btn-submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    
    .auth-container {
        border-radius: 20px;
        max-width: 100%;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-logo {
        width: 70px;
        height: 70px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-body {
        padding: 30px 20px;
    }
    
    .benefits-box {
        padding: 20px;
    }
    
    .auth-footer {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 10px;
    }
    
    .auth-container {
        border-radius: 16px;
    }
    
    .auth-title {
        font-size: 1.375rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
    }
    
    .form-input,
    .btn-submit,
    .btn-google {
        padding: 12px 14px;
        font-size: 0.9375rem;
    }
    
    .benefits-list li {
        font-size: 0.8125rem;
    }
}
