:root{color-scheme:light;--bg:#f5f6f8;--panel:#fff;--ink:#17222f;--muted:#647184;--line:#e5e8ed;--accent:#146d62;--accent-soft:#e5f3ef;--sidebar:#122b2b;--side-ink:#d2e4df;--red:#b23d48;--shadow:0 2px 5px #17222f06;--radius:16px;--field:#fbfcfd}html.dark{color-scheme:dark;--bg:#111a20;--panel:#19252c;--ink:#eef3f4;--muted:#a5b3bc;--line:#304047;--accent:#5fd3b7;--accent-soft:#203d37;--sidebar:#101f22;--side-ink:#b8d2cd;--red:#ff8b95;--field:#152128;--shadow:none}*{box-sizing:border-box}body{margin:0;font:14px/1.55 'Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}button,input,select{font:inherit;color:inherit}button{cursor:pointer;border:1px solid var(--line);background:var(--panel);border-radius:9px;padding:10px 15px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:600;transition:background .15s,border-color .15s,transform .15s}button:hover{border-color:var(--accent);background:var(--accent-soft)}button:active{transform:translateY(1px)}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:#146d62;color:#fff;border-color:#146d62}button.primary:hover{background:#10594f}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}svg.ico{width:19px;height:19px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin:0}h1{font-size:32px;letter-spacing:-1.3px;line-height:1.2;font-weight:650}h2{font-size:18px;letter-spacing:-.4px;line-height:1.35}h3{font-size:15px}small,.muted{color:var(--muted)}.eyebrow{font-size:11px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted)}.sub{color:var(--muted);margin-top:6px}.sidebar{position:fixed;inset:0 auto 0 0;width:244px;background:var(--sidebar);color:var(--side-ink);display:flex;flex-direction:column;padding:25px 17px;z-index:5}.brand{display:flex;align-items:center;gap:12px;padding:0 9px}.brand-mark{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#c3f3df;color:#123c34}.brand-mark svg{width:23px;height:23px}.brand strong{font-size:21px;letter-spacing:-.8px;color:#fff;display:block;line-height:1.2}.brand small{font-size:10px;color:#9abbb1;letter-spacing:1.2px;text-transform:uppercase}.nav-caption{margin:43px 13px 10px;font-size:10px;letter-spacing:1.7px;font-weight:700;color:#88aaa1}nav{display:flex;flex-direction:column;gap:5px}nav button{justify-content:flex-start;background:transparent;border:0;color:var(--side-ink);font-weight:500;padding:12px 13px;gap:12px;min-height:46px;border-radius:9px;text-align:left}nav button:hover{background:#ffffff0d;color:#fff}nav button.active{background:#ffffff16;color:#fff;box-shadow:inset 3px 0 #79e3be}nav button.active svg{color:#9de8cb}.side-bottom{margin-top:auto;padding:16px 10px 0;border-top:1px solid #ffffff16}.cloud-state{display:flex;align-items:center;gap:8px;font-size:12px}.dot{height:7px;width:7px;background:#71d9a8;border-radius:100%;display:inline-block}.side-bottom small{display:block;color:#8aaca3;margin-top:6px;font-size:11px}.shell{margin-left:244px;min-height:100vh;min-width:0}header{height:72px;border-bottom:1px solid var(--line);background:var(--panel);display:flex;align-items:center;justify-content:space-between;padding:0 34px;gap:18px;position:sticky;top:0;z-index:4}.crumb{display:flex;gap:9px;align-items:center;color:var(--muted);font-size:13px}.crumb b{color:var(--ink);font-weight:600}.header-actions,#identity{display:flex;align-items:center;gap:12px}.icon-btn{padding:9px;width:40px;height:40px}.avatar{width:38px;height:38px;display:grid;place-items:center;background:var(--accent-soft);border-radius:50%;color:var(--accent);font-weight:700;font-size:16px}.identity-text{line-height:1.3}.identity-text b,.identity-text small{display:block}.identity-text small{font-size:11px}.header-actions .logout{font-size:12px}.content{max-width:1510px;margin:auto;padding:30px 34px 50px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:26px}.page-head .eyebrow{margin-bottom:9px}.page-actions{display:flex;gap:9px;flex-wrap:wrap}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px}.metric,.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0}.metric{padding:19px 20px;min-height:141px}.metric-top{display:flex;align-items:center;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;font-weight:600}.metric-icon{width:34px;height:34px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);border-radius:10px}.amount{font-size:30px;line-height:1.15;font-weight:650;letter-spacing:-1.3px;font-variant-numeric:tabular-nums;margin:10px 0 6px;overflow-wrap:anywhere}.metric small{font-size:11px}.panel{padding:23px;margin-bottom:20px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:22px}.panel-head p{font-size:12px;color:var(--muted);margin-top:4px}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(280px,1fr);gap:20px;align-items:stretch}.dashboard-grid>.panel{margin-bottom:20px}.chart{display:grid;grid-template-columns:53px minmax(0,1fr);height:210px;margin-top:20px;gap:7px}.axis{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:24px;font-size:10px;color:var(--muted)}.plot{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%);background-size:100% calc(100% - 24px);background-repeat:no-repeat;min-width:0}.month{display:grid;grid-template-rows:1fr 24px;min-width:0;text-align:center;font-size:11px;color:var(--muted)}.columns{display:flex;align-items:flex-end;justify-content:center;gap:4px;height:100%;min-height:0}.columns i{width:clamp(5px,32%,24px);border-radius:4px 4px 0 0;background:#238578;display:block}.columns i.other{background:#a5c6b8}.month span{align-self:end}.legend{display:flex;gap:17px;flex-wrap:wrap;font-size:11px;color:var(--muted)}.legend i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:5px;background:#238578}.legend i.other{background:#a5c6b8}.due-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.due-row:last-child{border-bottom:0}.date-tile{background:var(--field);border:1px solid var(--line);border-radius:10px;width:46px;height:49px;flex:none;text-align:center;display:grid;align-content:center;line-height:1.1}.date-tile strong{font-size:19px}.date-tile small{font-size:10px;text-transform:uppercase;margin-top:3px}.due-info{flex:1;min-width:0}.due-info b{display:block;overflow-wrap:anywhere;font-size:13px}.due-info small{font-size:11px}.badge{display:inline-flex;border-radius:6px;padding:4px 8px;font-size:11px;font-weight:600;background:var(--field);color:var(--muted);white-space:nowrap}.badge.new{background:var(--accent-soft);color:var(--accent)}.badge.in_progress{background:#f9edcd;color:#805b19}.badge.completed{background:var(--accent-soft);color:var(--accent)}.badge.cancelled{color:var(--red)}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}th{font-size:11px;color:var(--muted);font-weight:600;padding:10px 12px;background:var(--field)}th:first-child{border-radius:7px 0 0 7px}th:last-child{border-radius:0 7px 7px 0}td{padding:15px 12px;border-bottom:1px solid var(--line);font-size:13px}tr:last-child td{border-bottom:0}td b{font-weight:600}td small{display:block}.empty{text-align:center;color:var(--muted);padding:24px 10px;font-size:13px}.empty svg{display:block;margin:0 auto 12px;width:29px;height:29px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.toolbar input{flex:1;min-width:180px}.toolbar select{width:auto;min-width:140px}input,select{width:100%;background:var(--field);border:1px solid var(--line);border-radius:9px;padding:11px 12px;min-height:44px;outline:none}input::placeholder{color:var(--muted)}label{display:block;font-size:12px;color:var(--muted);font-weight:600}label input,label select{display:block;margin-top:7px;color:var(--ink);font-size:14px;font-weight:400}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.fields.three{grid-template-columns:repeat(3,minmax(0,1fr))}.field-stack{display:grid;gap:16px}.full{grid-column:1/-1}.calc-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}.summary-panel{position:sticky;top:94px}.summary-hero{background:#123c36;color:#fff;border-radius:12px;padding:21px;margin-bottom:20px}.summary-hero small{color:#b8ddd0}.summary-hero .amount{font-size:40px;margin:12px 0}.summary-line{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.summary-line:last-of-type{border:0}.summary-line span{color:var(--muted);font-size:13px}.stack-buttons{display:grid;gap:9px;margin-top:20px}.checks{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.check-label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--field);border-radius:8px;padding:9px 10px;color:var(--ink);font-weight:400}.check-label input{width:16px;height:16px;min-height:0;margin:0;accent-color:#146d62}.form-divider{border:0;border-top:1px solid var(--line);margin:22px 0}.section-label{display:flex;align-items:center;gap:9px;margin-bottom:16px}.step{width:25px;height:25px;border-radius:7px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-weight:700;font-size:12px}.bar{height:10px;background:var(--line);border-radius:10px;overflow:hidden;margin:12px 0}.bar i{display:block;height:100%;background:#238578;border-radius:10px}.ordercard[hidden],#eng[hidden],[hidden]{display:none!important}#msg:not(:empty){background:var(--panel);color:var(--red);border:1px solid var(--red);padding:13px;border-radius:10px;margin-bottom:16px;white-space:pre-wrap}#toast{position:fixed;bottom:23px;right:24px;background:#123c36;color:white;padding:13px 18px;border-radius:10px;z-index:20;box-shadow:0 8px 30px #0003}body:not(.signed) .sidebar{display:none}body:not(.signed) .shell{margin:0}body:not(.signed) header{display:none}body:not(.signed) .content{padding:0;max-width:none}.login-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:100vh}.login-art{background:#122b2b;color:#fff;display:flex;flex-direction:column;padding:48px 8%;justify-content:space-between;position:relative;overflow:hidden}.login-art:after{content:'';position:absolute;right:-180px;bottom:-200px;width:580px;height:580px;border:1px solid #ffffff18;border-radius:50%;box-shadow:0 0 0 60px #ffffff08,0 0 0 120px #ffffff06;pointer-events:none}.login-art h1{font-size:52px;max-width:460px;letter-spacing:-2px}.login-art p{color:#b5d0c7;max-width:420px;margin-top:20px;font-size:16px}.login-form{display:grid;place-items:center;padding:40px}.login-inner{width:100%;max-width:380px}.login-inner h1{margin:10px 0}.login-inner form{display:grid;gap:17px;margin-top:28px}.login-inner .primary{margin-top:4px}.login-note{margin-top:24px;color:var(--muted);font-size:12px}body:not(.signed) #msg:not(:empty){position:fixed;top:16px;right:16px;max-width:420px;z-index:30}dialog{border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink);padding:25px;width:min(440px,calc(100% - 30px));box-shadow:0 20px 60px #0004}dialog::backdrop{background:#0b1d2380}dialog .toolbar{justify-content:flex-end;margin:20px 0 0}.price-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.price-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid var(--line)}.price-row input{max-width:130px}.mobile-brand{display:none}@media(min-width:1600px){.content{padding:38px 42px}}@media(max-width:1150px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}.calc-layout{grid-template-columns:minmax(0,1fr) 290px}.fields.three{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:210px}.shell{margin-left:210px}.content{padding:24px}header{padding:0 24px}}@media(max-width:800px){.sidebar{inset:auto 0 0;width:100%;padding:5px 7px max(6px,env(safe-area-inset-bottom));border-top:1px solid #ffffff20}.sidebar .brand,.nav-caption,.side-bottom{display:none}nav{flex-direction:row;justify-content:space-around;gap:0}nav button{min-width:0;flex:1;flex-direction:column;gap:3px;font-size:10px;line-height:1.2;padding:8px 2px;white-space:nowrap}nav button.active{box-shadow:none}nav button svg{width:21px;height:21px}.shell{margin:0}header{height:61px;padding:0 14px}.crumb{display:none}.mobile-brand{display:block;font-weight:700;font-size:18px;letter-spacing:-.6px}.header-actions,#identity{gap:8px}.identity-text{display:none}.header-actions .logout{font-size:0;padding:9px}.header-actions .logout svg{width:18px;height:18px}.content{padding:23px 14px 90px}.page-head{align-items:flex-start;flex-wrap:wrap;margin-bottom:20px}h1{font-size:27px}.metric-grid{gap:10px;margin-bottom:15px}.metric{padding:13px;min-height:117px}.metric-top{font-size:11px}.metric-icon{width:28px;height:28px}.metric-icon svg{width:16px;height:16px}.amount{font-size:24px}.panel{padding:16px;margin-bottom:15px}.dashboard-grid{gap:0}.calc-layout,.price-grid{grid-template-columns:1fr;gap:0}.summary-panel{position:static}.fields.three{grid-template-columns:repeat(2,minmax(0,1fr))}.login-layout{grid-template-columns:1fr}.login-art{padding:24px;min-height:200px}.login-art h1{font-size:30px;margin-top:25px}.login-art p{font-size:13px;margin:6px 0 0}.login-art>small{display:none}.login-form{padding:35px 20px}.chart{height:180px;grid-template-columns:43px 1fr}.plot{gap:5px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Payment state is independent of the production status. */
.pay-badge{display:inline-flex;align-items:center;gap:6px;border-radius:7px;padding:5px 9px;font-size:11px;font-weight:650;white-space:nowrap;border:1px solid transparent}.pay-badge i{width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}.pay-badge.unpaid{background:#fce8eb;color:#a22b3d;border-color:#f4cbd1}.pay-badge.partial{background:#fff2d4;color:#85570b;border-color:#f3deaa}.pay-badge.full{background:#e0f4e8;color:#206844;border-color:#bde6ce}.pay-badge.free{background:var(--field);color:var(--muted);border-color:var(--line)}html.dark .pay-badge.unpaid{background:#47262e;color:#ffacb7;border-color:#6b3541}html.dark .pay-badge.partial{background:#42361f;color:#f6d28a;border-color:#68562d}html.dark .pay-badge.full{background:#1e3d31;color:#9be6b7;border-color:#345c47}.order-actions{display:flex;align-items:center;gap:7px}.order-actions button{padding:9px 11px}.order-actions .delete-order{padding:9px;width:40px;color:var(--red)}.delete-order:hover{background:#b23d4815;border-color:var(--red)}button.danger{background:#b23d48;border-color:#b23d48;color:white}button.danger:hover{background:#922e39;border-color:#922e39}.delete-warning{padding:12px;margin:16px 0 10px;background:#b23d480c;border:1px solid var(--line);border-radius:9px;color:var(--ink);font-size:13px}.delete-symbol{display:grid;place-items:center;width:36px;height:36px;background:#b23d4815;color:var(--red);border-radius:10px;font-size:24px;font-weight:700;margin-bottom:12px}#deleteDialog .check-label{white-space:normal}#filterPay{max-width:210px}@media(max-width:800px){#filterPay{max-width:none}.toolbar select{flex:1;min-width:120px}.order-actions .delete-order{min-width:40px}}

/* v0.5 */
#workDialog{width:min(570px,calc(100% - 28px));max-height:90dvh;overflow:auto}#workBody{display:grid;gap:14px;margin-top:18px}#workBody textarea{width:100%;border:1px solid var(--line);border-radius:8px;background:var(--field);color:var(--ink);font:inherit;padding:11px;resize:vertical}#workError{color:var(--red);margin-top:10px}#workError:empty{display:none}.edit-order{min-width:40px}.calendar-scroll{overflow-x:auto}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;overflow:hidden;min-width:560px}.calendar-week{padding:12px;text-align:center;font-size:12px;color:var(--muted);background:var(--field)}.calendar-day{min-height:105px;min-width:0;display:flex;flex-direction:column;gap:5px;padding:8px;border-top:1px solid var(--line);border-right:1px solid var(--line)}.calendar-day:nth-child(7n){border-right:0}.calendar-day>b{font-size:13px;align-self:flex-start;padding:4px 7px}.calendar-day.outside{opacity:.45}.calendar-day.today>b{background:#16766b;color:white;border-radius:8px}.calendar-event{display:block;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;padding:5px 6px;color:var(--ink);background:var(--field);border-left:3px solid #238578}.calendar-event.late{border-left-color:var(--red)}@media(max-width:800px){nav{overflow-x:auto;justify-content:flex-start}nav button{flex:1 0 58px;font-size:9px}.calendar-day{min-height:86px}}

.cart-box{border:1px solid var(--border,#71807955);border-radius:12px;padding:15px;margin-top:16px}.cart-line{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--border,#71807955)}.cart-line>div{flex:1;min-width:0;overflow-wrap:anywhere}.cart-line small{display:block;opacity:.7}.cart-box>button{margin-top:12px}.cart-line button{padding:7px 10px}.cart-line b{white-space:nowrap}.cart-line>div b{white-space:normal}

#updateNotice{margin:0 0 16px;padding:12px 16px;border:1px solid #bc9a54;border-radius:10px;background:#fff8e5;color:#72500b;font-size:13px;}
.dark #updateNotice{background:#382c19;color:#f8d58d;border-color:#856530;}
#updateNotice[hidden]{display:none!important;}

.catalog-row{display:grid;grid-template-columns:minmax(0,1fr) 85px auto;gap:8px;align-items:center}.catalog-row input{width:100%;min-width:0}.catalog-row .icon-btn{width:auto;padding:5px 8px;white-space:nowrap} [hidden]{display:none!important}
