/* BatJox — استایل اصلی پنل مدیریت (راست‌چین، موبایل‌اول) */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700; font-display: swap;
}

:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --ink: #16202b;
  --muted: #64748b;
  --line: #dde3ea;
  --brand: #146e6a;
  --brand-dark: #0f5350;
  --brand-soft: #e3f1f0;
  --gold: #9a6b12;
  --ok: #2a7a55;
  --ok-soft: #e4f2ea;
  --warn: #a9721b;
  --warn-soft: #fbf1df;
  --danger: #a8322b;
  --danger-soft: #f8e7e6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(22, 32, 43, .06), 0 8px 24px rgba(22, 32, 43, .05);
  --font: 'Vazirmatn', 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.5; font-weight: 700; }
.bj-h1 { font-size: 1.5rem; }
.bj-h2 { font-size: 1.2rem; }
.bj-muted { color: var(--muted); }
.bj-small { font-size: .85rem; }
.bj-center { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.bj-narrow { max-width: 460px; width: 100%; }
.bj-wide { max-width: 720px; width: 100%; }

/* ---------- کارت‌ها ---------- */
.bj-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.bj-card + .bj-card { margin-top: 1rem; }
.bj-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: 1rem; padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

/* ---------- فرم ---------- */
.bj-field { margin-bottom: 1rem; }
.bj-label { display: block; font-weight: 700; margin-bottom: .35rem; font-size: .92rem; }
.bj-hint { color: var(--muted); font-size: .82rem; margin-top: .3rem; }

.bj-input, .bj-select, .bj-textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.bj-input:focus, .bj-select:focus, .bj-textarea:focus {
  background: var(--surface);
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.bj-textarea { min-height: 110px; resize: vertical; }
.bj-input[dir="ltr"] { direction: ltr; text-align: left; }

.bj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.bj-btn:hover { background: var(--brand-dark); text-decoration: none; }
.bj-btn--ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.bj-btn--ghost:hover { background: var(--brand-soft); }
.bj-btn--danger { background: var(--danger); }
.bj-btn--danger:hover { background: #8c2923; }
.bj-btn--block { width: 100%; }
.bj-btn[disabled] { opacity: .55; cursor: not-allowed; }

.bj-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- پیام‌ها ---------- */
.bj-alert {
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  font-size: .95rem;
}
.bj-alert--success { background: var(--ok-soft); border-color: #bfdccd; color: #1d5b3f; }
.bj-alert--error   { background: var(--danger-soft); border-color: #e9c3c0; color: #83251f; }
.bj-alert--warn    { background: var(--warn-soft); border-color: #ecd6ad; color: #7d5312; }
.bj-alert--info    { background: var(--brand-soft); border-color: #b9dedb; color: #0f5350; }

/* ---------- جدول ---------- */
.bj-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bj-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.bj-table th, .bj-table td { padding: .7rem .6rem; text-align: right; border-bottom: 1px solid var(--line); }
.bj-table th { color: var(--muted); font-weight: 700; white-space: nowrap; }
.bj-table tbody tr:hover { background: var(--surface-2); }

/* ---------- برچسب وضعیت ---------- */
.bj-tag {
  display: inline-block; padding: .18rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.bj-tag--pending   { background: var(--warn-soft); color: var(--warn); }
.bj-tag--confirmed { background: var(--brand-soft); color: var(--brand-dark); }
.bj-tag--completed { background: var(--ok-soft); color: var(--ok); }
.bj-tag--cancelled { background: var(--danger-soft); color: var(--danger); }

/* ---------- چیدمان پنل ---------- */
.bj-app { display: flex; min-height: 100vh; }

.bj-side {
  width: 244px; flex-shrink: 0;
  background: var(--surface);
  border-inline-start: 1px solid var(--line);
  padding: 1.1rem .8rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.bj-brand { display: flex; align-items: center; gap: .55rem; padding: .3rem .5rem 1rem; }
.bj-brand__mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.bj-brand__name { font-weight: 700; }
.bj-brand__sub { font-size: .75rem; color: var(--muted); }

.bj-nav { display: flex; flex-direction: column; gap: .15rem; }
.bj-nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .7rem; border-radius: var(--radius-sm);
  color: var(--ink); font-size: .93rem;
}
.bj-nav a:hover { background: var(--surface-2); text-decoration: none; }
.bj-nav a.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.bj-nav__group { margin-top: .9rem; padding: 0 .7rem .3rem; font-size: .78rem; color: var(--muted); }

.bj-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bj-topbar {
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: .75rem 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.bj-content { padding: 1.1rem; flex: 1; }
.bj-page-title { font-size: 1.25rem; font-weight: 700; }

/* ---------- آمار داشبورد ---------- */
.bj-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .8rem; }
.bj-stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem 1rem;
}
.bj-stat__label { color: var(--muted); font-size: .85rem; }
.bj-stat__value { font-size: 1.5rem; font-weight: 700; margin-top: .2rem; }
.bj-stat__value--money { font-size: 1.15rem; }

/* ---------- مراحل نصب ---------- */
.bj-steps { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.2rem; }
.bj-step {
  flex: 1 1 60px; text-align: center; font-size: .72rem; color: var(--muted);
  padding-top: .5rem; border-top: 3px solid var(--line);
}
.bj-step.is-done { border-top-color: var(--ok); color: var(--ok); }
.bj-step.is-current { border-top-color: var(--brand); color: var(--brand-dark); font-weight: 700; }

.bj-check { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.bj-check:last-child { border-bottom: 0; }
.bj-check__state { font-weight: 700; white-space: nowrap; }
.bj-check__state--ok { color: var(--ok); }
.bj-check__state--bad { color: var(--danger); }
.bj-check__state--warn { color: var(--warn); }

/* ---------- پیشرفت راه‌اندازی ---------- */
.bj-progress { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bj-progress__bar { height: 100%; background: var(--brand); }

/* ---------- موبایل ---------- */
.bj-mobile-nav { display: none; }

@media (max-width: 860px) {
  .bj-side { display: none; }
  .bj-content { padding: .9rem .8rem 5.5rem; }
  .bj-mobile-nav {
    display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom, 0px));
  }
  .bj-mobile-nav a {
    flex: 1; text-align: center; font-size: .7rem; color: var(--muted);
    padding: .35rem .1rem; border-radius: var(--radius-sm);
  }
  .bj-mobile-nav a.is-active { color: var(--brand-dark); background: var(--brand-soft); font-weight: 700; }
  .bj-mobile-nav span { display: block; font-size: 1.05rem; line-height: 1.3; }
  .bj-table { font-size: .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
