/* Authentication Pages Styles (Login & Register) */

body {
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow: hidden;
}

body.page-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.page-register {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Decorative Background */
.bg-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.bg-circle-1 {
    width: 600px;
    height: 600px;
    background: white;
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.bg-circle-2 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    bottom: -100px;
    left: -100px;
    animation: float 6s ease-in-out infinite reverse;
}

/* Left Panel - Branding */
.brand-panel {
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: white;
    text-align: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 900px) {
    .brand-panel {
        display: flex;
    }
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.brand-logo-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.brand-logo-icon .material-symbols-outlined {
    font-size: 2rem;
    color: white;
}

.brand-logo-text {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.brand-tagline {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.brand-description {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 300px;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.brand-feature .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--color-accent);
}

/* Right Panel - Form */
.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.form-container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Mobile Logo */
.mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
    .mobile-logo {
        display: none;
    }
}

.mobile-logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.page-login .mobile-logo-icon {
    background: var(--gradient-hero, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
}

body.page-register .mobile-logo-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.mobile-logo-icon .material-symbols-outlined {
    color: white;
    font-size: 1.5rem;
}

.mobile-logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    margin: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .material-symbols-outlined {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
}

.input-wrapper .input {
    padding-left: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: 0.5rem;
    font-weight: 500;
}

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

.submit-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    margin-top: 0.5rem;
}

body.page-login .submit-btn {
    /* Uses default primary color or we can enforce the gradient */
    background: var(--gradient-primary, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
}

body.page-register .submit-btn {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 8px 30px rgba(17, 153, 142, 0.3);
}

body.page-register .submit-btn:hover {
    box-shadow: 0 12px 35px rgba(17, 153, 142, 0.4);
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.signup-link,
.login-link {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.signup-link a,
.login-link a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

body.page-register .login-link a {
    color: #11998e;
}

.signup-link a:hover,
.login-link a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message,
.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: none;
}

.error-message,
.message.error {
    background: #FEE2E2;
    color: #DC2626;
}

.message.success {
    background: #D1FAE5;
    color: #059669;
}

.error-message.show,
.message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.terms {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

.terms a {
    color: #11998e;
    text-decoration: none;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #11998e;
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
    color: #0e8076;
}

/* =========================================
   DARK MODE
   ========================================= */

[data-theme="dark"] body.page-login {
    background: linear-gradient(135deg, #3b4d99 0%, #4a2d6e 100%);
}

[data-theme="dark"] body.page-register {
    background: linear-gradient(135deg, #0a6b62 0%, #1a9e52 100%);
}

[data-theme="dark"] .form-container {
    background: var(--bg-card, #1e293b);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .mobile-logo-text {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .form-header h1 {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .form-header p {
    color: var(--text-secondary, #94a3b8);
}

[data-theme="dark"] .form-label {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .input-wrapper .material-symbols-outlined {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .input {
    background: var(--bg-surface, #334155);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

[data-theme="dark"] .input::placeholder {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .password-toggle {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .divider {
    color: var(--text-muted, #64748b);
}

[data-theme="dark"] .divider::before,
[data-theme="dark"] .divider::after {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .signup-link,
[data-theme="dark"] .login-link,
[data-theme="dark"] .terms {
    color: var(--text-secondary, #94a3b8);
}

[data-theme="dark"] .error-message,
[data-theme="dark"] .message.error {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .message.success {
    background: rgba(5, 150, 105, 0.15);
    color: #6ee7b7;
}

[data-theme="dark"] .back-link {
    color: var(--text-secondary, #94a3b8);
}