/* CGSO public login: layout and spacing follow the BAC login page. */
:root {
    color-scheme: light;
    --cgso-primary: #2563eb;
    --cgso-primary-dark: #1d4ed8;
    --cgso-ink: #102b4e;
    --cgso-page-text: #29445d;
    --cgso-page-link: #1e40af;
    --cgso-page-background: #cceeff;
    --cgso-shell-top-space: clamp(.9375rem, 2.25vw, 1.875rem);
    --cgso-header-space: calc(var(--cgso-shell-top-space) * .66);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--cgso-page-text);
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--cgso-page-background);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.cgso-login-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 1280px);
    min-height: 0;
    flex: 1;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 3rem) var(--cgso-shell-top-space);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--cgso-shell-top-space);
}

.cgso-login-header {
    width: 100%;
    min-height: calc((60px + var(--cgso-header-space) * 2 + 1px) * 1.44);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: var(--cgso-header-space) clamp(1rem, 2vw, 1.75rem);
    border-bottom: 1px solid rgba(37, 99, 235, .2);
    background: var(--cgso-page-background);
}

.cgso-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .9rem;
    margin-inline-start: auto;
}

.cgso-header-link { color: var(--cgso-page-link); font-size: .9rem; font-weight: 600; text-decoration: none; }
.cgso-header-link:hover { color: #1e3a8a; text-decoration: underline; }
.cgso-header-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.cgso-header-signin {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: .55rem 1.25rem;
    border: 1px solid var(--cgso-primary);
    border-radius: 5px;
    background: var(--cgso-primary);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.cgso-header-signin:hover {
    border-color: var(--cgso-page-link);
    background: var(--cgso-primary-dark);
    color: #ffffff;
}

.cgso-header-signin:focus-visible {
    outline: 2px solid var(--cgso-page-link);
    outline-offset: 3px;
}

.cgso-brand {
    min-width: 0;
    align-self: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem;
}

.cgso-brand-logos {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .65rem;
}

.cgso-brand img {
    width: auto;
    height: 60px;
    object-fit: contain;
}

.cgso-brand-name {
    margin: 0;
    color: var(--cgso-ink);
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    font-weight: 800;
    line-height: 1;
}

.cgso-brand-subtitle {
    margin: 0;
    color: var(--cgso-page-text);
    font-size: .86rem;
    line-height: 1;
}

.cgso-login-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.cgso-mandate-column {
    display: grid;
    gap: 2.25rem;
    min-width: 0;
    width: 100%;
}

.cgso-page-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: clamp(18rem, 30vw, 25rem);
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 4rem) 0;
}

.cgso-page-intro::before {
    position: absolute;
    z-index: -1;
    inset: 0 auto 0 50%;
    width: 100vw;
    content: "";
    transform: translateX(-50%);
    background-image:
        linear-gradient(90deg, rgba(235, 247, 255, .98) 0%, rgba(224, 243, 255, .94) 34%, rgba(207, 235, 255, .85) 50%, rgba(56, 166, 255, .35) 68%, rgba(0, 132, 255, .22) 100%),
        var(--cgso-banner-image);
    background-position: center, center right;
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
}

.cgso-page-title {
    width: 50%;
    max-width: 50%;
    margin: 0;
    color: #142c45;
    font-family: Arial, 'Segoe UI', sans-serif;
    font-size: clamp(2.5rem, 4.5vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: .98;
    text-shadow: 0 1px 1px rgba(255, 255, 255, .45);
    text-wrap: balance;
}

.cgso-mandate-lead {
    width: 50%;
    max-width: 50%;
    margin: .9rem 0 0;
    color: #29445d;
    font-size: clamp(1.08rem, 1.6vw, 1.25rem);
    font-weight: 300;
    line-height: 1.66;
    text-shadow: 0 1px 1px rgba(255, 255, 255, .6);
}

.cgso-login-block {
    width: min(100%, 210px);
    margin: 0;
    padding-top: 1rem;
}

.cgso-login-title {
    margin: 0 0 2rem;
    color: var(--cgso-ink);
    font-size: 1.45rem;
    font-weight: 650;
}

.cgso-login-block .form-label { color: var(--cgso-page-text); font-size: .86rem; }

.cgso-login-block .form-control {
    min-height: 42px;
    border-color: rgba(37, 99, 235, .25);
    border-radius: 4px;
    background: rgba(255, 255, 255, .94);
    color: #1f2937;
}

.cgso-login-block .form-control:focus {
    border-color: var(--cgso-primary);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .2);
}

.cgso-login-block .text-end { text-align: left !important; }

.cgso-login-block .btn-primary {
    min-height: 42px;
    color: #fff;
    border-color: var(--cgso-primary);
    background: var(--cgso-primary);
    border-radius: 4px;
}

.cgso-login-block .btn-primary:hover,
.cgso-login-block .btn-primary:focus-visible {
    border-color: var(--cgso-page-link);
    background: var(--cgso-primary-dark);
}

.cgso-login-block .text-end a,
.cgso-login-block .login-form-backlink a {
    color: var(--cgso-page-link);
    text-decoration: none;
}

.cgso-login-block .text-end a:hover,
.cgso-login-block .login-form-backlink a:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

