/* EIDA shared shell: header, account menu, workspace nav and footer.
   Layout variants: public/default, workspace, administration. */
.eida-header > div > div:first-child > div:first-child{ min-width: 0; }
.eida-header nav a{ white-space: nowrap; }
.eida-header #userMenuPanel{ background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-md); }
.eida-header .accent-divider{ display: none; }
.eida-footer{ color: var(--muted); }
.eida-footer > div{ background-color: var(--surface); }
.eida-footer .eida-footer-bottom{ box-shadow: none; }
.eida-footer a:hover{ color: var(--eida-accent-text); }
.eida-worknav{ background: var(--surface); border-bottom: 1px solid var(--border); }
.eida-worknav-inner{ margin:auto; display:flex; align-items:center; overflow-x:auto; scrollbar-width:thin; }
.eida-worknav-label{ color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; padding-right: 12px; white-space: nowrap; }
.eida-worknav a{ display: inline-flex; align-items: center; border-radius:8px; white-space:nowrap; font-size:14px; font-weight: 650; color: var(--muted); }
.eida-worknav a:hover{ background: var(--surface-2); color: var(--text); }
.eida-worknav a[aria-current=page]{ background: color-mix(in srgb,var(--accent) 12%,var(--surface)); color: var(--eida-accent-text); }
@media (max-width:767px) {
  .eida-header img[alt="EIDA logo"] { height:34px; }
  .eida-worknav-label { display:none; }
  .eida-worknav a { font-size:13px; }
  .eida-footer a { white-space:normal; }
}
.eida-worknav a[aria-current=page] { box-shadow:inset 0 -2px 0 var(--accent); }

