:root{color-scheme:dark;--bg:#0a161d;--panel:#13252e;--field:#10212a;--border:#2a414e;--text:#eef5f6;--muted:#9db8c7;--accent:#ff4c44;--good:#89d9c7;font-family:'Segoe UI',Tahoma,Arial,sans-serif;font-size:16px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{background:var(--panel);border:1px solid var(--border);color:var(--text);padding:.55rem .85rem;border-radius:5px;cursor:pointer;min-height:40px}button:hover{border-color:#6f8d9e;background:#1c3440}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:white}button.active,button[aria-pressed=true]{border-color:var(--accent);background:#40282c}button.icon{min-width:38px;padding:.35rem}button.danger{color:#ffb3ad}input,select,textarea{border:1px solid #3a5260;border-radius:5px;background:var(--field);color:var(--text);padding:.6rem;min-height:42px;width:100%;min-width:0}input[type=number]{direction:ltr}input[type=checkbox]{width:20px;min-height:20px;accent-color:var(--accent)}input[type=range]{padding:0;accent-color:var(--accent)}input:focus,select:focus,button:focus-visible,textarea:focus{outline:2px solid var(--accent);outline-offset:2px}label{display:flex;flex-direction:column;gap:.4rem;color:var(--muted);font-size:.875rem}label.check{flex-direction:row;align-items:center}h1,h2,h3,p{margin:0}h1{font-size:1.4rem;font-weight:600}h2{font-size:1rem;font-weight:600}h3{font-size:.95rem;font-weight:500}small,.hint{font-size:.8rem;color:var(--muted)}[hidden]{display:none!important}.topbar{direction:ltr;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.35rem;border-bottom:1px solid var(--border)}.brand{display:flex;gap:.85rem;align-items:center}.brand strong{font-size:1.7rem;white-space:nowrap}.brand small{display:block;direction:rtl}.logo{font-size:2rem;border-bottom:5px solid var(--accent);padding-bottom:.2rem}.topbar nav{direction:rtl;display:flex;gap:.4rem;flex-wrap:wrap}.sync-line{padding:.5rem 1.5rem;font-size:.8rem;color:var(--muted);border-bottom:1px solid var(--border)}.home{max-width:1300px;margin:0 auto;padding:4rem 3rem;display:grid;grid-template-columns:1.2fr 1fr;gap:3rem;align-items:center}.welcome h1{font-size:clamp(2rem,4vw,3.7rem);line-height:1.35;margin:.6rem 0 1rem}.welcome p{color:var(--muted);line-height:1.9;margin-bottom:1.5rem}.eyebrow{color:var(--good);font-size:.9rem}.actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.home-art{display:grid;place-items:center;gap:1.5rem;direction:ltr;min-height:340px}.home-art>span{color:var(--muted);letter-spacing:.18rem;font-size:.8rem}.art-sheet{width:330px;height:240px;background:#e4ecef;transform:rotate(-10deg);display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:16px;box-shadow:20px 20px 0 #142e39}.art-sheet i{background:linear-gradient(150deg,#f9fbfc 65%,#ff4c44 65%,#b72629);position:relative}.art-sheet i:before{content:'SH';position:absolute;top:6px;left:9px;color:#223d4c;font-style:normal;font-weight:600}.recent{grid-column:1/-1}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:1rem}.project-card{text-align:right;padding:1.25rem;display:flex;flex-direction:column;gap:.7rem;min-height:135px}.project-card strong{font-size:1rem}.project-card small{color:var(--muted)}.project-thumb{height:140px;object-fit:contain;background:#e8eff3;width:100%;border-radius:3px}.empty{color:var(--muted);padding:2rem 0;line-height:1.9}.studio{padding:1rem}.studio-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem}.studio-heading h1{margin-bottom:.4rem}.studio-heading span{font-size:.85rem;color:var(--muted)}.studio-columns{display:grid;grid-template-columns:270px minmax(380px,1fr) 240px;gap:10px;align-items:start}.inspector,.layers{background:var(--panel);border:1px solid var(--border);border-radius:7px;max-height:calc(100vh - 240px);overflow:auto;scrollbar-width:thin}.layers{padding:1rem}.inspector details{border-bottom:1px solid var(--border);padding:.85rem}details summary{cursor:pointer;font-size:.9rem;margin-bottom:.6rem;user-select:none}details:not([open]) summary{margin-bottom:0}.fields{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.fields>.wide{grid-column:1/-1}.field-stack{display:flex;flex-direction:column;gap:.75rem}.workspace{background:var(--panel);border:1px solid var(--border);border-radius:7px;min-width:0;overflow:hidden}.canvas-toolbar{padding:.7rem;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.6rem;font-size:.85rem}.sheet-scroll{min-height:510px;height:calc(100vh - 370px);overflow:auto;background:#07131a;position:relative;direction:ltr;padding:36px 25px 25px}.paper-container{position:relative;background:white;margin:auto;box-shadow:0 12px 28px #0004;touch-action:none;flex-shrink:0}#paper{position:absolute;inset:0;width:100%;height:100%}#overlay{position:absolute;inset:0;width:100%;height:100%;overflow:visible;touch-action:none}#overlay rect{vector-effect:non-scaling-stroke}#overlay .slot{fill:transparent;stroke:#ff4c4488;stroke-width:.7;cursor:pointer}#overlay .slot.selected{stroke:var(--accent);stroke-width:2}#overlay .template{fill:none;pointer-events:stroke;stroke:#65a6bc;stroke-width:1;stroke-dasharray:4 3;cursor:move}#overlay .guide{stroke:#3385c7;stroke-width:1;cursor:move}#overlay text{pointer-events:none;fill:#203c4b;font:12px 'Segoe UI',sans-serif}#overlay .mark-hit{fill:transparent;cursor:move}.ruler{position:absolute;top:8px;left:25px;color:var(--muted);font-size:11px;white-space:nowrap}.canvas-status{padding:.7rem;font-size:.8rem;color:var(--muted);min-height:42px}.layer-group{margin-bottom:.8rem;border-bottom:1px solid var(--border);padding-bottom:.5rem}.layer{display:flex;align-items:center;gap:.4rem;padding:.4rem 0}.layer.active{background:#283944}.layer .name{flex:1;min-width:0;font-size:.85rem;overflow-wrap:anywhere}.layer .name small{display:block;font-size:.75rem}.layer img{width:42px;height:38px;object-fit:contain;background:#0b1a22}.layer button{min-height:30px;padding:.2rem .4rem;font-size:.8rem}dialog{background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:9px;width:min(850px,calc(100vw - 30px));max-height:calc(100vh - 35px);padding:0}dialog::backdrop{background:#0009}dialog header{display:flex;justify-content:space-between;align-items:center;padding:1.2rem;border-bottom:1px solid var(--border);gap:1rem}#modal-body{padding:1.2rem;display:flex;flex-direction:column;gap:1rem}dialog footer{padding:1rem 1.2rem;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-start}dialog .error{padding:0 1.2rem 1rem;color:#ffb3ad;font-size:.9rem;line-height:1.8}.photos{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.photo-slot{background:#0c1b23;padding:1rem;text-align:center;display:flex;flex-direction:column;gap:.6rem}.photo-slot img{height:140px;max-width:100%;object-fit:contain}.photo-slot input{font-size:.8rem}.fit-preview{height:340px;background:#000;display:grid;place-items:center;overflow:hidden;touch-action:none}.fit-preview canvas{max-width:100%;max-height:100%;object-fit:contain}.fit-tools{display:flex;gap:.5rem;flex-wrap:wrap}.ticket{font-variant-numeric:tabular-nums}.good{color:var(--good)}.error{color:#ffb3ad}.payments{display:flex;flex-direction:column;gap:.5rem}.payment{display:flex;align-items:center;justify-content:space-between;gap:.5rem;background:var(--field);padding:.6rem}table{width:100%;border-collapse:collapse;font-size:.9rem}th,td{padding:.8rem .5rem;border-bottom:1px solid var(--border);text-align:right}th{color:var(--muted);font-weight:500}.scroll-table{overflow:auto}#toast{position:fixed;bottom:24px;left:24px;background:#24424d;border:1px solid #547f91;padding:1rem 1.5rem;border-radius:7px;max-width:calc(100vw - 48px);z-index:50;box-shadow:0 5px 22px #0005;line-height:1.7}.progress-track{height:12px;background:#263b44;border-radius:20px;overflow:hidden}.progress-track>div{height:100%;background:var(--accent);transition:width .12s}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:1rem}.pill{padding:.25rem .5rem;border:1px solid var(--border);border-radius:4px;color:var(--muted);font-size:.8rem}.quick-row{padding:1rem;background:var(--field);border:1px solid var(--border);display:flex;flex-direction:column;gap:.8rem}.ink-fields{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem}.fit-sizes{grid-template-columns:repeat(3,1fr)}
@media(max-width:1150px){.topbar{align-items:start}.studio-columns{grid-template-columns:230px minmax(300px,1fr)}.layers{grid-column:1/-1;max-height:300px}.home{padding:3rem 1.5rem}.topbar nav{font-size:.85rem}.studio-heading{align-items:start;flex-direction:column}.studio-heading .actions{width:100%}}
@media(max-width:750px){.topbar{flex-direction:column}.topbar nav{width:100%}.home{grid-template-columns:1fr;gap:2rem}.home-art{display:none}.studio-columns{display:flex;flex-direction:column}.workspace{width:100%;order:0}.inspector{width:100%;order:1;max-height:none;display:grid;grid-template-columns:1fr 1fr}.layers{width:100%;order:2}.sheet-scroll{height:440px;min-height:350px}.studio{padding:.6rem}.fields{gap:.6rem}.fit-sizes{grid-template-columns:1fr 1fr}.photos{grid-template-columns:1fr}.ink-fields{grid-template-columns:1fr 1fr}.brand strong{font-size:1.4rem}.inspector details{min-width:0}.canvas-toolbar button{font-size:.8rem}.home h1{font-size:2.2rem}}
@media print{body>*{display:none!important}.print-root{display:block!important;background:white}.print-root canvas{width:100%;page-break-after:always}}
