:root{--bg: #fafaf9;--surface: #ffffff;--surface-2: #f4f4f3;--border: #e7e5e4;--border-strong: #d6d3d1;--text: #1c1917;--muted: #78716c;--faint: #a8a29e;--accent: #1c1917;--accent-text: #ffffff;--ok: #15803d;--ok-bg: #ecfdf3;--pending: #a16207;--pending-bg: #fef9e7;--danger: #b91c1c;--danger-bg: #fef2f2;--focus: #2563eb33;--radius: 12px;--radius-sm: 8px;--shadow: 0 1px 2px rgb(28 25 23 / .04), 0 1px 1px rgb(28 25 23 / .02);--shadow-lg: 0 12px 40px rgb(28 25 23 / .14);--font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 var(--font);-webkit-font-smoothing:antialiased;font-feature-settings:"cv11","ss01"}h1,h2,h3{margin:0;letter-spacing:-.01em}h1{font-size:22px;font-weight:650}h2{font-size:15px;font-weight:600}h3{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}a{color:inherit;text-decoration:none}code{background:var(--surface-2);padding:1px 5px;border-radius:4px;font-size:12px}.muted{color:var(--muted)}.small{font-size:12px}.center{text-align:center}.num{text-align:right;font-variant-numeric:tabular-nums}input,select{font:inherit;color:inherit;width:100%;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;height:36px;transition:border-color .15s,box-shadow .15s}input::placeholder{color:var(--faint)}input:hover,select:hover{border-color:var(--border-strong)}input:focus,select:focus{outline:none;border-color:#93a4c3;box-shadow:0 0 0 3px var(--focus)}input:disabled{background:var(--surface-2);color:var(--faint)}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input.num{text-align:right}.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}.field>span{font-size:12px;font-weight:500;color:var(--muted)}.field.grow{flex:1}.switch-field{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:500}.switch-field input{position:absolute;opacity:0;width:0;height:0}.switch{width:34px;height:20px;border-radius:99px;background:var(--border-strong);position:relative;transition:background .15s;flex:none}.switch:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #0003;transition:transform .15s}.switch-field input:checked+.switch{background:var(--accent)}.switch-field input:checked+.switch:after{transform:translate(14px)}.switch-field input:focus-visible+.switch{box-shadow:0 0 0 3px var(--focus)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-weight:500;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,opacity .15s}.btn:hover{background:var(--surface-2);border-color:var(--border-strong)}.btn:disabled{opacity:.45;cursor:default}.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}.btn-primary:hover{background:#3a3532;border-color:#3a3532}.btn-primary:disabled:hover{background:var(--accent)}.btn-ok{background:var(--ok);border-color:var(--ok);color:#fff}.btn-ok:hover{background:#126c34;border-color:#126c34}.btn-ghost{background:transparent;border-color:transparent}.btn-ghost:hover{background:var(--surface-2);border-color:transparent}.btn-danger-ghost{background:transparent;border-color:transparent;color:var(--danger)}.btn-danger-ghost:hover{background:var(--danger-bg);border-color:transparent}.btn-sm{height:30px;padding:0 10px;font-size:13px}.btn-block{width:100%}.icon-btn{border:0;background:transparent;color:var(--faint);width:30px;height:30px;border-radius:6px;cursor:pointer;font-size:13px}.icon-btn:hover{background:var(--surface-2);color:var(--text)}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{height:32px;padding:0 12px;border-radius:99px;border:1px solid var(--border);background:var(--surface);font:inherit;font-weight:500;color:var(--muted);cursor:pointer}.chip:hover{color:var(--text)}.chip.active{background:var(--accent);border-color:var(--accent);color:#fff}.chip-count{opacity:.6;margin-left:2px;font-variant-numeric:tabular-nums}.badge{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:500;white-space:nowrap}.badge:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.badge-ok{color:var(--ok);background:var(--ok-bg)}.badge-pending{color:var(--pending);background:var(--pending-bg)}.tag{font-family:var(--font);display:inline-block;font-size:11px;font-weight:600;padding:1px 7px;border-radius:5px;background:var(--surface-2);color:var(--muted);margin-left:6px;letter-spacing:.02em;text-transform:none}.tag-soft{background:#eef2ff;color:#4338ca}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.card.pad{padding:16px}.card.narrow{max-width:440px;padding:28px}.card.narrow h2{font-size:18px;margin-bottom:8px}.card.narrow p{margin:0 0 18px}.topbar{position:sticky;top:0;z-index:20;background:#fafaf9d9;-webkit-backdrop-filter:saturate(1.6) blur(10px);backdrop-filter:saturate(1.6) blur(10px);border-bottom:1px solid var(--border)}.topbar-inner{max-width:1240px;margin:0 auto;padding:0 24px;height:58px;display:flex;align-items:center;gap:28px}.brand{display:inline-flex;align-items:center;gap:10px;font-weight:650;font-size:15px;letter-spacing:-.01em}.brand-mark{width:28px;height:28px;border-radius:8px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:14px;font-weight:700}.brand-name .muted{font-weight:500}.nav{display:flex;gap:2px;flex:1;overflow-x:auto;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav-link{padding:7px 12px;border-radius:8px;color:var(--muted);font-weight:500;white-space:nowrap}.nav-link:hover,.nav-link.active{color:var(--text);background:var(--surface-2)}.user{position:relative}.user-btn{display:flex;align-items:center;gap:10px;border:0;background:transparent;cursor:pointer;padding:4px 6px;border-radius:10px;font:inherit;color:inherit;text-align:left}.user-btn:hover{background:var(--surface-2)}.avatar{width:30px;height:30px;border-radius:50%;background:#e7e5e4;display:grid;place-items:center;font-weight:600;font-size:13px}.user-meta{display:flex;flex-direction:column;line-height:1.2}.user-name{font-weight:500;font-size:13px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-role{font-size:11px;color:var(--muted)}.menu{position:absolute;right:0;top:calc(100% + 6px);min-width:210px;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-lg);padding:6px}.menu-info{padding:8px 10px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--border);margin-bottom:4px;overflow:hidden;text-overflow:ellipsis}.menu-item{width:100%;text-align:left;border:0;background:transparent;padding:8px 10px;border-radius:6px;font:inherit;cursor:pointer}.menu-item:hover{background:var(--surface-2)}.main{max-width:1240px;margin:0 auto;padding:28px 24px 80px}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px;flex-wrap:wrap}.page-head p{margin:2px 0 0}.head-actions{display:flex;gap:8px}.center-screen{min-height:100%;display:grid;place-items:center;padding:24px}.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:14px;flex-wrap:wrap}.search{position:relative;flex:1;max-width:380px;min-width:220px}.search svg{position:absolute;left:10px;top:50%;width:16px;height:16px;transform:translateY(-50%);color:var(--faint)}.search input{padding-left:34px}.list{overflow:hidden}.list-head,.list-row{display:grid;align-items:center;gap:16px;padding:0 18px;grid-template-columns:minmax(0,1fr) 90px 130px 110px 100px}.list-head.with-price,.list-row.with-price{grid-template-columns:minmax(0,1fr) 90px 130px 140px 110px 100px}.list-head{height:40px;font-size:12px;font-weight:500;color:var(--muted);border-bottom:1px solid var(--border);background:#fcfcfb}.list-row{min-height:60px;padding-top:10px;padding-bottom:10px;border-bottom:1px solid var(--border);transition:background .1s}.list-row:last-child{border-bottom:0}.list-row:hover{background:#fafaf8}.lr-article{display:flex;flex-direction:column;min-width:0}.lr-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lr-code{font-size:12px;color:var(--faint);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.lr-cost{font-weight:600}.lr-date{font-size:13px}.empty{text-align:center;padding:56px 20px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:12px}.empty-title{font-weight:600;color:var(--text);font-size:15px}.spinner-wrap{display:flex;align-items:center;justify-content:center;gap:10px;padding:48px;color:var(--muted)}.spinner{width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--text);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.editor-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px;flex-wrap:wrap}.back{color:var(--muted);font-weight:500;padding:6px 8px 6px 0}.back:hover{color:var(--text)}.editor-actions{display:flex;gap:6px;flex-wrap:wrap}.style-head{padding:20px 22px;margin-bottom:18px}.sh-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:22px;margin-bottom:6px}.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--faint)}.title-input{display:block;width:100%;resize:none;overflow:hidden;font-family:inherit;color:inherit;background:transparent;line-height:1.25;font-size:24px;font-weight:650;letter-spacing:-.015em;border:0;padding:4px 0;height:auto;border-radius:0;border-bottom:1px dashed transparent;margin-bottom:14px}.title-input:hover{border-bottom-color:var(--border-strong)}.title-input:focus{outline:none;box-shadow:none;border-bottom-color:var(--text)}.sh-fields{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}.sh-fields .field{margin:0;width:180px}.sh-fields .switch-field{height:36px;margin-left:4px}.sh-updated{margin-top:14px}.editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}.sections{display:flex;flex-direction:column;gap:14px;min-width:0}.section{padding:16px 18px 12px}.section-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}.section-total{font-weight:600;font-variant-numeric:tabular-nums}.items-grid{display:grid;gap:8px;align-items:center}.items-grid.cols-4{grid-template-columns:minmax(0,1fr) repeat(3,100px) 96px 30px}.items-grid.cols-3{grid-template-columns:minmax(0,1fr) repeat(2,100px) 96px 30px}.items-grid.cols-2{grid-template-columns:minmax(0,1fr) 120px 96px 30px}.items-header{white-space:nowrap;font-size:12px;color:var(--muted);font-weight:500;padding-bottom:6px}.unit{color:var(--faint);font-weight:400}.item-row{padding:3px 0}.cell{display:block;min-width:0}.cell-label{display:none}.cell-cost{font-variant-numeric:tabular-nums;color:var(--muted);font-size:13px;padding-right:2px}.item-row .remove{opacity:.5}.item-row:hover .remove{opacity:1}.add-line{margin-top:8px;border:1px dashed var(--border-strong);background:transparent;color:var(--muted);width:100%;height:34px;border-radius:var(--radius-sm);font:inherit;font-weight:500;cursor:pointer}.add-line:hover{color:var(--text);border-color:var(--muted);background:#fcfcfb}.summary{position:sticky;top:76px;display:flex;flex-direction:column;gap:14px}.summary-card{padding:18px}.summary-card h3{margin-bottom:10px;display:flex;align-items:center}.srow{display:flex;justify-content:space-between;align-items:center;padding:6px 0;gap:10px}.srow .num{font-weight:500}.srow.strong{border-top:1px solid var(--border);margin-top:4px;padding-top:10px;font-weight:600}.srow.strong .num{font-weight:650}.pct-label{display:inline-flex;align-items:center;gap:8px}.pct-name{width:64px}.pct-input{display:inline-flex;align-items:center;gap:4px;color:var(--muted)}.pct-input input{width:62px;height:30px;padding:4px 8px;text-align:right}.total{display:flex;justify-content:space-between;align-items:baseline;margin-top:10px;padding:14px;background:var(--surface-2);border-radius:10px;font-weight:600}.total-value{font-size:22px;font-weight:700;letter-spacing:-.02em;font-variant-numeric:tabular-nums}.pricing-card .field{margin:8px 0 6px}.switch-field.compact{font-weight:500}.hint{font-size:12px;color:var(--pending);margin-bottom:4px}.warn-note{background:var(--pending-bg);color:var(--pending);padding:10px 12px;border-radius:8px;margin:0 0 14px;font-size:13px}.mobile-bar{display:none}.timeline{list-style:none;margin:0;padding:0}.tl-item{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}.tl-item:last-child{border-bottom:0}.tl-dot{width:8px;height:8px;border-radius:50%;background:var(--border-strong);margin-top:7px;flex:none}.tl-dot[data-action=Create]{background:#2563eb}.tl-dot[data-action=Approve]{background:var(--ok)}.tl-dot[data-action="Revoke approval"]{background:var(--pending)}.tl-dot[data-action=Delete]{background:var(--danger)}.tl-body{min-width:0}.tl-text{overflow-wrap:anywhere}.tl-style{font-weight:600}a.tl-style:hover{text-decoration:underline}.tl-action{font-weight:600}.list-simple{overflow:hidden}.ls-row{display:grid;grid-template-columns:minmax(0,1fr) 130px auto;gap:14px;align-items:center;padding:10px 16px;border-bottom:1px solid var(--border)}.ls-row:last-child{border-bottom:0}.ls-row.editing{background:#fcfcfb}.ls-row.editing input{height:32px}.ls-name{display:flex;flex-direction:column;min-width:0;font-weight:500;overflow-wrap:anywhere}.ls-actions{display:flex;gap:4px;justify-content:flex-end}.user-row{grid-template-columns:minmax(0,1fr) 160px auto}.user-row select{height:32px}.add-master{display:flex;gap:12px;align-items:flex-end;margin-bottom:14px;flex-wrap:wrap}.add-master .field{margin:0}.add-master .field:not(.grow){width:190px}.tabs{margin-bottom:14px}.role-help{display:grid;gap:6px;margin-bottom:14px;font-size:13px;color:var(--muted)}.role-help b{color:var(--text);font-weight:600}.login-bg{background:radial-gradient(ellipse at top,#f5f5f4,var(--bg) 60%)}.login{width:100%;max-width:380px;padding:32px 28px}.login-brand{margin-bottom:26px}.login h1{margin-bottom:18px}.form-error{color:var(--danger);background:var(--danger-bg);padding:9px 12px;border-radius:8px;font-size:13px;margin-bottom:12px}.login .btn-block{margin:4px 0 16px;height:40px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#1c191752;z-index:50;display:grid;place-items:center;padding:16px;animation:fade .12s ease-out}.modal{background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg);width:100%;max-width:440px;max-height:90vh;display:flex;flex-direction:column}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px 6px}.modal-head h3{text-transform:none;letter-spacing:-.01em;font-size:16px;color:var(--text)}.modal-body{padding:10px 18px 6px;overflow:auto}.modal-foot{display:flex;justify-content:flex-end;gap:8px;padding:12px 18px 16px}.drawer{position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);background:var(--surface);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;animation:slide .18s ease-out}.drawer-body{padding:4px 18px 24px;overflow:auto}@keyframes fade{0%{opacity:0}}@keyframes slide{0%{transform:translate(30px);opacity:0}}.toasts{position:fixed;bottom:20px;left:50%;transform:translate(-50%);z-index:60;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}.toast{background:var(--accent);color:#fff;padding:10px 16px;border-radius:10px;box-shadow:var(--shadow-lg);font-weight:500;animation:fade .15s;max-width:90vw}.toast-error{background:var(--danger)}@media (max-width: 1024px){.editor-grid{grid-template-columns:1fr}.summary{position:static}}@media (max-width: 760px){.topbar-inner{padding:0 14px;gap:12px}.brand-name,.user-meta{display:none}.main{padding:18px 14px 110px}h1{font-size:20px}.head-actions{width:100%}.head-actions .btn{flex:1}.search{max-width:none}.list-head{display:none}.list-row,.list-row.with-price{grid-template-columns:1fr auto;gap:4px 12px;padding:12px 14px;grid-template-areas:"article cost" "meta price" "status date"}.lr-article{grid-area:article}.lr-cost{grid-area:cost}.lr-price{grid-area:price;font-size:13px;color:var(--muted)}.lr-order{grid-area:meta;font-size:13px;color:var(--muted)}.lr-order:before{content:"Order "}.lr-status{grid-area:status}.lr-date{grid-area:date;text-align:right;font-size:12px}.lr-name{white-space:normal}.editor-actions .btn{padding:0 10px}.desktop-only{display:none}.style-head{padding:16px}.title-input{font-size:20px}.sh-fields .field{width:calc(50% - 7px)}.section{padding:14px 14px 10px}.items-header{display:none}.items-grid.cols-3,.items-grid.cols-2{grid-template-columns:1fr 1fr;gap:8px}.items-grid.cols-4{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.item-row{position:relative;padding:12px 0;border-top:1px solid var(--border)}.item-row:first-of-type{border-top:0}.cell-name{grid-column:1 / -1;padding-right:34px}.cell-label{display:block;font-size:11px;color:var(--muted);margin-bottom:3px;font-weight:500}.cell-cost{grid-column:1 / -1;display:flex;justify-content:space-between;color:var(--text);font-weight:500}.cell-cost .cell-label{margin:0}.item-row .remove{position:absolute;right:0;top:30px;opacity:1}.items-grid.cols-2 .cell-rate{grid-column:1 / -1}.mobile-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;position:fixed;left:0;right:0;bottom:0;z-index:30;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#fffffff0;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-top:1px solid var(--border)}.mobile-bar .btn{min-width:110px;height:42px}.mb-value{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}.ls-row,.user-row{grid-template-columns:1fr auto}.ls-row .ls-actions,.user-row .ls-actions{grid-column:1 / -1;justify-content:flex-start}.user-row select{grid-column:2;grid-row:1;width:140px}.add-master .field:not(.grow){width:100%}.add-master .btn{width:100%}}
