/* Polish layer for the shared authentication shell (login, registration, password reset,
   imprint). Loaded after style.css.php so it can quiet the base defaults without touching
   opcodeCMS logic. Admin pages (main.admin) keep their own presentation. */

:root {
    --auth-ink: #1b2721;
    --auth-muted: #5f6d65;
    --auth-paper: #faf8f1;
    --auth-canvas: #f1efe5;
    --auth-white: #fffdf7;
    --auth-rule: #ded9c9;
    --auth-sage: #4b6c5c;
    --auth-sage-dark: #33513f;
    --auth-deep: #152019;
    --auth-rose: #c0747c;
    --auth-font-display: "Sentient", Georgia, "Times New Roman", serif;
}

body {
    color: var(--auth-ink);
    background: var(--auth-paper);
    font-family:
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        sans-serif;
}

/* Brand */
.meridian-auth-brand span,
.meridian-auth-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--auth-ink);
    font-family: var(--auth-font-display);
    font-size: 1.65rem;
    font-weight: 560;
    letter-spacing: -0.025em;
    line-height: 1;
}

.meridian-auth-brand img,
.meridian-auth-wordmark img {
    width: 1.35em;
    height: 1.35em;
}

.meridian-auth-wordmark {
    display: inline-block;
    margin-bottom: 1rem;
}

.meridian-auth-brand {
    text-decoration: none;
}

.meridian-auth-brand span i,
.meridian-auth-wordmark i {
    font-style: normal;
    color: var(--auth-rose);
}

/* Header shell */
header.frame {
    border-bottom: 1px solid var(--auth-rule);
    background: var(--auth-paper);
}

header.frame .navbar {
    background: transparent;
}

header.frame .nav-link {
    color: var(--auth-ink) !important;
    font-weight: 560;
}

header.frame .nav-link:hover {
    color: var(--auth-sage) !important;
}

header.frame .navbar-toggler {
    color: var(--auth-ink);
}

/* Content pages (never the admin shell) */
main.container:not(.admin) {
    max-width: 640px;
    padding-bottom: 3rem;
}

main.container:not(.admin) h2 {
    margin-bottom: 0.8rem;
    color: var(--auth-ink);
    font-family: var(--auth-font-display);
    font-size: 2.2rem;
    font-weight: 460;
    letter-spacing: -0.02em;
}

.meridian-auth-page main.container:not(.admin) {
    width: 100%;
    max-width: none;
    margin-block: 0 !important;
    padding: clamp(1.5rem, 6vw, 4.5rem) 1rem;
    background: var(--auth-canvas);
}

.meridian-auth-panel {
    width: min(100%, 36rem);
    margin-inline: auto;
    padding: clamp(1.5rem, 5vw, 2.75rem);
    border: 1px solid var(--auth-rule);
    border-radius: 14px;
    background: var(--auth-paper);
}

.meridian-auth-panel h1 {
    margin: 0 0 0.7rem;
    color: var(--auth-ink);
    font-family: var(--auth-font-display);
    font-size: clamp(2.15rem, 8vw, 3rem);
    font-weight: 460;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.meridian-auth-lede {
    max-width: 46ch;
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.55;
}

.meridian-auth-page footer.frame > .container {
    display: none;
}

.meridian-auth-page .meridian-auth-colophon {
    padding-block: 1.1rem !important;
}

main.container:not(.admin) a {
    color: var(--auth-sage-dark);
}

header.frame a:focus-visible {
    outline: 3px solid rgba(75, 108, 92, 0.4);
    outline-offset: 2px;
}

.meridian-auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-rule);
    background: transparent;
    font-size: 0.92rem;
}

.meridian-auth-switch {
    margin: 1.75rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-rule);
    color: var(--auth-muted);
    font-size: 0.92rem;
}

.meridian-auth-register > h2 {
    display: none;
}

/* Functional, mobile-safe fallback when Vue finds captcha or another field it does not own. */
#meridian-auth-app:not([data-v-app]) form {
    margin-top: 1.5rem;
}

#meridian-auth-app:not([data-v-app]) table,
#meridian-auth-app:not([data-v-app]) tbody,
#meridian-auth-app:not([data-v-app]) tr,
#meridian-auth-app:not([data-v-app]) td {
    display: block;
    width: 100%;
}

#meridian-auth-app:not([data-v-app]) tr {
    margin-bottom: 1rem;
}

#meridian-auth-app:not([data-v-app]) td {
    padding: 0.25rem 0 !important;
}

#meridian-auth-app:not([data-v-app]) input[type="email"],
#meridian-auth-app:not([data-v-app]) input[type="password"],
#meridian-auth-app:not([data-v-app]) input[type="text"] {
    width: 100% !important;
    max-width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--auth-rule) !important;
    border-radius: 9px;
    color: var(--auth-ink);
    background: var(--auth-white);
    font: inherit;
}

