/* ==========================================================================
   AUTHENTICATION LANE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--color-offwhite-350), var(--color-offwhite-0));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* --- Container & Card --- */
.auth-container {
    background: #fff; /* Crisp white for better contrast */
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08); /* Softer shadow */
    max-width: 440px;
    width: 100%;
    padding: 40px;
    border: 1px solid var(--color-border-soft);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Refined Auth Header --- */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-family: 'Young Serif', serif;
    font-size: 32px; /* Slightly larger */
    color: var(--color-secondary);
    margin-bottom: 10px;
    line-height: 1.2;
}

.auth-header p {
    color: var(--color-text-secondary);
    font-size: 16px;
    line-height: 1.5;
    max-width: 90%;
    margin: 0 auto; /* Center the text block */
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-heading); /* Darker for readability */
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-border-soft);
    border-radius: 8px;
    font-size: 16px; /* Better for mobile touch targets */
    transition: all 0.2s ease;
    background: var(--color-offwhite-350);
    color: var(--color-text-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-secondary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(112, 31, 86, 0.05);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* --- Options & Helpers --- */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border-soft);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background: #fff;
}

.remember-me input[type="checkbox"]:checked {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.remember-me input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #fff;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
}

.forgot-password {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- Buttons --- */
.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #701F56, #8c237c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(112, 31, 86, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(112, 31, 86, 0.3);
}

/* Divider for OAuth section */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--color-border-soft);
}

.divider::before { margin-right: 15px; }
.divider::after { margin-left: 15px; }

/* Google Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--color-border-soft);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text-heading);
    font-weight: 500;
    transition: all 0.2s ease;
}

.google-btn:hover {
    background: var(--color-offwhite-250);
    border-color: var(--color-text-muted);
}

/* --- Footer Links --- */
.auth-footer,
.signup-link,
.signin-link,
.back-home,
.back-signin {
    text-align: center;
    margin-top: 20px;
    font-size: 15px;
    color: var(--color-text-secondary);
}

/* Target the links inside these containers */
.auth-footer a,
.signup-link a,
.signin-link a,
.back-home a,
.back-signin a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 700;
    margin-left: 5px;
    transition: color 0.2s ease;
}

.auth-footer a:hover,
.signup-link a:hover,
.signin-link a:hover,
.back-home a:hover,
.back-signin a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Add extra spacing for the "Back to home" link specifically */
.back-home {
    margin-top: 30px;
    border-top: 1px solid var(--color-border-soft);
    padding-top: 20px;
}

/* --- Change Password Specific Styles --- */
.security-notice {
    background: #FFFBEB; /* Light yellow */
    border: 1px solid #FCD34D; /* Yellow border */
    color: #92400E; /* Dark yellow/brown text */
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-requirements {
    background: var(--color-offwhite-250);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-soft);
}

.password-requirements strong {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-heading);
}

.password-requirements ul {
    padding-left: 20px;
    margin: 0;
}

.password-requirements li {
    margin-bottom: 4px;
}

/* Password Hint (used in Reset Password) */
.password-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 6px;
}

/* --- Alerts --- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}