/* Shared auth pages (login, signup) — app primary palette */
body:has(main.auth-page-main) {
    --auth-primary: #1a56db;
    --auth-primary-dark: #1648c4;
    --auth-primary-hover: #1648c4;
    --auth-primary-rgb: 26, 86, 219;
}

body:has(main.auth-page-main) > nav.navbar.bg-primary {
    background: #1a56db !important;
}

main.auth-page-main {
    display: flex;
    flex-direction: column;
    background: #eef3ff;
    min-height: calc(100vh - 56px);
}

.auth-page-layout {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 56px);
    padding: 2.5rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5eaf5;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(31, 64, 120, 0.1);
    padding: 2rem 1.75rem;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card-header h3 {
    margin-bottom: 0.35rem;
    color: var(--auth-primary);
}

.auth-card-header h3 .bi {
    color: var(--auth-primary);
}

.auth-card-header .text-muted {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.auth-field-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .form-control {
    min-height: 2.75rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
    border: 1px solid #dde5f4;
    border-radius: 0.65rem;
    font-size: 0.95rem;
    color: #111827;
    text-align: left;
}

.auth-input-wrap .form-control::placeholder {
    text-align: left;
    color: #9ca3af;
    opacity: 1;
}

.auth-input-wrap .form-control::-webkit-input-placeholder {
    text-align: left;
}

.auth-input-wrap .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--auth-primary-rgb), 0.15);
}

.auth-input-wrap--password .form-control {
    padding-right: 2.75rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9ca3af;
    border-radius: 0.35rem;
    cursor: pointer;
    z-index: 2;
}

.auth-password-toggle:hover {
    color: #6b7280;
    background: #f3f4f6;
}

.btn.btn-primary.auth-submit-btn {
    min-height: 2.75rem;
    border-radius: 0.65rem;
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.btn.btn-primary.auth-submit-btn:hover,
.btn.btn-primary.auth-submit-btn:focus-visible {
    background: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
}

.auth-terms-text {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #9ca3af;
}

.auth-terms-text a {
    color: var(--auth-primary);
    font-weight: 500;
    text-decoration: none;
}

.auth-terms-text a:hover {
    text-decoration: underline;
}

.auth-alt-link-text {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0;
}

.auth-alt-link-text a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

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