/* Login page specific styling for accounts app */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&display=swap');

/* Background emojis on page - base styles */
.login-page-background-emojis {
    position: fixed;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    width: 100%;
    max-width: 100vw;
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

/* Top row - positioned at ~25% from top */
.login-page-background-emojis-top {
    top: 25%;
    transform: translate(-50%, -50%);
}

/* Middle row - positioned at ~50% (center) */
.login-page-background-emojis-middle {
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Bottom row - positioned at ~75% from top */
.login-page-background-emojis-bottom {
    top: 75%;
    transform: translate(-50%, -50%);
}

.emoji-bg {
    font-size: 200px;
    opacity: 0.06;
    line-height: 1;
    display: inline-block;
}

/* Ensure login box is above background */
.login-box {
    position: relative;
    z-index: 1;
}

/* Logo section styling */
.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.logo-section .logo-placeholder {
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-theme .logo-section .logo-placeholder {
    border-color: #666;
}

.auth-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
    background-color: #fff;
    padding: 4px;
    border-radius: 4px;
}

.dark-theme .auth-logo-img {
    background-color: transparent;
    padding: 0;
}

/* Landing-aligned brand wordmark beside logo */
.login-box .logo-section h1 {
    margin: 0;
    text-align: center;
    font-size: 2.5rem;
    font-family: 'Crimson Text', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #0a0a0a;
}

.dark-theme .login-box .logo-section h1 {
    color: #f8fafc;
}

.login-box .auth-login-headline {
    margin: -0.75rem 0 1.25rem;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
}

.dark-theme .login-box .auth-login-headline {
    color: #cbd5e1;
}

/* Social login section (legacy - kept for compatibility) */
.social-login-section {
    margin-top: 20px;
    text-align: center;
}

/* Button container - center the button */
.button-container {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Login submit button - compact oval (wide enough for icon + label) */
.login-box .button-container .login-submit-btn {
    width: 200px !important;
    min-width: 180px;
}

/* Label wrappers inside submit buttons (loading state) */
.login-box .ep-submit-btn-label,
.login-box .otp-send-btn-label,
.login-box .pr-send-btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Auth action buttons container */
.login-box .auth-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    margin-bottom: 20px;
}

/* Auth link buttons */
.login-box .auth-action-buttons .dashboard-btn {
    width: 320px !important;
    text-decoration: none !important;
    color: #495057 !important;
    font-size: 0.95rem;
    white-space: nowrap;
}

.login-box .auth-action-buttons .dashboard-btn:hover {
    text-decoration: none !important;
    color: #212529 !important;
}

/* Icon inside auth link buttons */
.login-box .auth-action-buttons .auth-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

/* Icon inside primary submit buttons (e.g. email-password Continue) */
.login-box .login-submit-btn .auth-btn-icon,
.login-box .otp-code-primary-btn .auth-btn-icon,
.login-box .otp-code-secondary-btn .auth-btn-icon,
.login-box .otp-name-modal-buttons .auth-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

.dark-theme .login-box .login-submit-btn .auth-btn-icon,
.dark-theme .login-box .otp-code-primary-btn .auth-btn-icon,
.dark-theme .login-box .otp-code-secondary-btn .auth-btn-icon,
.dark-theme .login-box .otp-name-modal-buttons .auth-btn-icon {
    filter: brightness(0) invert(1);
}

/* Dark theme: invert SVG icons but leave Google multicolor SVG alone */
.dark-theme .login-box .auth-action-buttons .auth-btn-icon {
    filter: brightness(0) invert(1);
}

.dark-theme .login-box .auth-action-buttons .dashboard-btn {
    color: #e2e8f0 !important;
}

.dark-theme .login-box .auth-action-buttons .dashboard-btn:hover {
    color: #ffffff !important;
}

/* Register page: tighter gap and smaller bottom margin */
.login-box .register-auth-buttons {
    gap: 10px;
    margin-top: 4px;
    margin-bottom: 12px;
}

/* Register page: row that holds the label + Login button side by side */
.login-box .register-login-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.login-box .register-login-label {
    font-size: 0.88rem;
    color: #6c757d;
    white-space: nowrap;
}

.dark-theme .login-box .register-login-label {
    color: #a0aec0;
}

/* Register page: Login link button - small/compact (matches login submit width) */
.login-box .register-auth-buttons .register-login-btn {
    width: 160px !important;
    min-width: 140px;
    padding: 8px 20px;
    font-size: 0.9rem !important;
}

/* Register page: Google button - full width but compact padding */
.login-box .register-auth-buttons .google-auth-btn {
    padding: 8px 20px;
    font-size: 0.9rem !important;
}

/* Continue button styling - smaller size */
.login-btn {
    width: auto;
    min-width: 120px;
    padding: 10px 24px;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

/* Ensure anchor tags with login-btn class are styled as buttons */
a.login-btn {
    text-decoration: none;
    color: white;
}

a.login-btn:hover {
    color: white;
    text-decoration: none;
}

.login-btn:hover {
    background-color: #0b5ed7;
}

.dark-theme .login-btn {
    background-color: #0d6efd;
}

.dark-theme .login-btn:hover {
    background-color: #0b5ed7;
}

/* Google login button - transparent with blue border */
.google-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    background-color: transparent;
    color: #4285F4;
    border: 2px solid #4285F4;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.google-login-btn:hover {
    background-color: rgba(66, 133, 244, 0.1);
    border-color: #357ae8;
    color: #357ae8;
}

.dark-theme .google-login-btn {
    color: #4285F4;
    border-color: #4285F4;
}

.dark-theme .google-login-btn:hover {
    background-color: rgba(66, 133, 244, 0.2);
    border-color: #5a9ef7;
    color: #5a9ef7;
}

.google-login-btn svg {
    margin-right: 0;
    width: 22px;
    height: 22px;
}

/* Increase input field font sizes */
.login-box .input-group input {
    font-size: 1.25rem;
    padding: 14px;
}

/* Error message font size - smaller to prevent overlap */
.login-box .error-message {
    font-size: 0.75rem;
    line-height: 1.3;
    word-wrap: break-word;
    max-width: 100%;
    color: #dc3545;
    margin-top: 0.3rem;
    display: block;
}

.dark-theme .login-box .error-message {
    color: #ffff00 !important;
}

/* Auth links (legacy - replaced by auth-action-buttons) */
.login-box .auth-links {
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* Style for "Or" text before social login */
.login-box .auth-links-or {
    text-align: center;
    margin: 0.75rem 0 0.25rem;
    font-size: 0.95rem;
    color: #6c757d;
}

.auth-links-or {
    font-size: 1.1rem;
    color: #6c757d;
}

.login-box .auth-login-intro {
    text-align: center;
    max-width: 420px;
    margin: 0 auto 1rem;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #6c757d;
}

.login-box .otp-email-input-group + .auth-login-intro {
    margin-top: 0.5rem;
    margin-bottom: 0.85rem;
}

.dark-theme .login-box .auth-login-intro {
    color: #a0aec0;
}

.login-box .auth-login-alt-hint {
    text-align: center;
    margin: 0.5rem 0 0.35rem;
    font-size: 0.88rem;
    color: #6c757d;
}

.dark-theme .login-box .auth-login-alt-hint {
    color: #a0aec0;
}

.login-box .auth-forgot-password-row {
    text-align: right;
    margin: -0.35rem 0 0.75rem;
}

.login-box .auth-forgot-password-link {
    font-size: 0.88rem;
    color: #0d6efd;
    text-decoration: none;
}

.login-box .auth-forgot-password-link:hover {
    text-decoration: underline;
}

.dark-theme .login-box .auth-forgot-password-link {
    color: #6ea8fe;
}

.login-box .alert a {
    color: inherit;
    text-decoration: underline;
}

.dark-theme .auth-links-or {
    color: #ccc !important;
}

/* Make emoji white in dark mode for better visibility */
.dark-theme .login-box .back-emoji {
    filter: brightness(0) invert(1);
    display: inline-block;
}

/* Increase alert message font size */
.login-box .alert {
    font-size: 1.1rem;
    padding: 12px 16px;
}

/* Dark mode styling for alerts in login-box */
.dark-theme .login-box .alert-danger {
    background-color: #333 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Password requirements styling */
.login-box .password-requirements {
    font-size: 1.1rem;
}

.login-box .password-requirements small {
    font-size: 1.1rem;
}

.login-box .password-requirements ul {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

/* Hide welcome message on authentication pages */
.content-container:has(.login-box) .welcome-user {
    display: none;
}

/* Success page styling */
.success-emoji {
    font-size: 3rem;
    display: inline-block;
    line-height: 1;
}

.success-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.dark-theme .success-title,
html.dark-theme .login-box .success-title,
body.dark-theme .login-box .success-title {
    color: #ffffff !important;
}

.success-message {
    font-size: 1.1rem;
}

.dark-theme .success-message,
html.dark-theme .login-box .success-message,
body.dark-theme .login-box .success-message {
    color: #ffffff !important;
}

/* Animated checkmark container */
.checkmark-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated checkmark SVG */
.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: checkmark-fill 0.4s ease-in-out 0.4s forwards, checkmark-scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: checkmark-circle-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-path {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #fff; /* White to contrast against green background */
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    animation: checkmark-path-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes checkmark-circle-stroke {
    0% {
        stroke-dashoffset: 166;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmark-path-stroke {
    0% {
        stroke-dashoffset: 48;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes checkmark-scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes checkmark-fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #28a745;
    }
}

/* Profile edit page styling */
.profile-edit-box {
    max-width: 500px;
    margin: 0 auto;
}

.profile-edit-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.login-box .section-title {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.login-box .section-title:first-of-type {
    margin-top: 0;
}

.login-box .form-label {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: block;
    font-weight: 500;
}

/* Style all form inputs in login-box to match login page (exclude OTP digit cells) */
.login-box input[type="text"]:not(.otp-digit-box),
.login-box input[type="email"],
.login-box input[type="password"],
.login-box textarea,
.login-box select {
    font-size: 1.25rem;
    padding: 14px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-box input[type="text"]:not(.otp-digit-box):focus,
.login-box input[type="email"]:focus,
.login-box input[type="password"]:focus,
.login-box textarea:focus,
.login-box select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Dark theme for profile edit inputs */
.dark-theme .login-box input[type="text"]:not(.otp-digit-box),
.dark-theme .login-box input[type="email"],
.dark-theme .login-box input[type="password"],
.dark-theme .login-box textarea,
.dark-theme .login-box select {
    background-color: #333 !important;
    color: white !important;
    border-color: #555 !important;
}

.dark-theme .login-box input[type="text"]:not(.otp-digit-box):focus,
.dark-theme .login-box input[type="email"]:focus,
.dark-theme .login-box input[type="password"]:focus,
.dark-theme .login-box textarea:focus,
.dark-theme .login-box select:focus {
    border-color: #ffff00 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 0, 0.25) !important;
}

/* Ensure all input fields have equal width in profile edit */
.profile-edit-box input[type="text"],
.profile-edit-box input[type="email"],
.profile-edit-box input[type="password"],
.profile-edit-box input[type="url"],
.profile-edit-box textarea,
.profile-edit-box select {
    width: 100% !important;
    display: block;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Label displayed above input with spacing */
.profile-edit-box .form-label {
    display: block !important;
    width: 100%;
    margin-bottom: 0.5rem !important;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold !important;
    text-align: left;
}

/* Ensure consistent spacing between input groups in profile edit */
.profile-edit-box .input-group {
    margin-bottom: 2rem !important;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

/* Profile edit buttons - same width */
.profile-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.profile-buttons .login-btn {
    flex: 0 0 auto;
    min-width: 140px;
}

.cancel-btn {
    background-color: #6c757d !important;
}

.cancel-btn:hover {
    background-color: #5a6268 !important;
}

.dark-theme .cancel-btn {
    background-color: #6c757d !important;
}

.dark-theme .cancel-btn:hover {
    background-color: #5a6268 !important;
}

/* Dashboard page font styling to match login page */
.container h4 {
    font-size: 1.8rem;
    font-weight: 600;
}

.container h5 {
    font-size: 1.3rem;
    font-weight: 600;
}

.container h6 {
    font-size: 1.1rem;
    font-weight: 500;
}

.container .card-body,
.container .card-body p,
.container .card-body .text-secondary {
    font-size: 1.1rem;
}

.container .alert {
    font-size: 1.1rem;
    padding: 12px 16px;
}

.container .btn {
    font-size: 1.2rem;
}

.container .list-group-item {
    font-size: 1.1rem;
}

.container .badge {
    font-size: 1rem;
}

.container .text-muted {
    font-size: 1.1rem;
}

.container label {
    font-size: 1.1rem;
}

.container .form-control {
    font-size: 1.25rem;
    padding: 14px;
}

/* Delete button - red version of login-btn - MUST BE AT THE END */
button.login-btn.delete-btn,
button.delete-btn,
.login-btn.delete-btn {
    background-color: #dc3545 !important;
    color: white !important;
    border-color: #dc3545 !important;
}

button.login-btn.delete-btn:hover,
button.delete-btn:hover,
.login-btn.delete-btn:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
    color: white !important;
}

button.login-btn.delete-btn:focus,
button.login-btn.delete-btn:active,
button.delete-btn:focus,
button.delete-btn:active,
.login-btn.delete-btn:focus,
.login-btn.delete-btn:active {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.dark-theme button.login-btn.delete-btn,
.dark-theme button.delete-btn,
.dark-theme .login-btn.delete-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.dark-theme button.login-btn.delete-btn:hover,
.dark-theme button.delete-btn:hover,
.dark-theme .login-btn.delete-btn:hover {
    background-color: #c82333 !important;
    border-color: #c82333 !important;
    color: white !important;
}

/* --- Email OTP login --- */
/* Blended status text (no alert panel) */
.login-box #otp-info.otp-inline-info {
    background: transparent !important;
    border: none !important;
    color: #6c757d;
    padding: 0.35rem 0 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.45;
    border-radius: 0;
}

.dark-theme .login-box #otp-info.otp-inline-info {
    color: #94a3b8;
}

/* Send code / email-password Continue button loading spinner */
.login-box #otp-send-btn,
.login-box #ep-submit-btn,
.login-box #pr-send-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
}

.login-box #otp-send-btn {
    width: 320px !important;
    min-width: 320px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.login-box #otp-send-btn .otp-send-btn-spinner,
.login-box #ep-submit-btn .ep-submit-btn-spinner,
.login-box #pr-send-btn .pr-send-btn-spinner {
    display: none;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid rgba(73, 80, 87, 0.2);
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: otp-send-spin 0.7s linear infinite;
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -0.575rem;
    margin-top: -0.575rem;
}

.login-box #otp-send-btn.is-loading .otp-send-btn-label,
.login-box #ep-submit-btn.is-loading .ep-submit-btn-label,
.login-box #pr-send-btn.is-loading .pr-send-btn-label {
    visibility: hidden;
}

.login-box #otp-send-btn.is-loading .otp-send-btn-spinner,
.login-box #ep-submit-btn.is-loading .ep-submit-btn-spinner,
.login-box #pr-send-btn.is-loading .pr-send-btn-spinner {
    display: block;
}

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

.login-box .otp-inbox-hint {
    text-align: center;
    line-height: 1.4;
}

.login-box .otp-inbox-hint-line {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 500;
    color: #343a40;
}

.dark-theme .login-box .otp-inbox-hint-line {
    color: #e2e8f0;
}

.login-box .otp-inbox-hint-sub {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.dark-theme .login-box .otp-inbox-hint-sub {
    color: #94a3b8;
}

.login-box .register-register-note {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.45;
}

.login-box .otp-trust-row {
    display: flex;
    justify-content: center;
    margin: 0.75rem 0 1rem;
    font-size: 0.92rem;
    color: #495057;
}

.dark-theme .login-box .otp-trust-row {
    color: #e2e8f0;
}

.login-box .otp-checkbox-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.25;
    cursor: pointer;
    margin: 0;
}

.login-box .otp-checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    vertical-align: middle;
}

.login-box .otp-checkbox-text {
    display: inline-block;
    vertical-align: middle;
    padding-top: 0;
}

.dark-theme .login-box .otp-checkbox-label input[type="checkbox"] {
    accent-color: #0d6efd;
}

.login-box .otp-digits-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.login-box .otp-digit-box {
    box-sizing: border-box !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    min-width: 2.5rem !important;
    max-width: 2.5rem !important;
    flex: 0 0 2.5rem !important;
    aspect-ratio: 1;
    text-align: center;
    font-size: 1.2rem !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 2.5rem !important;
    padding: 0 !important;
    border: 2px solid #ced4da !important;
    border-radius: 12px !important;
    flex-shrink: 0;
}

.login-box .otp-digit-box:focus {
    outline: none !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.22) !important;
}

.dark-theme .login-box .otp-digit-box {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #555 !important;
}

.dark-theme .login-box .otp-digit-box:focus {
    border-color: #ffff00 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 0, 0.2) !important;
}

.login-box .otp-code-actions-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    margin-top: 0.25rem;
}

.login-box .otp-code-actions-stack > .button-container {
    width: 100%;
    max-width: 320px;
    margin-bottom: 0;
}

.login-box .otp-code-actions-stack .otp-code-primary-btn,
.login-box .otp-code-actions-stack .otp-code-secondary-btn,
.login-box .otp-code-actions-stack .otp-code-resend-btn,
.login-box .otp-code-actions-stack .otp-code-google-btn {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

.login-box .dashboard-btn.btn-secondary-outline {
    background: transparent !important;
    border: 1px solid #6c757d !important;
    color: #495057 !important;
}

.dark-theme .login-box .dashboard-btn.btn-secondary-outline {
    color: #e2e8f0 !important;
    border-color: #8899aa !important;
}

.login-box .otp-email-google {
    margin-top: 0.5rem;
    margin-bottom: 20px;
}

.login-box .ep-back-nav {
    margin-top: -0.25rem;
    margin-bottom: 1rem;
}

.login-box .ep-back-btn {
    width: auto !important;
    min-width: 120px;
    padding-left: 1rem;
    padding-right: 1.25rem;
    text-decoration: none !important;
}

.login-box .ep-back-btn .auth-btn-icon {
    width: 16px;
    height: 16px;
}

.dark-theme .login-box .ep-back-btn .auth-btn-icon {
    filter: brightness(0) invert(1);
}

/* Email + password login page — wider box, uniform buttons */
.login-box.ep-login-box {
    max-width: 640px;
}

.login-box.ep-login-box .auth-login-intro {
    max-width: 100%;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .login-box.ep-login-box .auth-login-intro {
        white-space: normal;
    }
}

.login-box.ep-login-box .button-container .login-submit-btn,
.login-box.ep-login-box #ep-submit-btn,
.login-box.ep-login-box .ep-forgot-password-btn,
.login-box.ep-login-box .otp-code-actions-stack > .button-container {
    width: 380px !important;
    max-width: 100%;
}

.login-box.ep-login-box #ep-submit-btn {
    min-width: 380px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.login-box.ep-login-box .ep-forgot-password-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 380px;
    white-space: nowrap;
    font-size: 0.95rem;
    text-decoration: none !important;
    color: #495057 !important;
    box-sizing: border-box;
}

.login-box.ep-login-box .ep-forgot-password-btn:hover {
    text-decoration: none !important;
    color: #212529 !important;
}

.dark-theme .login-box.ep-login-box .ep-forgot-password-btn {
    color: #e2e8f0 !important;
}

.dark-theme .login-box.ep-login-box .ep-forgot-password-btn:hover {
    color: #ffffff !important;
}

.dark-theme .login-box.ep-login-box .ep-forgot-password-btn .auth-btn-icon {
    filter: brightness(0) invert(1);
}

.login-box.ep-login-box .otp-code-actions-stack > .button-container {
    max-width: 380px;
}

.login-box .otp-email-google .dashboard-btn.google-auth-btn,
.login-box .otp-email-google .dashboard-btn.email-password-auth-btn {
    width: 320px !important;
}

/* Display name modal (post-OTP signup) */
.otp-name-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.otp-name-modal-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dark-theme .otp-name-modal-card {
    background: #222;
    color: #fff;
}

.otp-name-modal-title {
    font-size: 1.35rem;
    margin: 0 0 0.5rem;
}

.otp-name-modal-buttons .dashboard-btn {
    width: auto;
    min-width: 140px;
}

