:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --navy: #f8fafc;
    /* Reusing name but mapping to light bg */
    --navy-light: #ffffff;
    /* Card bg */
    --text: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
}

body {
    /* bg/color handled by style.css but we ensure flex for layout */
    background-color: var(--navy);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    margin: 0;
    flex-direction: column;
    min-height: 100vh;
}

.auth-page-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.auth-container {
    background: var(--navy-light);
    padding: 1.25rem;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

.auth-logo {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-logo img {
    height: 32px;
    margin-bottom: 1rem;
    display: block;
}

.auth-title {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.auth-subtitle {
    display: block;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

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

.form-input {
    width: 100%;
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s;
}

.form-footer-link {
    text-align: right;
    margin-top: 5px;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.btn {
    width: 100%;
    padding: 0.6rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 10px;
}

/* Social Buttons Redesign */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-social {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid var(--border);
    /* Ensure border exists */
    background: white;
    color: var(--text);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Add subtle shadow for white-on-white contrast */
}

.btn-social:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.social-icon {
    width: 20px;
    height: 20px;
    position: absolute;
    left: 20px;
    /* Removed fixed fill as SVGs usually control this or inherit */
}

/* Fix Footer Social Icon Visibility */
.footer-content .social-icon {
    fill: #64748b;
    /* Explicit color for footer icons */
    position: static;
    /* Footer icons aren't absolute */
}

.footer-content .social-icon:hover {
    fill: var(--primary);
}

/* Brand Colors */
.btn-google {
    /* Google button specific tweaks if needed */
}

.btn-google:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-facebook:hover {
    border-color: #1877F2;
    background: #f0f9ff;
    color: #1877F2;
}

.btn-twitter:hover {
    border-color: #1DA1F2;
    background: #f0f9ff;
    color: #1DA1F2;
}

/* Dark Theme Adjustments Removed - Using Root Variables Now */

.auth-link {
    color: var(--primary);
    text-decoration: none;
}

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

.error-message {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: none;
    /* Hidden by default */
}

/* Password Toggle Config */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .form-input {
    padding-right: 40px;
    /* Space for the eye icon */
}

.eye-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}

.eye-icon:hover {
    color: var(--text);
}

/* Success Modal Styles */
.auth-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.auth-modal-content {
    background-color: white;
    margin: auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    /* Animation */
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.modal-text {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Resend Modal Styles */
.resend-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.resend-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.resend-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}