/* Xiaohua API - cool dashboard theme v7 */
:root{--xh-primary:#2563eb;--xh-accent:#3b82f6;--xh-ink:#172033;--xh-muted:#64748b;--xh-bg:#f4f7fb;--xh-card:#fff;--xh-line:#dbe4ee;--xh-radius:24px;--xh-shadow:0 12px 40px rgba(0,0,0,.06)}
html{scroll-behavior:smooth}body{font-family:Inter,"Noto Sans SC","Microsoft YaHei",system-ui,-apple-system,sans-serif;background:var(--xh-bg);color:var(--xh-ink)}::selection{background:rgba(37,99,235,.2);color:#1e3a8a}.navigation-progress-bar{background:var(--xh-primary)!important;box-shadow:none!important}
.btn-primary,button[type=submit]{background:var(--xh-primary)!important;border:1px solid var(--xh-primary)!important;color:#fff!important;border-radius:12px!important;box-shadow:none!important;font-weight:600!important;transition:background .2s,transform .2s!important}.btn-primary:hover,button[type=submit]:hover{background:#1d4ed8!important;transform:translateY(-1px)!important;box-shadow:0 10px 24px rgba(37,99,235,.18)!important}.input{height:50px!important;border:1px solid #cbd5e1!important;border-radius:12px!important;background:#f8fafc!important;box-shadow:none!important}.input:focus{border-color:var(--xh-primary)!important;background:#fff!important;box-shadow:0 0 0 3px rgba(37,99,235,.10)!important}.text-gradient{background:none!important;color:var(--xh-ink)!important;-webkit-text-fill-color:initial!important}
/* Public shell */
#app>div.relative.flex.min-h-screen.flex-col{background:var(--xh-bg)!important;overflow:clip!important}#app>div.relative.flex.min-h-screen.flex-col::before{display:none!important}#app>div.relative.flex.min-h-screen.flex-col>.pointer-events-none{display:none!important}
#app>div.relative.flex.min-h-screen.flex-col>header{position:sticky;top:0;z-index:40!important;background:rgba(255,255,255,.94)!important;border-bottom:1px solid rgba(0,0,0,.05)!important;backdrop-filter:blur(18px);padding-top:14px!important;padding-bottom:14px!important}#app>div.relative.flex.min-h-screen.flex-col>header nav{max-width:1280px!important}#app>div.relative.flex.min-h-screen.flex-col>header nav>div:first-child>div{width:42px!important;height:42px!important;border-radius:14px!important;box-shadow:none!important}#app>div.relative.flex.min-h-screen.flex-col a[href="/login"].rounded-full{background:#172033!important;border-radius:10px!important;padding:.58rem 1.2rem!important;font-size:.82rem!important;box-shadow:none!important}#app>div.relative.flex.min-h-screen.flex-col a[href="/login"].rounded-full:hover{background:var(--xh-primary)!important}
#app>div.relative.flex.min-h-screen.flex-col>main{padding:28px 24px 72px!important}#app>div.relative.flex.min-h-screen.flex-col>main>.mx-auto{max-width:1280px!important;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:20px}
/* Hero becomes a product panel */
#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-col{grid-column:1/-1;margin:0!important;min-height:500px;padding:64px 72px!important;border-radius:28px;background:linear-gradient(115deg,#fff 0%,#fff 47%,#edf2f7 100%);border:1px solid #e2e8f0;box-shadow:none;gap:48px!important;position:relative;overflow:hidden}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-col::after{content:"AI GATEWAY";position:absolute;right:-26px;bottom:-42px;font-size:118px;font-weight:800;letter-spacing:-.06em;color:rgba(0,0,0,.025);white-space:nowrap;pointer-events:none}#app>div.relative.flex.min-h-screen.flex-col h1{font-size:clamp(3.2rem,5.4vw,5.6rem)!important;line-height:1.02!important;letter-spacing:-.065em!important;font-weight:700!important;color:#172033!important;margin-bottom:24px!important}#app>div.relative.flex.min-h-screen.flex-col h1::after{display:none!important}#app>div.relative.flex.min-h-screen.flex-col h1+p{max-width:470px;color:#64748b!important;font-size:1.2rem!important;line-height:1.8!important;margin-bottom:30px!important}#app>div.relative.flex.min-h-screen.flex-col .btn-primary{padding:14px 30px!important;min-width:158px;justify-content:center}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-col>div:last-child>div{transform:none!important;border:0!important;border-radius:22px!important;background:#0f172a!important;box-shadow:0 26px 55px rgba(0,0,0,.18)!important;max-width:520px!important}
/* Trust chips */
#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-wrap{grid-column:1/-1;margin:0!important;padding:18px 24px;justify-content:flex-start!important;gap:10px!important;background:#fff;border:1px solid #e2e8f0;border-radius:18px}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-wrap>div{background:#edf2f7!important;border:0!important;border-radius:10px!important;box-shadow:none!important;padding:10px 16px!important}
/* Bento capabilities */
#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid{grid-column:1/-1;margin:0!important;display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;grid-auto-rows:minmax(180px,auto);gap:20px!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div{margin:0!important;background:#fff!important;border:1px solid #e2e8f0!important;border-radius:24px!important;box-shadow:none!important;padding:34px!important;transform:none!important;position:relative;overflow:hidden}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div::before{display:none!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div:nth-child(1){grid-column:span 7;grid-row:span 2;background:linear-gradient(145deg,#eff6ff,#fff)!important;padding:48px!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div:nth-child(2),#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div:nth-child(3){grid-column:span 5}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div:hover{border-color:#cbd5e1!important;box-shadow:var(--xh-shadow)!important;transform:translateY(-3px)!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div>div:first-child{border-radius:14px!important;background:var(--xh-primary)!important;box-shadow:none!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div:nth-child(1)>div:first-child{width:64px!important;height:64px!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid h3{font-size:1.4rem!important;letter-spacing:-.02em}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div:nth-child(1) h3{font-size:2rem!important;margin-top:18px}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid p{color:#64748b!important;line-height:1.8!important;max-width:520px}
/* Models become a single product shelf */
#app>div.relative.flex.min-h-screen.flex-col main .mb-8.text-center{grid-column:1/-1;margin:36px 0 0!important;text-align:left!important;padding:0 4px}#app>div.relative.flex.min-h-screen.flex-col main .mb-8.text-center h2{font-size:2.25rem!important;letter-spacing:-.035em;margin-bottom:8px!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-16.flex{grid-column:1/-1;margin:0!important;justify-content:stretch!important;display:grid!important;grid-template-columns:repeat(5,1fr);gap:12px!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-16.flex>div{background:#fff!important;border:1px solid #e2e8f0!important;border-radius:16px!important;box-shadow:none!important;justify-content:center;padding:18px!important;min-height:70px}#app>div.relative.flex.min-h-screen.flex-col main .mb-16.flex>div:hover{border-color:#93c5fd!important;background:#f8fafc!important}
#app>div.relative.flex.min-h-screen.flex-col footer{background:#fff!important;border-top:1px solid #dbe4ee!important;padding-top:28px!important;padding-bottom:28px!important}
/* Authentication: desktop split layout */
#app>div.relative.flex.min-h-screen.items-center{background:#f4f7fb!important;padding:28px!important}#app>div.relative.flex.min-h-screen.items-center>.absolute.inset-0,#app>div.relative.flex.min-h-screen.items-center>.pointer-events-none{display:none!important}#app>div.relative.flex.min-h-screen.items-center .relative.z-10.w-full.max-w-md{max-width:1040px!important;min-height:660px;display:grid;grid-template-columns:.9fr 1.1fr;grid-template-rows:1fr auto auto;gap:0;background:#fff;border-radius:28px;overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.08)}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center{grid-column:1;grid-row:1/4;margin:0!important;padding:64px 48px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;text-align:left!important;background:linear-gradient(145deg,#3b82f6,#2563eb);position:relative;overflow:hidden;color:#fff}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center::before{content:"API";position:absolute;top:30px;right:-16px;font-size:170px;line-height:1;font-weight:800;color:rgba(255,255,255,.09);letter-spacing:-.08em}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center::after{content:"一个入口，连接主流 AI 模型。简单接入，稳定调用。";font-size:1.05rem;line-height:1.8;color:rgba(255,255,255,.82);max-width:310px;margin-top:28px}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center>div:first-child{width:74px!important;height:74px!important;border-radius:24px!important;box-shadow:none!important;margin:0 0 24px!important;background:#fff}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center h1{color:#fff!important;background:none!important;-webkit-text-fill-color:#fff!important;font-size:2.8rem!important;letter-spacing:-.05em}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center p{color:rgba(255,255,255,.78)!important}#app>div.relative.flex.min-h-screen.items-center .card-glass{grid-column:2;grid-row:1;margin:0!important;padding:76px 72px 38px!important;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;backdrop-filter:none!important;align-self:stretch;display:flex;align-items:center}#app>div.relative.flex.min-h-screen.items-center .card-glass>div{width:100%}#app>div.relative.flex.min-h-screen.items-center h2{font-size:2rem!important;color:#172033!important;letter-spacing:-.04em}#app>div.relative.flex.min-h-screen.items-center .mt-6.text-center{grid-column:2;grid-row:2;margin:0!important;padding:0 72px 20px;background:#fff}#app>div.relative.flex.min-h-screen.items-center .mt-8.text-center{grid-column:2;grid-row:3;margin:0!important;padding:0 72px 34px;background:#fff}#app>div.relative.flex.min-h-screen.items-center a{color:var(--xh-primary)!important}
/* Dark: charcoal product style */
.dark #app>div.relative.flex.min-h-screen.flex-col,.dark #app>div.relative.flex.min-h-screen.items-center{background:#080d18!important}.dark #app>div.relative.flex.min-h-screen.flex-col>header{background:rgba(15,23,42,.94)!important;border-color:#263550!important}.dark #app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-col,.dark #app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-wrap,.dark #app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div,.dark #app>div.relative.flex.min-h-screen.flex-col main .mb-16.flex>div{background:#172033!important;border-color:#263550!important}.dark #app>div.relative.flex.min-h-screen.flex-col h1{color:#fff!important}.dark #app>div.relative.flex.min-h-screen.flex-col h1+p,.dark #app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid p{color:#94a3b8!important}.dark #app>div.relative.flex.min-h-screen.flex-col footer{background:#172033!important;border-color:#263550!important}.dark #app>div.relative.flex.min-h-screen.items-center .relative.z-10.w-full.max-w-md,.dark #app>div.relative.flex.min-h-screen.items-center .card-glass,.dark #app>div.relative.flex.min-h-screen.items-center .mt-6.text-center,.dark #app>div.relative.flex.min-h-screen.items-center .mt-8.text-center{background:#172033!important}.dark .input{background:#1e293b!important;border-color:#334155!important}.dark #app>div.relative.flex.min-h-screen.items-center h2{color:#fff!important}
@media(max-width:900px){#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-col{padding:48px 34px!important;min-height:auto}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div:nth-child(n){grid-column:1/-1;grid-row:auto}#app>div.relative.flex.min-h-screen.items-center .relative.z-10.w-full.max-w-md{display:block;max-width:480px!important;min-height:0}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center{padding:34px!important;align-items:center;text-align:center!important}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center::before,#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center::after{display:none}#app>div.relative.flex.min-h-screen.items-center .card-glass{padding:38px 30px!important}#app>div.relative.flex.min-h-screen.items-center .mt-6.text-center{padding:0 30px 18px}#app>div.relative.flex.min-h-screen.items-center .mt-8.text-center{padding:0 30px 28px}}
@media(max-width:640px){#app>div.relative.flex.min-h-screen.flex-col>main{padding:16px 14px 48px!important}#app>div.relative.flex.min-h-screen.flex-col main>.mx-auto{gap:14px}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-col{padding:38px 24px!important;border-radius:20px;gap:34px!important}#app>div.relative.flex.min-h-screen.flex-col h1{font-size:2.75rem!important}#app>div.relative.flex.min-h-screen.flex-col h1+p{font-size:1rem!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.flex.flex-wrap{padding:12px;justify-content:center!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-12.grid>div{padding:26px!important;border-radius:20px!important}#app>div.relative.flex.min-h-screen.flex-col main .mb-16.flex{grid-template-columns:1fr 1fr}#app>div.relative.flex.min-h-screen.flex-col main .mb-16.flex>div:last-child{grid-column:1/-1}#app>div.relative.flex.min-h-screen.items-center{padding:14px!important}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center{padding:26px 24px!important}#app>div.relative.flex.min-h-screen.items-center .mb-8.text-center h1{font-size:2rem!important}#app>div.relative.flex.min-h-screen.items-center .card-glass{padding:32px 22px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* ===== V3 authenticated console redesign ===== */
#app > div.min-h-screen.bg-gray-50,
#app > div.min-h-screen.dark\:bg-dark-950 { background:#f1f5f9 !important; }
#app > div.min-h-screen.bg-gray-50 > .bg-mesh-gradient,
#app > div.min-h-screen.dark\:bg-dark-950 > .bg-mesh-gradient { display:none !important; }

/* Dark product sidebar */
.sidebar { width:248px !important; background:#172033 !important; border-right:0 !important; box-shadow:none !important; color:#fff; }
.sidebar-header { min-height:76px !important; padding:16px 18px !important; border-bottom:1px solid rgba(255,255,255,.08) !important; }
.sidebar-logo { width:42px !important; height:42px !important; border-radius:14px !important; box-shadow:none !important; }
.sidebar-brand-title { color:#fff !important; font-weight:650 !important; letter-spacing:-.025em; }
.sidebar-header button { color:#94a3b8 !important; background:#263550 !important; border-color:#334155 !important; border-radius:8px !important; }
.sidebar-nav { padding:14px 12px 20px !important; }
.sidebar-section { margin-bottom:16px !important; }
.sidebar-section-title { color:#64748b !important; font-size:10px !important; font-weight:700 !important; letter-spacing:.14em !important; text-transform:uppercase; padding:10px 12px 7px !important; }
.sidebar-link { min-height:43px !important; border-radius:10px !important; padding:10px 12px !important; color:#94a3b8 !important; font-size:13px !important; font-weight:500 !important; transition:background .18s,color .18s,transform .18s !important; }
.sidebar-link:hover { color:#fff !important; background:#263550 !important; transform:translateX(2px); }
.sidebar-link.router-link-active,.sidebar-link[aria-current="page"] { color:#fff !important; background:#2563eb !important; box-shadow:none !important; }
.sidebar-link.router-link-active svg,.sidebar-link[aria-current="page"] svg { color:#fff !important; }
.sidebar > .mt-auto { border-color:rgba(255,255,255,.08) !important; background:#0b1220; padding:12px !important; }
.sidebar > .mt-auto .sidebar-link { color:#94a3b8 !important; }

/* Content frame */
.sidebar + div.relative.min-h-screen { margin-left:248px !important; background:#f1f5f9 !important; }
.sidebar + div.relative.min-h-screen > header.glass { height:auto; background:rgba(255,255,255,.96) !important; border-bottom:1px solid #e2e8f0 !important; box-shadow:none !important; backdrop-filter:blur(18px) !important; }
.sidebar + div.relative.min-h-screen > header.glass > div { height:72px !important; max-width:1560px; margin:0 auto; padding-left:30px !important; padding-right:30px !important; }
.sidebar + div.relative.min-h-screen > header h1 { font-size:20px !important; font-weight:650 !important; letter-spacing:-.03em; color:#172033 !important; }
.sidebar + div.relative.min-h-screen > header p { color:#94a3b8 !important; font-size:12px !important; }
.sidebar + div.relative.min-h-screen > header button { border-radius:10px !important; }
.sidebar + div.relative.min-h-screen > main { max-width:1560px; margin:0 auto; padding:28px 30px 48px !important; }

/* Universal console surfaces */
.sidebar + div.relative.min-h-screen .card { background:#fff !important; border:1px solid #dbe4ee !important; border-radius:18px !important; box-shadow:none !important; }
.sidebar + div.relative.min-h-screen .card:hover { border-color:#cbd5e1 !important; }
.sidebar + div.relative.min-h-screen main > .space-y-6 { gap:18px; }
.sidebar + div.relative.min-h-screen main .grid { gap:16px !important; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4:first-child { grid-template-columns:1.3fr repeat(3,1fr) !important; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4:first-child > .card:first-child { background:linear-gradient(135deg,#3b82f6,#2563eb) !important; border-color:transparent !important; color:#fff !important; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4:first-child > .card:first-child p { color:#fff !important; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4:first-child > .card:first-child p:last-child { color:rgba(255,255,255,.72) !important; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4 > .card { min-height:126px; padding:22px !important; position:relative; overflow:hidden; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4 > .card > p:first-child { color:#64748b !important; font-size:12px !important; font-weight:600 !important; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4 > .card > p:nth-child(2) { color:#172033 !important; font-size:25px !important; font-weight:650 !important; letter-spacing:-.04em; }
.sidebar + div.relative.min-h-screen main .space-y-6 > .space-y-6 { background:#fff; border:1px solid #dbe4ee; border-radius:22px; padding:18px; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-1.lg\:grid-cols-3 > .card { border-radius:22px !important; }

/* Charts, tables, forms */
.sidebar + div.relative.min-h-screen table { border-collapse:separate !important; border-spacing:0 !important; }
.sidebar + div.relative.min-h-screen thead { background:#edf2f7 !important; }
.sidebar + div.relative.min-h-screen th { color:#64748b !important; font-size:11px !important; font-weight:650 !important; letter-spacing:.025em; border-bottom:1px solid #dbe4ee !important; }
.sidebar + div.relative.min-h-screen td { border-bottom:1px solid #e2e8f0 !important; color:#334155 !important; }
.sidebar + div.relative.min-h-screen tbody tr:hover { background:#f8fafc !important; }
.sidebar + div.relative.min-h-screen .input,
.sidebar + div.relative.min-h-screen input,
.sidebar + div.relative.min-h-screen select,
.sidebar + div.relative.min-h-screen textarea { border-radius:10px !important; border-color:#cbd5e1 !important; background:#fff !important; }
.sidebar + div.relative.min-h-screen .btn-primary { border-radius:10px !important; }
.sidebar + div.relative.min-h-screen [role="dialog"] { border-radius:22px !important; border:1px solid #e2e8f0 !important; box-shadow:0 24px 80px rgba(0,0,0,.16) !important; }
.sidebar + div.relative.min-h-screen .empty-state-title { color:#334155 !important; }

/* Quick actions as compact product tiles */
.sidebar + div.relative.min-h-screen main .grid.grid-cols-1.lg\:grid-cols-3 .card:last-child button { background:#edf2f7 !important; border:1px solid transparent; border-radius:14px !important; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-1.lg\:grid-cols-3 .card:last-child button:hover { background:#eff6ff !important; border-color:#bfdbfe; }
.sidebar + div.relative.min-h-screen main .grid.grid-cols-1.lg\:grid-cols-3 .card:last-child button > div:first-child { background:#dbeafe !important; color:#2563eb !important; }

/* Onboarding and overlays */
[role="dialog"] { border-radius:22px !important; }
[role="dialog"] > header { background:#172033 !important; color:#fff !important; }

/* Dark console */
.dark #app > div.min-h-screen.bg-gray-50,.dark #app > div.min-h-screen.dark\:bg-dark-950 { background:#080d18 !important; }
.dark .sidebar + div.relative.min-h-screen { background:#080d18 !important; }
.dark .sidebar + div.relative.min-h-screen > header.glass { background:rgba(15,23,42,.96) !important; border-color:#263550 !important; }
.dark .sidebar + div.relative.min-h-screen > header h1 { color:#fff !important; }
.dark .sidebar + div.relative.min-h-screen .card,.dark .sidebar + div.relative.min-h-screen main .space-y-6 > .space-y-6 { background:#172033 !important; border-color:#263550 !important; }
.dark .sidebar + div.relative.min-h-screen td { color:#cbd5e1 !important; border-color:#334155 !important; }
.dark .sidebar + div.relative.min-h-screen thead { background:#1e293b !important; }

@media(max-width:1023px){
  .sidebar { width:260px !important; }
  .sidebar + div.relative.min-h-screen { margin-left:0 !important; }
  .sidebar + div.relative.min-h-screen > main { padding:20px 16px 40px !important; }
  .sidebar + div.relative.min-h-screen > header.glass > div { padding-left:14px !important; padding-right:14px !important; }
}
@media(max-width:767px){
  .sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4:first-child { grid-template-columns:1fr 1fr !important; }
  .sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4 > .card { min-height:112px; padding:16px !important; }
  .sidebar + div.relative.min-h-screen main .grid.grid-cols-2.lg\:grid-cols-4 > .card > p:nth-child(2) { font-size:21px !important; }
}
.sidebar-link.xh-active { color:#fff !important; background:#2563eb !important; box-shadow:none !important; }
.sidebar-link.xh-active svg { color:#fff !important; }

/* ===== V3b light sidebar refinement ===== */
html:not(.dark) .sidebar {
  background:#ffffff !important;
  color:#172033 !important;
  border-right:1px solid #e2e8f0 !important;
  box-shadow:4px 0 22px rgba(0,0,0,.025) !important;
}
html:not(.dark) .sidebar-header {
  border-bottom:1px solid #e2e8f0 !important;
  background:#ffffff !important;
}
html:not(.dark) .sidebar-brand-title {
  color:#172033 !important;
}
html:not(.dark) .sidebar-header button {
  color:#64748b !important;
  background:#f1f5f9 !important;
  border-color:#e2e8f0 !important;
}
html:not(.dark) .sidebar-section-title {
  color:#94a3b8 !important;
}
html:not(.dark) .sidebar-link {
  color:#64748b !important;
}
html:not(.dark) .sidebar-link svg {
  color:#94a3b8 !important;
}
html:not(.dark) .sidebar-link:hover {
  color:#172033 !important;
  background:#f4f7fb !important;
}
html:not(.dark) .sidebar-link:hover svg {
  color:#2563eb !important;
}
html:not(.dark) .sidebar-link.xh-active,
html:not(.dark) .sidebar-link.router-link-active,
html:not(.dark) .sidebar-link[aria-current="page"] {
  color:#2563eb !important;
  background:#eff6ff !important;
  box-shadow:inset 3px 0 0 #2563eb !important;
  font-weight:650 !important;
}
html:not(.dark) .sidebar-link.xh-active svg,
html:not(.dark) .sidebar-link.router-link-active svg,
html:not(.dark) .sidebar-link[aria-current="page"] svg {
  color:#2563eb !important;
}
html:not(.dark) .sidebar > .mt-auto {
  background:#f8fafc !important;
  border-color:#e2e8f0 !important;
}
html:not(.dark) .sidebar > .mt-auto .sidebar-link {
  color:#64748b !important;
}
html:not(.dark) .sidebar > .mt-auto .sidebar-link:hover {
  color:#172033 !important;
  background:#e2e8f0eee !important;
}
/* ===== V4 public legal notice ===== */
html.xh-legal-open, html.xh-legal-open body { overflow:hidden !important; }
.xh-legal-overlay { position:fixed; inset:0; z-index:2147483000; display:grid; place-items:center; padding:20px; background:rgba(15,15,15,.56); backdrop-filter:blur(10px); }
.xh-legal-dialog { width:min(620px,100%); max-height:min(780px,calc(100vh - 40px)); overflow:auto; padding:34px 38px 28px; border-radius:24px; background:#fff; border:1px solid rgba(0,0,0,.08); box-shadow:0 34px 100px rgba(0,0,0,.26); color:#1e293b; }
.xh-legal-mark { display:grid; place-items:center; width:48px; height:48px; margin-bottom:22px; border-radius:15px; color:#fff; background:#2563eb; font-size:27px; font-weight:750; box-shadow:0 12px 26px rgba(37,99,235,.22); }
.xh-legal-kicker { margin-bottom:8px; color:#2563eb; font-size:12px; font-weight:750; letter-spacing:.12em; }
.xh-legal-dialog h2 { margin:0 0 15px; color:#172033; font-size:27px; line-height:1.32; letter-spacing:-.035em; }
.xh-legal-copy { margin:0 0 16px; color:#64748b; font-size:14px; line-height:1.8; }
.xh-legal-points { margin:0 0 17px; padding:16px 18px 16px 36px; border-radius:15px; background:#edf2f7; color:#475569; font-size:13px; line-height:1.75; }
.xh-legal-points li + li { margin-top:5px; }
.xh-legal-links { margin:0 0 17px; color:#64748b; font-size:13px; line-height:1.8; }
.xh-legal-links a { color:#2563eb; font-weight:600; text-decoration:none; }
.xh-legal-links a:hover { text-decoration:underline; }
.xh-legal-check { display:flex; align-items:flex-start; gap:10px; padding:14px; border:1px solid #e2e8f0; border-radius:13px; background:#fff; color:#475569; font-size:13px; line-height:1.65; cursor:pointer; }
.xh-legal-check input { width:17px; height:17px; margin-top:2px; accent-color:#2563eb; flex:0 0 auto; }
.xh-legal-accept { width:100%; min-height:48px; margin-top:16px; border:0; border-radius:12px; background:#2563eb; color:#fff; font-size:15px; font-weight:650; cursor:pointer; transition:background .18s,opacity .18s,transform .18s; }
.xh-legal-accept:hover:not(:disabled) { background:#1d4ed8; transform:translateY(-1px); }
.xh-legal-accept:disabled { opacity:.38; cursor:not-allowed; }
.xh-legal-foot { margin:13px 0 0; color:#94a3b8; font-size:11px; line-height:1.6; text-align:center; }
.dark .xh-legal-dialog { background:#172033; border-color:#334155; color:#e2e8f0; }
.dark .xh-legal-dialog h2 { color:#fff; }
.dark .xh-legal-copy,.dark .xh-legal-links { color:#94a3b8; }
.dark .xh-legal-points { background:#1e293b; color:#cbd5e1; }
.dark .xh-legal-check { background:#1e293b; border-color:#334155; color:#cbd5e1; }
@media(max-width:640px){.xh-legal-overlay{padding:12px;align-items:end}.xh-legal-dialog{max-height:90vh;padding:26px 22px 22px;border-radius:22px 22px 16px 16px}.xh-legal-dialog h2{font-size:23px}.xh-legal-mark{width:43px;height:43px;margin-bottom:17px}}
/* Login registration CTA - 2026-07-26 */
a[href="/register"] {
  display: inline-flex !important;
  min-width: 148px;
  min-height: 42px;
  margin-top: 12px;
  padding: 10px 22px !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #2563eb !important;
  border-radius: 12px;
  background: #2563eb !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600 !important;
  line-height: 20px;
  text-decoration: none !important;
  box-shadow: 0 6px 16px rgba(37,99,235, 0.18);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

a[href="/register"]:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(37,99,235, 0.24);
  transform: translateY(-1px);
}

a[href="/register"]:focus-visible {
  outline: 3px solid rgba(37,99,235, 0.24);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  a[href="/register"] {
    width: min(100%, 240px);
  }
}

/* Ensure registration CTA label remains readable over the primary background. */
html body a[href="/register"],
html body a[href="/register"]:visited,
html body a[href="/register"]:hover,
html body a[href="/register"]:active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
