/* ===========================
   Divelog auth forms
   Dark slate / translucent glass theme
   Used by: Login, Register, ForgotPassword,
            ResetPassword, LoginWith2fa, LoginWithRecoveryCode,
            ForgotPasswordConfirmation, ResetPasswordConfirmation,
            CheckEmail, ConfirmEmail, Lockout, AccessDenied
   =========================== */

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background-color: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    box-shadow: 0 22px 56px rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
}
.auth-card-wide {
    max-width: 720px;
}
.auth-card-body {
    padding: 2rem 2rem 1.75rem;
}

.auth-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}
.auth-hero-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.7), rgba(51, 65, 85, 0.4));
    color: #e2e8f0;
    font-size: 1.55rem;
    margin-bottom: 0.85rem;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.22), 0 6px 18px rgba(2, 6, 23, 0.35);
}
.auth-hero h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.3rem;
    color: #f1f5f9;
}
.auth-hero p {
    font-size: 0.92rem;
    color: rgba(203, 213, 225, 0.72);
    margin: 0;
}

.auth-form label.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(226, 232, 240, 0.88);
    margin-bottom: 0.3rem;
}

.auth-input-group {
    position: relative;
}
.auth-input-group > .bi {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(148, 163, 184, 0.6);
    font-size: 1rem;
    pointer-events: none;
}
.auth-input-group .form-control,
.auth-input-group .form-select {
    padding-left: 2.5rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    background-color: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #f1f5f9;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.auth-input-group .form-control::placeholder {
    color: rgba(148, 163, 184, 0.45);
}
.auth-input-group .form-control:focus,
.auth-input-group .form-select:focus {
    background-color: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.3);
    color: #f8fafc;
}

.auth-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.auth-remember .form-check {
    padding-left: 1.6rem;
    margin: 0;
}
.auth-remember .form-check-label {
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.88rem;
}

.auth-form .form-check-input {
    border-color: rgba(148, 163, 184, 0.4);
    background-color: rgba(15, 23, 42, 0.55);
}
.auth-form .form-check-input:checked {
    background-color: #475569;
    border-color: #64748b;
}
.auth-form .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.3);
    border-color: rgba(148, 163, 184, 0.55);
}

.auth-link {
    font-size: 0.88rem;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
}
.auth-link:hover,
.auth-link:focus {
    color: #f1f5f9;
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.9) 0%, rgba(30, 41, 59, 0.9) 100%);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #f1f5f9;
    border-radius: var(--ui-btn-radius, 0.5rem);
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.auth-submit:hover,
.auth-submit:focus {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    border-color: rgba(148, 163, 184, 0.55);
    color: #f8fafc;
    box-shadow: 0 6px 22px rgba(2, 6, 23, 0.45);
}
.auth-submit:disabled {
    opacity: 0.55;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(148, 163, 184, 0.55);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1.1rem 0 0.75rem;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.18);
}

.auth-secondary {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(203, 213, 225, 0.75);
    margin: 0;
}
.auth-secondary a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}
.auth-secondary a:hover {
    color: #f1f5f9;
    text-decoration: underline;
}

.auth-status {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    background-color: rgba(51, 65, 85, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}
.auth-status .bi {
    color: #cbd5e1;
    font-size: 1rem;
    margin-top: 0.1rem;
}

.auth-errors {
    background-color: rgba(248, 113, 113, 0.10);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fecaca;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    font-size: 0.88rem;
}
.auth-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}
.auth-errors p {
    margin: 0;
}
.auth-field-error {
    display: block;
    font-size: 0.82rem;
    color: #fca5a5;
    margin-top: 0.3rem;
}

