@font-face {
  font-family: 'Vazirmatn';
  src: url('../vendor/vazirmatn/vazirmatn-variable.woff2') format('woff2-variations'),
       url('../vendor/vazirmatn/vazirmatn-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --nb-brand: #b8692a;
  --nb-brand-dark: #8c4a17;
  --nb-cream: #fbf6ef;
  --nb-ink: #2b2118;
  --nb-muted: #7a6a5c;
  --nb-line: #eadfd2;
  --bs-body-font-family: 'Vazirmatn', system-ui, sans-serif;
  --bs-body-bg: var(--nb-cream);
  --bs-body-color: var(--nb-ink);
  --bs-primary: var(--nb-brand);
  --bs-primary-rgb: 184, 105, 42;
  --bs-link-color: var(--nb-brand-dark);
  --bs-link-color-rgb: 140, 74, 23;
  --bs-border-color: var(--nb-line);
}
body { font-family: var(--bs-body-font-family); font-feature-settings: "ss01"; }
.btn-primary { --bs-btn-bg: var(--nb-brand); --bs-btn-border-color: var(--nb-brand);
  --bs-btn-hover-bg: var(--nb-brand-dark); --bs-btn-hover-border-color: var(--nb-brand-dark);
  --bs-btn-active-bg: var(--nb-brand-dark); }
.btn-outline-primary { --bs-btn-color: var(--nb-brand-dark); --bs-btn-border-color: var(--nb-brand);
  --bs-btn-hover-bg: var(--nb-brand); --bs-btn-hover-border-color: var(--nb-brand); }
.form-check-input:checked { background-color: var(--nb-brand); border-color: var(--nb-brand); }
.text-brand { color: var(--nb-brand-dark) !important; }
.bg-brand { background: var(--nb-brand) !important; color: #fff; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0; background: #2b2118; color: #e9dccd;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 1rem .75rem;
}
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1.25rem;
  font-weight: 800; font-size: 1.25rem; color: #fff; text-decoration: none; }
.sidebar .brand .logo { width: 38px; height: 38px; border-radius: 12px; background: var(--nb-brand);
  display: grid; place-items: center; font-size: 1.2rem; }
.sidebar .nav-title { font-size: .72rem; color: #a89383; margin: 1rem .6rem .35rem; }
.sidebar a.nav-link { color: #e9dccd; border-radius: 10px; padding: .55rem .75rem; display: flex;
  align-items: center; gap: .6rem; font-size: .93rem; }
.sidebar a.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar a.nav-link.active { background: var(--nb-brand); color: #fff; }
.sidebar .badge { margin-inline-start: auto; }
.main { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--nb-line); padding: .7rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 10; }
.content { padding: 1.5rem; }
.page-title { font-weight: 800; font-size: 1.35rem; margin: 0; }

.card { border: 1px solid var(--nb-line); border-radius: 16px; box-shadow: 0 1px 2px rgba(60,30,0,.04); }
.card-header { background: transparent; border-bottom: 1px solid var(--nb-line); font-weight: 700;
  padding: .9rem 1.1rem; }
.stat { padding: 1.1rem 1.2rem; display: flex; gap: .9rem; align-items: center; }
.stat .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.3rem; background: #f6e9da; color: var(--nb-brand-dark); flex-shrink: 0; }
.stat .num { font-size: 1.45rem; font-weight: 800; line-height: 1.2; }
.stat .lbl { color: var(--nb-muted); font-size: .85rem; }

.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .7rem .8rem; vertical-align: middle; }
.table thead th { color: var(--nb-muted); font-weight: 600; font-size: .82rem; border-bottom-color: var(--nb-line);
  white-space: nowrap; }
.table-hover tbody tr:hover > * { background: #fdf8f2; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%;
  justify-content: flex-end; }
.bars .bar span.b { width: 100%; max-width: 34px; background: linear-gradient(180deg, #d99252, var(--nb-brand));
  border-radius: 8px 8px 3px 3px; min-height: 3px; }
.bars .bar small { font-size: .68rem; color: var(--nb-muted); }
.hbar { height: 8px; background: #f3e7da; border-radius: 6px; overflow: hidden; }
.hbar > span { display: block; height: 100%; background: var(--nb-brand); border-radius: 6px; }

.status { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; white-space: nowrap; }
.st-awaiting_payment { background: #eee; color: #555; }
.st-pending { background: #fff1d6; color: #9a5b00; }
.st-accepted { background: #e3f0ff; color: #1d5fae; }
.st-baking { background: #ffe6d5; color: #b4501b; }
.st-ready { background: #e6f6ec; color: #187744; }
.st-sending { background: #e8e7ff; color: #4b3fb5; }
.st-done { background: #dff3e4; color: #0f6b34; }
.st-rejected, .st-canceled { background: #fde4e4; color: #b42323; }
.chip { display: inline-block; padding: .15rem .55rem; border-radius: 8px; font-size: .76rem;
  background: #f3e9dd; color: #6b4d33; }
.chip-sub { background: #e2f1ff; color: #1b5a99; }

.nav-tabs .nav-link { color: var(--nb-muted); border: 0; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link.active { color: var(--nb-brand-dark); border-bottom-color: var(--nb-brand); background: none;
  font-weight: 700; }
.form-label { font-weight: 600; font-size: .9rem; }
.form-text { font-size: .78rem; }
.helptext { color: var(--nb-muted); font-size: .78rem; }
.errorlist { color: #b42323; font-size: .82rem; list-style: none; padding: 0; margin: .25rem 0 0; }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(circle at 20% 20%, #f6e2c8, transparent 45%), var(--nb-cream); }
.login-card { width: 100%; max-width: 400px; }
.empty { text-align: center; color: var(--nb-muted); padding: 2.5rem 1rem; }
.empty i { font-size: 2.2rem; display: block; margin-bottom: .5rem; opacity: .6; }

@media (max-width: 991px) {
  .sidebar { position: fixed; inset-inline-start: 0; z-index: 1040; transform: translateX(100%);
    transition: transform .2s; }
  .sidebar.show { transform: none; }
  .content { padding: 1rem; }
  .topbar { padding: .6rem 1rem; }
}
@media (min-width: 992px) { .menu-toggle { display: none; } }
