/* ==================== */
/* Auth Page Styles */
/* ==================== */

.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(230, 57, 70, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(247, 37, 133, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* ==================== */
/* Auth Box */
/* ==================== */
.auth-box {
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ==================== */
/* Auth Form */
/* ==================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.auth-form label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    padding: 12px 15px;
    border: 2px solid var(--input-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--input-bg);
    color: var(--text-primary);
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-hint {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: -0.25rem;
}

/* ==================== */
/* Form Options */
/* ==================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 30px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 4px;
    transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
}

/* ==================== */
/* Auth Buttons */
/* ==================== */
.btn-auth {
    width: 100%;
    padding: 14px 30px;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* ==================== */
/* Auth Divider */
/* ==================== */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    background: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== */
/* Auth Messages */
/* ==================== */
.auth-message {
    margin-top: 1rem;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-message.show {
    display: block;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==================== */
/* Side Panel */
/* ==================== */
.auth-side-panel {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-panel-content {
    text-align: center;
}

.side-panel-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.side-panel-content h3 {
    color: var(--white);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.side-panel-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.side-panel-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

/* ==================== */
/* Loading State */
/* ==================== */
.btn-auth.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== */
/* Responsive Design */
/* ==================== */
@media (max-width: 968px) {
    .auth-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .auth-side-panel {
        display: none;
    }
    
    .auth-box {
        padding: 2.5rem;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .auth-section {
        padding: 40px 0;
        min-height: auto;
    }
    
    .auth-section::before,
    .auth-section::after {
        width: 400px;
        height: 400px;
        opacity: 0.5;
    }
    
    .auth-box {
        padding: 2rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .checkbox-container {
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .auth-section {
        padding: 1.5rem 0;
    }
    
    .auth-container {
        padding: 1rem;
        max-width: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .auth-box {
        padding: 1.25rem 0.75rem;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }
    
    .auth-header h2 {
        font-size: 1.35rem;
    }
    
    .auth-header p {
        font-size: 0.85rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 0.375rem;
    }
    
    .form-group input {
        padding: 11px 12px;
        font-size: 16px;
        min-height: 44px;
        border-radius: 6px;
        margin-bottom: 0.75rem;
    }
    
    .form-hint {
        font-size: 0.8rem;
        margin-top: -0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .btn-auth {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        min-height: 44px;
        width: 100%;
        border-radius: 6px;
    }
    
    .switch-auth {
        font-size: 0.85rem;
    }
    
    .switch-auth a {
        min-height: auto;
    }
    
    .auth-message {
        font-size: 0.85rem;
        padding: 0.75rem;
        margin-top: 0.75rem;
        border-radius: 6px;
    }
    
    .checkbox-container {
        font-size: 0.85rem;
        padding-left: 28px;
    }
    
    .checkmark {
        width: 18px;
        height: 18px;
        left: 0;
    }
    
    .form-options {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .checkbox-container {
        margin-bottom: 0.5rem;
    }
}

/* ==================== */
/* Dark Mode Styles */
/* ==================== */
body.dark-mode {
    .auth-section {
        background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    }
    
    .auth-container {
        background: var(--card-bg);
    }
    
    .auth-box {
        background: var(--card-bg);
        color: var(--text-primary);
    }
    
    .auth-header h2,
    .auth-header p {
        color: var(--text-primary);
    }
    
    .form-group label {
        color: var(--text-primary);
    }
    
    .form-group input {
        background: var(--input-bg);
        border-color: var(--input-border);
        color: var(--text-primary);
    }
    
    .form-group input:focus {
        border-color: var(--primary-color);
        background: var(--bg-primary);
    }
    
    .form-group input::placeholder {
        color: var(--text-secondary);
    }
    
    .form-link {
        color: var(--primary-light);
    }
    
    .toggle-form-link {
        color: var(--primary-light);
    }
    
    .auth-side-panel {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    }
    
    .divider span {
        background: var(--card-bg);
        color: var(--text-secondary);
    }
    
    .divider::before,
    .divider::after {
        background: var(--border-color);
    }
}
