/* Authentication Page Styles */

/* Dark Mode Toggle Button */
.theme-toggle-auth {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 1000;
}

.theme-toggle-auth:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.theme-toggle-auth .fa-sun {
    display: none;
}

html.dark .theme-toggle-auth .fa-moon {
    display: none;
}

html.dark .theme-toggle-auth .fa-sun {
    display: block;
}

.auth-container {
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
    align-items: center;
    justify-content: center;
}

html.dark .auth-container {
    background: #0f172a;
}

.auth-right {
    width: 100%;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

html.dark .auth-right {
    background: #1e293b;
}

.auth-box {
    width: 100%;
    max-width: 480px;
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

html.dark .auth-box {
    background: #0f172a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: #10b981;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.back-btn:hover {
    background: #f0f4ff;
}

html.dark .back-btn:hover {
    background: #1e293b;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
}

html.dark .auth-tabs {
    border-bottom-color: #374151;
}

.auth-tab {
    flex: 1;
    padding: 12px 24px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.auth-tab:hover {
    color: #10b981;
}

.auth-tab.active {
    color: #10b981;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #10b981;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

html.dark .auth-form h2 {
    color: #f9fafb;
}

.auth-subtitle {
    margin: 0 0 30px 0;
    color: #6b7280;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

html.dark .form-group label {
    color: #d1d5db;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

html.dark .form-group input {
    background: #1e293b;
    border-color: #374151;
    color: #f9fafb;
}

.form-group input:focus {
    outline: none;
    border-color: #10b981;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

html.dark .checkbox-label {
    color: #d1d5db;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.checkbox-label a {
    color: #10b981;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-link {
    color: #10b981;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

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

.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-social {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    margin-bottom: 12px;
}

html.dark .btn-social {
    background: #1e293b;
    color: #f9fafb;
    border-color: #374151;
}

.btn-social:hover {
    background: #f9fafb;
    border-color: #10b981;
}

html.dark .btn-social:hover {
    background: #374151;
}

.btn-social.google i {
    color: #db4437;
}

.btn-social.microsoft i {
    color: #00a4ef;
}

.divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

html.dark .divider::before {
    background: #374151;
}

.divider span {
    position: relative;
    background: white;
    padding: 0 15px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

html.dark .divider span {
    background: #0f172a;
}

.spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

#auth-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
}

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

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

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
    position: relative;
}

html.dark .modal-content {
    background: #0f172a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

html.dark .modal-content h3 {
    color: #f9fafb;
}

.modal-subtitle {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

html.dark .modal-subtitle {
    color: #9ca3af;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

html.dark .modal-close:hover {
    background: rgba(148, 163, 184, 0.15);
}

.modal-form .form-group {
    margin-bottom: 18px;
}

.modal-form .btn {
    width: 100%;
    margin-top: 8px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-container {
        flex-direction: column;
    }

    .auth-left {
        padding: 40px 30px;
    }

    .auth-brand h1 {
        font-size: 36px;
    }

    .auth-right {
        padding: 30px 20px;
    }

    .auth-box {
        padding: 30px 20px;
    }

    .back-btn {
        position: static;
        margin-bottom: 20px;
    }
}

@media (max-width: 640px) {
    .auth-left {
        display: none;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