.auth-resend {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.auth-resend p {
    color: rgba(203, 213, 225, 0.7);
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(203, 213, 225, 0.72);
    text-decoration: none;
    font-size: 0.88rem;
}
.auth-back-link:hover,
.auth-back-link:focus {
    color: #f1f5f9;
    text-decoration: underline;
}

.auth-help-text {
    color: rgba(203, 213, 225, 0.65);
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

.auth-recovery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92rem;
    color: #e2e8f0;
    letter-spacing: 0.05em;
}

/* Plain-input fallback (used in Register for short lookup fields) */
.auth-plain-input.form-control {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    background-color: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #f1f5f9;
}
.auth-plain-input.form-control:focus {
    background-color: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.5);
    box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.3);
    color: #f8fafc;
}

/* Shell background — deep slate with subtle radial highlights */
.auth-shell {
    background:
        radial-gradient(80% 80% at 10% 0%, rgba(51, 65, 85, 0.38) 0%, transparent 60%),
        radial-gradient(80% 80% at 100% 100%, rgba(30, 41, 59, 0.45) 0%, transparent 55%),
        #0b1220 !important;
}

/* ===========================
   Legal / content pages
   (About, Contact, Help, Privacy, Terms)
   These pages use the auth-shell layout when the user is logged out,
   so we re-theme the Bootstrap cards to match the glass aesthetic.
   =========================== */

/* Kill the Bootstrap tertiary background — the shell's gradient shows through */
.auth-shell .dashboard-shell,
.auth-shell .bg-body-tertiary {
    background: transparent !important;
}

/* Glass cards that inherit the auth aesthetic */
.auth-shell .card {
    background-color: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    border-radius: 14px !important;
    box-shadow: 0 22px 56px rgba(2, 6, 23, 0.45) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #e2e8f0;
}

.auth-shell .card h1,
.auth-shell .card h2,
.auth-shell .card h3,
.auth-shell .card h4,
.auth-shell .card h5 {
    color: #f1f5f9;
}

.auth-shell .card p,
.auth-shell .card li,
.auth-shell .card address {
    color: rgba(226, 232, 240, 0.85);
}

.auth-shell .card .text-body-secondary {
    color: rgba(203, 213, 225, 0.72) !important;
}

.auth-shell .card a:not(.btn) {
    color: #cbd5e1;
}
.auth-shell .card a:not(.btn):hover {
    color: #f1f5f9;
}

/* Hero card gets extra visual weight on legal pages */
.auth-shell .dashboard-hero.card h1 {
    letter-spacing: -0.02em;
}

/* Re-theme the "view" buttons (blue in light mode) to slate */
.auth-shell .btn-ui-view {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.9) 0%, rgba(51, 65, 85, 0.9) 100%);
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: #f1f5f9;
}
.auth-shell .btn-ui-view:hover,
.auth-shell .btn-ui-view:focus {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.95) 0%, rgba(71, 85, 105, 0.95) 100%);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f8fafc;
}

.auth-shell .btn-ui-neutral {
    background-color: rgba(30, 41, 59, 0.55);
    border-color: rgba(148, 163, 184, 0.22);
    color: rgba(226, 232, 240, 0.88);
}
.auth-shell .btn-ui-neutral:hover,
.auth-shell .btn-ui-neutral:focus {
    background-color: rgba(51, 65, 85, 0.75);
    border-color: rgba(148, 163, 184, 0.45);
    color: #f1f5f9;
}

/* Accordion on the Help page */
.auth-shell .accordion,
.auth-shell .accordion-item {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.22);
}
.auth-shell .accordion-item {
    border-radius: 10px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.auth-shell .accordion-button {
    background: rgba(30, 41, 59, 0.55);
    color: #f1f5f9;
    font-weight: 600;
    border: none;
    box-shadow: none !important;
}
.auth-shell .accordion-button:not(.collapsed) {
    background: rgba(51, 65, 85, 0.7);
    color: #f8fafc;
}
.auth-shell .accordion-button::after {
    filter: invert(1) brightness(1.5);
}
.auth-shell .accordion-body {
    background: rgba(15, 23, 42, 0.45);
    color: rgba(226, 232, 240, 0.85);
}

/* Wider content container for long-form legal/content pages */
.auth-shell .dashboard-shell > .container {
    max-width: 980px;
}
