/* Les alias de thème conservent les couleurs historiques en mode clair. */
html[data-theme="dark"] {
    --theme-surface: var(--surface);
    --theme-surface-muted: var(--surface-muted);
    --theme-foreground: var(--foreground);
    --theme-foreground-muted: var(--foreground-muted);
    --theme-border: var(--border);
    --theme-danger: #ffb4ab;
    --theme-warning: #f4d58d;
    --theme-link: #9ed5ff;
    --agx-bg: var(--surface-muted);
    --agx-paper: var(--surface);
    --agx-ink: var(--foreground);
    --agx-muted: var(--foreground-muted);
}

html[data-theme="dark"] :is(a, .btn-link):focus-visible,
html[data-theme="dark"] :is(button, input, textarea, select, summary):focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

html[data-theme="dark"] :is(.provider-sidebar, .provider-subpage, .site-header, .provider-mobile-bar) {
    border-color: var(--border);
}

html[data-theme="dark"] .provider-settings-card :is(input, textarea)::placeholder {
    color: var(--foreground-muted);
    opacity: 1;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color:#006bb7;
}

.btn-primary {
    color:#fff;
    background-color:#1b6ec2;
    border-color:#1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline:none;
}

.valid.modified:not([type=checkbox]) {
    outline:1px solid #26b050;
}

.invalid {
    outline:1px solid #e50000;
}