#meridian-auth-app:not([data-v-app]) input.dynform_button {
    min-height: 44px;
    padding: 0.65rem 1.3rem;
    margin: 0.5rem 0.5rem 0 0;
    border: 1px solid var(--auth-sage-dark);
    border-radius: 9px;
    color: var(--auth-white);
    background: var(--auth-sage-dark);
    font: inherit;
    font-weight: 620;
    cursor: pointer;
}

#meridian-auth-app:not([data-v-app]) input.dynform_button[type="reset"] {
    border-color: var(--auth-rule);
    color: var(--auth-muted);
    background: transparent;
}

#meridian-auth-app:not([data-v-app]) .dynform_captcha img {
    display: block;
    max-width: 100%;
    margin-bottom: 0.45rem;
}

#meridian-auth-app:not([data-v-app]) .dynform_captcha sup,
#meridian-auth-app:not([data-v-app]) table.dynform_footnotes tr > td:first-child {
    display: none;
}

.meridian-auth-panel .warning,
.meridian-auth-panel .dynform_error,
.meridian-auth-error {
    display: block;
    margin: 1.25rem 0;
    padding: 0.8rem 1rem;
    border-left: 3px solid var(--auth-rose);
    color: var(--auth-ink);
    background: var(--auth-white);
}

.meridian-auth-page .cookie-banner {
    width: min(100%, 30rem) !important;
    padding: clamp(1.4rem, 5vw, 2rem) !important;
    border: 1px solid var(--auth-rule);
    border-radius: 14px !important;
    color: var(--auth-ink);
    background: var(--auth-paper) !important;
    box-shadow: 0 12px 32px rgba(21, 32, 25, 0.16) !important;
    font-family: inherit !important;
}

.meridian-auth-page .cookie-banner-overlay {
    padding: 1rem !important;
    background: rgba(21, 32, 25, 0.48) !important;
}

main.container:not(.admin) .colored {
    color: var(--auth-sage-dark);
    font-family: var(--auth-font-display);
    font-size: 1.6rem;
    font-weight: 480;
}

main.container:not(.admin) select {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--auth-rule);
    border-radius: 8px;
    color: var(--auth-ink);
    background: var(--auth-white);
    font: inherit;
    font-size: 0.92rem;
}

.cookie-banner button.accept:hover {
    border-color: var(--auth-deep);
    background: var(--auth-deep);
}

@media (max-width: 519px) {
    .meridian-auth-panel {
        border-inline: 0;
        border-radius: 0;
    }

    .meridian-auth-page main.container:not(.admin) {
        padding-inline: 0;
    }

    .meridian-auth-links {
        flex-direction: column;
    }
}

.cookie-banner button.accept {
    display: inline-flex;
    min-height: 44px;
    padding: 0.65rem 1.3rem;
    margin-top: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--auth-sage-dark);
    border-radius: 9px;
    color: var(--auth-white);
    background: var(--auth-sage-dark);
    font-size: 0.95rem;
    font-weight: 620;
    cursor: pointer;
}

main.container:not(.admin) .line {
    height: 0;
    margin: 1.6rem 0 1rem;
    border-top: 1px solid var(--auth-rule);
    overflow: hidden;
}

/* Footer shell */
footer.frame {
    border-top: 1px solid var(--auth-rule);
    color: var(--auth-ink);
    background: var(--auth-canvas);
}

footer.frame .colored {
    color: var(--auth-muted);
}

footer.frame a.text-dark {
    color: var(--auth-sage-dark) !important;
    text-decoration: none;
}

footer.frame a.text-dark:hover {
    color: var(--auth-ink) !important;
}

.meridian-auth-locale {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    width: min(100%, 36rem);
    margin: 0 auto 0.75rem;
    padding-inline: 1rem;
    box-sizing: border-box;
    color: var(--auth-muted);
    font-size: 0.9rem;
}

.meridian-auth-consent {
    margin-block: 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-rule);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

main.container:not(.admin) .meridian-auth-consent h2 {
    margin: 0 0 1rem;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 650;
    line-height: 1.35;
}

.meridian-auth-consent-notice p {
    margin: 0 0 1rem;
}

.meridian-auth-consent-choice,
#meridian-auth-app:not([data-v-app]) .meridian-auth-consent table.dynform_checkbox tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
    cursor: pointer;
}

.meridian-auth-consent input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.2rem 0 0;
    accent-color: var(--auth-sage-dark);
    cursor: pointer;
}

.meridian-auth-consent input:focus-visible,
.meridian-auth-locale select:focus-visible {
    outline: 3px solid var(--auth-sage);
    outline-offset: 3px;
}

.meridian-auth-form button:disabled,
#meridian-auth-app input.dynform_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.meridian-auth-colophon {
    color: #a9b7ab;
    background: var(--auth-deep);
    font-size: 0.82rem;
}