/* EIDA wordmark / navigation. Independent of the home-form layout. */
.eida-ui { --eida-shell-width:calc(100% - 64px); --eida-shell-max:1360px; --eida-nav-bg:#10243d; --eida-nav-ink:#f1f6ff; --eida-nav-muted:#c2d0e3; }
.dark .eida-ui { --eida-nav-bg:#0b192b; }
.eida-ui .eida-header > div { background:var(--eida-nav-bg); border-color:#ffffff17!important; box-shadow:0 5px 18px #10243d18; }
.eida-ui .eida-header > div > div:first-child { width:var(--eida-shell-width);max-width:var(--eida-shell-max);padding:12px 0;min-height:76px;gap:24px; }
.eida-ui .eida-header > div > div:first-child > div:first-child { gap:32px; }
.eida-brand-link { flex-shrink:0; }
.eida-wordmark-header { display:block;width:122px;height:auto; }
.eida-ui .eida-header .eida-public-nav { gap:26px; }
.eida-ui .eida-header .eida-public-nav a { color:var(--eida-nav-muted);font-size:14px;font-weight:600; }
.eida-ui .eida-header .eida-public-nav a:hover,.eida-ui .eida-header .eida-public-nav a[aria-current=page] { color:white; }
.eida-ui .eida-header .eida-public-nav a[aria-current=page] { text-decoration:underline;text-underline-offset:7px;text-decoration-color:var(--eida-brand-green); }
.eida-ui .eida-global-actions { flex-shrink:0; }
.eida-ui .eida-header #theme-toggle,.eida-ui .eida-header #userMenuButton,.eida-ui .eida-header .eida-nav-panel,.eida-ui .eida-header .eida-nav-login,.eida-ui .eida-header .eida-nav-register { min-height:40px;border-radius:999px;white-space:nowrap;gap:7px;padding:0 14px;font-size:13px;font-weight:650;box-shadow:none;line-height:1.2; }
.eida-ui .eida-header #theme-toggle,.eida-ui .eida-header #userMenuButton { width:auto;height:40px; }
.eida-ui .eida-header #theme-toggle,.eida-ui .eida-header #userMenuButton,.eida-ui .eida-header .eida-nav-panel,.eida-ui .eida-header .eida-nav-login { color:var(--eida-nav-ink)!important; }
.eida-ui .eida-header .eida-nav-register { background:var(--eida-brand-green)!important;color:#082d25!important;border:1px solid transparent;font-weight:750; }
.eida-ui .eida-header .eida-nav-register:hover { background:#43d993!important; }
.eida-ui .eida-header :where(#theme-toggle,#userMenuButton,.eida-nav-panel,.eida-nav-login,.eida-nav-register,.eida-brand-link,.eida-public-nav a):focus-visible { outline-color:#9ce9c5; }
.eida-ui .eida-header #theme-toggle svg,.eida-account-icon,.eida-nav-arrow { width:16px;height:16px;flex:none; }
.eida-account-chevron { width:13px;height:13px;flex:none; }
.eida-theme-dark,.dark .eida-theme-light { display:none; }
.dark .eida-theme-dark { display:inline; }
#userMenu[open] .eida-account-chevron { transform:rotate(180deg); }
.eida-ui .eida-header #userMenuPanel { max-width:calc(100vw - 24px); }
.eida-ui .eida-worknav-inner { max-width:var(--eida-shell-max);width:var(--eida-shell-width);padding:9px 0;gap:10px; }
.eida-ui .eida-worknav a { padding:10px 17px; }
.eida-ui .eida-footer > div { width:100%;max-width:none; }
.eida-ui .eida-footer > div.border-t { padding-block:28px; }
.eida-ui .eida-footer > div.border-t > div,.eida-ui .eida-footer .eida-footer-bottom > div { width:var(--eida-shell-width);max-width:var(--eida-shell-max);margin-inline:auto;padding-inline:0; }
.eida-ui .eida-footer > div.border-t > div > div { gap:24px; }
.eida-ui .eida-footer > div.border-t > div > div > div:nth-child(2) { flex-wrap:wrap;gap:12px 25px; }
.eida-ui .eida-footer .eida-footer-bottom > div { padding-block:13px; }
.eida-footer-brand { display:flex;flex-direction:column;align-items:flex-start;gap:7px; }
.eida-footer-brand img { width:92px;height:auto;display:block; }
.eida-footer-brand span { color:var(--muted);font-size:11px; }
.dark .eida-wordmark-adaptive { content:url('../img/eida-brand/eida-logo-dark.svg'); }
.eida-ui.eida-auth .eida-panel img.eida-wordmark-adaptive { filter:none!important;width:auto;height:39px;max-width:100%; }
@media(max-width:1100px) {
 .eida-ui .eida-header > div > div:first-child { gap:14px; }
 .eida-ui .eida-header > div > div:first-child > div:first-child { gap:20px; }
 .eida-ui .eida-header .eida-public-nav { gap:16px; }
 .eida-ui .eida-header .eida-theme-copy { display:none; }
}
@media(max-width:900px) {
 .eida-ui { --eida-shell-width:calc(100% - 36px); }
 .eida-ui .eida-header .eida-public-nav a { font-size:12px; }
 .eida-wordmark-header { width:104px; }
}
@media(max-width:767px) {
 .eida-ui .eida-header > div > div:first-child { min-height:64px; }
 .eida-ui .eida-footer-brand { align-items:center; }
 .eida-ui .eida-footer > div.border-t { padding-block:22px; }
 .eida-ui .eida-footer > div.border-t > div > div > div { justify-content:center;text-align:center; }
 .eida-ui .eida-footer .eida-footer-bottom > div p { text-align:center; }
 .eida-ui .eida-worknav a { padding:9px 13px; }
}
@media(max-width:480px) {
 .eida-ui { --eida-shell-width:calc(100% - 24px); }
 .eida-ui .eida-header > div > div:first-child { gap:8px;min-height:58px;padding-block:9px; }
 .eida-wordmark-header { width:82px; }
 .eida-ui .eida-header #theme-toggle { width:34px;height:34px;min-height:34px; }
 .eida-ui .eida-header #userMenuButton,.eida-ui .eida-header .eida-nav-login,.eida-ui .eida-header .eida-nav-register { min-height:34px;height:34px;padding:0 10px;font-size:11px; }
 .eida-ui .eida-header .eida-nav-arrow,.eida-account-copy { display:none; }
 .eida-ui .eida-header #userMenuButton { gap:4px; }
}
/* Keep the wider working area of the existing dashboard. */
@media(min-width:901px) {
 .eida-ui.eida-workspace { --eida-shell-width:94%; --eida-shell-max:1680px; }
}
@media(min-width:768px) and (max-width:900px) {
 .eida-ui .eida-header > div > div:first-child { flex-wrap:wrap; }
 .eida-ui .eida-header > div > div:first-child > div:first-child { display:contents; }
 .eida-ui .eida-header .eida-public-nav { order:3;width:100%;justify-content:center;padding:4px 0 3px; }
}

/* Studio v3.0 — one continuous navigation capsule, not separate buttons. */
.eida-ui .eida-header .eida-global-actions {
  gap:0; padding:4px; border:1px solid #ffffff30;
  border-radius:999px; background:#ffffff08; align-items:center;
  overflow:visible; isolation:auto;
}
.eida-ui .eida-header .eida-global-actions > :where(button,a,details) { position:relative; }
.eida-ui .eida-header .eida-global-actions :is(#theme-toggle,#userMenuButton,.eida-nav-panel,.eida-nav-login) {
  background:transparent!important; border:1px solid transparent!important;
  box-shadow:none; height:34px; min-height:34px; padding:0 13px; border-radius:999px;
}
.eida-ui .eida-header .eida-global-actions :is(#theme-toggle,#userMenuButton,.eida-nav-panel,.eida-nav-login):hover,
.eida-ui .eida-header .eida-global-actions #userMenu[open] #userMenuButton {
  background:#ffffff14!important; border-color:transparent!important;
}
.eida-ui .eida-header .eida-global-actions > :is(.eida-nav-panel,#userMenu,.eida-nav-login)::before {
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:1px; height:18px; background:#ffffff25; pointer-events:none;
}
.eida-ui .eida-header .eida-global-actions .eida-nav-register {
  height:34px; min-height:34px; padding:0 13px; margin-inline:3px;
}
.eida-ui .eida-header .eida-global-actions .eida-nav-login::before { display:none; }
.eida-ui .eida-header .eida-nav-panel-icon { width:16px;height:16px;flex:none; }
.eida-ui .eida-header .eida-global-actions #userMenuButton::-webkit-details-marker { display:none; }
.eida-ui .eida-header .eida-global-actions :is(#theme-toggle,#userMenuButton,.eida-nav-panel,.eida-nav-login,.eida-nav-register):focus-visible {
  outline:2px solid #9ce9c5; outline-offset:1px;
}
.eida-ui .eida-header .eida-global-actions #userMenuPanel { margin-top:10px; }
@media(max-width:1100px) {
  .eida-ui .eida-header .eida-global-actions #theme-toggle { width:34px; padding:0; }
}
@media(max-width:480px) {
  .eida-ui .eida-header .eida-global-actions { padding:3px; }
  .eida-ui .eida-header .eida-global-actions :is(#theme-toggle,#userMenuButton,.eida-nav-panel,.eida-nav-login,.eida-nav-register) { height:32px;min-height:32px;padding:0 8px; }
  .eida-ui .eida-header .eida-global-actions #theme-toggle { width:32px; padding:0; }
  .eida-ui .eida-header .eida-global-actions .eida-nav-register { margin-inline:1px; }
}

/* Studio v3.1 — the footer surface spans the viewport; only its content is capped. */
.eida-ui .eida-footer .eida-footer-bottom {
  width: 100%;
  max-width: none;
}

@media(max-width:767px) {
 .eida-ui .eida-footer > div.border-t > div > div > div:last-child > div { justify-content:center; }
}

/* Administration shell width (independent of content styles). */
.eida-ui.eida-admin { --eida-shell-width:min(94%,1624px); --eida-shell-max:none; }

.dark .eida-ui .eida-header .eida-global-actions > :is(.eida-nav-panel,.eida-nav-login) { color:var(--eida-accent-text)!important; }

@media(max-width:767px) { .eida-ui .eida-header .eida-global-actions { gap:6px; } }
