@font-face {font-family: Vazirmatn; src: url(vazirmatn-fd-regular.woff2) format("woff2"); font-weight: 400; font-display: swap}
@font-face {font-family: Vazirmatn; src: url(vazirmatn-fd-bold.woff2) format("woff2"); font-weight: 600 800; font-display: swap}
:root {--bg:#f9fff7;--surface:#eff5ed;--ink:#171d16;--muted:#6c726b;--border:#d6dbd4;--green:#8cff70;--green-ink:#187a00}
* {box-sizing:border-box}
body {margin:0;background:var(--bg);color:var(--ink);font:16px/1.8 Vazirmatn,Tahoma,sans-serif}
header {background:white;border-bottom:1px solid var(--border)}
.wrap {width:min(1120px,calc(100% - 36px));margin-inline:auto}
.brand,.intro,.toolbar,.dialog-head,.actions {display:flex;align-items:center;gap:14px}
.brand,.intro,.dialog-head {justify-content:space-between}
.brand {min-height:76px}
.brand strong {font-size:1.3rem}
.brand small {display:block;color:var(--muted)}
.intro {padding:40px 0 24px}
h1,h2,h3,p {margin:0}
h1 {font-size:clamp(2rem,5vw,3rem);line-height:1.25}
.intro p {color:var(--muted);margin-top:8px}
.panel,dialog {border:1px solid var(--border);border-radius:16px;background:white}
.toolbar {padding:18px}
.toolbar input {max-width:360px}
.toolbar select {width:auto}
button,input,select,textarea {font:inherit;color:inherit;border:1px solid var(--border);border-radius:12px;background:white;padding:8px 12px}
input,select,textarea {width:100%;min-width:0}
button {cursor:pointer;min-height:44px}
button:hover {background:var(--surface)}
button:disabled {opacity:.55;cursor:wait}
.primary {background:var(--green);border-color:transparent;font-weight:700}
.primary:hover {background:#a5ff8e}
:focus-visible {outline:2px solid var(--green-ink);outline-offset:3px}
.badge {display:inline-block;background:var(--surface);border-radius:999px;padding:2px 12px;white-space:nowrap;font-size:.9rem}
.badge.published {background:#e9f9e3;color:var(--green-ink)}
.table-wrap {overflow:auto}
table {width:100%;border-collapse:collapse}
th,td {text-align:start;padding:14px 18px;border-top:1px solid var(--border)}
th {background:var(--surface);white-space:nowrap}
td small {display:block;color:var(--muted)}
td .actions {gap:8px;flex-wrap:wrap}
dialog {width:min(700px,calc(100% - 24px));max-height:90dvh;padding:24px;color:var(--ink)}
dialog::backdrop {background:#171d1680}
.dialog-head {margin-bottom:18px}
.grid {display:grid;grid-template-columns:1fr 1fr;gap:12px}
label {display:block;margin-bottom:12px}
fieldset {border:1px solid var(--border);border-radius:12px;margin:0 0 16px;padding:12px}
.spec {display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:8px;align-items:center;margin-bottom:8px}
.gallery {display:flex;gap:12px;flex-wrap:wrap}
.gallery figure {margin:0;width:104px}
.gallery img {width:100%;height:84px;object-fit:contain;background:var(--surface);border-radius:12px}
figure button {width:100%}
#form-error,#notice {margin-block:8px}
#form-error {color:#b3261e}
#preview article>* {margin-block:10px}
#preview dl div {display:flex;justify-content:space-between;border-bottom:1px solid var(--border);padding:8px}
#preview a {color:var(--green-ink)}
@media(max-width:580px) {.intro {align-items:flex-start;flex-direction:column}.toolbar,.grid {display:grid;grid-template-columns:1fr}.toolbar input {max-width:none}th,td,dialog {padding:12px}.spec {grid-template-columns:1fr 1fr}}
