:root{--bg:#fff;--sidebar:#f7f8fa;--text:#17212b;--muted:#7b8593;--line:#e0e4e9;--accent:#e66b35;--accent-hover:#cf5826;--soft:#faf0ea;--radius:7px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;color:var(--text);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:var(--accent-hover);text-decoration:none}a:hover{text-decoration:underline}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #e6a585;outline-offset:3px}h1,h2,h3,p{margin-top:0}h1{font-size:34px;line-height:1.2;letter-spacing:-1.1px;margin-bottom:10px}h2{font-size:23px;letter-spacing:-.5px;margin-bottom:18px}h3{font-size:17px;margin-bottom:14px}p{line-height:1.55}.muted{color:var(--muted)}.small{font-size:13px}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.loading-screen{max-width:500px;margin:15vh auto;padding:28px}
.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:var(--sidebar);padding:28px 12px;display:flex;flex-direction:column}.brand{padding:0 15px 39px}.brand strong{display:block;font-size:25px;letter-spacing:-.9px}.brand span{display:block;color:var(--muted);font-size:15px;margin-top:3px}.nav{display:flex;flex-direction:column;gap:9px}.nav button{display:flex;align-items:center;gap:15px;background:transparent;border:0;border-radius:6px;padding:15px 19px;text-align:left;color:var(--text);font-size:16px;position:relative}.nav button.active{background:var(--soft);color:var(--accent-hover);font-weight:600}.nav button.active:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--accent);border-radius:4px 0 0 4px}.sidebar-footer{margin-top:auto;padding:20px 17px 4px;overflow-wrap:anywhere;font-size:12px;color:var(--muted)}.main{margin-left:248px;padding:42px 34px 70px;max-width:1800px}.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:32px}.page-header p{color:var(--muted);font-size:17px;margin-bottom:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:var(--radius);padding:12px 19px;font-size:14px;font-weight:600;line-height:1.4;min-height:44px;white-space:nowrap;text-decoration:none}.btn:hover{background:#f8f9fa;text-decoration:none}.btn.primary{background:var(--accent);color:#fff;border-color:var(--accent)}.btn.primary:hover{background:var(--accent-hover)}.btn.danger{color:#a43030}.btn.quiet{border:0;background:transparent;padding:10px 0}.btn.compact{padding:8px 12px;min-height:38px;font-size:13px}.icon{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.toolbar{display:flex;gap:14px;margin-bottom:26px}.search-wrap{position:relative;flex:1}.search-wrap .icon{position:absolute;left:15px;top:15px;color:var(--muted)}.search-wrap input{padding-left:47px}.toolbar select{width:31%;min-width:190px}input,select,textarea{border:1px solid #cfd6df;border-radius:var(--radius);background:#fff;color:var(--text);padding:12px 13px;width:100%;min-height:46px;font-size:14px}input::placeholder,textarea::placeholder{color:#8993a1}textarea{resize:vertical;min-height:105px;line-height:1.55}select{appearance:auto}.inventory{border:1px solid var(--line);border-radius:7px;overflow:hidden}.table-header,.part-row{display:grid;grid-template-columns:minmax(240px,2.2fr) minmax(130px,1.3fr) 115px 125px 125px;align-items:center;gap:15px;padding:17px 20px}.table-header{font-size:13px;font-weight:600;color:#526070;border-bottom:1px solid var(--line)}.part-row{border-bottom:1px solid var(--line);cursor:pointer;min-height:96px}.part-row:last-child{border-bottom:0}.part-row:hover{background:#fafbfc}.part-name{display:flex;align-items:center;gap:13px;min-width:0}.part-name strong{display:block;font-size:14px;font-weight:600;overflow-wrap:anywhere}.part-name small{display:block;font-size:12px;color:var(--muted);margin-top:5px}.thumb{width:58px;height:58px;object-fit:cover;border-radius:5px;background:#f3f5f7}.thumb-empty{display:flex;align-items:center;justify-content:center;color:#9ca5b1;flex-shrink:0}.vehicle-cell,.price-cell,.listing-cell{font-size:13px}.vehicle-cell small{display:block;color:var(--muted);margin-top:4px}.status{display:inline-flex;align-items:center;gap:7px;font-size:12px;line-height:1.5;white-space:nowrap}.status:before{content:"";width:6px;height:6px;border-radius:50%;background:#a8b0ba}.status.for_sale:before,.status.published:before{background:#388761}.status.reserved:before,.status.pending:before,.status.uncertain:before{background:#c78a22}.status.sold:before{background:#6d65a8}.status.rejected:before{background:#bd4545}.empty-state{text-align:center;padding:130px 25px 145px}.empty-state>.icon{width:104px;height:104px;stroke-width:1;color:#8d97a5;margin-bottom:28px}.empty-state h2{font-size:24px;margin-bottom:10px}.empty-state p{font-size:16px;color:var(--muted);margin-bottom:28px}.empty-state.small-empty{padding:45px 20px}.empty-state.small-empty h2{font-size:18px}.count-label{font-size:12px;color:var(--muted);padding-top:13px}
.back{margin-bottom:22px}.detail-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,1fr);gap:32px}.section{padding:0 0 28px;margin-bottom:26px;border-bottom:1px solid var(--line)}.section:last-child{border-bottom:0}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.section-heading h2,.section-heading h3{margin-bottom:0}.detail-meta{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:10px 0 0}.details{display:grid;grid-template-columns:1fr 1fr;gap:20px}.details dt{font-size:12px;color:var(--muted);margin-bottom:6px}.details dd{margin:0;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.details .wide{grid-column:1/-1}.photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.photo-item{border:1px solid var(--line);border-radius:6px;overflow:hidden;min-width:0}.photo-item img{width:100%;aspect-ratio:1.2;object-fit:contain;background:#f7f8fa;display:block}.photo-item a{display:block;padding:9px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-area{padding:20px;border:1px dashed #bfc8d3;border-radius:7px;background:#fcfcfd}.upload-area p{font-size:13px;color:var(--muted);margin:8px 0 0}.upload-area input{padding:8px;min-height:38px;font-size:13px;background:#fff}.notice{background:#fff7eb;border-left:3px solid #cf9b41;padding:14px 16px;font-size:13px;line-height:1.6;margin-bottom:24px}.notice.success{background:#f0f8f4;border-color:#55916d}.tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin:10px 0 24px;overflow-x:auto}.tabs button{background:none;border:0;border-bottom:2px solid transparent;padding:13px 0;font-size:14px;white-space:nowrap;color:var(--muted)}.tabs button.active{border-color:var(--accent);color:var(--text);font-weight:600}.record{padding:20px 0;border-bottom:1px solid var(--line)}.record:first-child{padding-top:0}.record:last-child{border-bottom:0}.record-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:11px}.record-header h3{margin:0 0 6px}.record p{font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.record-actions{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.record-body{white-space:pre-wrap;font-size:13px;line-height:1.7;color:#526070;margin:12px 0;max-height:250px;overflow:auto}.history-item{display:grid;grid-template-columns:145px 1fr;gap:18px;padding:17px 0;border-bottom:1px solid var(--line)}.history-item time{font-size:12px;color:var(--muted);line-height:1.7}.history-item h3{font-size:14px;margin:0 0 7px}.history-item pre{white-space:pre-wrap;font-family:inherit;font-size:12px;line-height:1.7;color:#657184;margin:0;overflow-wrap:anywhere}.history-item summary{font-size:12px;cursor:pointer;color:var(--muted)}.settings-content{max-width:760px}.settings-content .section{padding-bottom:30px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:block;font-size:13px;font-weight:500}.field span{display:block;margin-bottom:7px}.field small{display:block;color:var(--muted);font-weight:400;margin-top:5px;line-height:1.5}.field.wide{grid-column:1/-1}.checkbox{display:flex;align-items:flex-start;gap:10px;font-size:13px;font-weight:400;line-height:1.5}.checkbox input{width:17px;height:17px;min-height:0;flex-shrink:0;margin:2px 0}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:26px}.inline-error{color:#b13b32;font-size:13px;margin:14px 0 0}.login{max-width:390px;margin:17vh auto;padding:20px}.login .brand{padding:0 0 32px}.login h1{font-size:26px}.login .btn{width:100%;margin-top:20px}.login p{font-size:14px;color:var(--muted)}.token-output{margin-top:16px}.token-output textarea{font-family:ui-monospace,monospace;font-size:12px;min-height:85px}.token-row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--line);gap:12px}.token-row p{margin:0;font-size:13px}.token-row small{display:block;margin-top:4px;color:var(--muted)}
dialog{border:1px solid var(--line);border-radius:12px;padding:28px;width:min(690px,calc(100vw - 32px));max-height:90dvh;color:var(--text);box-shadow:0 20px 80px #17212b24}dialog::backdrop{background:#17212b66}.dialog-header{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}.dialog-header h2{margin:0}.dialog-header button{padding:7px;border:0;background:none;min-height:38px;min-width:38px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);background:var(--text);color:#fff;padding:14px 20px;border-radius:8px;font-size:13px;z-index:10;box-shadow:0 6px 24px #17212b26}#toast.error{background:#9b302c}[hidden]{display:none!important}
@media(min-width:721px){h1{font-size:40px}.page-header{margin-bottom:24px}.page-header>.btn.primary{font-size:16px;padding:13px 21px;min-height:50px}.toolbar input,.toolbar select{font-size:16px;min-height:52px}.table-header{font-size:15px;padding-top:18px;padding-bottom:18px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:calc(100dvh - 290px);padding:100px 25px 120px}.empty-state>.icon{width:116px;height:116px}.empty-state h2{font-size:26px}.empty-state p{font-size:17px}.empty-state>.btn{font-size:16px;border-color:#8e98a6}.empty-state.small-empty{min-height:0;padding:45px 20px}.empty-state.small-empty h2{font-size:18px}}
@media(min-width:1600px){.main{padding-left:52px;padding-right:52px}.sidebar{width:260px}.main{margin-left:260px}}
@media(max-width:1150px){.sidebar{width:210px}.main{margin-left:210px;padding:32px 24px}.brand strong{font-size:22px}.table-header,.part-row{grid-template-columns:minmax(190px,2fr) 1fr 85px 110px;gap:10px;padding-left:15px;padding-right:15px}.listing-cell,.table-header span:last-child{display:none}.detail-layout{grid-template-columns:1fr}.detail-layout>aside{order:2}.empty-state{padding:110px 20px}}
@media(max-width:720px){h1{font-size:28px}.sidebar{position:static;width:auto;display:block;padding:17px 18px 0;border-bottom:1px solid var(--line)}.brand{padding:0 0 14px}.brand strong{font-size:21px;letter-spacing:-.6px}.brand span{font-size:12px}.nav{flex-direction:row;gap:20px}.nav button{padding:12px 0;gap:7px;font-size:13px;border-radius:0}.nav .icon{width:17px;height:17px}.nav button.active{background:transparent}.nav button.active:before{top:auto;right:0;width:auto;height:2px}.sidebar-footer{display:none}.main{margin-left:0;padding:26px 18px 50px}.page-header{gap:12px;margin-bottom:24px}.page-header p{font-size:14px}.page-header .btn{padding:10px 12px;font-size:12px;min-height:42px}.page-header .btn .icon{width:16px;height:16px}.toolbar{flex-direction:column;gap:10px;margin-bottom:18px}.toolbar select{width:100%;min-width:0}.toolbar input,.toolbar select{min-height:44px}.table-header{display:none}.part-row{grid-template-columns:1fr auto;gap:10px;padding:16px 12px}.part-name{grid-column:1/-1}.vehicle-cell{padding-left:71px;grid-column:1;grid-row:2;font-size:12px}.price-cell{grid-column:2;grid-row:2;font-size:14px;font-weight:600}.part-row>.status{grid-column:1/-1;padding-left:71px}.empty-state{padding:74px 15px 80px}.empty-state>.icon{width:80px;height:80px;margin-bottom:23px}.empty-state h2{font-size:20px;line-height:1.4}.empty-state p{font-size:14px}.empty-state .btn{font-size:13px}.form-grid{grid-template-columns:1fr}.field.wide{grid-column:auto}.form-actions{flex-wrap:wrap}.form-actions .btn{flex:1}.detail-layout{gap:10px}.details{gap:18px}.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tabs{gap:22px}.history-item{grid-template-columns:1fr;gap:6px}.history-item time{font-size:11px}.section-heading{align-items:flex-start}.section-heading .btn{font-size:12px;padding:8px 10px}.record-header{flex-wrap:wrap}.login{margin:10vh auto;padding:24px}.dialog-header h2{font-size:21px}dialog{padding:22px 18px;max-height:92dvh}.token-row{align-items:flex-start}.btn{white-space:normal}}
@media(max-width:720px){input,select,textarea{font-size:16px}}
@media(prefers-reduced-motion:no-preference){.btn,.nav button{transition:background .15s ease}.part-row{transition:background .12s ease}}
