/* Shared console refinements, independent of the selected service theme. */
.discovery-tab-intro { padding:18px 20px; margin:16px 0 24px; border-left:4px solid var(--line); background:color-mix(in srgb, var(--paper) 88%, var(--mint)); color:var(--ink); font-size:1rem; line-height:1.6; }
.companion-page .shell-account { background:var(--canvas); color:var(--ink); border-color:var(--line); }
body[data-page-title="External responses"] #create:not(:empty) { margin-bottom:32px; }
#activity-list { list-style:none; padding:0; margin:20px 0 0; }
.activity-filters { display:flex; flex-wrap:wrap; align-items:end; gap:16px; margin:24px 0 12px; }
.activity-filters label { display:grid; gap:8px; flex:1 1 180px; margin:0; }
.activity-filters label:has(input[type="date"]) { flex:0 1 210px; min-width:180px; }
.activity-filters label:has(input[type="search"]) { flex:1 1 320px; min-width:0; }
.activity-filters > button { margin:0; align-self:flex-end; }
.activity-filters input { box-sizing:border-box; width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--portal-line-strong,var(--line)); border-radius:6px; color:var(--ink); background:var(--paper); font:inherit; }
.activity-filters button,.activity-pagination button { min-height:44px; }
.activity-pagination { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:20px; }
.activity-pagination button:disabled { opacity:.5; cursor:default; }
#activity-list > li { display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:12px 28px; padding:12px; border-bottom:1px solid var(--line); align-items:baseline; }
#activity-list > li:nth-child(odd) { background:color-mix(in srgb, var(--paper) 94%, var(--mint-deep)); }
#activity-list .activity-description { overflow-wrap:anywhere; }
#activity-list .activity-description::before { content:"•"; margin-right:12px; }
#activity-list time { color:var(--muted); font-variant-numeric:tabular-nums; text-align:right; }
@media(max-width:640px) { #activity-list > li { grid-template-columns:minmax(0,1fr); gap:4px; } #activity-list time { text-align:left; padding-left:20px; } }
html,body {margin:0;}
body.has-session .site-shell {grid-template-columns:minmax(0,1fr);grid-template-rows:auto 1fr auto;align-content:start;}
body.has-session .brand-header {top:0;margin-top:0;min-width:0;flex-wrap:wrap;}
body.has-session .brand-header .header-end {min-width:0;flex-wrap:wrap;}
.site-shell > [hidden] {display:none!important;}
.subscriber-sidebar .sidebar-brand {height:64px;min-height:64px;border-radius:10px;background:#dddddd;isolation:isolate;padding:6px;}
.subscriber-sidebar .sidebar-brand img {mix-blend-mode:multiply;}
.subscriber-sidebar .sidebar-brand > img:not(.sidebar-brand-mark) {width:100%;height:100%;object-fit:contain;}
.subscriber-sidebar .sidebar-brand span {display:none!important;}
body .sidebar-collapse,body.subscriber-sidebar-collapsed .sidebar-collapse {top:104px;right:10px;}
.subscriber-sidebar .subscriber-nav {margin-top:62px;}
body.subscriber-sidebar-collapsed .subscriber-nav {margin-top:62px;}
body.subscriber-sidebar-collapsed .sidebar-brand {height:56px;min-height:56px;padding:0;}
body.subscriber-sidebar-collapsed .sidebar-brand-mark {width:100%;height:100%;object-fit:contain;}
.subscriber-page-identity :is(h1,h2) {display:flex;align-items:center;gap:10px;}
.console-icon {width:20px;height:20px;min-width:20px;flex:0 0 20px;fill:none!important;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
.subscriber-page-identity .console-icon {color:var(--mint-deep);width:24px;height:24px;}
.account-menu .account-menu-action {display:flex;align-items:center;gap:12px;text-align:left;}
.account-menu .console-icon {color:var(--muted);width:18px;height:18px;flex-basis:18px;min-width:18px;}
.organization-group .workspace-row {grid-template-columns:44px minmax(180px,1.4fr) minmax(150px,.8fr) minmax(145px,.75fr) 155px;}
.organization-group .workspace-row > .button {justify-self:end;}
.account-overlay {box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-height:calc(100dvh - 48px);padding:30px;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 20px 80px #0005;}
.account-overlay::backdrop {background:#0007;backdrop-filter:blur(3px);}
.account-frame-dialog {padding:46px 0 0;overflow:hidden;}
.account-frame-dialog iframe {display:block;border:0;width:100%;height:min(480px,calc(100dvh - 100px));background:var(--paper);}
.account-overlay-close {position:absolute;right:12px;top:10px;width:32px;height:32px;padding:0;display:grid;place-items:center;background:transparent;color:var(--ink);font-size:26px;border:1px solid var(--line);border-radius:8px;cursor:pointer;}
.account-embedded .subscriber-sidebar,.account-embedded .brand-header,.account-embedded .shell-footer,.account-embedded .account-sections,.account-embedded main > h1 {display:none!important;}
.account-embedded body.has-session .site-shell {padding:0;display:block;min-height:0;background:var(--paper);}
.account-embedded .companion-main {padding:12px 24px;}
.account-embedded,.account-embedded body {background:var(--paper);}
.account-embedded .companion-main .panel {padding:0;border:0;box-shadow:none;}
.account-sections a[aria-current=page] {font-weight:800;text-decoration-thickness:3px;}
.idle-locked body > :not(.idle-lock) {visibility:hidden!important;}
.idle-lock {position:fixed;inset:0;display:grid;place-content:center;background:var(--paper);color:var(--ink);z-index:9999;padding:24px;}
@media(max-width:900px){.organization-group .workspace-row{grid-template-columns:44px minmax(0,1fr);}.organization-group .workspace-row > .workspace-meta,.organization-group .workspace-row > .button{grid-column:2;justify-self:start;}}
@media(max-width:1400px){body.has-session .subscriber-utility-nav{display:none;}}

/* Palette themes retain Light as the untouched default. */
html[data-theme=violet],html[data-theme=violet] body.has-session {
 --ink:#240046;--muted:#5a189a;--line:#d8b6ed;--paper:#fdfaff;--canvas:#f5eaff;
 --mint:#9d4edd;--mint-deep:#5a189a;--mint-soft:#ebc9ff;--night:#10002b;
 --portal-control-fill:#7b2cbf;--portal-control-fill-hover:#5a189a;--portal-surface-2:#ebc9ff;--portal-line-strong:#b782d1;--portal-hover:#ebc9ff;--focus:#5a189a;
}
html[data-theme=amber],html[data-theme=amber] body.has-session {
 --ink:#3d2108;--muted:#795019;--line:#e7c58d;--paper:#fffdf7;--canvas:#ffedc1;
 --mint:#ff9b1e;--mint-deep:#914500;--mint-soft:#ffcd7a;--night:#35200c;
 --portal-control-fill:#a94700;--portal-control-fill-hover:#803500;--portal-surface-2:#ffe1a7;--portal-line-strong:#bb8745;--portal-hover:#ffe1a7;--focus:#914500;
}
html[data-theme=aqua],html[data-theme=aqua] body.has-session {
 --ink:#073c37;--muted:#30635d;--line:#8acfc4;--paper:#f7fffd;--canvas:#d0fff9;
 --mint:#12ffe3;--mint-deep:#006c60;--mint-soft:#a0fff4;--night:#07312c;
 --portal-control-fill:#006c60;--portal-control-fill-hover:#005449;--portal-surface-2:#b9fbf1;--portal-line-strong:#589f94;--portal-hover:#a0fff4;--focus:#005c51;
}
html:is([data-theme=violet],[data-theme=amber],[data-theme=aqua]) {color-scheme:light;}
html:is([data-theme=violet],[data-theme=amber],[data-theme=aqua]) body.has-session {
 --service-mark-fill:var(--portal-control-fill);--shadow:0 18px 54px #17212512;
}
html:is([data-theme=violet],[data-theme=amber],[data-theme=aqua]) :is(.workspace-safeguard,.isolation-seal,.notice) {background:var(--mint-soft);border-color:var(--line);color:var(--ink);}
/* Reserve space for the ID, dates and state instead of allowing the title to consume it. */
body.has-session .tender-row {grid-template-columns:minmax(170px,.85fr) minmax(240px,2fr) minmax(160px,.8fr) minmax(170px,.85fr) 84px;gap:24px;}
.tender-row > div {min-width:0;}
.tender-reference strong {overflow-wrap:anywhere;line-height:1.55;}
.tender-title strong {overflow-wrap:anywhere;}
.tender-row .status-pill {white-space:normal;line-height:1.4;}
.tender-row > .button {justify-self:end;}
@media(max-width:1350px){body.has-session .tender-row {grid-template-columns:minmax(145px,.8fr) minmax(200px,1.6fr) minmax(145px,.8fr) 84px;gap:18px;}.tender-row .tender-reference{grid-column:1;grid-row:1 / 3;}.tender-row .tender-title{grid-column:2;grid-row:1 / 3;}.tender-row .tender-meta{grid-column:3;grid-row:1;}.tender-row .tender-state{grid-column:3;grid-row:2;}.tender-row > .button{grid-column:4;grid-row:1 / 3;}}
@media(max-width:1000px){body.has-session .tender-row{grid-template-columns:minmax(0,1fr) auto;gap:14px;}.tender-row .tender-reference,.tender-row .tender-title,.tender-row .tender-meta,.tender-row .tender-state{grid-column:1;grid-row:auto;}.tender-row > .button{grid-column:2;grid-row:1 / 5;}}

.account-overlay-close {line-height:1;min-width:32px;min-height:32px;align-items:center;justify-items:center;}
.account-overlay-close svg {display:block;width:18px;height:18px;flex:none;}

body.auth-active .auth-verification-feedback {height:72px;min-height:72px;font-size:1rem;color:var(--mint-deep);}
.auth-verification-feedback > [aria-hidden] {display:grid;place-items:center;}
.auth-verification-feedback img {display:block;width:220px;height:66px;object-fit:contain;}
@media(prefers-reduced-motion:reduce){.auth-processing-dots i{animation:none;opacity:1;}}

/* Keep legal links and copyright on the same content edges as each console. */
body.has-session { --footer-content-width:1580px; --footer-content-gutter:clamp(28px,4vw,54px); }
body.companion-page { --footer-content-width:1500px; --footer-content-gutter:clamp(28px,4vw,54px); }
body.has-session .site-shell > footer,
body.companion-page .site-shell > .shell-footer {
  padding-inline:calc(max(0px, (100% - var(--footer-content-width)) / 2) + var(--footer-content-gutter));
}
@media(max-width:760px) {
  body.has-session,body.companion-page { --footer-content-gutter:18px; }
}

.account-role-context {display:block;margin-top:6px;white-space:normal;line-height:1.45;color:var(--mint-deep)!important;}
#new-tender[hidden],#sidebar-new-tender[hidden]{display:none!important;}

.subscriber-nav-item[hidden],[data-basket-controls][hidden]{display:none!important;}

/* Case facts need the full sidebar width for long references and names. */
body.has-session .case-facts > div {grid-template-columns:minmax(0,1fr);gap:6px;}
body.has-session .case-facts dt {font-size:.75rem;letter-spacing:.08em;line-height:1.4;}
body.has-session .case-facts dd {min-width:0;line-height:1.5;overflow-wrap:anywhere;}
body.has-session .case-documents li > strong:only-child {grid-column:1 / -1;font-size:.85rem;font-weight:400;line-height:1.5;overflow-wrap:normal;}

#setup-form .button-primary {background:var(--portal-control-fill);color:#fff;border:1px solid transparent;border-radius:5px;padding:11px 16px;font:inherit;font-weight:700;line-height:1.4;text-decoration:none;}
#setup-form .button-primary:hover {background:var(--portal-control-fill-hover);color:#fff;text-decoration:none;}
.setup-form input[type=checkbox] {width:18px;height:18px;display:inline-block;vertical-align:middle;accent-color:var(--mint-deep);}

/* Keep each access action visibly attached to the named member. */
.access-request-count {position:absolute;top:0;right:0;min-width:17px;padding:1px 4px;border-radius:12px;background:var(--mint-deep);color:#fff;font:700 11px/1.4 Arial,sans-serif;}
.access-request-count[hidden] {display:none;}
.notification-panel {max-height:70vh;overflow:auto;max-width:calc(100vw - 32px);}
.access-request-notice {display:flex;flex-direction:column;gap:6px;padding:14px 0;border-bottom:1px solid var(--line);color:var(--ink);overflow-wrap:anywhere;text-decoration:none;}
.access-request-notice span:last-child {color:var(--mint-deep);text-decoration:underline;}
.service-link-action {display:block;margin:12px 0;}
.service-link-action > small {display:block;margin-top:8px;}
body[data-page-title="Organization services"] .team-access-confirmation {display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;}
body[data-page-title="Organization services"] .team-access-confirmation input[type="checkbox"] {position:static;align-self:start;transform:none;appearance:auto;padding:0;margin:2px 0 0;min-height:18px;}
body[data-page-title="Organization services"] .team-access-confirmation span {display:block;line-height:1.5;}
body[data-page-title="Organization services"] .service-actions > .service-link-action {display:contents;}
body[data-page-title="Organization services"] .service-actions .service-link-action > a.button {display:inline-flex;align-items:center;justify-content:center;min-height:48px;box-sizing:border-box;margin:0;padding:11px 16px;font:inherit;font-weight:700;line-height:1.4;}
body[data-page-title="Organization services"] .team-member-card {display:block;border:1px solid var(--line);border-radius:6px;padding:16px;margin:16px 0;min-width:0;overflow-wrap:anywhere;}
body[data-page-title="Organization services"] .team-member-card h4 {margin:0 0 6px;}
body[data-page-title="Organization services"] .team-member-card p {margin:6px 0 12px;}
body[data-page-title="Organization services"] .team-access-confirmation {display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;gap:10px;margin:16px 0;line-height:1.5;}
body[data-page-title="Organization services"] .team-access-confirmation input {width:18px;height:18px;flex:0 0 18px;margin:3px 0 0;}
body[data-page-title="Organization services"] .service-actions {display:flex;flex-wrap:wrap;align-items:stretch;gap:8px;margin:20px 0 0;}
body[data-page-title="Organization services"] .service-actions:empty {display:none;}
body[data-page-title="Organization services"] .service-actions > :is(a.button,button) {display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:48px;margin:0;padding:11px 16px;border:1px solid transparent;border-radius:5px;font:inherit;font-weight:700;line-height:1.4;text-align:center;text-decoration:none;}

/* Keep failed basket actions distinct from normal status text in every theme. */
.basket-error-message { color: var(--danger, #a22620) !important; font-weight: 700; border-left: 4px solid currentColor; padding: 10px 14px; }

/* Match the Operations pane's logo and toggle in both sidebar states. */
body .subscriber-sidebar > .sidebar-brand { height:56px; min-height:56px; }
body .subscriber-sidebar > button.sidebar-collapse,
body.subscriber-sidebar-collapsed .subscriber-sidebar > button.sidebar-collapse {
  position:relative; top:auto; right:auto; bottom:auto; left:auto;
  align-self:flex-end; margin:18px 0 0;
}

/* Fill the expanded logo backing without an inner inset. */
body:not(.subscriber-sidebar-collapsed) .subscriber-sidebar > .sidebar-brand { padding:0; }

/* Visible pane-toggle feedback across light and dark themes. */
body .subscriber-sidebar > button.sidebar-collapse { transition:background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
body .subscriber-sidebar > button.sidebar-collapse:hover { background:#dddddd; border-color:#b8bec5; color:#263238; box-shadow:0 0 0 3px #d1d5db40; }
body .subscriber-sidebar > button.sidebar-collapse:focus-visible { outline:2px solid var(--aqua); outline-offset:3px; }
@media(prefers-reduced-motion:reduce){body .subscriber-sidebar > button.sidebar-collapse { transition:none; }}

html[data-theme=dark] body .subscriber-sidebar > button.sidebar-collapse:hover { background:#485653; border-color:#7a8985; color:#ffffff; box-shadow:0 0 0 3px #a6b7b426; }

.account-password-reset { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.account-password-reset h3 { margin-top:0; }
#reset-password { width:auto; font-weight:700; }

.subscriber-nav-item:disabled, .subscriber-nav-item:disabled * { cursor:not-allowed; }
.subscriber-nav-item:disabled:hover { background:transparent; box-shadow:none; }

.subscriber-nav-item[aria-disabled="true"], .subscriber-nav-item[aria-disabled="true"] * { cursor:not-allowed; }

dialog .dialog-close, dialog .account-overlay-close { position:absolute; top:10px; right:12px; width:32px; height:32px; padding:0; display:grid; place-items:center; border:1px solid var(--line); border-radius:7px; background:var(--paper); color:var(--ink); }
