/* Portal theme: dark navigation with light content, following XOAdmin. */
body, body.appearance-light, body.appearance-dark {
    color-scheme: light;
    --header-height-mobile: 64px;
    --header-height-desktop: 64px;
    --header-bg: #171b21;
    --body-bg: #f3f5f7;
    --body-text: #242c36;
    --h1-page-title: #242c36;
    --logo-fill: #ededed;
    --mobile-menu-bg: #20262d;
    --mobile-menu-text-color: #c5ced8;
    --light-grey: #f4f6f8;
    --light-grey-bg: #e9edf1;
    --light-grey-border: #d8dfe6;
    --input-border: #bac3cd;
    --grey: #bac3cd;
    --body-text-color-subtle: #52606d;
    --text-muted: #52606d;
    --link-color: #23638c;
    --heading-link-color: #242c36;
    --footer-links-bg: #f3f5f7;
    --footer-links-color: #52606d;
    --footer-bottom-bg: #f3f5f7;
    --footer-bottom-text: #52606d;
    --btn-primary-bg: #23638c;
    --btn-primary-text: #fff;
    --main-menu-btn-bg: #2c3743;
    --main-menu-btn-text: #e4e9ef;
    --highlight-color: #e6f3ff;
    --breadcrumbs-bg: #fff;
    --breadcrumbs-text: #23638c;
    --g-login-bg: #e4e9ef;
    --g-login-text: #171b21;
    --fb-login-bg: #23638c;
    --fb-login-text: #fff;
    --btn-fb-icon-fill: #fff;
    background: var(--body-bg);
    color: var(--body-text);
}
#header, #header.header-account { background: #171b21; border-bottom: 1px solid #343e49; height: 64px; box-sizing: border-box; }
#header > .container { padding: 0 22px; }
#header .logo-container { width: 202px; padding: 16px 0; }
#logo-header { display: block; }
#logo-header img { display: block; width: 100%; height: 31px; object-fit: contain; }
#footer { margin-top: auto; border-top: 1px solid #d8dfe6; }
#footer .footer-links { padding: 20px 24px 0; }
#footer .footer-links ul { justify-content: center; gap: 28px; flex-wrap: wrap; }
#footer .footer-links a { font-size: .8rem; }
#footer .footer-links .site-links { padding: 0; }
#footer .footer-bottom { padding: 16px 20px 20px; }
/* also used by the sign-in page, which does not load portal-layout.css */
#wrap { min-height: calc(100dvh - 64px); }
#main-content { min-height: inherit; display: flex; flex-direction: column; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #80c3ed; outline-offset: 3px; }
#login-container { min-height: calc(100dvh - 64px); display: flex; flex-direction: column; }
#login-container > #main-content { flex: 1; }
#login-container .section-login-form { padding: 48px 20px; }
.login-form-container { padding: 28px; background: #e9edf1; color: #242c36; border: 1px solid #cdd5de; box-shadow: 0 12px 32px rgb(0 0 0 / 15%); border-radius: 8px; max-width: 440px; margin: 0 auto; box-sizing: border-box; width: 100%; }
.login-form-container .form-container { width: 100%; max-width: 380px; }
body input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), body select, body textarea,
body .form-section.float-label .form-field input:not([type="checkbox"]):not([type="radio"]) {
    color-scheme: light;
    color: #171b21;
    background-color: #fff;
    border: 1px solid #bac3cd;
    border-radius: 4px;
    caret-color: #171b21;
}
body .form-section.float-label .form-field input.highlight { background-color: #e6f3ff; }
body input::placeholder, body textarea::placeholder { color: #515d6b; opacity: 1; }
@media (max-width: 639px) {
    #login-container .section-login-form { padding: 24px 16px; }
    .login-form-container { padding: 24px 20px; }
}

/* The sign-in card sits on the same charcoal backdrop as XOAdmin login. */
body:has(#login-container) {
    background: #171b21;
    --footer-links-bg: #171b21;
    --footer-bottom-bg: #171b21;
    --footer-links-color: #b9c3cf;
    --footer-bottom-text: #b9c3cf;
}
#login-container { background: radial-gradient(ellipse at top, #252d37 0%, #171b21 75%); }
#login-container #footer { border-top-color: #343e49; }
.login-form-container .recaptcha-disclaimer, .login-form-container .recaptcha-disclaimer a { color: #52606d; }

#btn-cancel-sign-in { background-color: #dce1e6; color: #242c36; }
#btn-cancel-sign-in:hover { background-color: #cdd4dc; }


/* Client portal Home */
#main-content .portal-home h1.page-title {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 1.75rem;
}
.portal-home {
    display: grid;
    gap: 1.25rem;
    max-width: 48rem;
    overflow-wrap: anywhere;
}
.portal-home :is(.portal-maintenance, .portal-current-projects, .portal-attention) h2 {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
    font-weight: 600;
}
.portal-home :is(.portal-maintenance, .portal-current-projects, .portal-attention) :is(ul, .portal-card) {
    margin: 0;
    padding: 0 1.25rem;
    list-style: none;
    border: 1px solid var(--portal-border);
    border-radius: 5px;
    background: var(--portal-card-bg);
}
.portal-home :is(.portal-maintenance, .portal-current-projects, .portal-attention) li {
    padding: .65rem 0;
    color: var(--portal-text-subtle);
}
.portal-home :is(.portal-maintenance, .portal-current-projects, .portal-attention) li + li {
    border-top: 1px solid var(--portal-border);
}
/* New (not yet viewed) sections on Home: compact lists, one section per entity type */
.portal-home .portal-new h2 {
    margin: 0 0 .5rem;
    font-size: 1.1rem;
    font-weight: 600;
}
.portal-new ul {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--portal-border);
    border-radius: 5px;
    background: var(--portal-card-bg);
}
.portal-new li + li { border-top: 1px solid var(--portal-border); }
.portal-new li a {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem 1rem;
    color: inherit;
    text-decoration: none;
}
.portal-new li a:hover { background: color-mix(in srgb, var(--portal-text-subtle) 8%, transparent); }
.portal-new li a:focus-visible { outline: 2px solid var(--link-color); outline-offset: -2px; }
.portal-current-icon { display: inline-block; margin-right: .75rem; color: var(--portal-text-subtle); }
.portal-view-all { margin: .6rem 0 0; font-size: .9rem; }
.portal-view-all a { text-decoration: none; }
.portal-new-media {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    color: var(--portal-text-subtle);
    font-size: 1.1rem;
}
.portal-new-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.portal-new-text { display: grid; flex: 1 1 auto; min-width: 0; }
.portal-new-title { font-weight: 600; }
.portal-new-meta { font-size: .85rem; color: var(--portal-text-subtle); }
.portal-new-go { flex: 0 0 auto; color: var(--portal-text-subtle); }
.portal-caught-up { margin: 0; color: var(--portal-text-subtle); }

.portal-home .portal-home-content {
    padding: 0;
    border: 0;
    background: transparent;
}
.portal-home-content > :first-child { margin-top: 0; }
.portal-home-content > :last-child { margin-bottom: 0; }

.portal-maintenance table { width: 100%; border-collapse: collapse; }
.portal-maintenance th, .portal-maintenance td { padding: .75rem 0; text-align: left; }
.portal-maintenance thead th { font-size: .8rem; color: var(--portal-text-subtle); }
.portal-maintenance thead th { padding-top: 1rem; }
.portal-maintenance tbody tr { border-top: 1px solid var(--portal-border); }
.portal-maintenance td, .portal-maintenance thead th:last-child { text-align: right; color: var(--portal-text-subtle); }
.maintenance-date { position: relative; display: inline-block; }
.maintenance-date:focus-visible { outline: 2px solid var(--link-color); outline-offset: 3px; }
.maintenance-exact {
    display: none;
    position: absolute;
    right: 0;
    bottom: 100%;
    z-index: 1;
    padding: .3rem .6rem;
    white-space: nowrap;
    border-radius: 4px;
    background: var(--body-text);
    color: var(--portal-card-bg);
}
.maintenance-date:is(:hover, :focus) .maintenance-exact, summary:focus-visible .maintenance-exact { display: block; }
@media (max-width: 639px) {
    .portal-maintenance thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    .portal-maintenance tbody tr { display: grid; gap: .25rem; padding: .75rem 0; }
    .portal-maintenance tbody :is(th, td) { padding: 0; text-align: left; }
    .maintenance-exact { right: auto; left: 0; }
}

/* Website and project detail pages (.wdb-website-detail, .portal-detail): heading, back link, panels. Conventions: _docs/updates/2026-11-25-project-detail-page.md */
:is(.wdb-website-detail,.portal-detail) { padding-inline: clamp(16px, 3vw, 32px); overflow-wrap: anywhere; }
:is(.wdb-website-detail,.portal-detail) > .container { padding-inline: 0; }
:is(.wdb-website-detail,.portal-detail) :is(.website-back,.portal-back) { display: inline-block; margin-bottom: 1rem; font-size: .9rem; }
:is(.website-heading,.portal-heading) { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
#main-content :is(.website-heading,.portal-heading) h1.page-title { padding: 0; margin: 0; border: 0; background: transparent; font-size: 1.65rem; }
:is(.wdb-website-detail,.portal-detail) .section-content { display: grid; gap: 1rem; }
:is(.wdb-website-detail,.portal-detail) :is(.website-detail-panel,.portal-panel) {
    background: var(--portal-card-bg);
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: clamp(16px, 2vw, 26px);
    min-width: 0;
}
:is(.wdb-website-detail,.portal-detail) :is(.website-detail-panel,.portal-panel) h2 { font-size: 1.1rem; font-weight: 600; margin: 0 0 .75rem; }
:is(.wdb-website-detail,.portal-detail) :is(.website-detail-panel,.portal-panel) > :last-child { margin-bottom: 0; }
:is(.wdb-website-detail,.portal-detail) :is(.website-domains,.website-projects) { list-style: none; margin: 0; padding: 0; }
:is(.wdb-website-detail,.portal-detail) li + li, :is(.wdb-website-detail,.portal-detail) details + details { border-top: 1px solid var(--portal-border); }
:is(.wdb-website-detail,.portal-detail) :is(.website-domains,.website-projects) li { padding: .45rem 0; }
:is(.wdb-website-detail,.portal-detail) summary { cursor: pointer; padding: .75rem 0; }
:is(.wdb-website-detail,.portal-detail) summary:focus-visible { outline: 2px solid var(--link-color); outline-offset: 2px; }
:is(.wdb-website-detail,.portal-detail) .website-maintenance-report { max-width: 75ch; padding: .5rem 1rem 1rem; line-height: 1.6; }

.website-heading .website-card-logo { width: auto; max-width: min(180px, 100%); max-height: 64px; object-fit: contain; }

/* Project detail: status pill, meta line, action panel, tasks, notes */
.portal-heading-meta { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--portal-text-subtle); }
.portal-detail .portal-panel-action { border-left: 4px solid var(--link-color); }
.portal-detail .portal-approved { display: flex; gap: .5rem; align-items: center; margin: 0; font-size: .9rem; color: var(--portal-text-subtle); }
.portal-panel-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: 1.1rem; }
.portal-panel-head h2 { margin: 0 !important; }
.portal-panel-head .portal-panel-summary { font-size: .85rem; color: var(--portal-text-subtle); }
.portal-rows { list-style: none; margin: 0; padding: 0; }
.portal-rows > li { padding: .75rem 0; }
.portal-rows > li:first-child { padding-top: 0; }
.portal-rows > li:last-child { padding-bottom: 0; }
.portal-row-head { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; justify-content: space-between; }
.portal-row-title { margin: 0; font-size: 1rem; font-weight: 600; }
.portal-row-meta { font-size: .85rem; color: var(--portal-text-subtle); }
.portal-row-body { max-width: 75ch; margin-top: .5rem; line-height: 1.6; }
.portal-row-body > :last-child { margin-bottom: 0; }
.portal-rows details > summary { display: flex; gap: .6rem; align-items: center; list-style: none; cursor: pointer; }
.portal-rows details > summary > .portal-row-head { flex: 1 1 auto; }
.portal-rows details > summary::-webkit-details-marker { display: none; }
.portal-rows details > summary::after { content: "\25BE"; flex: 0 0 auto; color: var(--portal-text-subtle); }
.portal-rows details[open] > summary::after { content: "\25B4"; }
.portal-rows details > summary:focus-visible { outline: 2px solid var(--link-color); outline-offset: 2px; }
.portal-status-done { border-color: var(--portal-status-success-border, #9fcfac); background: var(--portal-status-success-bg, #e6f4ea); color: var(--portal-status-success-text, #1e5631); }
.portal-attachments { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .9rem; }
.portal-attachments li { padding: .15rem 0; }
.portal-note-toggle-row { margin-top: .5rem; }
.project-note-toggle svg { width: 1em; height: 1em; vertical-align: -.125em; fill: currentColor; }

/* Billing page: same card, heading and table treatment as the Home sections */
.portal-billing { max-width: 60rem; overflow-wrap: anywhere; }
.portal-billing h2 { margin: 1.5rem 0 .5rem; font-size: 1.1rem; font-weight: 600; }
.portal-billing h2:first-child { margin-top: 0; }
.portal-billing .portal-card {
    margin: 0;
    padding: 0 1.25rem;
    border: 1px solid var(--portal-border);
    border-radius: 5px;
    background: var(--portal-card-bg);
}
.portal-billing .portal-card .table { width: 100%; margin: 0; border-collapse: collapse; background: transparent; }
.portal-billing .portal-card :is(th, td) { padding: .75rem .75rem .75rem 0; text-align: left; vertical-align: top; border: 0; background: transparent; }
.portal-billing .portal-card :is(th, td):last-child { padding-right: 0; }
.portal-billing .portal-card .text-end { text-align: right; }
.portal-billing .portal-card thead th { padding-top: 1rem; font-size: .8rem; font-weight: 600; color: var(--portal-text-subtle); }
.portal-billing .portal-card tbody tr { border-top: 1px solid var(--portal-border); }
.portal-billing .portal-card tbody td:not(:first-child) { color: var(--portal-text-subtle); }
.portal-billing .portal-card tbody td:first-child { color: inherit; }
.portal-billing .portal-card tfoot :is(th, td) { border-top: 1px solid var(--portal-border); }
.portal-billing .portal-billing-plans td:first-child small, .portal-billing .portal-billing-plans td:first-child .small { color: var(--portal-text-subtle); }
.portal-billing .portal-billing-plans td:nth-child(2) { white-space: nowrap; }
.portal-billing > .text-muted { margin-top: 1rem; }
