/* ==========================================================================
   Espart — Account panels: seller, technician, agent (requires main.css)
   Figma: ۰۷ › فروشنده ۱۲ پنل فروشنده (1440) · تکنسین ۱۲ پنل تکنسین (1440) · نماینده ۷–۱۱ پنل نماینده (360)
   Mobile of the desktop panels / desktop of the agent panel: built from the same parts.
   ========================================================================== */
.ptabs { background: var(--white); }
.ptabs .tabs { overflow-x: auto; scrollbar-width: none; }
.ptabs .tabs::-webkit-scrollbar { display: none; }
.panel { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; padding-bottom: 24px; }
.panel__layout { display: flex; flex-direction: column; gap: 16px; }
.panel__main { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-width: 0; }
.panel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.panel__title { font-weight: 700; font-size: 20px; line-height: 32px; color: var(--gray-900); }
.panel__cols { display: flex; flex-direction: column; gap: 16px; }
.panel__col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Sidebar (desktop) */
.pside { display: none; }
.pside__me { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; }
.avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 999px; background: var(--primary-50); color: var(--primary); }
.avatar .ic { width: 22px; height: 22px; }
.avatar--sm { width: 40px; height: 40px; background: var(--gray-200); color: var(--gray-700); }
.avatar--sm .ic { width: 20px; height: 20px; }
.who { display: flex; flex-direction: column; min-width: 0; }
.who b { font-weight: 700; font-size: 14px; line-height: 24px; color: var(--gray-900); white-space: nowrap; }
.who span { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); }
.pnav { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border-radius: 8px; font-weight: 500; font-size: 14px; line-height: 24px; color: var(--gray-700); transition: background-color .15s; }
.pnav .ic { flex: none; width: 18px; height: 18px; }
.pnav:hover { background: var(--gray-100); }
.pnav.is-active { background: var(--primary-50); color: var(--primary); font-weight: 700; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)); gap: 12px; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--gray-300); border-radius: 12px; background: var(--white); white-space: nowrap; }
.stat small { font-weight: 500; font-size: 12px; line-height: 20px; color: var(--gray-700); }
.stat b { font-weight: 900; font-size: 20px; line-height: 32px; color: var(--gray-900); }
.stat span { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); }
.stat--ok b { color: var(--success-900); }
.stat--brand b { color: var(--primary); }

/* Orders table (scrolls horizontally on small screens) */
.ptable { overflow-x: auto; background: var(--white); }
.ptable .tbl__head, .ptable .tbl__row { min-width: 680px; white-space: nowrap; }
.ptable .tbl__row { min-height: 45px; }
.c-code { flex: 0 0 120px; font-weight: 700; }
.c-date { flex: 0 0 130px; }
.c-n { flex: 0 0 80px; }
.c-amount { flex: 1 1 auto; min-width: 0; }
.c-status { flex: 0 0 150px; display: flex; align-items: center; }
.c-act { flex: 0 0 150px; display: flex; align-items: center; }
.ptable--tech .c-code { flex-basis: 130px; }
.ptable--tech .c-date { flex-basis: 140px; }
.tbl__head .c-code { font-weight: 700; }
.c-act .btn--text { padding: 0 8px; }

/* Price block with partner tiers */
.pblock { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pblock__sale { display: flex; align-items: center; gap: 8px; }
.pblock__old { font-weight: 400; font-size: 12px; line-height: 20px; color: var(--gray-600); text-decoration: line-through; }
.pblock__now { display: flex; align-items: baseline; gap: 6px; }
.pblock__now b { font-weight: 900; font-size: 24px; line-height: 36px; color: var(--gray-900); }
.pblock__now span { font-weight: 500; font-size: 12px; line-height: 20px; color: var(--gray-700); }
.sale-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 4px; background: var(--danger); color: var(--white); font-weight: 700; font-size: 12px; line-height: 20px; }
.tiers { display: flex; flex-direction: column; gap: 6px; align-self: stretch; padding: 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--accent-50); white-space: nowrap; }
.tiers__title { font-weight: 700; font-size: 12px; line-height: 20px; color: var(--accent-900); }
.tiers__row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; line-height: 22px; }
.tiers__row span { font-weight: 400; color: var(--gray-700); }
.tiers__row b { font-weight: 700; color: var(--gray-900); }
.tiers__row a { font-weight: 700; color: var(--primary); }

/* Sales expert */
.expert, .card.expert { gap: 8px; padding: 16px; }
.expert__who { display: flex; align-items: center; gap: 10px; }
.expert .who b { font-size: 13px; line-height: 22px; }

/* Agent panel */
.inp__wrap--search { padding: 0 12px; }
.inp__wrap--search .ic { color: var(--gray-900); }
.alert--warning { background: var(--warning-50); color: var(--warning-900); }
.track--tight .track__mark i { height: 24px; }

@media (min-width: 1200px) {
  .ptabs { display: none; }
  .panel { padding-top: 32px; padding-bottom: 64px; }
  .panel__layout { flex-direction: row; align-items: flex-start; gap: 24px; }
  .panel__main { gap: 20px; }
  .panel__title { font-size: 24px; line-height: 36px; }
  .panel__cols { flex-direction: row; align-items: flex-start; gap: 24px; }
  .panel__col--side { flex: 0 0 340px; }
  .panel__col--main { flex: 1 1 auto; }
  .pside { display: flex; flex-direction: column; gap: 4px; flex: 0 0 260px; padding: 12px; border: 1px solid var(--gray-300); border-radius: 12px; background: var(--white); position: sticky; top: 24px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; overflow: visible; }
  .ptable .tbl__head, .ptable .tbl__row { min-width: 0; }
  .panel--agent .panel__main { max-width: 760px; }
}
.inp__btn { display: flex; flex: none; color: var(--gray-900); }
.inp__btn .ic { width: 18px; height: 18px; color: inherit; }
.expert .card__title { font-size: 14px; line-height: 24px; }