.cgso-login-block a:focus-visible,
.cgso-login-block .btn-primary:focus-visible {
    outline: 2px solid var(--cgso-page-link);
    outline-offset: 3px;
}

.login-message {
    margin-top: .75rem;
    scroll-margin-block: 1rem;
    color: var(--cgso-page-text);
    font-size: .85rem;
    text-align: center;
}

.login-form-message {
    margin-top: 1rem;
    scroll-margin-block: 1rem;
    padding: .65rem .75rem;
    border-radius: 5px;
    font-size: .9rem;
}

.login-form-message--error { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
.login-form-message--notice { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }

.login-form-backlink { margin-top: 2rem; font-size: .88rem; text-align: center; }
.login-form-backlink a { color: var(--cgso-primary-dark); text-decoration: none; }
.login-form-backlink a:hover { text-decoration: underline; }

.cgso-info-divider {
    margin: .25rem 0 .5rem;
    border: 0;
    border-top: 1px solid rgba(37, 99, 235, .2);
    opacity: 1;
}

.cgso-login-news-row {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
    gap: clamp(3rem, 8vw, 6rem);
}

.cgso-login-news-row > * { min-width: 0; }

.cgso-official-section {
    margin-inline-start: calc(210px + clamp(3rem, 8vw, 6rem));
}

.cgso-info-section {
    min-width: 0;
    padding: 1rem 0 1.35rem;
}

.cgso-info-label {
    margin: 0 0 .35rem;
    color: var(--cgso-page-link);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.cgso-info-section h2 {
    margin: 0;
    color: var(--cgso-ink);
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 650;
    line-height: 1.2;
}

.cgso-info-lead {
    margin: .65rem 0 0;
    color: var(--cgso-page-text);
    font-size: .92rem;
    line-height: 1.55;
}

.cgso-news-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: .9rem;
}

@media (max-width: 991.98px) {
    .cgso-news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cgso-news-card {
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 7px;
    background: #ffffff;
    padding: .9rem 1rem;
    box-shadow: 0 7px 18px rgba(30, 64, 175, .06);
    backdrop-filter: blur(6px);
}

.cgso-news-card h3 {
    margin: 0 0 .3rem;
    color: #1e40af;
    font-size: .98rem;
    font-weight: 650;
}

.cgso-news-card p {
    margin: 0;
    color: #475569;
    font-size: .86rem;
    line-height: 1.5;
}





@media (max-width: 767.98px) {
    .cgso-login-shell { justify-content: flex-start; padding-top: 0; padding-bottom: 1.25rem; }
    .cgso-login-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .cgso-news-list { grid-template-columns: minmax(0, 1fr); }
    .cgso-page-intro { min-height: 18rem; }
    .cgso-page-intro::before {
        background-image:
            linear-gradient(90deg, rgba(235, 247, 255, .98) 0%, rgba(207, 235, 255, .92) 100%),
            var(--cgso-banner-mobile-image);
        background-position: center, 72% center;
    }
    .cgso-page-title,
    .cgso-mandate-lead {
        width: 100%;
        max-width: 100%;
    }
    .cgso-page-title { font-size: clamp(2rem, 8vw, 2.5rem); }
    .cgso-login-news-row { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
    .cgso-official-section { margin-inline-start: 0; }
}

.cgso-news-card small { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: .55rem; color: #1d4ed8; font-size: .75rem; font-weight: 650; text-transform: uppercase; }
.cgso-mandate-box { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 4px solid #2563eb; background: #edf4ff; border-radius: 0 7px 7px 0; }
.cgso-mandate-box h3 { margin: 0 0 .45rem; color: #173b66; font-size: 1rem; font-weight: 650; }
.cgso-mandate-box p { margin: 0; color: #475569; font-size: .9rem; line-height: 1.55; }
.cgso-function-accordion { margin-top: 1rem; border: 1px solid #d9e4f3; border-radius: 7px; overflow: hidden; }
.cgso-function-accordion .accordion-item { background: #ffffff; border-color: #d9e4f3; }
.cgso-function-accordion .accordion-button { min-height: 48px; background: #ffffff; color: #173b66; font-size: .95rem; font-weight: 600; box-shadow: none; }
.cgso-function-accordion .accordion-button:not(.collapsed) { background: #edf4ff; color: #1e40af; }
.cgso-function-accordion .accordion-button:focus-visible { outline: 2px solid #2563eb; outline-offset: -3px; }
.cgso-function-accordion .accordion-button i { margin-right: .55rem; color: #2563eb; }
.cgso-function-accordion .accordion-body { color: #475569; font-size: .9rem; line-height: 1.55; }
.cgso-service-commitments { display: grid; gap: .75rem; margin-top: .95rem; }
.cgso-service-commitments span { display: flex; align-items: flex-start; gap: .5rem; color: var(--cgso-page-text); font-size: .86rem; line-height: 1.45; }
.cgso-service-commitments i { color: #15803d; }
.cgso-alert { margin-bottom: 1rem; padding: .7rem .85rem; border-radius: 5px; font-size: .86rem; }
.cgso-alert.success { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.cgso-alert.error { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
