:root {
  --bg: #0f1115;
  --card: #171a21;
  --border: #2a2e38;
  --accent: #6c8cff;
  --accent2: #22c55e;
  --text: #e8e9ec;
  --muted: #9aa0ac;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.topbar h1 { font-size: 18px; margin: 0; }
main { padding: 24px 28px; max-width: 1200px; margin: 0 auto; }
.hint { color: var(--muted); text-align: center; padding: 40px 0; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  background: #222;
}
.card h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.card .status { font-size: 12px; color: var(--muted); }
.card .actions { margin-top: auto; display: flex; gap: 8px; }
button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: white; flex: 1; }
.btn-primary:disabled { opacity: 0.5; cursor: wait; }
.btn-secondary { background: #232734; color: var(--text); }
.pager button { background: #232734; color: var(--text); }
.pager span { margin: 0 8px; color: var(--muted); font-size: 13px; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 90%; max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}
.close-btn {
  position: absolute; top: 14px; left: 14px;
  background: transparent; color: var(--muted);
  font-size: 22px; line-height: 1;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%;
  background: #10131a;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
}
.field textarea { min-height: 100px; resize: vertical; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip {
  background: #232734;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions button { flex: 1; }
.error-box {
  background: #3a1c1c; color: #ffb4b4;
  border: 1px solid #6b2b2b; border-radius: 8px;
  padding: 12px; font-size: 13px;
}
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