.validation-message {
    color:var(--theme-danger, #e50000);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color:white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color:var(--theme-border, #929292);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* BeforEvent premium aesthetic aligned with Agorabox inspiration */
:root {
    --agx-bg: #ffffff;
    --agx-paper: #ffffff;
    --agx-ink: #1f1914;
    --agx-muted: #6a6157;
    --agx-gold: var(--portal-accent, #2f80ed);
    --agx-green: var(--portal-accent-strong, #1f6fd6);
}

body {
    background:var(--theme-surface, #ffffff);
    color: var(--agx-ink);
}

.agx-shell {
    position: relative;
}

.agx-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.25;
}

.agx-hero-panel {
    border:0;
    border-radius: 2rem;
    background: var(--portal-tint, rgba(212, 234, 255, 0.72));
    box-shadow: none;
}

.agx-card {
    max-width: 24rem;
    border-radius: 1rem;
    overflow: hidden;
    background:var(--theme-surface, #fff);
    border:1px solid rgba(31, 25, 20, 0.08);
    box-shadow: 0 22px 50px rgba(31, 25, 20, 0.18);
}

.agx-card-link {
    display: block;
    text-decoration: none;
    color:inherit;
}

.agx-card-cover {
    position: relative;
    z-index: 1;
    height: 18rem;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 4.5vw));
}

.agx-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(1px);
    transform: scale(1.05);
}

.agx-card-cover-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(140deg, var(--portal-accent-strong, #1f6fd6), var(--portal-accent, #2f80ed));
}

.agx-card-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(31, 25, 20, 0.2), rgba(31, 25, 20, 0.62));
}

.agx-card-title {
    position: absolute;
    bottom: 4.3rem;
    width: 100%;
    text-align: center;
    padding: 0 1rem;
    color:#fff;
}

.agx-stars {
    display: inline-flex;
    gap: 0.15rem;
    margin-top: 0.35rem;
}

.agx-stars svg {
    width: 1.1rem;
    height: 1.1rem;
    color:#f5e7b4;
}

.agx-card-score {
    position: relative;
    z-index: 3;
    margin-top: -2.15rem;
    padding: 0 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agx-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color:var(--theme-foreground-muted, #6b635a);
}

.agx-score-value {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background:#2f9b5f;
    color:#fff;
    font-weight: 700;
}

.agx-card-body {
    padding: 1.25rem 1.35rem 1.5rem;
    text-align: center;
    color: var(--agx-muted);
}

.agx-card-desc {
    min-height: 5.2rem;
    margin-top: 0.45rem;
    line-height: 1.5;
}

.agx-metrics {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.agx-metric-label {
    font-size: 0.65rem;
    color:#b2a79b;
}

.agx-metric-value {
    margin-top: 0.2rem;
    font-size: 0.76rem;
    color: var(--agx-gold);
    font-weight: 700;
}

.agx-card-cta {
    margin-top: 0.95rem;
}

html:has(.computing-loader),
body:has(.computing-loader) {
    overflow: hidden;
}

/* Provider dashboard shell. Kept global because the layout is rendered through PortalShell. */
.provider-dashboard-frame { display:grid; grid-template-columns:256px minmax(0,1fr); gap:30px; min-height:calc(100vh - 150px); }
.provider-sidebar { position:sticky; top:20px; display:flex; flex-direction:column; align-self:start; min-height:calc(100vh - 110px); max-height:calc(100vh - 40px); padding:17px 13px; border:1px solid rgba(31,55,45,.09); border-radius:22px; background:var(--theme-surface, rgba(255,255,255,.94)); box-shadow:0 14px 40px rgba(31,55,45,.065); }
.provider-sidebar-heading { padding:4px 7px 17px; border-bottom:1px solid rgba(31,55,45,.08); }
.provider-sidebar-brand { display:flex; align-items:center; gap:11px; min-width:0; }
.provider-brand-mark { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; border-radius:12px; background:linear-gradient(145deg,var(--portal-accent-strong,#315c4d),#1e3d30); color:#fff; font-family:Georgia,serif; font-size:19px; box-shadow:0 7px 16px rgba(31,67,51,.18); }
.provider-sidebar-brand > span:last-child { display:flex; flex-direction:column; min-width:0; }
.provider-sidebar-brand strong { color:var(--theme-foreground, #243b30); font-size:14px; letter-spacing:-.01em; }
.provider-sidebar-brand small { margin-top:2px; overflow:hidden; color:var(--theme-foreground-muted, #7b8982); font-size:8px; font-weight:800; letter-spacing:.11em; text-overflow:ellipsis; white-space:nowrap; }
.provider-nav { display:grid; gap:5px; padding-top:17px; }
a.provider-nav-link, a.provider-nav-link:link, a.provider-nav-link:visited, button.provider-nav-link { display:flex; align-items:center; gap:12px; width:100%; min-height:45px; padding:10px 12px; border:0; border-radius:12px; background:transparent; color:var(--theme-foreground-muted, #617068); font-size:13px; font-weight:650; text-align:left; text-decoration:none; cursor:pointer; transition:background .15s,color .15s,transform .15s; }
a.provider-nav-link:hover, button.provider-nav-link:hover { background:var(--theme-surface-muted, #f3f7f4); color:var(--theme-foreground, #294a3a); text-decoration:none; }
a.provider-nav-link.active { background:var(--portal-tint,#edf4ef); color:var(--portal-accent-strong,#315c4d); box-shadow:inset 3px 0 0 var(--portal-accent-strong,#315c4d); }
.provider-nav-icon { width:20px; color:currentColor; text-align:center; font-size:15px; }
.provider-sidebar-bottom { display:grid; gap:5px; margin-top:auto; padding-top:17px; border-top:1px solid rgba(31,55,45,.08); }
.provider-sidebar-bottom form { margin:0; }
.provider-logout { cursor:pointer; }
.provider-dashboard-main { min-width:0; padding:0 4px 30px; }
.provider-subpage { width:100%; min-height:calc(100vh - 190px); padding:clamp(24px,4vw,48px); border:1px solid rgba(31,55,45,.09); border-radius:24px; background:var(--theme-surface, rgba(255,255,255,.94)); box-shadow:0 14px 40px rgba(31,55,45,.055); }
.provider-subpage h1 { margin:10px 0 0; color:var(--theme-foreground, #20372c); font-size:clamp(28px,3vw,40px); font-weight:700; letter-spacing:-.03em; }
.provider-eyebrow { margin:0; color:var(--portal-accent-strong,#315c4d); font-size:11px; font-weight:800; letter-spacing:.18em; text-transform:uppercase; }
.provider-back-link { display:inline-flex; align-items:center; gap:8px; color:var(--portal-accent-strong,#315c4d); font-size:13px; font-weight:700; text-decoration:none; }
.provider-subpage-intro { max-width:700px; margin:14px 0 0; color:var(--theme-foreground-muted, #5d6d65); font-size:15px; line-height:1.75; }
.provider-empty-state { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:260px; margin-top:32px; padding:40px 24px; border:1px dashed var(--theme-border, #d5ddd8); border-radius:20px; background:var(--theme-surface-muted, #f5f7f6); text-align:center; }
.provider-empty-icon { display:grid; place-items:center; width:76px; height:76px; margin-bottom:18px; border-radius:22px; background:var(--theme-surface-muted, #e4e9e6); color:var(--theme-foreground-muted, #718078); }
.provider-empty-title { margin:0; color:var(--theme-foreground, #26392f); font-size:18px; font-weight:700; }
.provider-empty-copy { max-width:430px; margin:8px 0 0; color:var(--theme-foreground-muted, #6b7972); font-size:14px; line-height:1.6; }
.provider-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:32px; }
.provider-choice-card { display:flex; align-items:center; gap:18px; min-height:120px; padding:20px 24px; border:1px solid var(--theme-border, #dfe7e2); border-radius:18px; background:var(--theme-surface, #fff); box-shadow:0 8px 24px rgba(31,55,45,.045); }
.provider-choice-card > i { flex:0 0 34px; width:34px; color:var(--portal-accent-strong,#315c4d); text-align:center; }
.provider-choice-card h2 { margin:0; color:var(--theme-foreground, #243b30); font-size:18px; font-weight:700; }
.provider-choice-card p { margin:8px 0 0; color:var(--theme-foreground-muted, #617068); font-size:14px; line-height:1.65; }
.provider-settings-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(300px,.8fr); gap:20px; margin-top:28px; align-items:start; }
.provider-settings-page { container-type:inline-size; }
.provider-settings-side { display:grid; gap:20px; min-width:0; }
@container (max-width:740px) { .provider-settings-grid { grid-template-columns:1fr; } }
.provider-settings-card { min-width:0; padding:clamp(20px,2.5vw,30px); border:1px solid var(--theme-border, #e1e8e3); border-radius:20px; background:var(--theme-surface, #fff); box-shadow:0 10px 30px rgba(31,55,45,.045); }
.provider-settings-card > header { display:flex; align-items:center; gap:15px; margin-bottom:24px; }
.provider-settings-icon { display:grid; place-items:center; width:48px; height:48px; flex:0 0 48px; border-radius:15px; background:var(--theme-surface-muted, #edf4ef); color:var(--portal-accent-strong,#315c4d); font-size:20px; }
.provider-settings-card header h2 { margin:0; color:var(--theme-foreground, #263b30); font-size:21px; font-weight:750; }
.provider-settings-card header p { margin:5px 0 0; color:var(--theme-foreground-muted, #68776f); font-size:13px; line-height:1.55; }
.provider-settings-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.provider-settings-card label { display:grid; gap:7px; color:var(--theme-foreground, #34483d); font-size:13px; font-weight:650; }
.provider-settings-card input:not([type=checkbox]):not([type=radio]),.provider-settings-card textarea { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--theme-border, #d5ded8); border-radius:10px; background:var(--theme-surface, #fff); color:var(--theme-foreground, #26352d); font:inherit; font-weight:450; outline:none; }
.provider-settings-card input:focus,.provider-settings-card textarea:focus { border-color:#537b66; box-shadow:0 0 0 3px rgba(49,92,77,.12); }
.provider-settings-primary { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; margin-top:20px; padding:10px 16px; border:0; border-radius:11px; background:var(--portal-accent-strong,#315c4d); color:#fff; font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.provider-settings-primary:hover:not(:disabled) { background:#244638; }
.provider-settings-primary:disabled { opacity:.55; cursor:wait; }
.provider-settings-card form > .provider-settings-primary { display:flex; width:max-content; max-width:100%; margin-left:auto; }
.provider-settings-actions { display:flex; justify-content:flex-end; }
.provider-email-change .provider-settings-fields { grid-template-columns:minmax(0,1fr); }
.provider-email-change .provider-settings-fields label > span:first-child { white-space:nowrap; }
.provider-settings-message { margin:20px 0 0; padding:13px 16px; border-radius:12px; font-size:14px; }
.provider-settings-message.is-success { background:var(--theme-surface-muted, #eaf4ed); color:var(--theme-foreground, #285a3d); }
.provider-settings-message.is-error { background:var(--theme-surface-muted, #fff0ef); color:var(--theme-danger, #8d2924); }
.provider-email-change { margin-top:24px; padding-top:22px; border-top:1px solid var(--theme-border, #e6ebe7); }
.provider-email-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; margin-top:7px; }
.provider-email-row button { padding:9px 12px; border:1px solid var(--theme-border, #cdd9d1); border-radius:10px; background:var(--theme-surface-muted, #f7faf8); color:var(--theme-foreground, #315c4d); font-size:12px; font-weight:700; cursor:pointer; }
.provider-email-change > p,.provider-settings-hint { margin:9px 0 0; color:var(--theme-foreground-muted, #718078); font-size:12px; line-height:1.55; }
.provider-password-change { margin-top:23px; padding-top:18px; border-top:1px solid var(--theme-border, #e6ebe7); }
.provider-password-change summary { color:var(--theme-foreground, #315c4d); font-size:14px; font-weight:700; cursor:pointer; }
.provider-password-change[open] summary { margin-bottom:16px; }
.provider-password-fields { grid-template-columns:1fr; }
.provider-notification-option { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:19px 0; border-top:1px solid var(--theme-border, #e9eeea); }
.provider-notification-option strong { color:var(--theme-foreground, #2a4034); font-size:14px; }
.provider-notification-option p { margin:6px 0 0; color:var(--theme-foreground-muted, #718078); font-size:12px; line-height:1.55; }
.provider-switch { position:relative; display:block!important; width:46px; height:26px; flex:0 0 46px; }
.provider-switch input { position:absolute; width:1px; height:1px; opacity:0; }
.provider-switch > span[aria-hidden=true] { position:absolute; inset:0; border-radius:20px; background:var(--theme-surface-muted, #cbd5ce); cursor:pointer; transition:background .16s ease; }
.provider-switch > span[aria-hidden=true]::after { position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:var(--theme-surface, #fff); box-shadow:0 1px 4px #0002; content:""; transition:transform .16s ease; }
.provider-switch input:checked + span[aria-hidden=true] { background:#4b795f; }
.provider-switch input:checked + span[aria-hidden=true]::after { transform:translateX(20px); }
.provider-switch input:focus-visible + span[aria-hidden=true] { outline:3px solid rgba(49,92,77,.25); outline-offset:2px; }
.provider-inquiry-list { display:grid; gap:16px; margin-top:28px; }
.provider-inquiry-card { padding:24px; border:1px solid var(--theme-border, #e0e8e2); border-radius:18px; background:var(--theme-surface, #fff); box-shadow:0 8px 26px rgba(31,55,45,.04); }
.provider-inquiry-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.provider-inquiry-heading h2 { margin:6px 0 0; color:var(--theme-foreground, #263b30); font-size:20px; font-weight:750; }
.provider-inquiry-status { padding:6px 10px; border-radius:99px; background:var(--theme-surface-muted, #eaf4ed); color:var(--theme-foreground, #315c4d); font-size:11px; font-weight:750; }
.provider-inquiry-listing { display:inline-flex; align-items:center; gap:8px; margin-top:15px; color:var(--theme-foreground, #315c4d); font-size:13px; font-weight:700; text-decoration:none; }
.provider-inquiry-meta { display:flex; flex-wrap:wrap; gap:9px 18px; margin-top:15px; color:var(--theme-foreground-muted, #66756d); font-size:12px; }
.provider-inquiry-meta span { display:inline-flex; align-items:center; gap:7px; }
.provider-inquiry-meta i { color:var(--theme-foreground-muted, #527763); }
.provider-inquiry-message { margin:17px 0 0; padding:15px; border-radius:12px; background:var(--theme-surface-muted, #f6f8f6); color:var(--theme-foreground, #3f5147); font-size:14px; line-height:1.65; white-space:pre-wrap; }
.provider-inquiry-actions { display:flex; flex-wrap:wrap; gap:10px 18px; margin-top:17px; }
.provider-inquiry-actions a { display:inline-flex; align-items:center; gap:8px; color:var(--theme-foreground, #315c4d); font-size:13px; font-weight:700; text-decoration:none; }
.provider-email-confirm-page { display:grid; place-items:center; min-height:70vh; padding:24px; background:var(--portal-surface,#f7fbff); }
.provider-email-confirm-card { width:min(100%,520px); padding:36px; border:1px solid var(--theme-border, #e0e8e2); border-radius:22px; background:var(--theme-surface, #fff); box-shadow:0 16px 48px rgba(31,55,45,.08); }
.provider-email-confirm-card h1 { margin:16px 0 10px; color:var(--theme-foreground, #253b30); font-size:28px; }
.provider-email-confirm-card p { color:var(--theme-foreground-muted, #65756c); line-height:1.65; }
.provider-email-confirm-card > a { display:inline-block; margin-top:18px; color:var(--theme-foreground, #315c4d); font-weight:700; }
@media (max-width:760px) {
    .provider-subpage { min-height:0; padding:24px 18px; border-radius:18px; }
    .provider-choice-grid { grid-template-columns:1fr; }
    .provider-settings-grid { grid-template-columns:1fr; }
    .provider-settings-fields { grid-template-columns:1fr; }
    .provider-email-row { grid-template-columns:1fr; }
    .provider-inquiry-card { padding:18px; }
}
.provider-mobile-bar,.provider-mobile-nav { display:none; }

/* Keep the editor focused on the form: the desktop sidebar becomes an icon rail. */
.provider-dashboard-frame-compact { grid-template-columns:78px minmax(0,1fr); gap:24px; }
.provider-dashboard-frame-expanded { grid-template-columns:256px minmax(0,1fr); gap:30px; }
.provider-sidebar-toggle { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; border:1px solid var(--theme-border, #dfe7e2); border-radius:10px; background:var(--theme-surface, #fff); color:var(--portal-accent-strong,#315c4d); cursor:pointer; }
.provider-sidebar-brand .provider-role-label { margin-top:3px; color:var(--portal-accent-strong,#315c4d); font-size:10px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.provider-dashboard-frame-compact .provider-sidebar-brand .provider-role-label { display:none; }
.provider-dashboard-frame-compact .provider-sidebar-heading { position:relative; }
.provider-dashboard-frame-compact .provider-sidebar-toggle { margin:10px auto 0; }
.provider-dashboard-frame-compact .provider-sidebar { padding:14px 9px; }
.provider-dashboard-frame-compact .provider-sidebar-heading { padding:3px 0 14px; }
.provider-dashboard-frame-compact .provider-sidebar-brand { justify-content:center; }
.provider-dashboard-frame-compact .provider-sidebar-brand > span:last-child { display:none; }
.provider-dashboard-frame-compact .provider-nav { gap:7px; padding-top:14px; }
.provider-dashboard-frame-compact a.provider-nav-link,
.provider-dashboard-frame-compact button.provider-nav-link { justify-content:center; gap:0; min-height:46px; padding:10px 8px; }
.provider-dashboard-frame-compact .provider-nav-link span { display:none; }
.provider-dashboard-frame-compact .provider-nav-icon { width:auto; font-size:16px; }
.provider-dashboard-frame-compact .provider-sidebar-bottom { padding-top:14px; }
.provider-dashboard-frame-compact .provider-dashboard-main { padding-right:0; }

@media(max-width:900px) {
    .provider-dashboard-frame { display:block; min-height:0; }
    .provider-sidebar { display:none; }
    .provider-dashboard-main { padding:0 0 24px; }
    .provider-mobile-bar { display:flex; align-items:center; justify-content:space-between; min-height:56px; margin-bottom:18px; padding:8px 11px; border:1px solid rgba(31,55,45,.1); border-radius:15px; background:var(--theme-surface, rgba(255,255,255,.96)); box-shadow:0 8px 24px rgba(31,55,45,.05); }
    .provider-mobile-menu,.provider-mobile-home { display:grid; place-items:center; width:38px; height:38px; border:0; border-radius:10px; background:var(--theme-surface-muted, #f2f6f3); color:var(--portal-accent-strong,#315c4d); text-decoration:none; cursor:pointer; }
    .provider-mobile-title { color:var(--theme-foreground, #243c30); font-size:14px; font-weight:700; }
    .provider-mobile-nav { display:grid; gap:4px; margin:-8px 0 18px; padding:10px; border:1px solid rgba(31,55,45,.1); border-radius:15px; background:var(--theme-surface, #fff); box-shadow:0 12px 28px rgba(31,55,45,.07); }
    .provider-mobile-nav a,.provider-mobile-nav a:link,.provider-mobile-nav a:visited { display:flex; align-items:center; gap:12px; padding:12px; border-radius:10px; color:var(--theme-foreground-muted, #52625a); font-weight:650; text-decoration:none; }
    .provider-mobile-nav a:hover { background:var(--theme-surface-muted, #f3f7f4); color:var(--theme-foreground, #294a3a); text-decoration:none; }
    .provider-mobile-nav a.active { background:var(--portal-tint,#edf4ef); color:var(--portal-accent-strong,#315c4d); }
.provider-mobile-nav i { width:18px; text-align:center; }
}

.portal-journey-navigation { display:flex; flex-wrap:wrap; gap:8px; }
.portal-journey-navigation nav { display:flex; flex-wrap:wrap; gap:8px; }
.portal-journey-navigation a,
.portal-journey-navigation a:link,
.portal-journey-navigation a:visited { display:inline-flex; align-items:center; justify-content:center; min-height:38px; padding:8px 16px; border-radius:999px; color:var(--theme-foreground-muted, #52645b); font-size:13px; font-weight:650; line-height:1.2; text-decoration:none; }
.portal-journey-navigation a:hover { color:var(--theme-foreground, #203d30); background:var(--theme-surface, rgba(255,255,255,.8)); text-decoration:none; }
.portal-journey-navigation a[aria-current="page"] { color:#fff; background:var(--portal-accent-strong,#315c4d); }
.listing-rich-description p { margin:0 0 1rem; }
.listing-rich-description p:last-child { margin-bottom:0; }
.listing-rich-description img { max-width:100%; height:auto; border-radius:12px; }
.listing-rich-description a { color:var(--portal-accent-strong,#315c4d); text-decoration:underline; }

/* Main header. Global selectors also style anchors rendered by NavLink. */
.site-header { position:relative; z-index:20; border-bottom:1px solid rgba(31,55,45,.075); background:var(--theme-surface, rgba(255,255,255,.96)); }
.site-header-inner { display:flex; align-items:center; gap:28px; max-width:1280px; min-height:74px; margin:0 auto; padding:0 32px; }
.site-brand,.site-brand:link,.site-brand:visited { display:inline-flex; align-items:center; gap:11px; flex-shrink:0; color:var(--theme-foreground, #1e3329); font-size:20px; font-weight:680; letter-spacing:-.025em; text-decoration:none; }
.site-brand-mark { display:grid; place-items:center; width:38px; height:38px; border-radius:12px; background:linear-gradient(145deg,var(--portal-accent-strong,#315c4d),#1e3d30); color:#fff; font-size:11px; font-weight:800; letter-spacing:.04em; box-shadow:0 7px 16px rgba(31,67,51,.16); }
.provider-header-nav { display:flex; align-items:center; align-self:stretch; gap:5px; margin-left:auto; }
.provider-header-nav a,.provider-header-nav a:link,.provider-header-nav a:visited { position:relative; display:flex; align-items:center; height:100%; padding:0 13px; color:var(--theme-foreground-muted, #617068); font-size:13px; font-weight:650; text-decoration:none; }
.provider-header-nav a:hover { color:var(--theme-foreground, #274b3a); text-decoration:none; }
.provider-header-nav a.active { color:var(--portal-accent-strong,#315c4d); }
.provider-header-nav a.active::after { content:""; position:absolute; right:13px; bottom:0; left:13px; height:3px; border-radius:3px 3px 0 0; background:var(--portal-accent-strong,#315c4d); }
.provider-mobile-menu { display:none; position:relative; margin-left:auto; }
.provider-mobile-menu summary { display:grid; place-items:center; width:40px; height:40px; border-radius:11px; background:var(--theme-surface-muted, #f1f5f2); color:var(--theme-foreground, #315b48); cursor:pointer; list-style:none; }
.provider-mobile-menu summary::-webkit-details-marker { display:none; }
.provider-mobile-menu nav { position:absolute; top:48px; right:0; z-index:30; display:grid; width:220px; padding:9px; border:1px solid var(--theme-border, #dfe6e2); border-radius:14px; background:var(--theme-surface, #fff); box-shadow:0 16px 38px rgba(28,52,41,.14); }
.provider-mobile-menu nav a,.provider-mobile-menu nav a:link,.provider-mobile-menu nav a:visited { padding:11px 12px; border-radius:9px; color:var(--theme-foreground-muted, #53655c); font-size:13px; font-weight:650; text-decoration:none; }
.provider-mobile-menu nav a.active { background:var(--theme-surface-muted, #edf4ef); color:var(--theme-foreground, #315b48); }
.provider-header-actions,.public-header-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.provider-header-actions { margin-left:2px; padding-left:14px; border-left:1px solid var(--theme-border, #e3e8e5); }
.provider-header-actions form { margin:0; }
.settings-link,.settings-link:link,.settings-link:visited,.logout-button { display:inline-flex; align-items:center; justify-content:center; width:40px; min-height:40px; padding:0; border-radius:11px; color:var(--theme-foreground-muted, #52675d); font-size:14px; font-weight:700; text-decoration:none; }
.settings-link.active { background:var(--theme-surface-muted, #eef4f0); color:var(--theme-foreground, #315e49); }
.logout-button { border:1px solid var(--theme-border, #dfe6e2); background:var(--theme-surface, #fff); cursor:pointer; transition:background .15s,color .15s; }
.logout-button:hover,.settings-link:hover { background:var(--theme-surface-muted, #f1f5f2); color:var(--theme-foreground, #294d3c); text-decoration:none; }
.header-primary-action,.header-primary-action:link,.header-primary-action:visited,.header-secondary-action,.header-secondary-action:link,.header-secondary-action:visited { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:10px 17px; border-radius:12px; font-size:13px; font-weight:700; text-decoration:none; }
.header-primary-action,.header-primary-action:link,.header-primary-action:visited { background:var(--portal-accent-strong,#315c4d); color:#fff; }
.header-secondary-action,.header-secondary-action:link,.header-secondary-action:visited { background:var(--portal-tint,#edf4ef); color:var(--theme-foreground, #29473a); }
.provider-welcome-header { padding:30px 32px; background:linear-gradient(135deg,var(--portal-tint,#edf4ef),#fff); border-bottom:1px solid rgba(31,55,45,.07); }
.provider-welcome-header-inner { display:flex; align-items:center; justify-content:space-between; gap:28px; max-width:1280px; margin:0 auto; }
.provider-welcome-eyebrow { margin:0 0 7px; color:var(--portal-accent-strong,#315c4d); font-size:11px; font-weight:800; letter-spacing:.18em; text-transform:uppercase; }
.provider-welcome-header h1 { margin:0; color:var(--theme-foreground, #20372c); font-size:clamp(24px,3vw,34px); font-weight:700; letter-spacing:-.025em; }
.provider-welcome-header p:last-child { margin:9px 0 0; color:var(--theme-foreground-muted, #66766e); font-size:14px; }
.provider-welcome-action,.provider-welcome-action:link,.provider-welcome-action:visited { display:inline-flex; align-items:center; justify-content:center; gap:9px; flex-shrink:0; min-height:44px; padding:10px 17px; border-radius:12px; background:var(--portal-accent-strong,#315c4d); color:#fff; font-size:13px; font-weight:700; text-decoration:none; box-shadow:0 8px 18px rgba(31,67,51,.14); }
@media(max-width:850px) {
    .site-header-inner { min-height:66px; padding:0 20px; }
    .provider-header-nav { display:none; }
    .provider-mobile-menu { display:block; }
    .provider-header-actions { margin-left:0; padding-left:0; border-left:0; }
    .provider-welcome-header { padding:24px 20px; }
    .provider-welcome-header-inner { align-items:flex-start; flex-direction:column; gap:18px; }
}
@media(max-width:520px) {
    .site-brand { font-size:17px; }
    .site-brand-mark { width:35px; height:35px; }
    .public-header-actions .header-primary-action { display:none; }
}

html[data-theme="dark"] .provider-welcome-header {
    background: var(--surface);
    border-color: var(--border);
}

html[data-theme="dark"] :is(.provider-eyebrow, .provider-back-link, .provider-welcome-eyebrow, .provider-settings-icon, .provider-header-nav a.active, a.provider-nav-link.active) {
    color: var(--theme-link);
}

html[data-theme="dark"] :is(a.provider-nav-link.active, .header-secondary-action) {
    background: var(--surface-muted);
}

html[data-theme="dark"] a:not([class]),
html[data-theme="dark"] .btn-link {
    color: var(--theme-link);
}
