/* Make only the auth page vertically centered */
body.login-page {
    min-height: 100vh;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-wrap {
    width: 100%;
}

.auth-card {
    max-width: 960px;
    margin: 0 auto;
    background-color: var(--bs-card-bg); /* theme-aware surface */
    border: 1px solid var(--bs-border-color); /* theme-aware border */
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--bs-box-shadow-lg); /* theme-aware shadow */
}

.auth-media {
    position: relative;
    background: var(--bs-tertiary-bg);
    display: grid;
    place-items: center; /* perfect centering */
    padding: 1.75rem; /* breathing room around logo */
    min-height: 180px; /* nice mobile height */
}

.auth-media img {
    width: min(82%, 520px);
    height: auto;
    object-fit: contain; /* <— was cover; prevents cropping */
    max-height: 340px; /* guards against giant images */
}

.auth-body {
    padding: 1rem 1rem 1.25rem;
    color: var(--bs-body-color); /* ensure correct text color */
    background: var(--bs-card-bg);
}

@media (min-width: 576px) {
    .auth-body {
        padding: 1.25rem 1.25rem 1.5rem;
    }
}

@media (min-width: 992px) {
    .auth-body {
        padding: 2rem;
    }

    .auth-media {
        min-height: 100%;
    }
}

/* Validation (use Bootstrap defaults; just ensure display behavior) */
.input-group .form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

.invalid-feedback {
    margin-top: .25rem;
    color: var(--bs-danger);
}

/* Buttons + meta */
.btn-submit {
    width: 100%;
}

@media (min-width: 576px) {
    .btn-submit {
        width: auto;
    }
}

.auth-meta {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-top: .75rem;
    color: var(--bs-secondary-color); /* muted, theme-aware */
}

@media (min-width: 576px) {
    .auth-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Default: show dark logo */
.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

/* If dark theme is active */
[data-bs-theme="dark"] .logo-light {
    display: block;
}

[data-bs-theme="dark"] .logo-dark {
    display: none;
}