:root { --font: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
html { font-family: var(--font); }
[data-theme="advhub"] {
  color-scheme: light;
  --p: 55% 0.21 277; --pc: 98% 0.01 277;
  --s: 63% 0.11 215; --sc: 98% 0.01 215;
  --a: 80% 0.16 75; --ac: 27% 0.05 60;
  --n: 26% 0.04 265; --nc: 96% 0.008 265;
  --b1: 100% 0 0; --b2: 97.6% 0.006 265; --b3: 93.5% 0.01 265; --bc: 26% 0.04 265;
  --in: 68% 0.14 235; --inc: 98% 0.01 235;
  --su: 62% 0.15 155; --suc: 98% 0.01 155;
  --wa: 82% 0.16 82; --wac: 28% 0.06 80;
  --er: 62% 0.21 22; --erc: 98% 0.01 22;
  --rounded-box: 0.9rem; --rounded-btn: 0.6rem; --rounded-badge: 1.5rem;
  --animation-btn: .2s; --btn-focus-scale: .98;
}
[data-theme="advhub-dark"] {
  color-scheme: dark;
  --p: 70% 0.15 277; --pc: 20% 0.04 277;
  --s: 74% 0.11 215; --sc: 20% 0.03 215;
  --a: 82% 0.15 75; --ac: 27% 0.05 60;
  --n: 24% 0.03 265; --nc: 92% 0.01 265;
  --b1: 22% 0.03 265; --b2: 18.5% 0.03 265; --b3: 28% 0.035 265; --bc: 92% 0.01 265;
  --in: 72% 0.13 235; --inc: 20% 0.03 235;
  --su: 72% 0.15 155; --suc: 20% 0.03 155;
  --wa: 84% 0.15 82; --wac: 28% 0.06 80;
  --er: 70% 0.19 22; --erc: 20% 0.04 22;
  --rounded-box: 0.9rem; --rounded-btn: 0.6rem; --rounded-badge: 1.5rem;
}
.hero-bg {
  background:
    radial-gradient(900px 420px at 15% -10%, oklch(var(--p) / .22), transparent 60%),
    radial-gradient(700px 380px at 90% 0%, oklch(var(--s) / .20), transparent 60%),
    radial-gradient(600px 300px at 60% 110%, oklch(var(--a) / .14), transparent 60%);
}
.grad-text { background: linear-gradient(90deg, oklch(var(--p)), oklch(var(--s))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -12px oklch(var(--p) / .35); }
.glass { background: oklch(var(--b1) / .72); backdrop-filter: blur(14px); }
.kpi-icon { width: 2.5rem; height: 2.5rem; border-radius: .8rem; display: grid; place-items: center; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.menu li > a.sidebar-link.active, .menu li > a.sidebar-link.active:hover { background: oklch(var(--p) / .13); color: oklch(var(--p)); font-weight: 600; }
.code-box { background: #0f172a; color: #e2e8f0; border-radius: .9rem; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.7; }
.code-box .c { color: #64748b; } .code-box .k { color: #c4b5fd; } .code-box .s { color: #86efac; } .code-box .f { color: #7dd3fc; }
.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.table :where(thead, tfoot) tr { background: oklch(var(--b2)); }
.scroll-thin::-webkit-scrollbar { height: 8px; width: 8px; } .scroll-thin::-webkit-scrollbar-thumb { background: oklch(var(--bc) / .2); border-radius: 8px; }

/* ---- polish pass ---- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; letter-spacing: -0.005em; }
h1, h2, h3 { letter-spacing: -0.02em; }
/* cards: soft elevation, crisper borders */
.card.bg-base-100.border { box-shadow: 0 1px 2px oklch(var(--bc) / .04), 0 4px 14px -8px oklch(var(--bc) / .08); border-color: oklch(var(--bc) / .09); }
.card-hover:hover { border-color: oklch(var(--p) / .35); }
/* tables */
.table :where(thead th, tfoot td) { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: oklch(var(--bc) / .55); }
.table :where(tbody tr):hover td { background: oklch(var(--p) / .04); }
.table :where(tbody td) { border-color: oklch(var(--bc) / .06); }
/* forms */
.input:focus, .select:focus, .textarea:focus { outline: 2px solid oklch(var(--p) / .35); outline-offset: 1px; border-color: oklch(var(--p) / .6); }
.btn-primary { box-shadow: 0 6px 16px -8px oklch(var(--p) / .7); }
.btn-secondary { box-shadow: 0 6px 16px -8px oklch(var(--s) / .7); }
/* announcement banners: quiet, readable */
.alert-info { background: oklch(var(--in) / .1); border: 1px solid oklch(var(--in) / .35); color: oklch(var(--bc)); }
.alert-info > div > .font-semibold { color: oklch(var(--in)); }
.alert-warning { background: oklch(var(--wa) / .16); border: 1px solid oklch(var(--wa) / .5); color: oklch(var(--bc)); }
/* sidebar: section labels and product-line identity */
.menu li.menu-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding-top: .35rem; }
.menu li.product-app::before, .menu li.product-web::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 9999px; margin-right: .4rem; }
.menu li.menu-title.product-app, .menu li.menu-title.product-web { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; }
.menu li.product-app::before { background: oklch(var(--p)); }
.menu li.product-web::before { background: oklch(var(--s)); }
.menu li.product-web.menu-title { color: oklch(var(--s)); opacity: .9; }
.menu li.product-app.menu-title { color: oklch(var(--p)); opacity: .9; }
.menu li > a.sidebar-link { transition: background .15s, color .15s; }
.menu li > a.sidebar-link:hover { background: oklch(var(--bc) / .05); }
.menu li > a.sidebar-link.sidebar-web.active, .menu li > a.sidebar-link.sidebar-web.active:hover { background: oklch(var(--s) / .14); color: oklch(var(--s)); }
.menu li > a.sidebar-link.active { box-shadow: inset 3px 0 0 oklch(var(--p)); }
.menu li > a.sidebar-link.sidebar-web.active { box-shadow: inset 3px 0 0 oklch(var(--s)); }
/* console canvas */
#main { background: transparent; }
.drawer-content { background: linear-gradient(180deg, oklch(var(--b2)) 0%, oklch(var(--b2) / .6) 100%); }
/* KPI numbers */
.card .text-3xl.font-extrabold, .card .text-2xl.font-extrabold { font-variant-numeric: tabular-nums; }
/* auth card */
.auth-logo { width: 3.25rem; height: 3.25rem; margin: 0 auto .6rem; filter: drop-shadow(0 10px 14px oklch(var(--p) / .35)); }
.auth-logo img { width: 100%; height: 100%; }
/* badges */
.badge { font-weight: 600; }
/* scrollbars in sidebar */
.menu::-webkit-scrollbar { width: 6px; } .menu::-webkit-scrollbar-thumb { background: oklch(var(--bc) / .15); border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .fade-in, .card-hover { animation: none; transition: none; } }
.table .btn.font-mono { max-width: 8.5rem; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }

/* ---- mobile + alerts ---- */
.alert { text-align: left; justify-items: start; }
.alert:not([class*="alert-"]) { background: oklch(var(--b1)); border: 1px solid oklch(var(--bc) / .12); color: oklch(var(--bc)); }
.crumb h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
p code, li code, td code { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 640px) {
  .crumb-prefix { display: none; }
  .drawer-content main#main { padding: 1rem; }
  .table { font-size: .85rem; }
}
.grid > *, .flex > .card, main .card { min-width: 0; }
.card-body { overflow-wrap: anywhere; }

/* ---- UV Junction Zone brand + photography ---- */
.brand-word { white-space: nowrap; }
.drawer-side .brand-word { font-size: 1.05rem; }
/* photo heroes: dark overlay keeps text readable in both themes */
.hero-photo { position: relative; isolation: isolate; color: #fff; background: #0b1230 url(/static/img/hero-junction.jpg) center 70% / cover no-repeat; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10,14,40,.94) 0%, rgba(17,24,64,.82) 42%, rgba(30,27,75,.45) 72%, rgba(8,47,73,.35) 100%); }
.hero-photo-web { background-image: url(/static/img/web-hero.jpg); background-position: center 40%; }
.hero-photo-web::before { background: linear-gradient(100deg, rgba(8,20,36,.95) 0%, rgba(8,37,56,.86) 45%, rgba(8,47,73,.6) 100%); }
.hero-photo .grad-text { background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; }
.hero-photo .hero-accent { color: #67e8f9; }
.hero-photo .opacity-75, .hero-photo .opacity-60 { opacity: .86; }
.hero-photo .link { color: #a5f3fc; }
.hero-chip { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); color: #e0e7ff; backdrop-filter: blur(6px); height: auto; }
.hero-ghost.btn-outline { color: #fff; border-color: rgba(255,255,255,.55); }
.hero-ghost.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.hero-photo .card { color: oklch(var(--bc)); }
/* product-line cards */
.line-fig { height: 190px; overflow: hidden; margin: 0; position: relative; }
.line-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover > .line-fig img { transform: scale(1.04); }
.line-fig::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, oklch(var(--b1) / .55)); }
/* closing call-to-action */
.cta-photo { background: linear-gradient(120deg, rgba(67,56,202,.93), rgba(79,70,229,.86) 45%, rgba(6,182,212,.84)), url(/static/img/hero-junction.jpg) center 65% / cover; }
/* auth: split card with photo panel */
.auth-split { max-width: 28rem; overflow: hidden; display: grid; }
.auth-art { display: none; }
@media (min-width: 1024px) {
  .auth-split { max-width: 60rem; grid-template-columns: 1fr 1fr; }
  .auth-art { display: block; position: relative; color: #fff; min-height: 34rem;
    background: linear-gradient(160deg, rgba(30,27,75,.55), rgba(8,47,73,.88)), url(/static/img/auth-network.jpg) center / cover; }
  .auth-art-inner { position: absolute; inset: 0; padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .line-fig img { transition: none; } }
.overflow-hidden { overflow: hidden; }
.leading-tight { line-height: 1.25; }
@media (min-width: 1024px) and (max-width: 1279px) {
  header.navbar .navbar-center .menu-horizontal { gap: 0; }
  header.navbar .navbar-center .menu-horizontal > li > a { padding-left: .5rem; padding-right: .5rem; font-size: .875rem; }
  header.navbar .navbar-start .brand-word { font-size: 1.05rem; }
}
@media (max-width: 639px) {
  header.navbar .navbar-start .brand-word { display: none; }
}
#lines .badge { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 639px) {
  header.navbar .navbar-start { width: auto; flex: 0 0 auto; }
  header.navbar .navbar-end { width: auto; flex: 1 1 auto; gap: .25rem; }
}
@media (max-width: 399px) {
  header.navbar .navbar-end > button.btn-circle { display: none; }
}
