/* ===== پنل بازاریابی — پالت برند باوام (آبی کاربنی + زرد) ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #eef2f9;
  --card: #ffffff;
  --dark: #0f2a5c;        /* آبی سرمه‌ای برند */
  --darker: #0a1e42;
  --blue: #1d4ed8;        /* آبی کاربنی */
  --blue-soft: #dbeafe;
  --yellow: #facc15;      /* زرد برند */
  --text: #334155;
  --muted: #8ea0bd;
  --border: #dbe3ef;
  --radius: 14px;
}

body { font-family: "Vazirmatn", Tahoma, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
.layout { display: flex; min-height: 100vh; }

/* ===== منوی کنار ===== */
.sidebar { width: 250px; background: linear-gradient(180deg, var(--darker), var(--dark));
  color: #fff; padding: 22px 16px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.logo-badge { width: 44px; height: 44px; background: var(--blue); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.logo-title { font-weight: 700; font-size: 15px; }
.logo-sub { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.menu { display: flex; flex-direction: column; gap: 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; background: none; border: none;
  color: #cbd5e1; font-family: inherit; font-size: 14px; padding: 12px 14px;
  border-radius: 10px; cursor: pointer; text-align: right; transition: 0.2s; }
.menu-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.menu-item.active { background: var(--blue); color: #fff; font-weight: 700; }

.main { flex: 1; padding: 24px 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.topbar h1 { font-size: 20px; color: var(--dark); }

/* ===== کارت‌ها ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-head h3 { font-size: 15px; color: var(--dark); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; gap: 14px; margin-bottom: 0; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-icon.blue { background: var(--blue-soft); }
.stat-icon.orange { background: #fef9c3; }
.stat-icon.green { background: #dcfce7; }
.stat-icon.purple { background: #ede9fe; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--dark); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ===== جدول ===== */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: right; font-size: 12px; color: var(--muted); padding: 10px 12px;
  border-bottom: 2px solid var(--border); }
.table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
code { background: #f1f5f9; padding: 3px 8px; border-radius: 6px; font-size: 12px;
  direction: ltr; display: inline-block; font-family: Consolas, monospace; }

/* ===== دکمه‌ها ===== */
.btn { font-family: inherit; font-size: 13px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); padding: 9px 16px;
  border-radius: 10px; cursor: pointer; transition: 0.2s; text-decoration: none; display: inline-block; }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #1e40af; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; margin-top: 8px; }

.status { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.status.pending { background: #fef9c3; color: #a16207; }
.status.progress { background: var(--blue-soft); color: var(--blue); }
.status.done { background: #dcfce7; color: #16a34a; }

/* ===== فرم‌های داخل پنل ===== */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.field input, .field select, .field textarea { width: 100%; font-family: inherit; font-size: 13px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: #fafbfc; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }

/* ===== صفحه عمومی فرم (فرم مشتری) ===== */
.form-public { display: flex; align-items: flex-start; justify-content: center;
  min-height: 100vh; padding: 20px; background: linear-gradient(160deg, #dbeafe 0%, #eef2f9 40%); }
.form-card { max-width: 520px; width: 100%; background: var(--card);
  border: 1px solid var(--border); border-radius: 18px; padding: 26px;
  box-shadow: 0 10px 30px rgba(15, 42, 92, 0.08); }

.brand-banner { width: 100%; border-radius: 12px; display: block; margin-bottom: 18px; }

.form-title { font-weight: 800; color: var(--dark); font-size: 19px;
  margin-bottom: 10px; padding-bottom: 12px; border-bottom: 2px solid var(--yellow); }
.form-desc { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.9; }

.product-shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--border);
  margin-bottom: 18px; background: #f8fafc; }
.product-shot img { width: 100%; display: block; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 14px; cursor: pointer; font-size: 13px; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); font-weight: 600; }

.req { color: #dc2626; font-style: normal; }

.btn-submit { width: 100%; font-family: inherit; font-size: 15px; font-weight: 800;
  background: var(--blue); color: #fff; border: none; border-radius: 12px;
  padding: 14px; cursor: pointer; margin-top: 10px; transition: 0.2s; }
.btn-submit:hover { background: #1e40af; }

.trust-note { text-align: center; font-size: 11px; color: var(--muted); margin-top: 12px; }

.success-box { text-align: center; padding: 30px 10px; }
.success-icon { font-size: 48px; margin-bottom: 12px; }
.success-box h2 { color: var(--dark); margin-bottom: 12px; }
.success-box p { font-size: 14px; color: var(--text); line-height: 2; }

/* ===== ورود ===== */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; width: 100%; max-width: 380px; }
.login-box h2 { color: var(--dark); margin-bottom: 20px; font-size: 18px; }
.error { background: #fee2e2; color: #b91c1c; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; margin-bottom: 14px; }

/* ===== کیو آر ===== */
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 800px) { .qr-grid { grid-template-columns: 1fr; } }
.qr-frame { text-align: center; padding: 20px; border: 2px dashed var(--border);
  border-radius: 16px; background: #fff; }
.qr-frame img { display: block; margin: 0 auto 14px; }
.qr-url { font-size: 12px; direction: ltr; margin-bottom: 16px; word-break: break-all; }
.qr-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.ok-box { background: #dcfce7; border: 1px solid #86efac; color: #166534;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 13px; }

.org-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.org-tags span { background: var(--blue-soft); color: var(--blue);
  padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }

.note { font-size: 11px; color: var(--muted); margin-top: 12px; }
.hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.actions { display: flex; gap: 6px; }
.add-box { display: flex; gap: 10px; margin-bottom: 20px; }
.add-box input { flex: 1; font-family: inherit; font-size: 14px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 10px; outline: none; }
.org-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.org-checks label { display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px;
  font-size: 13px; cursor: pointer; }
.org-checks label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.pw-form { max-width: 380px; }
.brand-banner {
  display: block;
  max-height: 240px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 auto 18px auto;
}
.product-shot img {
  max-height: 300px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
.brand-logo {
  height: 44px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
}