/* Shared service navigation, surfaces, typography and responsive forms. */
:root{
  --sans:"PingFang SC","Microsoft YaHei UI","Microsoft YaHei","Noto Sans CJK SC","Noto Sans SC",system-ui,sans-serif;--serif:var(--sans);
  --rail:205px;--bar:65px;--bg:#f2f5ef;--panel:#fffefa;--popup:#fffefa;--soft:#e9f2e9;--head:#fcfdf9ef;--text:#152f28;--body:#354a42;--muted:#51685d;--line:#d9e2d7;--accent:#17674e;--on:#fffefa;--gold:#89602c;--gold-bg:#f6edda;--positive:#27684f;--hero:#174f3f;--hero-ink:#fff9ea;--hero-sub:#d3e8d6;
  --rail-bg:#eaf0e7;--rail-active:#15543f;--rail-ink:#f4f7ee;--mark-bg:#184e3e;--mark-ink:#f6df9a;--radius:18px;--shadow:0 5px 22px #23472f0d;
}
:root[data-theme=night]{--bg:#121d22;--panel:#1c2a30;--popup:#243239;--soft:#2b373a;--head:#18262ceb;--text:#f3eee0;--body:#e0e2d8;--muted:#b5c0b6;--line:#35464a;--accent:#edc585;--on:#2c261d;--gold:#e3bd80;--gold-bg:#42392c;--hero:#263330;--hero-ink:#fff5db;--hero-sub:#d8cbb1;--rail-bg:#19282d;--rail-active:#ddbb81;--rail-ink:#25271e;--mark-bg:#39403a;--mark-ink:#f4d295;--shadow:0 9px 29px #0002}
:root[data-theme=paper]{--bg:#e7d3aa;--panel:#f5e8cb;--popup:#f6eace;--soft:#ead9b7;--head:#efdfbdf5;--text:#352d21;--body:#493d2d;--muted:#65533c;--line:#ccba97;--accent:#78541d;--on:#fff8e8;--gold:#745324;--gold-bg:#ecdaaf;--hero:#6b512f;--hero-ink:#fff6df;--hero-sub:#efddba;--rail-bg:#e2cda6;--rail-active:#78541d;--rail-ink:#fff8e8;--mark-bg:#71552c;--mark-ink:#f5ddae;--shadow:0 12px 32px #573d1812}
:root[data-theme=glass]{--bg:#eef1f9;--panel:#fffffff1;--popup:#f9faff;--soft:#ebeffc;--head:#f9fbffe3;--text:#24304c;--body:#3d4863;--muted:#53647f;--line:#d4dcee;--accent:#445d9c;--on:#fff;--gold:#795069;--gold-bg:#f3e8ef;--hero:#384b75;--hero-ink:#fffaff;--hero-sub:#e4e7fb;--rail-bg:#e7ebf7ca;--rail-active:#4c6194;--rail-ink:#fbfaff;--mark-bg:#4d608f;--mark-ink:#f0e1ff;--radius:20px;--shadow:0 8px 30px #485d8710}
body{font-family:var(--sans);font-size:15px;line-height:1.6;font-variant-numeric:tabular-nums}
h1,h2,h3,.brand,.serif,.focal .big,.num,.stat .num,.compact-stats strong,.rank-num,.stage-badge,.donut b{font-family:var(--sans)}
h1,h2,h3{font-weight:680;letter-spacing:-.025em}h1{font-size:clamp(25px,2.4vw,37px);line-height:1.24}h2{font-size:clamp(18px,1.45vw,23px);line-height:1.38}.section-title{margin-bottom:17px}
.top{height:var(--bar);border-bottom:1px solid var(--line);background:var(--head);z-index:10;backdrop-filter:blur(18px)}
.top-inner{max-width:none;min-height:var(--bar);height:100%;padding:0 clamp(20px,3vw,46px);gap:20px}
.brand{font:700 21px/1 var(--sans);letter-spacing:.015em;gap:10px;color:var(--text)}
.brand-symbol{width:37px;height:37px;display:grid;place-items:center;background:var(--mark-bg);color:var(--mark-ink);border-radius:12px;box-shadow:inset 0 0 0 1px #ffffff20}
.brand .brand-symbol svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.context-title{color:var(--muted);font-size:13px;white-space:nowrap}
.top-actions{gap:10px}.theme-button{padding:0;border:0;border-radius:0;background:transparent;display:block;color:var(--text)}
.workbench-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 10px;border-radius:12px;color:var(--accent);font-weight:650;font-size:.9375rem;white-space:nowrap}
.workbench-link:hover,.workbench-link[aria-current]{background:var(--soft);text-decoration:none}
.workbench-signin{display:grid;gap:18px;max-width:440px;margin:clamp(12px,6vh,60px) auto}
.workbench-signin h1{font-size:clamp(23px,4vw,30px)}.workbench-signin>p{color:var(--muted)}
.workbench-signin>a{justify-self:start}
.seat-settings .seat-current{display:grid;gap:5px;margin:12px 0 18px}
.seat-permissions{display:grid;gap:10px;min-width:0;margin:0;padding:10px 14px;border:1px solid var(--line);border-radius:10px}
.seat-permissions legend{padding:0 4px;color:var(--text);font-weight:600}
[data-seat-reload][hidden]{display:none}
.top-actions .theme-button .pick-trigger{justify-content:center;background:transparent;border:1px solid var(--line);border-radius:999px;min-height:38px;gap:6px;font-size:13px;font-weight:550;padding:0 11px}
.top-actions .theme-button .pick-trigger>.pick-icon:first-child{width:22px;height:22px}.top-actions .theme-button .pick-trigger>.pick-icon:last-child{width:12px;height:12px}
.theme-button #theme:not(.pick-native){background:transparent url('/assets/theme-palette.svg') no-repeat 8px center / 22px 22px;padding-inline-start:36px;color:var(--text)}
.me{display:flex;align-items:center;gap:8px;min-height:38px;max-width:178px;border:1px solid var(--line);background:var(--panel);color:var(--text);padding:4px 13px 4px 8px}
.me .icon{width:26px;height:26px;padding:4px;color:var(--accent);background:var(--soft);border-radius:50%}.me span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#desktop-nav{display:none}
main{max-width:1390px;padding:clamp(20px,3vw,38px) clamp(18px,3vw,44px) 65px}
.page-head{margin:0 0 22px;align-items:center}.page-head>div:first-child{min-width:0}.page-head p{font-size:14px;margin-top:5px;line-height:1.58;max-width:72ch}.page-head .crumb{font-size:12px;line-height:1.4}
.panel,.card,.receipt{box-shadow:var(--shadow)}.panel{padding:clamp(17px,1.8vw,27px)}.card{padding:17px 19px}.grid{gap:17px}
.btn,.button-link{border-radius:11px;font-weight:590;transition:background .15s,border-color .15s,transform .15s}.btn:active,.button-link:active,.pick-trigger:active{transform:translateY(1px)}
.btn.primary,.button-link.primary{box-shadow:0 3px 7px color-mix(in srgb,var(--accent) 18%,transparent)}
.fields{gap:16px}.field{gap:6px}.field input,.field select,.field textarea,.filters input,.filters select,input.control,select.control,textarea.control{border-radius:11px;min-height:44px;font-size:15px}
.field input:not([type=checkbox]):not([type=radio]),.field textarea{width:100%}
.filter-bar{display:flex;flex-wrap:wrap;align-items:end;gap:9px;margin:3px 0 20px}
.filter-bar>label{min-width:0;max-width:100%;display:flex;align-items:center;gap:0;position:relative;flex:0 1 auto}
.filter-bar>label>span:first-child:not(.seva-select){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.filter-bar .seva-select{max-width:100%}
.filter-bar .pick-trigger{border-radius:999px;min-height:41px;background:var(--panel);padding:0 13px;gap:7px;min-width:110px;max-width:260px;font-size:14px;font-weight:540}
.filter-bar .pick-trigger>.pick-icon:first-child{width:17px;height:17px}
.filter-bar .pick-trigger>.pick-icon:last-child{width:13px;height:13px}
.tabs,.manage-menu{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;gap:5px;align-items:center;border:0;padding:2px 1px 7px;scroll-padding:8px}
.tabs>a,.tabs>button,.manage-menu>a{flex:0 0 auto;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;min-height:39px;font-size:14px;line-height:1.4;border-radius:999px;padding:6px 13px;color:var(--muted);border:1px solid transparent}
.tabs>.selected,.manage-menu>a.selected{background:var(--panel);color:var(--accent);border-color:var(--line);font-weight:650;box-shadow:0 2px 6px #243c260b}
.tabs a:focus-visible,.manage-menu a:focus-visible{outline-offset:-2px}
.empty{display:grid;justify-items:center;align-content:center;gap:5px;padding:clamp(22px,3vw,38px) 12px}.empty strong{font-size:16px;font-weight:620}.empty p{max-width:48ch;font-size:14px;line-height:1.6;margin:0 0 5px}
.empty>.icon{display:block;box-sizing:content-box;width:22px;height:22px;margin:0 0 5px;padding:11px;background:var(--soft);border-radius:14px}
dialog#modal{width:min(520px,calc(100% - 28px));border-radius:21px;padding:24px;background:var(--popup);box-shadow:0 18px 72px #152b253b}
dialog#modal::backdrop{background:#0c201b66;backdrop-filter:blur(3px)}
dialog#modal .section-title{padding-bottom:12px;border-bottom:1px solid var(--line)}
dialog#modal .section-title .btn[data-close]{min-width:42px;width:42px;min-height:42px;height:42px;padding:0;border-color:transparent;background:var(--soft);border-radius:999px}
dialog#modal .section-title .btn[data-close] .icon{width:17px;height:17px}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(min-width:900px){
  .with-nav .top-inner{padding-left:0}
  .with-nav .brand{width:var(--rail);height:100%;padding-left:22px;flex:none;background:var(--rail-bg);border-right:1px solid var(--line)}
  .with-nav #desktop-nav{display:flex;position:fixed;inset:var(--bar) auto 0 0;width:var(--rail);flex-direction:column;align-items:stretch;gap:5px;padding:25px 13px;background:var(--rail-bg);border-right:1px solid var(--line);z-index:6;overflow-y:auto}
  #desktop-nav a{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:45px;padding:0 15px;border:0;border-radius:12px;color:var(--body);font:540 14px/1.3 var(--sans)}
  #desktop-nav a .icon{width:19px;height:19px;opacity:.88}#desktop-nav a.active{color:var(--rail-ink);background:var(--rail-active);font-weight:660;box-shadow:0 3px 8px #172a2011}
  #desktop-nav a[href="#admin"]{margin-top:13px}#desktop-nav a:hover{text-decoration:none;background:var(--panel);color:var(--accent)}#desktop-nav a.active:hover{background:var(--rail-active);color:var(--rail-ink)}
  .with-nav main{margin-left:max(var(--rail),calc((100% - 1350px + var(--rail))/2));margin-right:max(0px,calc((100% - 1350px - var(--rail))/2));max-width:1350px}
  #mobile-nav:not(:empty){display:none}
}
@media(min-width:900px) and (max-width:1090px){:root{--rail:163px}.with-nav .brand{padding-left:14px;font-size:19px}.with-nav #desktop-nav{padding:20px 9px}.with-nav main{padding:24px 19px}}
@media(max-width:899px){
  :root{--bar:59px}
  .top-inner{min-height:var(--bar);padding:0 16px}.brand{font-size:20px;gap:8px}.brand-symbol{width:34px;height:34px;border-radius:11px}.brand .brand-symbol svg{width:25px;height:25px}
  .context-title{display:none}.top-actions{gap:5px}
  .top-actions .theme-button .pick-trigger,.me{border:0;background:transparent;box-shadow:none;width:44px;height:44px;padding:0;display:grid;place-items:center;border-radius:13px}
  .top-actions .theme-button .pick-trigger:hover,.me:hover{background:var(--soft)}
  .top-actions .theme-button .pick-trigger>.pick-icon:first-child{width:26px;height:26px}.top-actions .theme-button .pick-trigger>.pick-value,.top-actions .theme-button .pick-trigger>.pick-icon:last-child,.me>span{display:none}
  .theme-button #theme:not(.pick-native){width:44px;height:44px;min-width:0;padding:0;appearance:none;-webkit-appearance:none;background-position:center;background-size:26px 26px;color:transparent}.theme-button #theme:not(.pick-native) option{color:var(--text)}
  .me .icon{width:27px;height:27px;padding:3px}
  #desktop-nav{display:none}.with-nav #mobile-nav:not(:empty){position:fixed;display:flex;gap:0;align-items:stretch;bottom:0;left:0;right:0;border-top:1px solid var(--line);background:var(--head);backdrop-filter:blur(16px);box-shadow:0 -5px 20px #152e2309;padding:3px max(4px,calc((100vw - 580px)/2)) max(4px,env(safe-area-inset-bottom));z-index:8}
  #mobile-nav a{position:relative;display:flex;flex:1;min-width:0;min-height:49px;flex-direction:column;justify-content:center;align-items:center;gap:2px;color:var(--muted);font-size:11px;line-height:1.25;isolation:isolate}
  #mobile-nav a .icon{width:20px;height:20px}#mobile-nav a.active{color:var(--accent);font-weight:680}#mobile-nav a.active:before{content:"";position:absolute;z-index:-1;top:3px;width:39px;height:23px;border-radius:100px;background:var(--soft)}
  main{padding-bottom:82px}.page-head{margin:0 0 17px;gap:9px}.with-nav .toast{bottom:calc(67px + env(safe-area-inset-bottom))}
}
@media(max-width:700px){
  main{padding:19px 14px 82px}.panel{border-radius:16px;padding:16px}.page-head .tools{gap:6px}
  .filter-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;max-width:440px;margin:3px 0 15px}
  .filter-bar>label,.filter-bar .seva-select,.filter-bar .pick-trigger{width:100%;min-width:0;max-width:none}
  .filter-bar .pick-trigger{height:43px;padding:0 12px;font-size:13px}
  .tabs,.manage-menu{margin-bottom:13px;scrollbar-width:none}.tabs::-webkit-scrollbar,.manage-menu::-webkit-scrollbar{display:none}
  .tabs>a,.tabs>button,.manage-menu>a{padding:6px 12px;font-size:13px;min-height:40px}
  .table-scroll{max-width:100%}
  dialog#modal{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:88dvh;border-radius:23px 23px 0 0;padding:10px 18px max(20px,env(safe-area-inset-bottom));border-bottom:0;overscroll-behavior:contain}
  dialog#modal[open]::before{content:"";display:block;margin:0 auto 14px;width:36px;height:4px;border-radius:8px;background:var(--line)}
  input:not([type=checkbox]):not([type=radio]),textarea,.field input,.filters input{font-size:16px}
}
@media(max-width:380px){.top-inner{padding-inline:10px;gap:4px}.workbench-link{padding-inline:5px}}
@media(prefers-reduced-motion:reduce){.btn,.button-link,.pick-trigger{transition:none!important}}
