/* KM Supplier Portal · design pack v4 "glass over the KM wave"
   Thesis: the blue arcs of the KM logo are the ground; content floats on liquid-glass panes above them.
   Glass is reserved for navigation (top bar, tab capsule) and the primary card; lists stay calm.
   One family (Geist; Chinese uses the phone's PingFang SC / Microsoft YaHei). Sizes 32 · 20 · 15 · 12. Weights 400 · 600.
   Colour: KM blue #1796D3 is the only accent; silver for hairlines; no cream. Motion only explains state. */
:root{
  color-scheme:light;
  --ground:#EAF2F7;--ink:#0A0C0E;--soft:#4A5661;--line:rgba(10,12,14,.09);--silver:#B9BDBE;
  --blue:#1796D3;--blue-d:#0F7AB0;--blue-lit:#3FB4E8;--mist:rgba(23,150,211,.12);
  --ok:#1F7A4D;--warn:#9A6212;
  --glass:rgba(255,255,255,.58);--glass-hi:rgba(255,255,255,.78);--glass-edge:rgba(255,255,255,.85);
  --blur:blur(24px) saturate(170%);
  --lift:0 1px 0 rgba(255,255,255,.9) inset,0 18px 40px -22px rgba(15,122,176,.45),0 2px 6px -2px rgba(10,12,14,.08);
  --f:"Geist","PingFang SC","Microsoft YaHei","Noto Sans SC",system-ui,-apple-system,sans-serif;
  --s1:32px;--s2:20px;--s3:15px;--s4:12px;--r:22px;--gap:14px;
  --ease:cubic-bezier(.2,.9,.25,1.05);
}
*{box-sizing:border-box;min-width:0;margin:0}
html{-webkit-text-size-adjust:100%;background:var(--ground)}
body{color:var(--ink);font:400 var(--s3)/1.55 var(--f);font-variant-numeric:tabular-nums;min-height:100vh;background:transparent}
html[lang=zh] body{line-height:1.7}
button{font:inherit;color:inherit;cursor:pointer;background:none;border:0}
a{color:inherit}
:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:10px}
h1,h2,h3{font-weight:600;line-height:1.2;text-wrap:balance}
h2{font-size:var(--s2)}
.lbl{font-size:var(--s4);color:var(--soft)}
.fig{font-size:var(--s1);font-weight:600;line-height:1.05;letter-spacing:-.02em;white-space:nowrap}
.muted{color:var(--soft)}
/* the KM wave ground (from the logo) */
.wave{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:radial-gradient(120% 70% at 85% 0%,#D3E9F6 0%,var(--ground) 55%)}
.wave svg{position:absolute;left:-10%;width:120%;height:auto;top:2vh}
.wave path{fill:none;stroke:var(--blue);stroke-linecap:round}
/* glass material */
.glass{background:var(--glass);-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur);border:1px solid var(--glass-edge);box-shadow:var(--lift)}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.glass{background:rgba(255,255,255,.95)}}
.pane{background:rgba(255,255,255,.86);border:1px solid rgba(255,255,255,.9);border-radius:var(--r);box-shadow:0 1px 2px rgba(10,12,14,.04),0 12px 30px -24px rgba(15,122,176,.35)}
/* top bar */
.top{position:sticky;top:10px;z-index:30;margin:10px max(12px,3vw) 0;height:58px;border-radius:999px;display:flex;align-items:center;gap:12px;padding:0 8px 0 14px}
.top img{height:32px;width:auto}
.top .who{margin-right:auto;display:flex;flex-direction:column;line-height:1.2}
.top .who b{font-weight:600}
.seg{position:relative;display:flex;padding:3px;border-radius:999px;background:rgba(10,12,14,.05)}
.seg button{position:relative;z-index:1;min-width:46px;height:40px;border-radius:999px;font-size:var(--s4);font-weight:600;color:var(--soft);transition:color .25s}
.seg button[aria-pressed=true]{color:#fff}
.seg .knob{position:absolute;top:3px;bottom:3px;border-radius:999px;background:var(--ink);transition:left .35s var(--ease),width .35s var(--ease)}
.pill-link{height:42px;padding:0 16px;border-radius:999px;display:inline-flex;align-items:center;font-weight:600;font-size:var(--s4);text-decoration:none;background:var(--ink);color:#fff;white-space:nowrap}
/* layout */
.page{max-width:1100px;margin:0 auto;padding:18px max(12px,3vw) 120px;display:grid;gap:var(--gap)}
.grid{display:grid;gap:var(--gap)}
@media(min-width:780px){.g2{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}}
.row{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}
.card{padding:20px}
.card>h2{margin-bottom:12px}
.count{min-width:26px;height:26px;padding:0 8px;border-radius:999px;display:inline-grid;place-items:center;font-size:var(--s4);font-weight:600;background:var(--mist);color:var(--blue-d)}
.count.n{background:rgba(10,12,14,.06);color:var(--soft)}
/* hero card (primary glass) */
.hero{border-radius:28px;padding:22px;display:flex;justify-content:space-between;align-items:center;gap:16px}
.hero .fig{font-size:clamp(32px,9vw,44px)}
/* list rows */
.li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 14px;align-items:center;padding:14px 0;border-top:1px solid var(--line)}
.li:first-of-type{border-top:0;padding-top:2px}
.li .t{font-weight:600}.li .d{font-size:var(--s4);color:var(--soft);grid-column:1}
.li .v{grid-row:1/3;grid-column:2;font-weight:600;white-space:nowrap}
.btn{grid-row:1/3;grid-column:2;height:44px;padding:0 18px;border-radius:999px;background:var(--ink);color:#fff;font-weight:600;font-size:var(--s4);white-space:nowrap;transition:transform .15s}
.btn:active{transform:scale(.96)}
.btn.soft{background:rgba(10,12,14,.06);color:var(--ink)}
/* stepper */
.steps{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin:18px 0 8px;position:relative}
.steps::before,.steps .bar{content:"";position:absolute;left:8.33%;top:10px;height:3px;border-radius:3px;background:rgba(10,12,14,.08)}
.steps::before{right:8.33%}
.steps .bar{background:linear-gradient(90deg,var(--blue-d),var(--blue-lit));width:0;transition:width .9s var(--ease)}
.step{display:flex;flex-direction:column;align-items:center;gap:7px;position:relative;font-size:var(--s4);color:var(--soft);text-align:center}
.step i{width:23px;height:23px;border-radius:50%;background:#fff;border:2px solid rgba(10,12,14,.12);display:grid;place-items:center}
.step.done i{background:var(--blue);border-color:var(--blue)}
.step.done i::after{content:"";width:6px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:translateY(-1px) rotate(45deg)}
.step.now i{border-color:var(--blue);box-shadow:0 0 0 5px var(--mist)}
.step.now{color:var(--ink);font-weight:600}
@media(max-width:520px){.step span{display:none}.step.now span{display:block;position:absolute;top:30px;white-space:nowrap}.steps{margin-bottom:30px}}
/* payment bar */
.pbar{display:flex;height:14px;border-radius:999px;overflow:hidden;background:rgba(10,12,14,.06);gap:3px;margin:12px 0 6px}
.pbar>div{transform-origin:left;animation:fill .8s var(--ease) both}
.pbar .paid{background:linear-gradient(90deg,var(--blue-d),var(--blue))}.pbar .due{background:var(--warn)}.pbar .sched{background:rgba(23,150,211,.22)}
@keyframes fill{from{transform:scaleX(0)}}
.legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:var(--s4);color:var(--soft)}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.ring{width:76px;height:76px;flex:none}
.ring .arc{transition:stroke-dasharray 1s var(--ease)}
/* floating tab capsule */
.tabs{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(12px + env(safe-area-inset-bottom));z-index:30;width:min(440px,calc(100% - 24px));height:66px;border-radius:999px;display:grid;grid-template-columns:repeat(4,1fr);padding:5px}
.tabs .knob{position:absolute;top:5px;bottom:5px;border-radius:999px;background:rgba(23,150,211,.14);border:1px solid rgba(255,255,255,.9);transition:left .4s var(--ease),width .4s var(--ease)}
.tabs button{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:var(--s4);color:var(--soft);border-radius:999px}
.tabs svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tabs button[aria-current=page]{color:var(--blue-d);font-weight:600}
/* view transition */
.view{animation:in .35s var(--ease) both}
@keyframes in{from{opacity:0;transform:translateY(8px)}}
/* sheet */
.sheet{position:fixed;inset:0;background:rgba(10,12,14,.28);display:none;align-items:flex-end;justify-content:center;z-index:50;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.sheet.on{display:flex}
.sheet>div{width:min(560px,calc(100% - 16px));margin-bottom:calc(8px + env(safe-area-inset-bottom));border-radius:28px;padding:22px;display:grid;gap:14px;animation:up .3s var(--ease)}
@keyframes up{from{transform:translateY(30px);opacity:.4}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
[hidden]{display:none!important}
/* v4.1 polish (skills: iart-ai/glassmorphism, jakubkrehel/better-ui) */
.glass{position:relative;isolation:isolate}
.glass::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;background:linear-gradient(140deg,rgba(255,255,255,.95),rgba(255,255,255,0) 38%,rgba(255,255,255,0) 70%,rgba(23,150,211,.35));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
.glass::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:.05;z-index:-1;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.tabs.glass{position:fixed}.top.glass{position:sticky}
/* the one authored moment: KM-blue liquid lens */
.lens{position:relative;overflow:hidden;border-radius:28px;padding:22px;color:#fff;background:linear-gradient(135deg,#0B5F8A 0%,#0F7AB0 45%,#1796D3 100%);box-shadow:0 1px 0 rgba(255,255,255,.35) inset,0 24px 50px -26px rgba(11,95,138,.75);isolation:isolate}
.lens .liq{position:absolute;inset:-20%;z-index:-1;filter:url(#liquid);opacity:.9}
.lens .liq i{position:absolute;border-radius:50%;border:10px solid rgba(255,255,255,.16)}
.lens .liq i:nth-child(1){width:70%;aspect-ratio:1;right:-18%;top:-30%}
.lens .liq i:nth-child(2){width:46%;aspect-ratio:1;right:2%;top:-6%;border-width:6px;border-color:rgba(63,180,232,.45)}
.lens .liq i:nth-child(3){width:90%;aspect-ratio:1;left:-40%;bottom:-75%;border-width:14px;border-color:rgba(255,255,255,.08)}
.lens .lbl,.lens .muted{color:rgba(255,255,255,.86)}
.lens .fig{font-size:clamp(34px,10vw,48px)}
.lens .days{display:grid;place-items:center;min-width:84px;height:84px;border-radius:50%;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.35);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);text-align:center;line-height:1.1}
.lens .days b{font-size:26px;font-weight:600;display:block}
.pane{padding:20px}
.pane>.head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.tag{font-size:var(--s4);font-weight:600;padding:4px 10px;border-radius:999px;background:var(--mist);color:var(--blue-d);white-space:nowrap}
.tag.ok{background:rgba(31,122,77,.1);color:var(--ok)}
.li .v.warn{color:var(--warn)}
.tabs svg .fill{fill:none}
.tabs button[aria-current=page] svg .fill{fill:currentColor;fill-opacity:.18}
.first .stagger>*{animation:in .5s var(--ease) both}
.first .stagger>*:nth-child(2){animation-delay:.08s}.first .stagger>*:nth-child(3){animation-delay:.16s}.first .stagger>*:nth-child(4){animation-delay:.24s}.first .stagger>*:nth-child(5){animation-delay:.32s}
.months{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;margin:8px 0 6px}
.months div{height:36px;border-radius:8px;background:rgba(10,12,14,.05)}
.months .on{background:linear-gradient(180deg,var(--blue-lit),var(--blue-d))}
.months .tbc{background:transparent;border:1.5px dashed var(--silver)}
.mlab{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;font-size:11px;color:var(--soft);text-align:center}
details.pane summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center}
details.pane summary::-webkit-details-marker{display:none}
@media(prefers-reduced-transparency:reduce){.glass{background:rgba(255,255,255,.97);-webkit-backdrop-filter:none;backdrop-filter:none}.glass::after{display:none}}
@media(prefers-reduced-motion:reduce){.lens .liq{filter:none}}
.li:first-of-type{border-top:1px solid var(--line);padding-top:14px}
.head+.li,.head+div>.li:first-child{border-top:0;padding-top:2px}
.top{margin:10px max(12px,3vw,calc((100% - 1076px)/2)) 0}
/* live portal additions */
.rowbtn{width:100%;text-align:left;cursor:pointer}
.rowbtn .v{color:var(--blue-d);font-size:var(--s4)}
.thread{display:grid;gap:8px;max-height:40vh;overflow:auto}
.msg{padding:10px 12px;border-radius:14px;background:rgba(10,12,14,.05);font-size:14px}
.msg.km{background:var(--mist)}
.msg small{display:block;color:var(--soft);font-size:11px;margin-top:2px}
textarea,input,select{font:inherit;width:100%;border:1px solid rgba(10,12,14,.15);border-radius:14px;padding:10px 12px;background:#fff;color:var(--ink)}
textarea{min-height:90px;resize:vertical}
.bubble{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--blue);color:#fff;font-size:11px;font-weight:600;margin-left:6px;vertical-align:1px}
.center{min-height:60vh;display:grid;place-items:center;text-align:center;color:var(--soft)}
