:root{--header-bg:rgba(7,12,24,.94);--header-border:rgba(148,163,184,.16);--header-hover:rgba(148,163,184,.09);--header-panel:#111a2d;--header-ink:#f4f7ff;--header-muted:#8f9db7}
.site-header{position:sticky;z-index:50;top:0;height:auto;min-height:72px;padding:0;border-bottom:1px solid var(--header-border);background:var(--header-bg);box-shadow:0 12px 38px rgba(0,0,0,.18);backdrop-filter:blur(18px) saturate(150%);-webkit-backdrop-filter:blur(18px) saturate(150%)}
.header-inner{display:flex;align-items:center;width:min(1440px,100%);min-height:72px;margin:0 auto;padding:0 clamp(18px,3.2vw,48px);gap:clamp(20px,3vw,42px)}
.brand-cluster{display:flex;align-items:center;flex:none;gap:12px;min-width:max-content}
.site-header .brand{display:inline-flex;align-items:center;gap:10px;color:var(--header-ink);font-size:21px;font-weight:650;letter-spacing:-.65px;line-height:1;text-decoration:none}
.site-header .brand b{color:#72e5b1;font-weight:800}
.brand-mark{position:relative;width:29px;height:29px;border:1px solid rgba(114,229,177,.38);border-radius:9px;background:linear-gradient(145deg,rgba(114,229,177,.2),rgba(48,111,207,.12));box-shadow:inset 0 1px rgba(255,255,255,.08),0 7px 20px rgba(0,0,0,.18)}
.brand-mark::before,.brand-mark::after{content:"";position:absolute;border-radius:50%;background:#72e5b1;box-shadow:0 0 12px rgba(114,229,177,.45)}
.brand-mark::before{width:7px;height:7px;left:6px;top:6px}
.brand-mark::after{width:5px;height:5px;right:6px;bottom:6px;opacity:.68}
.portal-home{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 11px;border:1px solid rgba(114,229,177,.24);border-radius:10px;background:rgba(114,229,177,.07);color:#cef8e6;font-size:12px;font-weight:800;letter-spacing:.025em;line-height:1;text-decoration:none;transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease}
.portal-home svg{width:15px;height:15px;fill:none;stroke:#72e5b1;stroke-linejoin:round;stroke-width:1.65}
.portal-home:hover{border-color:rgba(114,229,177,.55);background:rgba(114,229,177,.12);color:#fff;transform:translateY(-1px)}
.header-menu{display:flex;align-items:center;flex:1;min-width:0;gap:24px}
.site-header .site-nav{display:flex;align-items:center;gap:4px;min-width:0}
.nav-link,.nav-dropdown>summary{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border:1px solid transparent;border-radius:10px;color:#b9c5dc;font-size:14px;font-weight:680;line-height:1;white-space:nowrap;cursor:pointer;list-style:none;transition:color .16s ease,background .16s ease,border-color .16s ease}
.nav-link:hover,.nav-dropdown>summary:hover,.nav-dropdown[open]>summary{border-color:rgba(148,163,184,.1);background:var(--header-hover);color:#f7f9ff}
.nav-link[aria-current="page"]{background:rgba(114,229,177,.1);color:#baf3d9}
.nav-link[aria-current="page"]::after{content:"";position:absolute;right:12px;bottom:3px;left:12px;height:2px;border-radius:99px;background:#72e5b1;box-shadow:0 0 9px rgba(114,229,177,.42)}
.nav-icon{display:inline-grid;place-items:center;width:17px;height:17px;color:#72e5b1;font-size:14px;font-style:normal}
.nav-icon-library{position:relative;border:1.5px solid currentColor;border-radius:3px}
.nav-icon-library::before{content:"";position:absolute;top:3px;bottom:3px;left:4px;width:1.5px;border-radius:2px;background:currentColor;box-shadow:4px 0 currentColor}
.nav-dropdown,.account-menu{position:relative}
.nav-dropdown>summary::-webkit-details-marker,.account-menu>summary::-webkit-details-marker{display:none}
.dropdown-chevron{width:7px;height:7px;margin:-3px 2px 0 3px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);transition:transform .16s ease}
.nav-dropdown[open] .dropdown-chevron,.account-menu[open] .dropdown-chevron{margin-top:3px;transform:rotate(225deg)}
.nav-popover,.account-popover{position:absolute;z-index:20;top:calc(100% + 11px);padding:8px;border:1px solid rgba(148,163,184,.18);border-radius:14px;background:rgba(14,22,39,.98);box-shadow:0 24px 64px rgba(0,0,0,.46),inset 0 1px rgba(255,255,255,.04);animation:header-popover .15s ease-out}
.nav-popover{left:0;display:grid;grid-template-columns:repeat(2,minmax(168px,1fr));gap:6px;min-width:220px}
.nav-popover-group{display:grid;align-content:start;gap:2px;padding:5px}
.nav-popover-group+.nav-popover-group{border-left:1px solid rgba(148,163,184,.13)}
.nav-popover-label{padding:3px 9px 6px;color:#73829f;font-size:10px;font-weight:850;letter-spacing:.12em;text-transform:uppercase}
.nav-popover a,.account-popover a{display:flex;align-items:center;min-height:38px;padding:8px 9px;border-radius:9px;color:#cbd5e7;font-size:13px;font-weight:650;text-decoration:none;white-space:nowrap}
.nav-popover a:hover,.account-popover a:hover,.nav-popover a[aria-current="page"],.account-popover a[aria-current="page"]{background:rgba(114,229,177,.09);color:#c9f8e4}
.account{display:flex;align-items:center;margin-left:auto;flex:none}
.account-menu>summary{display:flex;align-items:center;gap:9px;min-height:44px;padding:5px 8px 5px 6px;border:1px solid rgba(148,163,184,.14);border-radius:12px;background:rgba(148,163,184,.05);cursor:pointer;list-style:none;transition:border-color .16s ease,background .16s ease}
.account-menu>summary:hover,.account-menu[open]>summary{border-color:rgba(114,229,177,.28);background:rgba(114,229,177,.07)}
.account-avatar{display:grid;place-items:center;width:31px;height:31px;border-radius:9px;background:linear-gradient(145deg,#72e5b1,#50b990);color:#081710;font-size:13px;font-weight:900}
.account-copy{display:grid;max-width:170px;line-height:1.15}
.account-copy small{color:#7887a4;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.account-copy strong{overflow:hidden;color:#dce4f2;font-size:12px;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
.account-popover{right:0;width:248px}
.account-popover a{display:grid;gap:2px}
.account-popover a small{color:#75849f;font-size:10px;font-weight:500}
.account-popover form{margin:6px 0 0;padding-top:7px;border-top:1px solid rgba(148,163,184,.13)}
.account-popover .logout-button{width:100%;min-height:38px;padding:8px 10px;border:0;border-radius:9px;background:transparent;color:#f1a7b2;font-size:13px;text-align:left}
.account-popover .logout-button:hover{background:rgba(255,99,122,.1);color:#ffc0c9;filter:none}
.login-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 16px;border:1px solid rgba(114,229,177,.32);border-radius:10px;background:#72e5b1;color:#07140f;font-size:13px;font-weight:820}
.menu-toggle{display:none;align-items:center;gap:8px;min-height:40px;padding:7px 11px;border:1px solid rgba(148,163,184,.16);border-radius:10px;background:rgba(148,163,184,.06);color:#dbe4f5;font-size:13px}
.menu-toggle:hover{background:rgba(148,163,184,.11);color:#fff;filter:none}
.menu-toggle-lines{display:grid;gap:3px;width:17px}
.menu-toggle-lines i{display:block;width:17px;height:1.5px;border-radius:2px;background:currentColor;transition:transform .18s ease,opacity .18s ease}
.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:first-child{transform:translateY(4.5px) rotate(45deg)}
.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:nth-child(2){opacity:0}
.menu-toggle[aria-expanded="true"] .menu-toggle-lines i:last-child{transform:translateY(-4.5px) rotate(-45deg)}
@keyframes header-popover{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
@media(max-width:1180px){.header-inner{gap:18px}.account-copy{display:none}.nav-link,.nav-dropdown>summary{padding-right:10px;padding-left:10px}}
@media(max-width:900px){
  .site-header{min-height:64px}
  .header-inner{position:relative;min-height:64px;padding:0 16px;gap:12px}
  .brand-cluster{gap:8px}
  .site-header .brand{font-size:19px}
  .brand-mark{width:27px;height:27px}
  .portal-home{min-height:34px;padding:7px 9px}
  .portal-home span{display:none}
  .menu-toggle{display:inline-flex;margin-left:auto}
  .header-menu{position:absolute;top:calc(100% + 1px);right:10px;left:10px;display:none;max-height:calc(100vh - 82px);padding:10px;border:1px solid rgba(148,163,184,.18);border-radius:0 0 16px 16px;background:rgba(9,15,28,.985);box-shadow:0 26px 55px rgba(0,0,0,.5);overflow:auto}
  .header-menu.is-open{display:grid;gap:8px;animation:header-popover .17s ease-out}
  .site-header .site-nav{display:grid;width:100%;gap:4px}
  .nav-link,.nav-dropdown>summary{width:100%;min-height:46px;padding:10px 12px;font-size:14px}
  .nav-dropdown>summary{justify-content:space-between}
  .nav-popover{position:static;display:grid;grid-template-columns:1fr;margin:3px 0 7px;padding:6px;border-radius:11px;background:rgba(5,10,21,.7);box-shadow:none;animation:none}
  .nav-popover-group+.nav-popover-group{border-top:1px solid rgba(148,163,184,.13);border-left:0}
  .nav-popover a{min-height:42px}
  .account{display:block;width:100%;margin:0;padding-top:9px;border-top:1px solid rgba(148,163,184,.13)}
  .account-menu>summary{width:100%;min-height:48px}
  .account-copy{display:grid;max-width:none;min-width:0;flex:1}
  .account-popover{position:static;width:100%;margin-top:6px;background:rgba(5,10,21,.7);box-shadow:none;animation:none}
  .login-button{width:100%}
}
@media(max-width:420px){.header-inner{padding:0 12px}.site-header .brand{gap:7px;font-size:17px}.brand-mark{width:25px;height:25px}.portal-home{width:34px;padding:0}.menu-toggle{padding:7px 9px}.menu-toggle>span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){.site-header *{animation:none!important;transition:none!important}}
