:root{--navy:#14243c;--blue:#255ed9;--ink:#1b2b42;--muted:#66778c;--line:#dce4ee;font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;font-size:14px;color:var(--ink);background:#f4f6fa}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button{border:1px solid var(--line);background:white;border-radius:7px;padding:10px 16px;color:var(--ink);cursor:pointer;font-weight:600;white-space:nowrap}button:hover{border-color:#8da8d4;background:#f8faff}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--blue);color:white;border-color:var(--blue)}.primary:hover{background:#174cc3;color:white}.danger{color:#b53434;border-color:#e9bbbb}.link-button{border:0;color:var(--blue);background:transparent;padding:4px 0}.tiny{padding:6px 10px;font-size:12px}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin-top:0}h1{font-size:27px;letter-spacing:-.6px;margin-bottom:9px}h2{font-size:18px}h3{font-size:15px}p{line-height:1.8}.muted,small{color:var(--muted)}small{font-size:12px;line-height:1.7}.mono,.amount{font-variant-numeric:tabular-nums}.amount{font-weight:650}.sidebar{width:232px;position:fixed;inset:0 auto 0 0;background:var(--navy);color:#c6d2e5;display:flex;flex-direction:column;padding:28px 18px;z-index:10}.brand{display:flex;gap:11px;align-items:center;color:white;font-size:17px;font-weight:700;margin:0 8px 32px}.brand-mark{width:35px;height:35px;border-radius:9px;background:#3268de;display:grid;place-items:center;font-size:19px}.side-label{font-size:11px;letter-spacing:1.5px;color:#8297b5;margin:0 12px 12px}.sidebar nav a{display:flex;align-items:center;gap:13px;color:#b5c6de;border-radius:7px;padding:13px 14px;margin-bottom:6px}.sidebar nav a:hover{background:#223651;text-decoration:none}.sidebar nav a.active{background:#2c5188;color:white}.nav-icon{font-size:17px;width:20px;text-align:center}.side-bottom{margin-top:auto;padding:20px 12px 0;border-top:1px solid #30425d;font-size:12px;line-height:1.9;color:#92a7c2}.side-bottom strong{color:#d8e3f1}.shell{margin-left:232px}.topbar{height:75px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 36px;gap:15px}.breadcrumb{color:var(--muted);font-size:13px}.user{display:flex;align-items:center;gap:12px;font-size:13px}.avatar{display:grid;place-items:center;background:#edf3ff;color:var(--blue);width:33px;height:33px;border-radius:50%;font-weight:bold}.workspace{max-width:1480px;margin:auto;padding:32px 36px 52px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px;gap:20px}.page-heading p{margin:0;font-size:13px;color:var(--muted)}.tag{font-size:11px;border-radius:5px;padding:4px 7px;display:inline-block;background:#fff5dc;color:#986317;font-weight:600;white-space:nowrap}.card{background:white;border:1px solid var(--line);border-radius:10px;margin-bottom:20px;overflow:hidden;box-shadow:0 2px 3px #18315402}.card-body{padding:24px}.card-title{padding:20px 24px;border-bottom:1px solid #e9edf4;display:flex;align-items:center;justify-content:space-between;gap:12px}.card-title h2,.card-title h3{margin:0}.section-num{color:var(--blue);font-size:12px;font-weight:700;margin-right:10px;letter-spacing:1px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.stat{background:white;border:1px solid var(--line);border-radius:9px;padding:20px 22px}.stat-label{font-size:12px;color:var(--muted);margin-bottom:10px}.stat-number{font-size:28px;font-weight:650;line-height:1.2}.stat-number span{font-size:13px;color:var(--muted);margin-left:6px;font-weight:400}.filters{display:flex;flex-wrap:wrap;gap:12px;padding:18px 22px;border-bottom:1px solid var(--line);align-items:end}.filters label{font-size:12px;color:var(--muted);display:grid;gap:7px;min-width:140px;flex:1}.filters input,.filters select{padding:9px 10px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}th{text-align:left;font-weight:500;color:var(--muted);background:#f8fafc;white-space:nowrap}th,td{padding:16px 20px;border-bottom:1px solid #edf0f5;vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fcfdff}.align-right{text-align:right}.table-sub{font-size:11px;color:var(--muted);margin-top:5px;max-width:220px;overflow-wrap:anywhere}.badge{font-size:12px;display:inline-block;padding:5px 9px;border-radius:5px;white-space:nowrap;background:#eef1f5;color:#657286}.badge.pending{background:#fff4de;color:#9c6e1c}.badge.returned{background:#fdecec;color:#ac4242}.badge.queued{background:#eaf2ff;color:#255ed9}.badge.exported{background:#eeecff;color:#6d56b4}.badge.invoiced{background:#e8f5ef;color:#247356}.notice{border:1px solid #d7e3fa;background:#f1f6ff;border-radius:8px;padding:14px 18px;line-height:1.8;font-size:13px;margin-bottom:20px;color:#385779}.notice.warning{background:#fff9ed;border-color:#eadbb9;color:#886127}.notice.error{background:#fff1f1;border-color:#edc9c9;color:#a13636}.notice.success{background:#eff9f4;border-color:#c9e4d6;color:#286c50}.notice ul{margin:4px 0;padding-left:20px}.notice p:last-child{margin-bottom:0}.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.field{display:flex;flex-direction:column;gap:8px;min-width:0}.field>label{font-size:13px;font-weight:500}.required{color:#cd4f4f;margin-left:3px}input,select,textarea{border:1px solid #ccd7e5;border-radius:6px;background:white;padding:10px 12px;color:var(--ink);width:100%;min-width:0}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #255ed913}input[readonly]{background:#f7f9fc;color:var(--muted)}textarea{resize:vertical;min-height:82px;line-height:1.7}.span-all{grid-column:1/-1}.check{display:flex;align-items:flex-start;gap:10px;line-height:1.7;font-size:13px;cursor:pointer}.check input{width:17px;height:17px;margin:3px 0 0;flex-shrink:0;accent-color:var(--blue)}.section-tabs{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}.section-tabs a{padding:9px 14px;background:white;border:1px solid var(--line);border-radius:6px;color:var(--muted);font-size:12px}.form-section{scroll-margin-top:20px}.line-card{border:1px solid var(--line);border-radius:7px;margin-bottom:16px;background:#fcfdff;padding:19px}.line-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.line-head strong{font-size:13px}.line-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px}.line-grid .wide{grid-column:span 2}.actionbar{position:sticky;bottom:0;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:17px 22px;background:white;border:1px solid var(--line);border-radius:9px;box-shadow:0 -5px 24px #193c5710;z-index:2}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.empty{padding:60px 24px;text-align:center;color:var(--muted)}.empty h3{font-size:16px;color:var(--ink);font-weight:500}.empty p{font-size:13px}.attachment-list{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0}.attachment{border:1px solid var(--line);border-radius:6px;padding:12px 15px;display:flex;gap:13px;align-items:center;max-width:100%;overflow-wrap:anywhere}.attachment img{width:50px;height:44px;object-fit:cover;border-radius:3px}.kv{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.kv dt{color:var(--muted);font-size:12px;margin-bottom:8px}.kv dd{margin:0;font-size:14px;overflow-wrap:anywhere;white-space:pre-wrap}.summary-strip{display:flex;gap:35px;padding:20px 24px;justify-content:flex-end;flex-wrap:wrap;background:#fafcff;border-top:1px solid var(--line)}.summary-item{font-size:12px;color:var(--muted)}.summary-item strong{display:block;font-size:21px;color:var(--ink);margin-top:7px}.summary-item.final strong{color:var(--blue)}.timeline{margin:0;padding:0;list-style:none}.timeline li{padding:0 0 22px 23px;position:relative;border-left:1px solid var(--line);margin-left:5px}.timeline li:last-child{padding-bottom:0;border-left-color:transparent}.timeline li:before{content:'';width:7px;height:7px;position:absolute;left:-4px;top:5px;background:#93afd8;border-radius:50%}.timeline .time{color:var(--muted);font-size:11px;float:right}.timeline p{font-size:12px;color:var(--muted);margin:6px 0 0;white-space:pre-wrap}.modal-shade{position:fixed;inset:0;background:#14243c70;display:grid;place-items:center;padding:24px;z-index:100}.modal{background:white;box-shadow:0 20px 80px #14243c40;border-radius:12px;width:min(670px,100%);max-height:90vh;overflow:auto}.modal header{padding:24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.modal header h2{margin:0}.modal section{padding:24px}.modal footer{padding:18px 24px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:10px}.modal .stats{grid-template-columns:repeat(2,1fr);gap:10px}.modal .stat{background:#f8fafc}.modal .stat-number{font-size:23px}.login-page{min-height:100vh;display:grid;grid-template-columns:44% 56%;background:white}.login-story{background:var(--navy);padding:60px clamp(28px,5vw,90px);color:#fff;display:flex;flex-direction:column;justify-content:center}.login-story .brand{margin:0 0 60px}.login-story h1{font-size:36px;line-height:1.55;font-weight:600;letter-spacing:-.5px}.login-story>p{color:#a9bed9;max-width:330px}.login-steps{margin:35px 0 40px;padding:0;list-style:none;counter-reset:step}.login-steps li{display:flex;gap:15px;margin-bottom:22px;align-items:center;font-size:14px;color:#d9e4f4}.login-steps li:before{counter-increment:step;content:counter(step);display:grid;place-items:center;background:#30496e;color:#cfe0ff;width:28px;height:28px;border-radius:50%;font-size:12px}.login-story small{color:#8da4c4;margin-top:35px}.login-form-area{display:flex;align-items:center;justify-content:center;padding:45px}.login-form{width:390px;max-width:100%}.login-form h2{font-size:26px;margin-bottom:12px}.login-form .field{margin:23px 0}.login-form .primary{width:100%;padding:13px}.account-hints{margin-top:30px;background:#f6f8fc;padding:18px 20px;border-radius:8px;font-size:12px;line-height:2;color:var(--muted)}.account-hints strong{color:var(--ink)}.account-buttons{display:flex;gap:8px;margin:12px 0;flex-wrap:wrap}.account-buttons button{font-size:12px;padding:5px 9px;font-weight:400;background:white}.loading{padding:80px;text-align:center;color:var(--muted)}#toast{position:fixed;left:50%;bottom:35px;transform:translateX(-50%);z-index:120;max-width:min(90%,700px);white-space:pre-wrap;background:#203853;color:white;border-radius:8px;padding:15px 24px;font-size:13px;box-shadow:0 5px 25px #16305025;display:none;line-height:1.7}.note-list{padding-left:22px;line-height:2.2}.note-list li{padding-bottom:8px}.admin-row{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;margin-bottom:12px;align-items:center}.admin-row.simple{grid-template-columns:1fr auto}.admin-group{margin-bottom:25px}.admin-group p{font-size:12px;color:var(--muted)}.visually-hidden{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}
@media(max-width:1100px){.sidebar{width:200px}.shell{margin-left:200px}.workspace{padding:25px 22px}.topbar{padding:0 22px}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.line-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{gap:10px}.stat{padding:17px 15px}.kv{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.sidebar{position:static;width:100%;padding:15px}.brand{margin:0 0 14px;font-size:16px}.sidebar nav{display:flex;overflow:auto;gap:5px}.sidebar nav a{margin:0;padding:10px;white-space:nowrap;font-size:12px}.side-label,.side-bottom,.nav-icon{display:none}.shell{margin:0}.topbar{height:59px;padding:0 16px}.workspace{padding:22px 14px}.breadcrumb{font-size:11px}.avatar{display:none}.user{gap:8px;font-size:11px}.page-heading{align-items:flex-start;gap:12px}h1{font-size:23px}.page-heading p{font-size:12px}.page-heading button{padding:9px 11px;font-size:12px}.stats{grid-template-columns:repeat(2,1fr)}.stat-number{font-size:25px}.card-title{padding:17px}.card-body{padding:18px}.grid,.grid.two,.kv{grid-template-columns:1fr}.line-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.line-grid .wide{grid-column:span 2}.line-card{padding:14px}.field>label{font-size:12px}.actionbar{padding:13px;flex-wrap:wrap}.actionbar .actions{width:100%}.actionbar button{flex:1;font-size:12px;padding:10px}.actionbar small{font-size:11px}.filters{padding:15px;gap:10px}.filters label{min-width:110px}.summary-strip{justify-content:space-between;gap:18px;padding:18px}.summary-item strong{font-size:18px}.login-page{grid-template-columns:1fr}.login-story{padding:25px}.login-story .brand{margin:0 0 20px}.login-story h1{font-size:24px;margin:0}.login-story>p,.login-story small,.login-steps{display:none}.login-form-area{padding:35px 24px}.admin-row{grid-template-columns:1fr}.admin-row.simple{grid-template-columns:1fr auto}th,td{padding:13px;font-size:12px}.timeline .time{float:none;display:block;margin-top:4px}}

/* Invoice authentication UI tokens. Scoped to .invoice-auth; business pages keep their styles.
   Reference: orders system --ink/--ink-soft/--blue/--blue-dark and auth-page background. */
.invoice-auth {
  --auth-ink:#10213f;
  --auth-muted:#526581;
  --auth-blue:#1973f3;
  --auth-blue-dark:#0f5fd5;
  --auth-input:#eaf1ff;
  --auth-line:#c8d8ee;
  --auth-card-line:#dce5f1;
  --auth-card-radius:24px;
  --auth-control-radius:11px;
  --auth-card-padding:36px;
  --auth-field-gap:20px;
  --auth-shadow:0 20px 60px rgba(26,62,109,.14);
  min-height:100vh;
  min-height:100svh;
  width:100%;
  display:grid;
  place-items:center;
  padding:32px 24px;
  color:var(--auth-ink);
  font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",Arial,sans-serif;
  background:radial-gradient(circle at 18% 12%,#e7f2ff 0,transparent 33%),linear-gradient(145deg,#f8fbff,#eef4fc);
}
.invoice-auth__card {width:min(560px,100%);min-width:0;padding:var(--auth-card-padding);background:#fff;border:1px solid var(--auth-card-line);border-radius:var(--auth-card-radius);box-shadow:var(--auth-shadow)}
.invoice-auth__brand {display:flex;align-items:center;gap:14px;margin-bottom:30px;font-size:18px;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.invoice-auth__mark {display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;border-radius:16px;background:var(--auth-blue);color:#fff}
.invoice-auth__mark svg {width:30px;height:30px}
.invoice-auth h1 {font-size:30px;line-height:1.4;letter-spacing:0;font-weight:500;margin:0 0 10px}
.invoice-auth__description {color:var(--auth-muted);font-size:15px;line-height:1.8;margin:0}
.invoice-auth__message {min-height:64px;display:flex;align-items:center;overflow-wrap:anywhere}
.invoice-auth__message .notice {width:100%;margin:0;padding:10px 12px;font-size:13px;line-height:20px;border-radius:9px}
.invoice-auth__fields {display:grid;gap:var(--auth-field-gap)}
.invoice-auth .field {gap:8px;margin:0}
.invoice-auth .field>label {color:var(--auth-ink);font-size:15px;font-weight:650;line-height:22px}
.invoice-auth input {height:52px;padding:0 14px;border:1px solid var(--auth-line);border-radius:var(--auth-control-radius);background:var(--auth-input);font-size:16px;color:var(--auth-ink);line-height:normal;transition:border-color .15s,box-shadow .15s}
.invoice-auth input:focus {border-color:var(--auth-blue);box-shadow:0 0 0 3px rgba(25,115,243,.15);outline:none}
.invoice-auth input[readonly] {background:#f5f8fd;color:var(--auth-muted)}
.invoice-auth input:-webkit-autofill {-webkit-text-fill-color:var(--auth-ink);-webkit-box-shadow:0 0 0 1000px var(--auth-input) inset}
.invoice-auth input:-webkit-autofill:focus {-webkit-box-shadow:0 0 0 1000px var(--auth-input) inset;outline:3px solid rgba(25,115,243,.2);outline-offset:1px}
.invoice-auth input:autofill {background:var(--auth-input);color:var(--auth-ink)}
.invoice-auth__submit {width:100%;min-height:52px;margin-top:22px;padding:12px 16px;display:flex;align-items:center;justify-content:center;gap:9px;border:1px solid var(--auth-blue);border-radius:var(--auth-control-radius);background:linear-gradient(110deg,#2685ff,#1468e8);box-shadow:0 8px 18px rgba(25,115,243,.2);font-size:16px;font-weight:700;color:#fff;line-height:26px}
.invoice-auth__submit:hover {background:var(--auth-blue-dark);border-color:var(--auth-blue-dark);color:#fff}
.invoice-auth__submit:focus-visible {outline:3px solid rgba(25,115,243,.3);outline-offset:3px}
.invoice-auth__submit:disabled {opacity:.7;cursor:wait;box-shadow:none}
.invoice-auth__submit svg {width:21px;height:21px}
.invoice-auth__help {font-size:13px;line-height:1.8;color:var(--auth-muted);margin:22px 0 0;overflow-wrap:anywhere}
.invoice-auth__footnote {display:block;font-size:11px;color:#73849c;margin-top:12px;line-height:1.7}
.invoice-auth__identity {grid-template-columns:1fr 1fr;padding-bottom:24px;margin-bottom:24px;border-bottom:1px solid #e8eef7}
.invoice-auth__identity .field:first-child {grid-column:1/-1}
.invoice-auth .field small {color:var(--auth-muted);font-weight:400}
.invoice-auth__spinner {width:18px;height:18px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:invoice-auth-spin .8s linear infinite}
@keyframes invoice-auth-spin {to {transform:rotate(360deg)}}
@media(max-width:600px) {
  .invoice-auth {--auth-card-padding:26px 22px;--auth-card-radius:20px;padding:24px 16px}
  .invoice-auth__brand {font-size:16px;gap:12px;margin-bottom:26px}
  .invoice-auth__mark {flex-basis:46px;width:46px;height:46px;border-radius:14px}
  .invoice-auth__mark svg {width:27px;height:27px}
  .invoice-auth h1 {font-size:27px}
  .invoice-auth__description {font-size:14px}
}
@media(max-width:360px) {
  .invoice-auth {--auth-card-padding:24px 18px;padding:16px 12px}
  .invoice-auth__brand {font-size:15px;gap:10px}
  .invoice-auth h1 {font-size:25px}
}
@media(prefers-reduced-motion:reduce) {
  .invoice-auth input {transition:none}
  .invoice-auth__spinner {animation:none}
}
