
/* =============================================================
   Sales Network — Persian Typography Hotfix
   بدون درخواست خارجی؛ آماده برای Vazirmatn لوکال در صورت اضافه شدن فایل‌ها
   ============================================================= */
:root{
  --sn-font: 'Vazirmatn','IRANSans','Segoe UI',Tahoma,Arial,sans-serif;
}
body,
.sn-admin,
.sn-panel,
.sn-app,
.sn-card,
.sn-table,
.sn-sidebar,
.sn-invoice-page,
.sn-auth-wrap,
.sn-myaccount-invoices,
.sn-panel input,
.sn-panel select,
.sn-panel textarea,
.sn-panel button,
.sn-admin input,
.sn-admin select,
.sn-admin textarea,
.sn-admin button{
  font-family: var(--sn-font) !important;
  letter-spacing: 0 !important;
}
.sn-card{font-weight:500;}
.sn-table th, .sn-admin table th{font-weight:700;}
.sn-title, .sn-panel-header h2, .sn-admin h1{font-weight:800;}
.sn-table td, .sn-table th, .sn-admin table td, .sn-admin table th{
  font-variant-numeric: tabular-nums;
}
.sn-code, .sn-invoice-code, .sn-table .code, .sn-table .amount, .sn-price, .sn-amount{
  font-family: var(--sn-font) !important;
  letter-spacing: 0 !important;
}

/* =============================================================
   Sales Network — Public Styles
   فونت: Vazirmatn لوکال (بدون درخواست به سرور خارجی)
   ============================================================= */

/* فونت‌ها از طریق wp_add_inline_style با مسیر مطلق تزریق می‌شوند */

/* ---------- Design Tokens ---------- */
:root {
  --sn-primary:      #4a6cf7;
  --sn-primary-dk:   #3a5ce4;
  --sn-primary-lt:   #eef1fe;
  --sn-success:      #16a34a;
  --sn-success-lt:   #f0fdf4;
  --sn-success-bd:   #bbf7d0;
  --sn-warning:      #ca8a04;
  --sn-warning-lt:   #fefce8;
  --sn-error:        #dc2626;
  --sn-error-lt:     #fef2f2;
  --sn-error-bd:     #fecaca;
  --sn-info:         #0284c7;
  --sn-info-lt:      #f0f9ff;
  --sn-border:       #e2e8f0;
  --sn-bg:           #f8fafc;
  --sn-white:        #ffffff;
  --sn-text:         #1e293b;
  --sn-text-muted:   #64748b;
  --sn-radius:       12px;
  --sn-radius-sm:    8px;
  --sn-radius-lg:    16px;
  --sn-shadow:       0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --sn-shadow-md:    0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --sn-font:         'Vazirmatn','IRANSans','Segoe UI',Tahoma,Arial,sans-serif;
}

/* ---------- Reset (scoped) ---------- */
.sn-panel *, .sn-invoice-page *, .sn-auth-wrap *,
.sn-myaccount-invoices * { box-sizing: border-box; }

/* ---------- Base Wrapper ---------- */
.sn-panel, .sn-invoice-page {
  direction: rtl;
  font-family: var(--sn-font);
  font-size: .9375rem;
  color: var(--sn-text);
  line-height: 1.6;
  max-width: 960px;
  margin: 24px auto;
  padding: 0 16px;
}

/* ---------- Panel Header ---------- */
.sn-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 18px;
  border-bottom: 2px solid var(--sn-border);
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.sn-panel-header h2 { margin:0; font-size:1.25rem; font-weight:700; color:var(--sn-text); }

/* ---------- Badge ---------- */
.sn-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--sn-error); color: #fff;
  padding: 2px 12px; border-radius: 20px;
  font-size: .8rem; font-weight: 700; min-width: 28px;
}

/* ---------- Tabs ---------- */
.sn-tabs {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--sn-border);
  margin-bottom: 24px;
  overflow-x: auto; scrollbar-width: none;
}
.sn-tabs::-webkit-scrollbar { display: none; }
.sn-tab {
  padding: 10px 20px;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: var(--sn-font); font-size: .9rem; font-weight: 500;
  color: var(--sn-text-muted);
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.sn-tab:hover { color: var(--sn-text); }
.sn-tab.active { color: var(--sn-primary); border-bottom-color: var(--sn-primary); font-weight: 700; }
.sn-tab-content { display: none !important; }
.sn-tab-content.active { display: block !important; }

/* ---------- Card ---------- */
.sn-card {
  background: var(--sn-white);
  border: 1px solid var(--sn-border);
  border-radius: var(--sn-radius-lg);
  padding: 24px; margin-bottom: 20px;
  box-shadow: var(--sn-shadow);
}
.sn-card h3 {
  margin: 0 0 20px; font-size: 1.05rem; font-weight: 700; color: var(--sn-text);
  display: flex; align-items: center; gap: 8px;
}
.sn-card h3::before {
  content: ''; display: block;
  width: 4px; height: 20px;
  background: var(--sn-primary); border-radius: 4px; flex-shrink: 0;
}

/* ---------- Form ---------- */
.sn-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.sn-full { grid-column: 1 / -1; }
.sn-field { display: flex; flex-direction: column; gap: 6px; }
.sn-field label { font-size: .85rem; font-weight: 600; color: var(--sn-text); }
.sn-field input, .sn-field select, .sn-field textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--sn-border);
  border-radius: var(--sn-radius-sm);
  font-family: var(--sn-font); font-size: .9rem;
  color: var(--sn-text); background: var(--sn-white);
  transition: border-color .15s, box-shadow .15s;
  outline: none; direction: rtl;
}
.sn-field input:focus, .sn-field select:focus, .sn-field textarea:focus {
  border-color: var(--sn-primary);
  box-shadow: 0 0 0 3px rgb(74 108 247 / .12);
}
.sn-field input::placeholder, .sn-field textarea::placeholder { color: #94a3b8; }

/* ---------- Buttons ---------- */
.sn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px;
  border-radius: var(--sn-radius-sm); border: none;
  cursor: pointer;
  font-family: var(--sn-font); font-size: .9rem; font-weight: 700; line-height: 1;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
}
.sn-btn:active { transform: scale(.97); }
.sn-btn-primary {
  background: var(--sn-primary); color: #fff;
  box-shadow: 0 2px 8px rgb(74 108 247 / .25);
}
.sn-btn-primary:hover { background: var(--sn-primary-dk); box-shadow: 0 4px 12px rgb(74 108 247 / .3); }
.sn-btn-secondary { background: var(--sn-primary-lt); color: var(--sn-primary); }
.sn-btn-secondary:hover { background: #dde5fd; }
.sn-btn-ghost { background: transparent; color: var(--sn-text-muted); border: 1.5px solid var(--sn-border); }
.sn-btn-ghost:hover { background: var(--sn-bg); }
.sn-btn-sm { padding: 6px 14px; font-size: .82rem; }
.sn-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Notices ---------- */
.sn-notice {
  padding: 12px 16px; border-radius: var(--sn-radius-sm);
  margin-bottom: 16px; font-size: .9rem; font-weight: 500; line-height: 1.5;
}
.sn-success { background: var(--sn-success-lt); color: var(--sn-success); border: 1px solid var(--sn-success-bd); }
.sn-error   { background: var(--sn-error-lt);   color: var(--sn-error);   border: 1px solid var(--sn-error-bd); }
.sn-info    { background: var(--sn-info-lt);    color: var(--sn-info);    border: 1px solid #bae6fd; }
.sn-warning { background: var(--sn-warning-lt); color: var(--sn-warning); border: 1px solid #fde68a; }

/* ---------- Loading Spinner ---------- */
.sn-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 48px; color: var(--sn-text-muted); font-size: .9rem;
}
.sn-loading::before {
  content: ''; width: 20px; height: 20px;
  border: 2.5px solid var(--sn-border); border-top-color: var(--sn-primary);
  border-radius: 50%; animation: sn-spin .7s linear infinite; flex-shrink: 0;
}
@keyframes sn-spin { to { transform: rotate(360deg); } }

/* ---------- Table ---------- */
.sn-table-wrap { overflow-x: auto; border-radius: var(--sn-radius); }
table.sn-table { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--sn-white); }
table.sn-table thead tr { background: var(--sn-bg); border-bottom: 2px solid var(--sn-border); }
table.sn-table th {
  padding: 12px 14px; text-align: right; font-weight: 700;
  color: var(--sn-text-muted); font-size: .82rem; white-space: nowrap;
}
table.sn-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--sn-border);
  color: var(--sn-text); vertical-align: middle;
}
table.sn-table tbody tr:last-child td { border-bottom: none; }
table.sn-table tbody tr:hover td { background: #f8fafc; }

/* ---------- Status Badges ---------- */
.sn-status {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: .78rem; font-weight: 700; white-space: nowrap;
}
.sn-status-unassigned       { background: #fef9c3; color: #854d0e; }
.sn-status-assigned         { background: #dbeafe; color: #1e40af; }
.sn-status-invoiced         { background: #dcfce7; color: #166534; }
.sn-status-pending          { background: #fef9c3; color: #854d0e; }
.sn-status-paid             { background: #dcfce7; color: #166534; }
.sn-status-receipt_uploaded { background: #e0f2fe; color: #075985; }
.sn-status-cancelled        { background: #fee2e2; color: #991b1b; }

/* ---------- Invoice Page ---------- */
.sn-invoice-page { max-width: 600px; }
.sn-invoice-card { max-width: 580px; margin: 0 auto; }
.sn-invoice-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding-bottom: 18px; margin-bottom: 20px;
  border-bottom: 2px dashed var(--sn-border);
}
.sn-invoice-header h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.sn-invoice-code {
  font-family: var(--sn-font); font-weight: 700; letter-spacing:0;
  background: var(--sn-primary-lt); color: var(--sn-primary);
  padding: 5px 14px; border-radius: var(--sn-radius-sm);
  font-size: .95rem; letter-spacing: 1px;
}
.sn-invoice-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--sn-bg); gap: 12px;
}
.sn-invoice-row span { color: var(--sn-text-muted); font-size: .88rem; }
.sn-invoice-row strong { font-weight: 600; }
.sn-invoice-total {
  padding: 14px 0 0; margin-top: 8px;
  border-top: 2px solid var(--sn-border); border-bottom: none; font-size: 1.1rem;
}
.sn-invoice-total strong { color: var(--sn-primary); font-weight: 700; }
.sn-payment-section { margin-top: 24px; }
.sn-payment-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.sn-pay-methods { display: flex; gap: 12px; flex-wrap: wrap; }
.sn-pay-methods .sn-btn { flex: 1; min-width: 150px; }
.sn-card-info {
  margin-top: 20px; background: var(--sn-bg);
  border-radius: var(--sn-radius); padding: 20px; border: 1px solid var(--sn-border);
}
.sn-card-number {
  font-size: 1.5rem; font-family: var(--sn-font); letter-spacing: 0;
  text-align: center; padding: 14px;
  background: var(--sn-white); border-radius: var(--sn-radius-sm);
  border: 2px solid var(--sn-primary); color: var(--sn-text);
  margin: 12px 0; font-weight: 700;
  cursor: pointer; user-select: all;
}
.sn-card-owner { text-align: center; color: var(--sn-text-muted); font-size: .9rem; margin-bottom: 16px; }
.sn-card-info hr { border: none; border-top: 1px solid var(--sn-border); margin: 16px 0; }
.sn-card-info input[type="file"] {
  width: 100%; padding: 10px;
  border: 1.5px dashed var(--sn-border); border-radius: var(--sn-radius-sm);
  cursor: pointer; background: var(--sn-white); margin: 10px 0;
  font-family: var(--sn-font);
}
.sn-card-info input[type="file"]:hover { border-color: var(--sn-primary); }

/* ---------- Auth ---------- */
.sn-auth-wrap {
  direction: rtl; font-family: var(--sn-font);
  max-width: 440px; margin: 40px auto; color: var(--sn-text);
}
.sn-auth-wrap .sn-card { padding: 32px; }

/* ---------- Checkbox / Radio ---------- */
.sn-checkbox-list {
  max-height: 220px; overflow-y: auto;
  border: 1.5px solid var(--sn-border); border-radius: var(--sn-radius-sm);
  padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; background: var(--sn-bg);
}
.sn-checkbox-list label {
  display: inline-flex; align-items: center; gap: 6px; font-size: .87rem;
  background: var(--sn-white); padding: 6px 12px; border-radius: 6px;
  cursor: pointer; border: 1px solid var(--sn-border); transition: background .12s, border-color .12s;
}
.sn-checkbox-list label:hover { background: var(--sn-primary-lt); border-color: var(--sn-primary); }
.sn-radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.sn-radio-group label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .9rem; }
.sn-phone-list {
  max-height: 240px; overflow-y: auto;
  border: 1.5px solid var(--sn-border); border-radius: var(--sn-radius-sm); background: var(--sn-bg);
}
.sn-phone-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-bottom: 1px solid var(--sn-border); font-size: .88rem;
}
.sn-phone-item:last-child { border-bottom: none; }
.sn-phone-item:hover { background: var(--sn-white); }

/* ---------- My Account ---------- */
.sn-myaccount-invoices { direction: rtl; font-family: var(--sn-font); }
.sn-myaccount-invoices h3 { margin-bottom: 20px; font-size: 1.1rem; font-weight: 700; }
.sn-myaccount-invoices table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sn-myaccount-invoices table th {
  background: var(--sn-bg); padding: 10px 14px; text-align: right;
  font-weight: 700; color: var(--sn-text-muted); border-bottom: 2px solid var(--sn-border);
}
.sn-myaccount-invoices table td { padding: 12px 14px; border-bottom: 1px solid var(--sn-border); vertical-align: middle; }
.sn-myaccount-invoices table tr:last-child td { border-bottom: none; }
.sn-myaccount-invoices .sn-sub-content {
  background: #f0fdf4; border-right: 4px solid #16a34a; padding: 14px 16px;
}
.sn-empty { text-align: center; padding: 48px 24px; color: var(--sn-text-muted); }
.sn-empty p { font-size: .95rem; margin: 0; }
.sn-divider { border: none; border-top: 1px solid var(--sn-border); margin: 20px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .sn-form-grid { grid-template-columns: 1fr; }
  .sn-full { grid-column: 1; }
  .sn-pay-methods { flex-direction: column; }
  .sn-tabs { gap: 0; }
  .sn-tab { padding: 8px 14px; font-size: .85rem; }
  .sn-card { padding: 16px; }
}

/* ========================================================
   Auth Form — فرم ورود و ثبت‌نام فروشنده
   ======================================================== */
.sn-auth-wrap {
  direction: rtl;
  font-family: var(--sn-font);
  max-width: 460px;
  margin: 48px auto;
  padding: 0 16px;
  color: var(--sn-text);
}

.sn-auth-wrap .sn-auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.sn-auth-wrap .sn-auth-logo h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--sn-text);
  margin: 0 0 6px;
}
.sn-auth-wrap .sn-auth-logo p {
  color: var(--sn-text-muted);
  font-size: .88rem;
  margin: 0;
}

/* کارت فرم */
.sn-auth-wrap .sn-auth-card {
  background: var(--sn-white);
  border: 1px solid var(--sn-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgb(74 108 247 / .08), 0 2px 8px rgb(0 0 0 / .04);
  overflow: hidden;
}

/* تب‌های ورود/ثبت‌نام */
.sn-auth-wrap .sn-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--sn-border);
  background: var(--sn-bg);
}
.sn-auth-wrap .sn-auth-tab {
  flex: 1;
  padding: 14px;
  background: none;
  border: none;
  font-family: var(--sn-font);
  font-size: .9rem;
  font-weight: 600;
  color: var(--sn-text-muted);
  cursor: pointer;
  transition: color .15s, background .15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.sn-auth-wrap .sn-auth-tab:hover { color: var(--sn-primary); background: var(--sn-white); }
.sn-auth-wrap .sn-auth-tab.active {
  color: var(--sn-primary);
  background: var(--sn-white);
  border-bottom-color: var(--sn-primary);
  font-weight: 700;
}

/* بدنه فرم */
.sn-auth-wrap .sn-auth-body {
  padding: 28px 28px 24px;
}

/* فیلدها */
.sn-auth-wrap .sn-field {
  margin-bottom: 18px;
}
.sn-auth-wrap .sn-field label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--sn-text);
  margin-bottom: 7px;
}
.sn-auth-wrap .sn-field input {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--sn-border);
  border-radius: 10px;
  font-family: var(--sn-font);
  font-size: .93rem;
  color: var(--sn-text);
  background: var(--sn-white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  direction: rtl;
}
.sn-auth-wrap .sn-field input:focus {
  border-color: var(--sn-primary);
  box-shadow: 0 0 0 3px rgb(74 108 247 / .12);
}
.sn-auth-wrap .sn-field input::placeholder { color: #94a3b8; font-size: .88rem; }

/* دکمه ارسال */
.sn-auth-wrap .sn-auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--sn-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: var(--sn-font);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, box-shadow .15s, transform .1s;
  box-shadow: 0 4px 14px rgb(74 108 247 / .28);
  margin-top: 4px;
}
.sn-auth-wrap .sn-auth-submit:hover {
  background: var(--sn-primary-dk);
  box-shadow: 0 6px 18px rgb(74 108 247 / .35);
}
.sn-auth-wrap .sn-auth-submit:active { transform: scale(.98); }

/* پیام خطا */
.sn-auth-wrap .sn-auth-error {
  background: var(--sn-error-lt);
  border: 1px solid var(--sn-error-bd);
  color: var(--sn-error);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sn-auth-wrap .sn-auth-error::before { content: '⚠️'; font-size: 1rem; }

/* فوتر کارت */
.sn-auth-wrap .sn-auth-footer {
  text-align: center;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--sn-border);
  background: var(--sn-bg);
  font-size: .83rem;
  color: var(--sn-text-muted);
}

@media (max-width: 480px) {
  .sn-auth-wrap { margin: 24px auto; }
  .sn-auth-wrap .sn-auth-body { padding: 20px; }
}

/* Supervisor seller profile accordion */
.sn-supervisor-sellers-table .sn-seller-profile-row > td {
  padding: 0 !important;
  border-top: 0 !important;
}
.sn-supervisor-sellers-table .sn-seller-profile-panel {
  padding: 14px;
  background: #f0f9ff;
  border-right: 3px solid #3b82f6;
}
.sn-supervisor-sellers-table .sn-seller-profile.active,
.sn-supervisor-sellers-table .sn-seller-profile[aria-expanded="true"] {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.sn-seller-profile-card {
  margin: 0;
  box-shadow: none;
}
.sn-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sn-mini-stat {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 10px;
}
.sn-mini-stat b {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 4px;
}
.sn-mini-stat span {
  font-weight: 800;
  color: #1e293b;
}


/* SN Jalali payment picker */
.sn-jalali-picker{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px;margin-top:6px}
.sn-jalali-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;direction:rtl}
.sn-jalali-row select{min-width:68px;border:1px solid #cbd5e1;border-radius:10px;padding:8px;background:#fff;font-family:inherit}
.sn-jalali-row .sn-time-sep{margin-right:8px;color:#475569;font-size:12px}
.sn-jalali-picker small{display:block;margin-top:6px;color:#64748b}
.sn-row-done{background:#f0fdf4!important}.sn-row-rejected{background:#fef2f2!important}

/* SN verified Jalali picker */
.sn-jalali-picker-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:12px;margin-top:8px;direction:rtl}
.sn-jalali-title{font-weight:700;margin-bottom:10px;color:#0f172a}
.sn-jalali-row{display:flex;flex-wrap:wrap;gap:8px;align-items:end}
.sn-jalali-row label{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#475569}
.sn-jalali-row select{min-width:78px;border:1px solid #cbd5e1;border-radius:10px;padding:7px 8px;background:#fff;direction:rtl}
.sn-jalali-selected{margin-top:10px;color:#334155;font-size:13px}
.sn-info{background:#e0f2fe!important;color:#075985!important;border-color:#7dd3fc!important}

/* =============================================================
   Sales Network — Modern Portal Theme v3
   افزوده شده برای تبدیل پنل‌ها به پورتال مدرن RTL با سایدبار
   بدون وابستگی خارجی / بدون تغییر منطق PHP و AJAX
   ============================================================= */
:root{
  --sn-modern-bg:#eef3fb;
  --sn-modern-surface:rgba(255,255,255,.88);
  --sn-modern-sidebar:#0f172a;
  --sn-modern-sidebar-2:#1e293b;
  --sn-modern-accent:#6366f1;
  --sn-modern-accent-2:#06b6d4;
  --sn-modern-green:#10b981;
  --sn-modern-orange:#f59e0b;
  --sn-modern-red:#ef4444;
  --sn-modern-radius:22px;
  --sn-modern-shadow:0 24px 70px rgba(15,23,42,.12);
  --sn-modern-shadow-soft:0 12px 36px rgba(15,23,42,.08);
}
body .sn-panel,
body .sn-invoice-page,
body .sn-auth-wrap{
  font-feature-settings:"ss01";
}
body .sn-panel{
  max-width:1240px;
  margin:26px auto;
  padding:18px;
  background:
    radial-gradient(circle at 95% 0%, rgba(99,102,241,.18), transparent 28%),
    radial-gradient(circle at 5% 100%, rgba(6,182,212,.14), transparent 32%),
    linear-gradient(135deg,#f8fafc 0%,var(--sn-modern-bg) 100%);
  border:1px solid rgba(148,163,184,.22);
  border-radius:30px;
  box-shadow:var(--sn-modern-shadow);
  display:grid;
  grid-template-columns:282px minmax(0,1fr);
  grid-template-rows:auto 1fr;
  gap:18px;
  overflow:hidden;
  position:relative;
}
body .sn-panel::before{
  content:"";
  position:absolute;
  inset:-80px auto auto -80px;
  width:230px;height:230px;
  border-radius:50%;
  background:rgba(99,102,241,.11);
  pointer-events:none;
  filter:blur(3px);
}
body .sn-panel-header{
  grid-column:1 / -1;
  margin:0;
  padding:18px 20px;
  border:1px solid rgba(226,232,240,.84);
  border-radius:24px;
  background:rgba(255,255,255,.72);
  box-shadow:var(--sn-modern-shadow-soft);
  backdrop-filter:blur(14px);
  position:relative;
  z-index:1;
}
body .sn-panel-header h2{
  font-size:1.35rem;
  letter-spacing:-.02em;
  display:flex;
  align-items:center;
  gap:10px;
}
body .sn-panel-header h2::before{
  content:"";
  width:42px;height:42px;
  border-radius:16px;
  background:linear-gradient(135deg,var(--sn-modern-accent),var(--sn-modern-accent-2));
  box-shadow:0 12px 26px rgba(99,102,241,.26);
  display:inline-block;
}
body .sn-panel-header form{margin-inline-start:auto!important}
body .sn-panel-header .sn-btn,
body .sn-panel-header button{
  border-radius:14px!important;
}
body .sn-panel > .sn-tabs{
  grid-column:1;
  grid-row:2;
  display:flex;
  flex-direction:column;
  gap:8px;
  overflow:visible;
  border:0;
  margin:0;
  min-height:580px;
  padding:18px;
  border-radius:26px;
  background:
    linear-gradient(180deg,rgba(15,23,42,.96),rgba(30,41,59,.96)),
    radial-gradient(circle at 0 0,rgba(99,102,241,.28),transparent 38%);
  box-shadow:0 24px 60px rgba(15,23,42,.22);
  position:sticky;
  top:18px;
  align-self:start;
}
body .sn-panel > .sn-tabs::before{
  content:"شبکه فروش";
  color:#fff;
  font-weight:900;
  font-size:1.05rem;
  padding:12px 14px 16px;
  margin-bottom:6px;
  border-bottom:1px solid rgba(255,255,255,.11);
  display:block;
}
body #sn-supervisor-panel > .sn-tabs::before{content:"پنل سرپرست"}
body #sn-seller-panel > .sn-tabs::before{content:"پنل فروشنده"}
body .sn-panel > .sn-tabs .sn-tab{
  width:100%;
  margin:0;
  padding:14px 14px;
  border:1px solid transparent;
  border-radius:16px;
  color:rgba(255,255,255,.72);
  background:transparent;
  text-align:right;
  font-weight:800;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  transition:all .18s ease;
}
body .sn-panel > .sn-tabs .sn-tab::before{
  content:"•";
  width:28px;height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:rgba(255,255,255,.09);
  color:#cbd5e1;
  font-size:18px;
  line-height:1;
}
body .sn-panel > .sn-tabs .sn-tab:nth-child(1)::before{content:"👥"}
body .sn-panel > .sn-tabs .sn-tab:nth-child(2)::before{content:"🧾"}
body .sn-panel > .sn-tabs .sn-tab:nth-child(3)::before{content:"📊"}
body .sn-panel > .sn-tabs .sn-tab:nth-child(4)::before{content:"💼"}
body .sn-panel > .sn-tabs .sn-tab:nth-child(5)::before{content:"💳"}
body .sn-panel > .sn-tabs .sn-tab:hover{
  color:#fff;
  background:rgba(255,255,255,.08);
  transform:translateX(-2px);
}
body .sn-panel > .sn-tabs .sn-tab.active{
  color:#fff;
  background:linear-gradient(135deg,var(--sn-modern-accent),#8b5cf6);
  border-color:rgba(255,255,255,.12);
  box-shadow:0 16px 34px rgba(99,102,241,.32);
}
body .sn-panel > .sn-tabs .sn-tab.active::before{
  background:rgba(255,255,255,.2);
  color:#fff;
}
body .sn-panel > .sn-tab-content{
  grid-column:2;
  grid-row:2;
  min-width:0;
  background:rgba(255,255,255,.52);
  border:1px solid rgba(226,232,240,.72);
  border-radius:26px;
  padding:20px;
  box-shadow:var(--sn-modern-shadow-soft);
  backdrop-filter:blur(10px);
}
body .sn-panel > .sn-tab-content.active{
  animation:sn-modern-fade .22s ease both;
}
@keyframes sn-modern-fade{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}
body .sn-card,
body .sn-invoice-card,
body .sn-auth-card{
  border:1px solid rgba(226,232,240,.82)!important;
  border-radius:24px!important;
  background:var(--sn-modern-surface)!important;
  box-shadow:var(--sn-modern-shadow-soft)!important;
  backdrop-filter:blur(14px);
}
body .sn-card h3{
  font-size:1.08rem;
  letter-spacing:-.01em;
}
body .sn-card h3::before{
  width:8px;
  height:28px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--sn-modern-accent),var(--sn-modern-accent-2));
}
body .sn-field label{
  color:#334155;
  font-weight:900;
  font-size:.83rem;
}
body .sn-field input,
body .sn-field select,
body .sn-field textarea,
body .sn-panel input:not([type="checkbox"]):not([type="radio"]),
body .sn-panel select,
body .sn-panel textarea,
body .sn-invoice-page input:not([type="checkbox"]):not([type="radio"]),
body .sn-invoice-page select,
body .sn-invoice-page textarea{
  border-radius:15px!important;
  border:1px solid rgba(148,163,184,.42)!important;
  background:rgba(255,255,255,.9)!important;
  min-height:42px;
  box-shadow:0 1px 0 rgba(15,23,42,.03);
}
body .sn-field input:focus,
body .sn-field select:focus,
body .sn-field textarea:focus,
body .sn-panel input:focus,
body .sn-panel select:focus,
body .sn-panel textarea:focus,
body .sn-invoice-page input:focus,
body .sn-invoice-page select:focus,
body .sn-invoice-page textarea:focus{
  border-color:var(--sn-modern-accent)!important;
  box-shadow:0 0 0 4px rgba(99,102,241,.13)!important;
}
body .sn-btn,
body .sn-panel button,
body .sn-invoice-page button{
  border-radius:15px!important;
  min-height:40px;
  font-weight:900!important;
}
body .sn-btn-primary,
body .sn-panel .sn-btn-primary,
body .sn-invoice-page .sn-btn-primary{
  background:linear-gradient(135deg,var(--sn-modern-accent),#8b5cf6)!important;
  box-shadow:0 14px 28px rgba(99,102,241,.25)!important;
}
body .sn-btn-secondary,
body .sn-panel .sn-btn-secondary,
body .sn-invoice-page .sn-btn-secondary{
  background:#e0f2fe!important;
  color:#0369a1!important;
  border:1px solid #bae6fd!important;
}
body .sn-btn:hover,
body .sn-panel button:hover,
body .sn-invoice-page button:hover{
  transform:translateY(-1px);
}
body .sn-badge{
  border-radius:999px;
  min-height:28px;
  padding:4px 12px;
  background:linear-gradient(135deg,var(--sn-modern-red),#fb7185);
  box-shadow:0 8px 18px rgba(239,68,68,.18);
}
body .sn-supervisor-summary-card .sn-badge,
body #sn-sum-total,
body #sn-sum-assigned,
body #sn-sum-unassigned,
body #sn-sum-range{
  background:linear-gradient(135deg,var(--sn-modern-accent),var(--sn-modern-accent-2));
  min-width:54px;
  font-size:.95rem;
}
body .sn-supervisor-summary-card .sn-grid > div:not(.sn-field){
  padding:14px;
  border-radius:20px;
  background:linear-gradient(180deg,#fff,rgba(248,250,252,.88));
  border:1px solid rgba(226,232,240,.85);
}
body .sn-table-wrap,
body table.sn-table{
  border-radius:20px!important;
  overflow:hidden;
}
body table.sn-table{
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}
body table.sn-table thead tr{
  background:linear-gradient(180deg,#f8fafc,#eef2ff)!important;
}
body table.sn-table th{
  color:#475569!important;
  font-weight:900!important;
}
body table.sn-table td{
  border-bottom-color:#edf2f7!important;
}
body table.sn-table tbody tr:hover td{
  background:#f8fbff!important;
}
body .sn-status{
  padding:5px 11px;
  border-radius:999px;
  font-weight:900;
}
body .sn-notice{
  border-radius:18px!important;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
body .sn-loading{
  background:rgba(255,255,255,.58);
  border:1px dashed rgba(148,163,184,.45);
  border-radius:22px;
}
body .sn-checkbox-list,
body .sn-phone-list,
body #sn-sellers-table,
body #sn-leads-list,
body #sn-invoices-list,
body #sn-supervisor-invoice-list{
  border-radius:20px;
}
body .sn-radio-group,
body .sn-pay-methods{
  padding:10px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
}
body .sn-auth-wrap{
  max-width:480px;
}
body .sn-auth-card{
  overflow:hidden;
}
body .sn-auth-wrap .sn-auth-submit{
  background:linear-gradient(135deg,var(--sn-modern-accent),#8b5cf6)!important;
  border-radius:16px!important;
}
body .sn-invoice-page{
  max-width:760px;
  padding:18px;
  border-radius:30px;
  background:linear-gradient(135deg,#f8fafc,#eef2ff);
  box-shadow:var(--sn-modern-shadow);
}
body .sn-invoice-row{
  border-bottom-color:#edf2f7;
}
body .sn-card-number{
  direction:ltr;
  letter-spacing:2px;
  font-weight:900;
  border-radius:18px;
  background:linear-gradient(135deg,#0f172a,#334155)!important;
  color:#fff!important;
  padding:16px!important;
  text-align:center;
}
body .sn-jalali-picker,
body .sn-jalali-picker-box{
  border-radius:20px!important;
  background:linear-gradient(180deg,#fff,#f8fafc)!important;
}
body .sn-jalali-row select{
  border-radius:14px!important;
}
@media (max-width: 1024px){
  body .sn-panel{
    grid-template-columns:230px minmax(0,1fr);
    padding:14px;
  }
  body .sn-panel > .sn-tabs{padding:14px;min-height:520px}
  body .sn-panel > .sn-tab-content{padding:16px}
}
@media (max-width: 820px){
  body .sn-panel{
    display:block;
    border-radius:22px;
    margin:14px auto;
  }
  body .sn-panel-header{margin-bottom:14px}
  body .sn-panel > .sn-tabs{
    position:relative;
    top:auto;
    min-height:0;
    flex-direction:row;
    overflow-x:auto;
    border-radius:22px;
    margin-bottom:14px;
    padding:10px;
  }
  body .sn-panel > .sn-tabs::before{display:none}
  body .sn-panel > .sn-tabs .sn-tab{
    min-width:max-content;
    padding:11px 12px;
  }
  body .sn-panel > .sn-tab-content{
    border-radius:22px;
    padding:14px;
  }
  body .sn-form-grid{grid-template-columns:1fr}
}
@media (max-width: 520px){
  body .sn-panel{padding:10px;background:#f8fafc}
  body .sn-panel-header{padding:14px;border-radius:18px}
  body .sn-panel-header h2{font-size:1.06rem}
  body .sn-panel-header h2::before{width:34px;height:34px;border-radius:13px}
  body .sn-card{padding:16px!important;border-radius:18px!important}
  body .sn-pay-methods .sn-btn{min-width:100%}
}

/* ============================================================
   Sales Network Advanced UI Pack: KPI, Dark Mode, Sticky Tables,
   Mobile UX, Skeleton Loading - no CDN dependencies
   ============================================================ */
body .sn-ui-toolbar{
  display:flex;
  justify-content:flex-end;
  margin-bottom:12px;
}
body .sn-dark-toggle{
  appearance:none;
  border:1px solid rgba(148,163,184,.35);
  background:rgba(255,255,255,.74);
  color:#0f172a;
  padding:9px 14px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  box-shadow:0 10px 22px rgba(15,23,42,.08);
  transition:.18s ease;
  margin-inline-start:auto;
}
body .sn-panel-header .sn-dark-toggle{
  position:relative;
  z-index:2;
}
body .sn-dark-toggle:hover{transform:translateY(-1px);box-shadow:0 14px 26px rgba(15,23,42,.12)}

body .sn-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0 0 18px;
}
body .sn-kpi-card{
  position:relative;
  overflow:hidden;
  min-height:112px;
  padding:18px 18px 14px;
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,255,255,.92),rgba(248,250,252,.82));
  border:1px solid rgba(226,232,240,.9);
  box-shadow:0 16px 38px rgba(15,23,42,.075);
  isolation:isolate;
}
body .sn-kpi-card::before{
  content:"";
  position:absolute;
  inset:auto auto -48px -48px;
  width:132px;
  height:132px;
  border-radius:999px;
  background:radial-gradient(circle,rgba(99,102,241,.18),rgba(99,102,241,0) 70%);
  z-index:-1;
}
body .sn-kpi-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(120deg,rgba(255,255,255,.45),rgba(255,255,255,0) 42%);
  pointer-events:none;
}
body .sn-kpi-icon{
  width:40px;
  height:40px;
  border-radius:16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#eef2ff,#e0f2fe);
  box-shadow:inset 0 0 0 1px rgba(99,102,241,.12);
  font-size:1.2rem;
  margin-bottom:10px;
}
body .sn-kpi-card small{
  display:block;
  color:#64748b;
  font-weight:900;
  margin-bottom:5px;
}
body .sn-kpi-card strong{
  display:block;
  color:#0f172a;
  font-size:1.45rem;
  line-height:1.25;
  font-weight:1000;
  letter-spacing:-.02em;
}
body .sn-kpi-card em{
  display:block;
  margin-top:6px;
  color:#64748b;
  font-size:.82rem;
  font-style:normal;
  font-weight:800;
}
body .sn-kpi-money::before{background:radial-gradient(circle,rgba(16,185,129,.18),rgba(16,185,129,0) 70%)}
body .sn-kpi-money .sn-kpi-icon{background:linear-gradient(135deg,#dcfce7,#ecfdf5)}

body .sn-table-wrap{
  max-width:100%;
  overflow:auto;
  border-radius:22px;
  -webkit-overflow-scrolling:touch;
}
body table.sn-table{
  border-collapse:separate!important;
  border-spacing:0!important;
}
body table.sn-table thead th{
  position:sticky;
  top:0;
  z-index:4;
  backdrop-filter:blur(10px);
  background:rgba(248,250,252,.94)!important;
  box-shadow:0 1px 0 rgba(226,232,240,.9);
}
body .sn-table-wrap table.sn-table thead th:first-child{border-start-start-radius:18px}
body .sn-table-wrap table.sn-table thead th:last-child{border-start-end-radius:18px}

body .sn-skeleton-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:22px;
  padding:10px;
  box-shadow:0 12px 26px rgba(15,23,42,.05);
}
body .sn-skeleton-table td{padding:14px!important;border-bottom:1px solid #f1f5f9!important}
body .sn-skeleton-line{
  display:block;
  width:100%;
  max-width:190px;
  height:14px;
  border-radius:999px;
  background:linear-gradient(90deg,#e2e8f0 0%,#f8fafc 42%,#e2e8f0 76%);
  background-size:220% 100%;
  animation:snSkeletonShimmer 1.25s ease-in-out infinite;
}
body .sn-skeleton-table td:nth-child(2) .sn-skeleton-line{max-width:120px}
body .sn-skeleton-table td:nth-child(3) .sn-skeleton-line{max-width:260px}
@keyframes snSkeletonShimmer{0%{background-position:120% 0}100%{background-position:-120% 0}}

/* Better mobile tables: horizontal card-like rows */
@media (max-width: 680px){
  body .sn-kpi-grid{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
  body .sn-kpi-card{min-height:96px;padding:14px;border-radius:20px}
  body .sn-kpi-card strong{font-size:1.05rem}
  body .sn-kpi-card em{font-size:.74rem}
  body .sn-kpi-icon{width:34px;height:34px;border-radius:13px;margin-bottom:7px}
  body .sn-table-wrap{border-radius:18px;margin-inline:-4px;padding-bottom:4px}
  body table.sn-table{min-width:720px}
  body .sn-panel input,
  body .sn-panel select,
  body .sn-panel textarea{font-size:16px!important}
  body .sn-btn{min-height:42px}
}
@media (max-width: 420px){
  body .sn-kpi-grid{grid-template-columns:1fr}
  body .sn-dark-toggle{width:100%;justify-content:center}
}

/* Dark mode */
body.sn-dark-mode{
  background:#07111f!important;
  color:#e5eefb!important;
}
body.sn-dark-mode .sn-panel,
body.sn-dark-mode .sn-invoice-page{
  background:linear-gradient(135deg,#07111f,#111827)!important;
  color:#e5eefb!important;
}
body.sn-dark-mode .sn-panel-header,
body.sn-dark-mode .sn-tab-content,
body.sn-dark-mode .sn-card,
body.sn-dark-mode .sn-auth-card,
body.sn-dark-mode .sn-skeleton-card,
body.sn-dark-mode .sn-kpi-card,
body.sn-dark-mode .sn-table-wrap,
body.sn-dark-mode #sn-leads-list,
body.sn-dark-mode #sn-invoices-list,
body.sn-dark-mode #sn-sellers-table,
body.sn-dark-mode #sn-supervisor-invoice-list{
  background:linear-gradient(145deg,rgba(15,23,42,.95),rgba(30,41,59,.88))!important;
  border-color:rgba(71,85,105,.85)!important;
  color:#e5eefb!important;
  box-shadow:0 20px 44px rgba(0,0,0,.34)!important;
}
body.sn-dark-mode .sn-panel > .sn-tabs{
  background:linear-gradient(180deg,#0f172a,#111827)!important;
  border-color:rgba(71,85,105,.75)!important;
}
body.sn-dark-mode .sn-panel > .sn-tabs .sn-tab{
  color:#cbd5e1!important;
}
body.sn-dark-mode .sn-panel > .sn-tabs .sn-tab.active{
  color:#fff!important;
  background:linear-gradient(135deg,#6366f1,#8b5cf6)!important;
}
body.sn-dark-mode table.sn-table,
body.sn-dark-mode table.sn-table td,
body.sn-dark-mode table.sn-table th{
  color:#e5eefb!important;
  border-color:rgba(71,85,105,.65)!important;
}
body.sn-dark-mode table.sn-table thead th{
  background:rgba(15,23,42,.96)!important;
  color:#cbd5e1!important;
}
body.sn-dark-mode table.sn-table tbody tr,
body.sn-dark-mode table.sn-table tbody tr td{
  background:rgba(15,23,42,.68)!important;
}
body.sn-dark-mode table.sn-table tbody tr:hover td{background:rgba(30,41,59,.92)!important}
body.sn-dark-mode input,
body.sn-dark-mode select,
body.sn-dark-mode textarea{
  background:#0f172a!important;
  color:#f8fafc!important;
  border-color:#475569!important;
}
body.sn-dark-mode input::placeholder,
body.sn-dark-mode textarea::placeholder{color:#94a3b8!important}
body.sn-dark-mode .sn-kpi-card small,
body.sn-dark-mode .sn-kpi-card em,
body.sn-dark-mode .sn-panel-header p,
body.sn-dark-mode .sn-notice{color:#cbd5e1!important}
body.sn-dark-mode .sn-kpi-card strong{color:#fff!important}
body.sn-dark-mode .sn-dark-toggle{
  background:#0f172a;
  color:#fff;
  border-color:#475569;
}
body.sn-dark-mode .sn-skeleton-line{background:linear-gradient(90deg,#1e293b 0%,#334155 42%,#1e293b 76%);background-size:220% 100%}

/* ============================================================
   KPI / Summary layout fix - 2026-05-03
   جلوگیری از کارت‌های باریک و عمودی در پنل فروشنده/سرپرست
   ============================================================ */
body #sn-seller-kpi-cards,
body #sn-supervisor-kpi-cards,
body .sn-kpi-host{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 0 18px !important;
  grid-column:auto !important;
}

body .sn-kpi-grid,
body .sn-seller-kpis,
body .sn-supervisor-kpis{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap:16px !important;
  width:100% !important;
  align-items:stretch !important;
  margin:0 !important;
}

body .sn-kpi-card{
  min-width:0 !important;
  min-height:118px !important;
  padding:18px 18px !important;
  display:grid !important;
  grid-template-columns:52px minmax(0,1fr) !important;
  grid-template-areas:
    "icon label"
    "icon value"
    "icon hint" !important;
  column-gap:14px !important;
  row-gap:4px !important;
  align-items:center !important;
  text-align:right !important;
  white-space:normal !important;
}

body .sn-kpi-icon{
  grid-area:icon !important;
  width:52px !important;
  height:52px !important;
  margin:0 !important;
  border-radius:18px !important;
  flex:0 0 52px !important;
}

body .sn-kpi-card small{
  grid-area:label !important;
  margin:0 !important;
  font-size:.88rem !important;
  line-height:1.45 !important;
  white-space:normal !important;
}

body .sn-kpi-card strong{
  grid-area:value !important;
  margin:0 !important;
  font-size:1.55rem !important;
  line-height:1.3 !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}

body .sn-kpi-card em{
  grid-area:hint !important;
  margin:0 !important;
  font-size:.8rem !important;
  line-height:1.6 !important;
  white-space:normal !important;
}

body .sn-supervisor-summary-card{
  width:100% !important;
  margin:0 0 18px !important;
  box-sizing:border-box !important;
}

body .sn-supervisor-summary-card .sn-grid{
  grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)) !important;
  gap:14px !important;
  align-items:end !important;
}

body .sn-supervisor-summary-card .sn-grid > div:not(.sn-field){
  min-height:88px !important;
  padding:16px !important;
  border-radius:20px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  gap:8px !important;
  text-align:right !important;
}

body .sn-supervisor-summary-card .sn-badge{
  align-self:flex-start !important;
  min-width:48px !important;
  text-align:center !important;
}

body .sn-supervisor-summary-card input[type="date"],
body .sn-supervisor-summary-card input[type="time"]{
  direction:ltr !important;
  text-align:center !important;
  min-height:48px !important;
}

body.sn-dark-mode .sn-kpi-card{
  background:linear-gradient(145deg, rgba(30,41,59,.95), rgba(15,23,42,.9)) !important;
  border-color:rgba(148,163,184,.22) !important;
}
body.sn-dark-mode .sn-supervisor-summary-card .sn-grid > div:not(.sn-field){
  background:rgba(15,23,42,.72) !important;
  border-color:rgba(148,163,184,.22) !important;
}

@media (max-width: 980px){
  body .sn-kpi-grid,
  body .sn-seller-kpis,
  body .sn-supervisor-kpis{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Scoped hardening for heavy themes/Elementor/Woodmart */
body .sn-panel,
body .sn-invoice-page,
body .sn-auth-wrap,
body .sn-myaccount-invoices{
  isolation:isolate;
}
body .sn-panel *,
body .sn-invoice-page *,
body .sn-auth-wrap *,
body .sn-myaccount-invoices *{
  letter-spacing:0 !important;
}
body.sn-dark-mode .sn-panel input,
body.sn-dark-mode .sn-panel select,
body.sn-dark-mode .sn-panel textarea,
body.sn-dark-mode .sn-invoice-page input,
body.sn-dark-mode .sn-invoice-page select,
body.sn-dark-mode .sn-invoice-page textarea,
body.sn-dark-mode .sn-auth-wrap input,
body.sn-dark-mode .sn-auth-wrap select,
body.sn-dark-mode .sn-auth-wrap textarea{
  background:#0f172a!important;
  color:#f8fafc!important;
  border-color:#475569!important;
}
body .sn-panel pre,
body .sn-panel code,
body .sn-invoice-page pre,
body .sn-invoice-page code{
  white-space:normal;
}

/* Seller lead editor UX */
body .sn-phone-copy{
  display:block;
  width:100%;
  background:transparent;
  border:0;
  padding:0 0 4px;
  text-align:right;
  cursor:pointer;
  color:#0f172a;
  font-weight:900;
  font-size:1rem;
  direction:ltr;
}
body .sn-copy-msg{
  display:none;
  color:#16a34a;
  font-size:.78rem;
  font-weight:800;
  margin-top:4px;
}
body .sn-lead-editor{
  background:#f0f9ff;
  padding:14px;
  border-radius:0 0 8px 8px;
}
body .sn-lead-editor-grid{
  display:grid;
  grid-template-columns:1.4fr repeat(4, minmax(130px, 1fr));
  gap:10px;
  align-items:end;
}
body .sn-lead-field label{
  display:block;
  font-size:.78rem;
  color:#475569;
  font-weight:900;
  margin-bottom:4px;
}
body .sn-lead-field input,
body .sn-lead-field select,
body .sn-lead-field textarea{
  width:100%;
  min-height:38px;
  padding:8px 10px;
  border:1.5px solid #bfdbfe;
  border-radius:8px;
  background:#fff;
  color:#0f172a;
  font-size:.88rem;
}
body .sn-lead-field-note{
  grid-column:1 / -2;
}
body .sn-lead-field-note textarea{
  min-height:86px;
  resize:vertical;
  line-height:1.7;
}
body .sn-inline-save-state{
  align-self:end;
  min-width:120px;
  font-size:.8rem;
  color:#64748b;
  padding-bottom:8px;
}
body .sn-lead-editor-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:flex-start;
  border-top:1px solid #bfdbfe;
  padding-top:10px;
  margin-top:10px;
}
body .sn-jalali-mini{
  display:inline-flex;
  gap:4px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:5px;
}
body .sn-jalali-mini select{
  min-width:68px;
  min-height:34px;
  padding:5px 8px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
}
body #sn-sales-manager-panel .sn-card{
  overflow:visible;
}
body #sn-sales-manager-panel .sn-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
body #sn-sales-manager-panel .sn-card-head h3{
  margin:0;
}
body #sn-sales-manager-panel .sn-manager-filters{
  display:grid;
  grid-template-columns:repeat(4, minmax(160px, 1fr));
  gap:10px;
  align-items:end;
}
body #sn-sales-manager-panel .sn-manager-filter-actions{
  display:flex;
  flex-direction:column;
}
body #sn-sales-manager-panel .sn-manager-report-meta{
  margin:12px 0;
  font-size:.9rem;
  color:#475569;
  font-weight:800;
}
body #sn-sales-manager-panel .sn-table-wrap{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
body #sn-sales-manager-panel .sn-manager-table{
  min-width:920px;
}
body #sn-sales-manager-panel .sn-manager-table code{
  direction:ltr;
  unicode-bidi:plaintext;
  white-space:nowrap;
}
@media (max-width: 900px){
  body #sn-sales-manager-panel .sn-manager-filters{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
  body .sn-lead-editor-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }
  body .sn-lead-field-note,
  body .sn-inline-save-state{
    grid-column:1 / -1;
  }
}
@media (max-width: 560px){
  body #sn-sales-manager-panel .sn-manager-filters{
    grid-template-columns:1fr;
  }
  body .sn-lead-editor-grid{
    grid-template-columns:1fr;
  }
}
@media (max-width: 560px){
  body .sn-kpi-grid,
  body .sn-seller-kpis,
  body .sn-supervisor-kpis{
    grid-template-columns:1fr !important;
  }
  body .sn-kpi-card{
    grid-template-columns:46px minmax(0,1fr) !important;
    min-height:104px !important;
    padding:15px !important;
  }
  body .sn-kpi-icon{width:46px !important;height:46px !important;flex-basis:46px !important}
  body .sn-supervisor-summary-card .sn-grid{
    grid-template-columns:1fr !important;
  }
}


/* ============================================================
   Full-width portal layout fix - 2026-05-04
   رفع مشکل فول نشدن پنل‌ها داخل قالب وردپرس و پنل‌های بدون تب
   ============================================================ */
body.sn-portal-page,
body.sn-portal-page #page,
body.sn-portal-page .site,
body.sn-portal-page .site-main,
body.sn-portal-page .content-area,
body.sn-portal-page .entry-content,
body.sn-portal-page .wp-site-blocks,
body.sn-portal-page .wp-block-post-content,
body.sn-portal-page .elementor,
body.sn-portal-page .elementor-section,
body.sn-portal-page .elementor-container,
body.sn-portal-page .elementor-widget-container{
  overflow-x:clip;
}
body.sn-portal-page .entry-content,
body.sn-portal-page .wp-block-post-content,
body.sn-portal-page .site-main > article,
body.sn-portal-page .page-content,
body.sn-portal-page .content-area,
body.sn-portal-page .elementor-container,
body.sn-portal-page .elementor-column,
body.sn-portal-page .elementor-widget-wrap{
  max-width:none !important;
  width:100% !important;
}
body.sn-portal-page .entry-content > .sn-panel,
body.sn-portal-page .wp-block-post-content > .sn-panel,
body.sn-portal-page .elementor-widget-container > .sn-panel,
body .sn-panel{
  width:min(1360px, calc(100vw - 48px)) !important;
  max-width:min(1360px, calc(100vw - 48px)) !important;
  box-sizing:border-box !important;
}
body .sn-panel > .sn-tab-content,
body .sn-panel > .sn-tab-content.active{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  overflow:visible !important;
}
body .sn-panel > .sn-tab-content > .sn-card,
body .sn-panel > .sn-tab-content > .sn-table-wrap,
body .sn-panel > .sn-tab-content > div[id$="-list"],
body .sn-panel > .sn-tab-content > div[id$="-loading"],
body .sn-panel > .sn-tab-content > form,
body .sn-panel .sn-card,
body .sn-panel .sn-wallet-card{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}
body .sn-panel table.sn-table,
body .sn-panel table.widefat,
body .sn-panel .sn-table-wrap table{
  width:100% !important;
}

/* پنل‌هایی مثل تایید مالی/خدمات پس از فروش که تب ندارند نباید مثل دو ستونه رندر شوند */
body .sn-panel.sn-no-sidebar,
body .sn-panel:not(:has(> .sn-tabs)){
  display:block !important;
  grid-template-columns:none !important;
  grid-template-rows:none !important;
  min-height:auto !important;
}
body .sn-panel.sn-no-sidebar > .sn-panel-header,
body .sn-panel:not(:has(> .sn-tabs)) > .sn-panel-header{
  display:flex !important;
  width:100% !important;
  margin-bottom:22px !important;
}
body .sn-panel.sn-no-sidebar > table,
body .sn-panel:not(:has(> .sn-tabs)) > table,
body .sn-panel.sn-no-sidebar > .widefat,
body .sn-panel:not(:has(> .sn-tabs)) > .widefat{
  width:100% !important;
  display:table !important;
  margin:0 !important;
  border-radius:22px !important;
  overflow:hidden !important;
}
body .sn-panel.sn-no-sidebar .widefat,
body .sn-panel.sn-no-sidebar .sn-table,
body .sn-panel:not(:has(> .sn-tabs)) .widefat,
body .sn-panel:not(:has(> .sn-tabs)) .sn-table{
  width:100% !important;
}

/* جلوگیری از فشرده شدن کارت کیف پول فروشنده */
body #sn-tab-wallet,
body #sn-tab-wallet.active{
  align-self:stretch !important;
}
body #sn-tab-wallet .sn-card,
body #sn-tab-wallet .sn-wallet-box,
body #sn-tab-wallet table{
  width:100% !important;
  max-width:100% !important;
}
body #sn-tab-wallet table{
  table-layout:auto !important;
}

/* Phase 4A wallet readiness, scoped to finance portal only */
body .sn-wallet-readiness{
  display:flex;
  flex-direction:column;
  gap:18px;
}
body .sn-wallet-readiness .sn-section{
  border-top:1px solid rgba(148,163,184,.22);
  padding-top:16px;
}
body .sn-wallet-readiness h4{
  margin:0 0 10px;
  font-size:16px;
  font-weight:800;
}
body .sn-wallet-readiness .sn-filter-bar label,
body .sn-wallet-readiness .sn-form-grid label{
  min-width:180px;
}
body .sn-wallet-readiness small{
  color:#7c8798;
  font-size:11px;
}
body .sn-commission-preview{
  display:flex;
  flex-direction:column;
  gap:18px;
}
body .sn-commission-preview .sn-section{
  border-top:1px solid rgba(148,163,184,.22);
  padding-top:16px;
}
body .sn-commission-preview h4{
  margin:0 0 10px;
  font-size:16px;
  font-weight:800;
}
body .sn-commission-preview .sn-table form{
  margin:0;
}
body .sn-commission-preview small{
  color:#7c8798;
  font-size:11px;
}
body .sn-hr-compensation .sn-notice{
  margin:10px 0 14px;
}
body .sn-hr-compensation .sn-table td,
body .sn-hr-compensation .sn-table th{
  white-space:nowrap;
}
body .sn-hr-compensation .sn-table td:last-child{
  white-space:normal;
  min-width:180px;
}

/* جدول تایید مالی روی صفحه کامل و خواناتر */
body #sn-financial-panel .widefat,
body #sn-financial-panel .sn-table{
  border-collapse:separate !important;
  border-spacing:0 !important;
  font-size:14px !important;
}
body #sn-financial-panel .widefat th,
body #sn-financial-panel .widefat td{
  padding:14px 12px !important;
  vertical-align:middle !important;
  white-space:normal !important;
}
body #sn-financial-panel .widefat thead th{
  position:sticky !important;
  top:0 !important;
  z-index:3 !important;
}

/* ============================================================
   Jalali date picker + readable table spacing hotfix - v1.0.6
   Scoped to Sales Network panels to avoid theme/Elementor bleed.
   ============================================================ */
body .sn-panel .sn-jalali-wrap,
body .sn-invoice-page .sn-jalali-wrap,
body .sn-myaccount-invoices .sn-jalali-wrap{
  position:relative;
  display:flex;
  gap:8px;
  align-items:center;
  width:100%;
}
body .sn-panel .sn-jalali-wrap .sn-jalali-date,
body .sn-invoice-page .sn-jalali-wrap .sn-jalali-date,
body .sn-myaccount-invoices .sn-jalali-wrap .sn-jalali-date{
  flex:1 1 auto;
  min-width:0;
  cursor:pointer;
  text-align:right;
}
body .sn-panel .sn-jalali-trigger,
body .sn-invoice-page .sn-jalali-trigger,
body .sn-myaccount-invoices .sn-jalali-trigger{
  flex:0 0 auto;
  min-height:40px;
  padding:8px 12px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#f8fafc;
  color:#334155;
  font-family:var(--sn-font);
  font-weight:800;
  cursor:pointer;
}
body .sn-panel .sn-jalali-picker,
body .sn-invoice-page .sn-jalali-picker,
body .sn-myaccount-invoices .sn-jalali-picker{
  position:absolute;
  inset-inline-start:0;
  top:calc(100% + 8px);
  z-index:50;
  width:min(320px, calc(100vw - 40px));
  padding:12px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.16);
  direction:rtl;
}
body .sn-panel .sn-jalali-picker[hidden],
body .sn-invoice-page .sn-jalali-picker[hidden],
body .sn-myaccount-invoices .sn-jalali-picker[hidden]{display:none!important}
body .sn-jalali-head,
body .sn-jalali-week,
body .sn-jalali-days,
body .sn-jalali-actions{
  display:grid;
  grid-template-columns:repeat(7, minmax(0,1fr));
  gap:6px;
}
body .sn-jalali-head{
  grid-template-columns:40px 1fr 40px;
  align-items:center;
  margin-bottom:10px;
}
body .sn-jalali-head strong{text-align:center;color:#0f172a}
body .sn-jalali-prev,
body .sn-jalali-next,
body .sn-jalali-day,
body .sn-jalali-today,
body .sn-jalali-clear{
  min-height:36px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  font-family:var(--sn-font);
  font-weight:800;
  cursor:pointer;
}
body .sn-jalali-week{margin-bottom:6px}
body .sn-jalali-week span{
  text-align:center;
  color:#64748b;
  font-size:.78rem;
  font-weight:900;
}
body .sn-jalali-day:hover,
body .sn-jalali-trigger:hover{border-color:#4a6cf7;background:#eef1fe;color:#1d4ed8}
body .sn-jalali-day.is-selected{background:#4a6cf7;color:#fff;border-color:#4a6cf7}
body .sn-jalali-actions{
  grid-template-columns:1fr 1fr;
  margin-top:10px;
}
body .sn-panel input[type="time"],
body .sn-invoice-page input[type="time"],
body .sn-myaccount-invoices input[type="time"]{
  direction:ltr;
  text-align:center;
  font-variant-numeric:tabular-nums;
}

body .sn-panel .sn-table-wrap,
body .sn-invoice-page .sn-table-wrap,
body .sn-myaccount-invoices .sn-table-wrap,
body .sn-panel div[id$="-list"],
body .sn-panel div[id$="-table"]{
  max-width:100%;
  overflow-x:auto !important;
  overflow-y:visible !important;
  -webkit-overflow-scrolling:touch;
  padding-bottom:8px;
}
body .sn-panel table.sn-table,
body .sn-invoice-page table.sn-table,
body .sn-myaccount-invoices table.sn-table,
body .sn-panel table.widefat{
  border-collapse:separate !important;
  border-spacing:0 !important;
  table-layout:auto !important;
}
body .sn-panel table.sn-table thead th,
body .sn-invoice-page table.sn-table thead th,
body .sn-myaccount-invoices table.sn-table thead th,
body .sn-panel table.widefat thead th,
body #sn-financial-panel .widefat thead th{
  position:static !important;
  top:auto !important;
  z-index:auto !important;
  background:#f8fafc !important;
  box-shadow:0 1px 0 #e2e8f0 !important;
}
body .sn-panel table.sn-table th,
body .sn-panel table.sn-table td,
body .sn-invoice-page table.sn-table th,
body .sn-invoice-page table.sn-table td,
body .sn-myaccount-invoices table.sn-table th,
body .sn-myaccount-invoices table.sn-table td,
body .sn-panel table.widefat th,
body .sn-panel table.widefat td{
  padding:14px 16px !important;
  line-height:1.65 !important;
  vertical-align:middle !important;
  overflow:visible !important;
  white-space:normal !important;
}
body .sn-panel table.sn-table tbody tr,
body .sn-invoice-page table.sn-table tbody tr,
body .sn-myaccount-invoices table.sn-table tbody tr{
  min-height:54px;
}
body .sn-panel table.sn-table .sn-btn,
body .sn-panel table.widefat .button,
body .sn-panel table.widefat .sn-btn,
body .sn-invoice-page table.sn-table .sn-btn,
body .sn-myaccount-invoices table.sn-table .sn-btn{
  min-height:36px;
  margin:3px 2px;
  white-space:nowrap;
  line-height:1.35 !important;
}
body .sn-panel table.sn-table .sn-badge,
body .sn-panel table.sn-table .sn-status,
body .sn-invoice-page table.sn-table .sn-badge,
body .sn-invoice-page table.sn-table .sn-status,
body .sn-myaccount-invoices table.sn-table .sn-badge,
body .sn-myaccount-invoices table.sn-table .sn-status{
  margin-block:2px;
  line-height:1.35;
}
body .sn-panel .sn-card,
body .sn-invoice-page .sn-card{
  margin-bottom:22px !important;
}
body .sn-panel .sn-form-grid,
body .sn-panel .sn-grid,
body #sn-sales-manager-panel .sn-manager-filters{
  row-gap:14px !important;
}
@media (max-width:680px){
  body .sn-panel .sn-table-wrap,
  body .sn-invoice-page .sn-table-wrap,
  body .sn-myaccount-invoices .sn-table-wrap{
    margin-inline:0 !important;
    border-radius:14px !important;
  }
  body .sn-panel table.sn-table,
  body .sn-invoice-page table.sn-table,
  body .sn-myaccount-invoices table.sn-table,
  body .sn-panel table.widefat{
    min-width:760px;
  }
  body .sn-panel .sn-jalali-wrap,
  body .sn-invoice-page .sn-jalali-wrap,
  body .sn-myaccount-invoices .sn-jalali-wrap{
    align-items:stretch;
  }
  body .sn-panel .sn-jalali-picker,
  body .sn-invoice-page .sn-jalali-picker,
  body .sn-myaccount-invoices .sn-jalali-picker{
    position:fixed;
    inset-inline:12px;
    top:auto;
    bottom:14px;
    width:auto;
    max-height:86vh;
    overflow:auto;
  }
}

@media (min-width: 1440px){
  body.sn-portal-page .entry-content > .sn-panel,
  body.sn-portal-page .wp-block-post-content > .sn-panel,
  body.sn-portal-page .elementor-widget-container > .sn-panel,
  body .sn-panel{
    width:min(1480px, calc(100vw - 64px)) !important;
    max-width:min(1480px, calc(100vw - 64px)) !important;
  }
}
@media (max-width: 980px){
  body.sn-portal-page .entry-content > .sn-panel,
  body.sn-portal-page .wp-block-post-content > .sn-panel,
  body.sn-portal-page .elementor-widget-container > .sn-panel,
  body .sn-panel{
    width:calc(100vw - 24px) !important;
    max-width:calc(100vw - 24px) !important;
    margin:12px auto !important;
  }
  body .sn-panel > .sn-tab-content{
    grid-column:1 !important;
    grid-row:auto !important;
  }
}


/* SN 1.0.13 verified UI hotfix */
.sn-invoice-option-row{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 6px;padding:10px;border:1px solid #e5e7eb;border-radius:18px;background:#f8fafc}.sn-invoice-option{border:1px solid #dbeafe;background:#fff;color:#1d4ed8;border-radius:16px;padding:10px 14px;font-weight:800;cursor:pointer;box-shadow:0 4px 12px rgba(30,64,175,.06)}.sn-invoice-option:hover{background:#eff6ff}.sn-invoice-option-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:18px}.sn-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.45)}.sn-modal-box{position:relative;background:#fff;border-radius:22px;max-width:560px;width:min(560px,96vw);max-height:86vh;overflow:auto;padding:20px;box-shadow:0 18px 50px rgba(15,23,42,.22)}.sn-modal-close{position:absolute;top:10px;left:10px;border:0;background:#f1f5f9;border-radius:999px;width:34px;height:34px;font-size:24px;cursor:pointer}.sn-option-products{display:grid;gap:10px}.sn-option-product{border:1px solid #eef2f7;border-radius:16px;padding:12px;background:#fbfdff}.sn-option-price{display:flex;gap:8px;align-items:center;color:#4f46e5;font-weight:900}.sn-option-price del{color:#94a3b8}.sn-lottery-count{display:inline-flex;border-radius:16px;background:#eef2ff;color:#4f46e5;font-weight:900;padding:10px 16px}.sn-wheel-visual{position:relative;width:170px;height:170px;margin:12px auto 16px}.sn-wheel-disc{width:170px;height:170px;border-radius:50%;border:8px solid #7c3aed;background:conic-gradient(#e0f2fe 0 20%,#ede9fe 0 40%,#fef3c7 0 60%,#dcfce7 0 80%,#ffe4e6 0 100%);display:flex;align-items:center;justify-content:center;font-size:36px;transition:transform .9s cubic-bezier(.18,.89,.32,1.28);will-change:transform}.sn-wheel-disc.is-spinning{animation:snWheelSpin1013 .9s cubic-bezier(.2,.8,.2,1)}.sn-wheel-pointer{position:absolute;top:-9px;left:50%;transform:translateX(-50%);color:#ef4444;font-size:24px}.sn-wheel-segments{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:10px 0 14px}.sn-wheel-segments span{border:1px solid #e5e7eb;border-radius:999px;padding:7px 11px;background:#fff;display:inline-flex;gap:5px}.sn-wheel-segments small{color:#64748b}.sn-jalali-picker-box{border:1px solid #dbeafe;background:#f8fafc;border-radius:16px;padding:12px;margin-top:8px}.sn-jalali-title{font-weight:900;margin-bottom:8px;color:#1e3a8a}.sn-jalali-row{display:grid;grid-template-columns:repeat(5,minmax(70px,1fr));gap:8px}.sn-jalali-row label{font-size:12px;font-weight:800}.sn-jalali-row select{width:100%;height:38px;border:1px solid #d1d5db;border-radius:10px;background:#fff}.sn-jalali-selected{margin-top:8px;color:#475569}@keyframes snWheelSpin1013{from{transform:rotate(0deg)}to{transform:rotate(1440deg)}}@media(max-width:640px){.sn-jalali-row{grid-template-columns:repeat(2,1fr)}.sn-invoice-option{flex:1 1 45%}}

/* SN 1.0.14 invoice wheel polish */
.sn-live-total{display:block;font-size:1.1em;color:#4f46e5;font-weight:800}.sn-live-discount,.sn-live-coupon{display:block;margin-top:5px;color:#16a34a;font-size:12px}.sn-invoice-option-row{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0;padding:12px;border:1px solid #e5e7eb;border-radius:18px;background:#fff}.sn-invoice-option{border:1px solid #dbeafe;background:linear-gradient(135deg,#eef6ff,#fff);border-radius:15px;padding:10px 14px;color:#0369a1;font-weight:800;cursor:pointer}.sn-invoice-option:hover{background:#e0f2fe}.sn-v14-modal .sn-modal-box{max-width:560px;border-radius:24px}.sn-option-product{border:1px solid #edf2f7;border-radius:18px;padding:12px;margin:8px 0;background:#fff}.sn-option-product h4{margin:0 0 8px}.sn-option-product p{margin:0 0 10px;color:#475569;line-height:1.9}.sn-option-price del{color:#94a3b8;margin-left:8px}.sn-option-price ins{text-decoration:none;color:#16a34a;font-weight:900}.sn-free-label{display:inline-block;background:#dcfce7;color:#15803d;border-radius:999px;padding:4px 10px}.sn-wheel-visual{position:relative;width:260px;height:260px;margin:18px auto}.sn-wheel-disc{width:250px;height:250px;border-radius:50%;margin:auto;position:relative;overflow:hidden;border:8px solid #fff;box-shadow:0 8px 26px rgba(15,23,42,.18);background:conic-gradient(from 0deg,#8b5cf6 0 60deg,#06b6d4 60deg 120deg,#22c55e 120deg 180deg,#f59e0b 180deg 240deg,#ef4444 240deg 300deg,#3b82f6 300deg 360deg);transition:transform 2.55s cubic-bezier(.12,.74,.18,1)}.sn-wheel-disc:after{content:'🎁';position:absolute;inset:88px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:34px;box-shadow:0 4px 18px rgba(0,0,0,.12);z-index:3}.sn-wheel-disc span{position:absolute;left:50%;top:50%;width:90px;transform:rotate(var(--rot)) translate(58px) rotate(calc(-1 * var(--rot)));transform-origin:left center;text-align:center;font-size:11px;font-weight:800;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.38);z-index:2}.sn-wheel-disc span b{display:block;line-height:1.35}.sn-wheel-pointer{position:absolute;top:-5px;left:50%;transform:translateX(-50%);z-index:5;color:#ef4444;font-size:28px;text-shadow:0 2px 5px rgba(0,0,0,.25)}.sn-wheel-apply-box{border:1px solid #e0e7ff;background:#f8fafc;border-radius:18px;padding:12px;margin-top:12px}.sn-coupon-box{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.sn-coupon-box input{flex:1;min-width:160px;border:1px solid #cbd5e1;border-radius:12px;padding:10px}.sn-jalali-picker-box{border:1px solid #dbeafe;background:#f8fafc;border-radius:16px;padding:12px;margin-top:8px}.sn-jalali-title{font-weight:900;margin-bottom:10px}.sn-jalali-row{display:grid;grid-template-columns:repeat(5,minmax(70px,1fr));gap:8px}.sn-jalali-row label{font-size:12px;color:#475569;font-weight:800}.sn-jalali-row select{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:7px;background:#fff}.sn-jalali-selected{margin-top:10px;color:#0369a1;font-weight:800}@media(max-width:520px){.sn-wheel-visual{width:220px;height:220px}.sn-wheel-disc{width:210px;height:210px}.sn-wheel-disc:after{inset:72px}.sn-wheel-disc span{font-size:10px;transform:rotate(var(--rot)) translate(48px) rotate(calc(-1 * var(--rot)))}.sn-jalali-row{grid-template-columns:repeat(2,1fr)}}

/* SN 1.0.15 invoice cleanup: real wheel + clean modals + datetime */
.sn-clean-modal{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;padding:18px}.sn-clean-modal .sn-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(2px)}.sn-clean-modal .sn-modal-box{position:relative;width:min(640px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:24px;padding:22px;box-shadow:0 24px 80px rgba(15,23,42,.22);direction:rtl}.sn-clean-modal .sn-modal-close{position:absolute;top:14px;left:14px;width:42px;height:42px;border:1px solid #fecdd3;border-radius:10px;background:#fff;color:#e11d48;font-size:22px;line-height:1;cursor:pointer}.sn-invoice-option-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:16px 0}.sn-invoice-option{border:1px solid #bfdbfe;background:linear-gradient(135deg,#eff6ff,#e0f2fe);color:#0369a1;border-radius:18px;padding:12px 10px;font-weight:800;cursor:pointer;box-shadow:0 8px 20px rgba(2,132,199,.08)}.sn-invoice-option:hover{border-color:#7c3aed;color:#6d28d9}.sn-option-product{border:1px solid #e5e7eb;border-radius:18px;padding:14px;margin:10px 0;background:#fff}.sn-option-product h4{margin:0 0 8px}.sn-option-price del,.sn-live-original{color:#94a3b8;margin-left:8px}.sn-option-price ins,.sn-live-total{color:#4f46e5;text-decoration:none;font-weight:900}.sn-live-discount,.sn-live-coupon,.sn-live-reward{display:block;margin-top:6px;color:#059669;font-size:12px}.sn-info-chip{display:inline-block;margin:6px 0 0 6px;padding:5px 9px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:12px}.sn-wheel-real-wrap{position:relative;width:min(360px,82vw);height:min(360px,82vw);margin:18px auto 22px}.sn-wheel-pointer{position:absolute;top:-6px;left:50%;transform:translateX(-50%);z-index:3;color:#ef4444;font-size:28px;text-shadow:0 2px 0 #fff}.sn-wheel-real{position:absolute;inset:0;border-radius:50%;border:8px solid #fff;box-shadow:0 16px 40px rgba(15,23,42,.22),inset 0 0 0 2px rgba(255,255,255,.6);overflow:hidden;will-change:transform}.sn-wheel-real:after{content:"";position:absolute;inset:42%;border-radius:50%;background:#fff;box-shadow:0 0 0 3px rgba(124,58,237,.18);z-index:2}.sn-wheel-real em{position:absolute;z-index:3;top:50%;left:50%;transform:translate(-50%,-50%);font-style:normal;font-weight:900;color:#4f46e5}.sn-wheel-label{position:absolute;inset:0;transform:rotate(var(--rot));display:flex;align-items:flex-start;justify-content:center;padding-top:18px;pointer-events:none}.sn-wheel-label b{display:block;width:90px;text-align:center;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.45);font-size:12px;line-height:1.45;transform:rotate(90deg);white-space:normal}.sn-wheel-apply-box{margin-top:12px;padding:12px;border-radius:16px;background:#f8fafc;border:1px solid #e2e8f0}.sn-coupon-box{display:flex;gap:10px;align-items:center}.sn-coupon-box input{flex:1;min-height:44px;border-radius:12px;border:1px solid #cbd5e1;padding:0 12px}.sn-jalali-picker-box{margin-top:10px;padding:12px;border:1px solid #dbeafe;background:#f8fbff;border-radius:16px}.sn-jalali-title{font-weight:900;margin-bottom:10px}.sn-jalali-row{display:grid;grid-template-columns:repeat(5,minmax(75px,1fr));gap:8px}.sn-jalali-row label{font-size:12px;font-weight:800}.sn-jalali-row select{width:100%;min-height:38px;border:1px solid #cbd5e1;border-radius:10px;background:#fff}.sn-jalali-selected{margin-top:10px;color:#475569}.sn-free-label{color:#16a34a}.sn-modal-result .sn-notice{margin-top:10px}@media(max-width:520px){.sn-jalali-row{grid-template-columns:repeat(2,1fr)}.sn-coupon-box{display:block}.sn-coupon-box .sn-btn{width:100%;margin-top:8px}.sn-wheel-label b{font-size:10px;width:70px}.sn-clean-modal .sn-modal-box{padding:18px 14px}}

/* 1.0.15.2: inline card-to-card paid datetime selector - never popup/floating */
body .sn-invoice-page #sn-card-paid-at-picker.sn-inline-paid-datetime,
body #sn-card-paid-at-picker.sn-inline-paid-datetime{
  position:static!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  z-index:auto!important;
  width:100%!important;
  max-width:none!important;
  max-height:none!important;
  overflow:visible!important;
  display:block!important;
  margin-top:8px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body .sn-invoice-page .sn-inline-date-box{
  border:1px solid #dbeafe;
  background:#f8fbff;
  border-radius:16px;
  padding:12px;
  margin-top:8px;
  direction:rtl;
}
body .sn-invoice-page .sn-inline-date-title{
  font-weight:900;
  color:#1e3a8a;
  margin-bottom:10px;
}
body .sn-invoice-page .sn-inline-date-row{
  display:grid;
  grid-template-columns:repeat(5,minmax(70px,1fr));
  gap:8px;
}
body .sn-invoice-page .sn-inline-date-row label{
  display:flex;
  flex-direction:column;
  gap:5px;
  font-size:12px;
  font-weight:800;
  color:#334155;
}
body .sn-invoice-page .sn-inline-date-row select{
  width:100%;
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  padding:7px;
  font-family:inherit;
}
body .sn-invoice-page .sn-inline-date-selected{
  margin-top:10px;
  color:#475569;
  font-size:12px;
}
@media(max-width:640px){body .sn-invoice-page .sn-inline-date-row{grid-template-columns:repeat(2,1fr)}}

/* 1.0.15.3: polished real wheel UX */
.sn-clean-modal .sn-modal-box:has(.sn-wheel-shell){max-width:620px;text-align:center;}
.sn-wheel-lead{margin:6px auto 12px;color:#475569;line-height:1.9;text-align:center;}
.sn-wheel-shell{display:flex;justify-content:center;align-items:center;margin:8px auto 10px;}
.sn-wheel-real-wrap{width:min(300px,76vw)!important;height:min(300px,76vw)!important;margin:14px auto 12px!important;}
.sn-wheel-real{border:10px solid #7c3aed!important;box-shadow:0 18px 40px rgba(124,58,237,.22), inset 0 0 0 2px rgba(255,255,255,.72)!important;transition:transform 3.85s cubic-bezier(.08,.72,.08,1)!important;background-origin:border-box;}
.sn-wheel-real:before{content:"";position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at center,rgba(255,255,255,.08) 0 34%,transparent 35%);z-index:1;pointer-events:none;}
.sn-wheel-real:after{content:"چرخش"!important;inset:38%!important;background:#fff!important;color:#4f46e5!important;font-size:16px!important;font-weight:900!important;display:flex!important;align-items:center!important;justify-content:center!important;z-index:4!important;}
.sn-wheel-real em{display:none!important;}
.sn-wheel-pointer{top:-14px!important;color:#ef4444!important;font-size:34px!important;filter:drop-shadow(0 3px 2px rgba(15,23,42,.18));}
.sn-wheel-label{z-index:3!important;padding-top:22px!important;}
.sn-wheel-label b{width:72px!important;min-height:28px;padding:4px 6px;border-radius:10px;background:rgba(15,23,42,.22);font-size:11px!important;line-height:1.45!important;color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.55)!important;transform:rotate(90deg)!important;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
.sn-wheel-action-row{display:flex;justify-content:center;margin:12px 0 8px;}
.sn-wheel-start-btn{min-width:190px;border-radius:16px!important;padding:12px 22px!important;background:linear-gradient(135deg,#7c3aed,#c026d3)!important;color:#fff!important;box-shadow:0 14px 28px rgba(124,58,237,.22)!important;}
.sn-wheel-start-btn[disabled]{background:linear-gradient(135deg,#e9d5ff,#fbcfe8)!important;color:#9f1239!important;box-shadow:none!important;cursor:not-allowed;}
.sn-wheel-result-card{display:flex;gap:12px;align-items:center;text-align:right;margin:14px 0 10px;padding:14px;border-radius:18px;border:1px solid #dcfce7;background:linear-gradient(135deg,#f0fdf4,#fff);box-shadow:0 10px 22px rgba(22,163,74,.08);}
.sn-wheel-result-empty{border-color:#fed7aa;background:linear-gradient(135deg,#fff7ed,#fff);}
.sn-wheel-result-icon{width:50px;height:50px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff;font-size:26px;box-shadow:0 8px 18px rgba(15,23,42,.08);flex:0 0 auto;}
.sn-wheel-result-card strong{display:block;color:#14532d;font-size:16px;margin-bottom:4px;}
.sn-wheel-result-empty strong{color:#9a3412;}
.sn-wheel-result-card p{margin:0;color:#475569;line-height:1.8;}
.sn-wheel-apply-box{text-align:right!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;border-radius:18px!important;padding:14px!important;}
.sn-wheel-apply-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px;}
.sn-wheel-apply-actions .sn-btn{flex:1 1 160px;}
@media(max-width:520px){.sn-wheel-real-wrap{width:245px!important;height:245px!important}.sn-wheel-label{padding-top:16px!important}.sn-wheel-label b{width:58px!important;font-size:9px!important}.sn-wheel-real:after{font-size:13px!important}.sn-wheel-result-card{align-items:flex-start}.sn-wheel-start-btn{width:100%;}}

/* 1.0.15.4: real wheel readability fix - remove center button/text, readable segment labels */
.sn-clean-modal .sn-modal-box:has(.sn-wheel-shell){max-width:640px;text-align:center;}
.sn-wheel-shell{display:block;margin:4px auto 8px;}
.sn-wheel-real-wrap{position:relative;width:min(330px,78vw)!important;height:min(330px,78vw)!important;margin:14px auto 10px!important;}
.sn-wheel-real{position:absolute;inset:0;border-radius:50%;border:10px solid #7c3aed!important;overflow:hidden;transition:transform 4.1s cubic-bezier(.08,.78,.12,1)!important;box-shadow:0 18px 44px rgba(124,58,237,.24), inset 0 0 0 3px rgba(255,255,255,.7)!important;}
.sn-wheel-real:before{content:""!important;position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at center,rgba(255,255,255,.10) 0 31%,transparent 32%);z-index:1;pointer-events:none;}
.sn-wheel-real:after{content:""!important;position:absolute;inset:39%!important;border-radius:50%;background:#fff!important;box-shadow:0 0 0 5px rgba(124,58,237,.16), 0 8px 22px rgba(15,23,42,.16)!important;z-index:5!important;display:block!important;}
.sn-wheel-real em{display:none!important;}
.sn-wheel-pointer{top:-17px!important;left:50%!important;transform:translateX(-50%)!important;font-size:38px!important;color:#ef4444!important;z-index:10!important;filter:drop-shadow(0 4px 3px rgba(15,23,42,.2));}
.sn-wheel-label{position:absolute!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;inset:auto!important;width:0!important;height:0!important;padding:0!important;margin:0!important;display:block!important;z-index:4!important;transform:rotate(var(--rot)) translateY(calc(-1 * min(112px, 27vw)))!important;transform-origin:0 0!important;}
.sn-wheel-label b{display:block!important;width:82px!important;max-width:82px!important;min-height:34px!important;padding:5px 7px!important;border-radius:12px!important;background:rgba(15,23,42,.38)!important;color:#fff!important;font-size:11px!important;font-weight:900!important;line-height:1.35!important;text-align:center!important;text-shadow:0 1px 3px rgba(0,0,0,.72)!important;transform:translateX(-50%) rotate(calc(-1 * var(--rot)))!important;white-space:normal!important;overflow:hidden!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;}
.sn-wheel-action-row{display:flex!important;justify-content:center!important;margin:14px 0 8px!important;}
.sn-wheel-start-btn{position:relative!important;z-index:2!important;min-width:210px!important;border-radius:18px!important;padding:13px 24px!important;background:linear-gradient(135deg,#7c3aed,#c026d3)!important;color:#fff!important;font-weight:900!important;box-shadow:0 14px 28px rgba(124,58,237,.22)!important;}
.sn-wheel-start-btn[disabled]{background:linear-gradient(135deg,#e9d5ff,#fbcfe8)!important;color:#9f1239!important;box-shadow:none!important;}
@media(max-width:520px){.sn-wheel-real-wrap{width:270px!important;height:270px!important}.sn-wheel-label{transform:rotate(var(--rot)) translateY(-92px)!important}.sn-wheel-label b{width:68px!important;max-width:68px!important;font-size:9px!important;min-height:28px!important;padding:4px 5px!important}.sn-wheel-pointer{font-size:34px!important}.sn-wheel-start-btn{width:100%!important;}}

/* 1.0.16 stability-lite: final lightweight invoice/wheel overrides */
.sn-clean-modal .sn-modal-box{max-width:640px;}
.sn-invoice-option-modal,.sn-clean-modal{will-change:auto!important;}
.sn-wheel-real-wrap{width:min(340px,82vw)!important;height:min(340px,82vw)!important;}
.sn-wheel-real{transform-origin:50% 50%!important;backface-visibility:hidden;will-change:transform;}
.sn-wheel-real:after{content:""!important;inset:40%!important;border-radius:50%;background:#fff!important;box-shadow:0 0 0 4px rgba(124,58,237,.18)!important;}
.sn-wheel-real em{display:none!important;}
.sn-wheel-label b{background:rgba(15,23,42,.54)!important;color:#fff!important;}
.sn-wheel-start-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;}
.sn-wheel-start-btn:before{content:"↻";font-size:16px;line-height:1;}
.sn-wheel-start-btn[disabled]:before{content:"✓";}
.sn-inline-paid-datetime{position:static!important;float:none!important;clear:both!important;width:100%!important;max-width:100%!important;margin:12px 0!important;transform:none!important;}
.sn-inline-date-box{box-shadow:none!important;background:#fff!important;}
.sn-inline-date-row select{min-height:40px!important;}
.sn-runtime-notice{position:relative!important;z-index:2;}
@media(max-width:520px){.sn-wheel-real-wrap{width:280px!important;height:280px!important}.sn-wheel-label b{font-size:9px!important;width:66px!important}.sn-clean-modal .sn-modal-box{width:calc(100vw - 26px)!important;padding:18px!important}}

/* 1.0.17 product/wheel/coupon polish */
.sn-invoice-items-summary{margin:14px 0 12px;border:1px solid #e5e7eb;background:#fff;border-radius:18px;padding:12px;display:grid;gap:10px}
.sn-items-summary-title{font-weight:900;color:#0f172a;margin-bottom:2px}
.sn-invoice-item-row{display:grid;grid-template-columns:52px 1fr auto;gap:10px;align-items:center;border:1px solid #f1f5f9;border-radius:14px;padding:9px;background:#fbfdff}
.sn-invoice-item-img{width:52px;height:52px;border-radius:12px;object-fit:cover;background:#f1f5f9}
.sn-invoice-item-main strong{display:block;color:#0f172a;font-weight:900}.sn-invoice-item-main small{display:block;color:#64748b;margin-top:3px}.sn-invoice-item-price{text-align:left;font-weight:900;white-space:nowrap}.sn-invoice-item-price del{color:#94a3b8;margin-left:6px}.sn-invoice-item-price ins{text-decoration:none;color:#4f46e5}
.sn-option-product-image{width:100%;max-height:210px;object-fit:cover;border-radius:16px;margin:0 0 10px;background:#f1f5f9}.sn-option-gallery{display:flex;gap:8px;overflow:auto;margin:8px 0 10px;padding-bottom:4px}.sn-option-gallery img{width:64px;height:64px;object-fit:cover;border-radius:12px;border:1px solid #e5e7eb;flex:0 0 auto}.sn-applied-coupon{display:flex;gap:10px;align-items:center;justify-content:space-between;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:16px;padding:10px 12px;margin:10px 0}.sn-applied-coupon strong{color:#15803d}
.sn-wheel-real-wrap{width:min(380px,84vw)!important;height:min(380px,84vw)!important}.sn-wheel-real{border:10px solid #7c3aed!important;box-shadow:0 18px 46px rgba(124,58,237,.22),inset 0 0 0 3px rgba(255,255,255,.7)!important}.sn-wheel-label{position:absolute!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;inset:auto!important;width:0!important;height:0!important;margin:0!important;padding:0!important;transform:rotate(var(--rot)) translateY(-126px)!important;transform-origin:0 0!important;z-index:6!important;pointer-events:none!important}.sn-wheel-label b{display:block!important;width:96px!important;max-width:96px!important;min-height:36px!important;padding:5px 7px!important;border-radius:12px!important;background:rgba(255,255,255,.92)!important;color:#111827!important;text-shadow:none!important;font-size:11px!important;line-height:1.35!important;font-weight:900!important;text-align:center!important;box-shadow:0 4px 12px rgba(15,23,42,.16)!important;transform:translateX(-50%) rotate(calc(-1 * var(--rot)))!important;white-space:normal!important;overflow:hidden!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}.sn-wheel-real:after{inset:42%!important;background:#fff!important;box-shadow:0 0 0 5px rgba(124,58,237,.14),0 6px 18px rgba(15,23,42,.13)!important}.sn-wheel-start-btn{margin-top:4px!important}
@media(max-width:520px){.sn-invoice-item-row{grid-template-columns:46px 1fr}.sn-invoice-item-price{grid-column:1/-1;text-align:right}.sn-wheel-real-wrap{width:292px!important;height:292px!important}.sn-wheel-label{transform:rotate(var(--rot)) translateY(-98px)!important}.sn-wheel-label b{width:72px!important;font-size:9px!important;min-height:30px!important;padding:4px 5px!important}}

/* SN 1.0.18: inline product row + readable SVG wheel */
.sn-products-inline-list{display:grid;gap:8px;width:100%}
.sn-product-inline-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;border:1px solid #edf2f7;border-radius:12px;background:#fbfdff}
.sn-product-inline-name{font-weight:900;color:#0f172a;line-height:1.7;text-align:right}
.sn-product-inline-name small{font-weight:800;color:#64748b;margin-right:6px}.sn-product-inline-price{text-align:left;white-space:nowrap;font-weight:900}.sn-product-inline-price del{color:#94a3b8;margin-left:6px}.sn-product-inline-price ins{text-decoration:none;color:#4f46e5}
.sn-invoice-items-summary{display:none!important}
.sn-wheel-real{display:flex!important;align-items:center!important;justify-content:center!important;overflow:visible!important;background:none!important;border:10px solid #7c3aed!important}
.sn-wheel-real:before,.sn-wheel-real:after{display:none!important;content:none!important}.sn-wheel-svg{width:100%;height:100%;display:block;border-radius:50%;overflow:visible;background:#fff}.sn-wheel-slice{stroke:rgba(255,255,255,.72);stroke-width:1.1}.sn-wheel-text text{font-family:inherit;font-size:9.2px;font-weight:900;fill:#fff;paint-order:stroke;stroke:rgba(15,23,42,.62);stroke-width:2.4px;stroke-linejoin:round}.sn-wheel-hub{fill:#fff;stroke:rgba(124,58,237,.28);stroke-width:4}.sn-wheel-label{display:none!important}.sn-wheel-pointer{top:-22px!important}.sn-wheel-real-wrap{width:min(360px,84vw)!important;height:min(360px,84vw)!important}.sn-wheel-start-btn{position:static!important;margin:10px auto 0!important;display:inline-flex!important}.sn-wheel-action-row{margin-top:14px!important}
@media(max-width:520px){.sn-product-inline-item{display:block}.sn-product-inline-price{text-align:right;margin-top:5px}.sn-wheel-real-wrap{width:290px!important;height:290px!important}.sn-wheel-text text{font-size:8px;stroke-width:2px}}

/* SN 1.0.20 - seller recontact/action log polish */
.sn-recontact-lead-chip{display:inline-flex;align-items:center;gap:4px;background:#fff1f2;color:#be123c;border:1px solid #fecdd3;border-radius:999px;padding:2px 8px;font-size:.78rem;font-weight:700}
.sn-action-badge{display:inline-flex;align-items:center;background:#eef2ff;color:#4338ca;border:1px solid #c7d2fe;border-radius:999px;padding:2px 8px;font-size:.78rem;font-weight:700;white-space:nowrap}
#sn-tab-customer-actions .sn-table td{vertical-align:top;font-size:.84rem}
#sn-tab-customer-actions code{direction:ltr;display:inline-block}

/* Phase 3F-1.2: HR panel usability cleanup */
.sn-hr-panel{background:#f8fafc;color:#0f172a}
.sn-hr-panel .sn-card{border:1px solid #e2e8f0;border-radius:12px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.05);margin:14px 0;padding:14px}
.sn-hr-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}
.sn-hr-header h2{margin:0 0 6px;font-size:24px;line-height:1.5}
.sn-hr-header p{margin:0;color:#475569;line-height:1.9;max-width:920px}
.sn-hr-dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}
.sn-hr-stat,.sn-hr-mini-stat{border:1px solid #e5e7eb;border-radius:10px;background:linear-gradient(180deg,#fff,#f8fafc);padding:12px;min-height:72px;display:flex;flex-direction:column;justify-content:center;gap:4px}
.sn-hr-stat strong,.sn-hr-mini-stat strong{font-size:24px;font-weight:900;color:#1d4ed8;line-height:1}
.sn-hr-stat span,.sn-hr-mini-stat span{font-size:13px;color:#334155;font-weight:700}
.sn-hr-section summary{cursor:pointer;padding:4px 0 10px;color:#0f172a}
.sn-hr-three-col{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:start}
.sn-hr-subsection{margin:12px 0 18px}
.sn-hr-subsection h4,.sn-hr-form-section h4{margin:0 0 10px;color:#0f172a;font-size:15px}
.sn-hr-edit-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sn-hr-edit-card{border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:12px;display:grid;gap:10px}
.sn-hr-new-card{background:#f8fbff;border-color:#bfdbfe}
.sn-hr-edit-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sn-hr-edit-head strong{font-size:15px;color:#0f172a;margin-left:auto}
.sn-hr-muted{font-size:12px;color:#64748b;line-height:1.8}
.sn-hr-filter-form{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:10px;align-items:end;margin:12px 0}
.sn-hr-filter-form label,.sn-hr-editor label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:800;color:#334155}
.sn-hr-panel input,.sn-hr-panel select,.sn-hr-panel textarea{width:100%;box-sizing:border-box;min-height:38px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#111827;padding:7px 9px;font-family:inherit}
.sn-hr-panel textarea{min-height:72px;resize:vertical}
.sn-hr-editor{display:grid;gap:12px;margin:14px 0;padding:12px;border:1px solid #dbeafe;border-radius:12px;background:#f8fbff}
.sn-hr-form-section{border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:12px}
.sn-hr-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sn-hr-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sn-hr-actions .sn-btn{min-height:38px}
.sn-hr-check{flex-direction:row!important;align-items:center!important;justify-content:flex-start;gap:7px!important}
.sn-hr-check input{width:auto;min-height:auto}
.sn-hr-badge{display:inline-flex;align-items:center;max-width:100%;border:1px solid #c7d2fe;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:11px;font-weight:800;padding:2px 7px;direction:ltr;white-space:nowrap}
.sn-hr-advanced{margin-top:8px}
.sn-hr-advanced summary{cursor:pointer;color:#475569;font-weight:800}
.sn-hr-report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.sn-hr-log-value{white-space:pre-wrap;margin:0;max-width:280px;max-height:120px;overflow:auto;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:8px;line-height:1.8;font-family:inherit;font-size:12px}
.sn-hr-panel .sn-table-wrap{overflow:auto;border:1px solid #e5e7eb;border-radius:10px;background:#fff}
.sn-hr-panel table.sn-table{width:100%;border-collapse:collapse;min-width:860px}
.sn-hr-panel table.sn-table th{background:#f1f5f9;color:#334155;font-size:12px;font-weight:900;text-align:right;white-space:nowrap}
.sn-hr-panel table.sn-table td{vertical-align:top;font-size:12px;line-height:1.8}
.sn-hr-panel table.sn-table th,.sn-hr-panel table.sn-table td{border-bottom:1px solid #e5e7eb;padding:8px 9px}
.sn-hr-panel .sn-note{color:#64748b;line-height:1.9}
body.sn-dark-mode .sn-hr-panel{background:#0f172a;color:#e5e7eb}
body.sn-dark-mode .sn-hr-panel .sn-card,body.sn-dark-mode .sn-hr-form-section,body.sn-dark-mode .sn-hr-editor,body.sn-dark-mode .sn-hr-edit-card{background:#111827;border-color:#334155;color:#e5e7eb}
body.sn-dark-mode .sn-hr-stat,body.sn-dark-mode .sn-hr-mini-stat{background:#1e293b;border-color:#334155}
body.sn-dark-mode .sn-hr-header p,body.sn-dark-mode .sn-hr-panel .sn-note{color:#cbd5e1}
body.sn-dark-mode .sn-hr-panel input,body.sn-dark-mode .sn-hr-panel select,body.sn-dark-mode .sn-hr-panel textarea{background:#0f172a;border-color:#475569;color:#e5e7eb}
@media(max-width:1100px){.sn-hr-dashboard{grid-template-columns:repeat(3,minmax(0,1fr))}.sn-hr-three-col,.sn-hr-filter-form,.sn-hr-edit-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.sn-hr-dashboard,.sn-hr-three-col,.sn-hr-filter-form,.sn-hr-form-grid,.sn-hr-report-grid,.sn-hr-edit-list{grid-template-columns:1fr}.sn-hr-header{display:block}.sn-hr-panel .sn-card{padding:12px}.sn-hr-panel table.sn-table{min-width:760px}}

/* Phase 3G-1: unified CRM portal visual system */
body .sn-portal,
body .sn-panel.sn-portal,
body #sn-seller-panel,
body #sn-sales-manager-panel,
body #sn-financial-panel,
body .sn-sales-deputy-panel,
body .sn-senior-supervisor-panel,
body .sn-hr-panel,
body .sn-mis-panel,
body .sn-after-sales-panel{
  direction:rtl;
  color:#0f172a;
  background:#f6f8fb;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:18px;
  box-shadow:0 12px 36px rgba(15,23,42,.06);
}
body .sn-portal *,
body .sn-panel.sn-portal *{
  box-sizing:border-box;
}
body .sn-portal .sn-panel-header,
body .sn-panel.sn-portal .sn-panel-header,
body .sn-portal-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:0 0 16px;
  padding:0 0 14px;
  border-bottom:1px solid #e5e7eb;
}
body .sn-portal .sn-panel-header h2,
body .sn-panel.sn-portal .sn-panel-header h2,
body .sn-portal-title{
  margin:0;
  font-size:24px;
  line-height:1.55;
  font-weight:900;
  color:#0f172a;
  letter-spacing:0;
}
body .sn-portal .sn-panel-header p,
body .sn-panel.sn-portal .sn-panel-header p,
body .sn-portal-subtitle{
  margin:5px 0 0;
  color:#64748b;
  line-height:1.9;
  max-width:920px;
}
body .sn-portal-actions,
body .sn-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
body .sn-portal .sn-card,
body .sn-panel.sn-portal .sn-card,
body .sn-section{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:14px;
  margin:12px 0;
  box-shadow:0 8px 24px rgba(15,23,42,.045);
}
body .sn-portal details.sn-card > summary,
body .sn-panel.sn-portal details.sn-card > summary{
  cursor:pointer;
  list-style:none;
  padding:0 0 10px;
  margin:0 0 12px;
  border-bottom:1px solid #eef2f7;
}
body .sn-portal details.sn-card > summary::-webkit-details-marker,
body .sn-panel.sn-portal details.sn-card > summary::-webkit-details-marker{display:none}
body .sn-portal details.sn-card > summary strong,
body .sn-panel.sn-portal details.sn-card > summary strong,
body .sn-section-title{
  font-size:16px;
  font-weight:900;
  color:#0f172a;
}
body .sn-portal .sn-card h3,
body .sn-panel.sn-portal .sn-card h3{
  margin:0 0 12px;
  font-size:17px;
  line-height:1.6;
  color:#111827;
}
body .sn-portal .sn-card h4,
body .sn-panel.sn-portal .sn-card h4{
  margin:14px 0 9px;
  font-size:14px;
  color:#334155;
}
body .sn-portal .sn-dashboard-grid,
body .sn-panel.sn-portal .sn-dashboard-grid,
body .sn-portal .sn-dashboard-cards,
body .sn-panel.sn-portal .sn-dashboard-cards,
body .sn-portal .sn-kpi-grid,
body .sn-panel.sn-portal .sn-kpi-grid,
body .sn-card-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin:12px 0 16px!important;
}
body .sn-portal .sn-dashboard-grid > .sn-card,
body .sn-panel.sn-portal .sn-dashboard-grid > .sn-card,
body .sn-portal .sn-dashboard-cards > .sn-card,
body .sn-panel.sn-portal .sn-dashboard-cards > .sn-card,
body .sn-stat-card{
  min-height:78px;
  margin:0;
  padding:12px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  background:linear-gradient(180deg,#fff,#f8fafc);
}
body .sn-portal .sn-dashboard-grid > .sn-card strong,
body .sn-panel.sn-portal .sn-dashboard-grid > .sn-card strong,
body .sn-portal .sn-dashboard-cards > .sn-card strong,
body .sn-panel.sn-portal .sn-dashboard-cards > .sn-card strong,
body .sn-stat-card strong{
  display:block;
  font-size:24px;
  line-height:1.1;
  color:#1d4ed8;
  font-weight:900;
}
body .sn-portal .sn-dashboard-grid > .sn-card span,
body .sn-panel.sn-portal .sn-dashboard-grid > .sn-card span,
body .sn-portal .sn-dashboard-cards > .sn-card small,
body .sn-panel.sn-portal .sn-dashboard-cards > .sn-card small,
body .sn-stat-card span{
  display:block;
  color:#475569;
  font-size:12px;
  font-weight:800;
}

/* Finance regression/UX pass */
body .sn-finance-flow-guide .sn-flow-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
body .sn-finance-flow-guide .sn-flow-steps > div{
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f8fafc;
  padding:11px 12px;
  min-height:92px;
}
body .sn-finance-flow-guide .sn-flow-steps strong{
  display:block;
  color:#0f172a;
  font-size:13px;
  margin-bottom:6px;
}
body .sn-finance-flow-guide .sn-flow-steps span{
  display:block;
  color:#475569;
  font-size:12px;
  line-height:1.8;
}
body .sn-commission-review .sn-alert code,
body .sn-finance-flow-guide code{
  direction:ltr;
  display:inline-flex;
  border:1px solid #c7d2fe;
  background:#eef2ff;
  color:#3730a3;
  border-radius:7px;
  padding:1px 6px;
  font-family:inherit;
  font-weight:800;
}
body .sn-regression-readiness table.sn-table td:first-child{
  font-weight:800;
  color:#0f172a;
}
body.sn-dark-mode .sn-finance-flow-guide .sn-flow-steps > div{
  background:#1e293b;
  border-color:#334155;
}
body.sn-dark-mode .sn-finance-flow-guide .sn-flow-steps strong,
body.sn-dark-mode .sn-regression-readiness table.sn-table td:first-child{
  color:#e5e7eb;
}
body.sn-dark-mode .sn-finance-flow-guide .sn-flow-steps span{
  color:#cbd5e1;
}
body .sn-portal form.sn-grid,
body .sn-panel.sn-portal form.sn-grid,
body .sn-portal .sn-filter-form .sn-grid,
body .sn-panel.sn-portal .sn-filter-form .sn-grid,
body .sn-form-grid,
body .sn-filter-bar{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
  align-items:end;
}
body .sn-portal label,
body .sn-panel.sn-portal label,
body .sn-portal .sn-field label,
body .sn-panel.sn-portal .sn-field label{
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#334155;
  font-size:12px;
  font-weight:900;
  line-height:1.6;
}
body .sn-portal input,
body .sn-portal select,
body .sn-portal textarea,
body .sn-panel.sn-portal input,
body .sn-panel.sn-portal select,
body .sn-panel.sn-portal textarea{
  width:100%;
  min-height:40px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  padding:8px 10px;
  font-family:inherit;
  font-size:13px;
}
body .sn-portal textarea,
body .sn-panel.sn-portal textarea{
  min-height:76px;
  resize:vertical;
}
body .sn-portal input:focus,
body .sn-portal select:focus,
body .sn-portal textarea:focus,
body .sn-panel.sn-portal input:focus,
body .sn-panel.sn-portal select:focus,
body .sn-panel.sn-portal textarea:focus{
  outline:2px solid rgba(37,99,235,.16);
  border-color:#3b82f6;
}
body .sn-portal .sn-btn,
body .sn-panel.sn-portal .sn-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:38px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  padding:8px 13px;
  font-family:inherit;
  font-size:12px;
  font-weight:900;
  line-height:1.4;
  text-decoration:none;
  cursor:pointer;
}
body .sn-portal .sn-btn-primary,
body .sn-panel.sn-portal .sn-btn-primary,
body .sn-portal .sn-btn:hover,
body .sn-panel.sn-portal .sn-btn:hover{
  border-color:#2563eb;
  background:#2563eb;
  color:#fff;
}
body .sn-portal .sn-tabs,
body .sn-panel.sn-portal .sn-tabs,
body .sn-portal .sn-subtabs,
body .sn-panel.sn-portal .sn-subtabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0 16px;
  padding:8px;
  background:#eef2f7;
  border-radius:12px;
}
body .sn-portal .sn-tab,
body .sn-panel.sn-portal .sn-tab,
body .sn-portal .sn-subtab,
body .sn-panel.sn-portal .sn-subtab{
  border:0;
  border-radius:10px;
  background:transparent;
  color:#475569;
  padding:9px 12px;
  font-family:inherit;
  font-weight:900;
  cursor:pointer;
}
body .sn-portal .sn-tab.active,
body .sn-panel.sn-portal .sn-tab.active,
body .sn-portal .sn-subtab.active,
body .sn-panel.sn-portal .sn-subtab.active{
  background:#fff;
  color:#1d4ed8;
  box-shadow:0 4px 14px rgba(15,23,42,.08);
}
body .sn-portal .sn-table-wrap,
body .sn-panel.sn-portal .sn-table-wrap{
  width:100%;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#fff;
  margin:10px 0;
}
body .sn-portal table.sn-table,
body .sn-panel.sn-portal table.sn-table{
  width:100%;
  min-width:760px;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  margin:10px 0;
  overflow:hidden;
}
body .sn-portal table.sn-table th,
body .sn-panel.sn-portal table.sn-table th{
  background:#f1f5f9;
  color:#334155;
  text-align:right;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
body .sn-portal table.sn-table td,
body .sn-panel.sn-portal table.sn-table td{
  color:#1f2937;
  font-size:12px;
  line-height:1.85;
  vertical-align:top;
}
body .sn-portal table.sn-table th,
body .sn-portal table.sn-table td,
body .sn-panel.sn-portal table.sn-table th,
body .sn-panel.sn-portal table.sn-table td{
  border-bottom:1px solid #e5e7eb;
  padding:9px 10px;
}
body .sn-portal table.sn-table tbody tr:hover,
body .sn-panel.sn-portal table.sn-table tbody tr:hover{
  background:#f8fafc;
}
body .sn-portal code,
body .sn-panel.sn-portal code,
body .sn-badge,
body .sn-status{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  padding:2px 8px;
  font-family:inherit;
  font-size:11px;
  font-weight:900;
  line-height:1.7;
  direction:ltr;
  white-space:nowrap;
}
body .sn-portal pre,
body .sn-panel.sn-portal pre{
  max-width:100%;
  max-height:190px;
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
  color:#334155;
  padding:10px;
  font-family:inherit;
  font-size:12px;
  line-height:1.8;
}
body .sn-alert,
body .sn-portal .sn-notice,
body .sn-panel.sn-portal .sn-notice{
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:#eff6ff;
  color:#1e40af;
  padding:10px 12px;
  line-height:1.9;
}
body .sn-portal .sn-error,
body .sn-panel.sn-portal .sn-error{
  border-color:#fecdd3;
  background:#fff1f2;
  color:#be123c;
}
body .sn-muted,
body .sn-portal .sn-note,
body .sn-panel.sn-portal .sn-note{
  color:#64748b;
  line-height:1.9;
}
body .sn-empty-state{
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
  color:#64748b;
  padding:18px;
  text-align:center;
}
body .sn-advanced,
body .sn-portal details.sn-advanced,
body .sn-panel.sn-portal details.sn-advanced{
  border:1px dashed #cbd5e1;
  background:#f8fafc;
  border-radius:10px;
  padding:10px;
}
body .sn-mis-panel .sn-grid,
body .sn-after-sales-panel .sn-grid,
body .sn-sales-deputy-panel .sn-grid,
body .sn-senior-supervisor-panel .sn-grid{
  display:grid;
  gap:12px;
}
body .sn-mis-panel form[method="post"],
body .sn-mis-panel form[method="get"],
body .sn-after-sales-panel form[method="post"],
body .sn-after-sales-panel form[method="get"]{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:12px;
  align-items:end;
}
body .sn-mis-panel form textarea,
body .sn-after-sales-panel form textarea{
  grid-column:1/-1;
}
body .sn-mis-panel form p,
body .sn-after-sales-panel form p{
  grid-column:1/-1;
  margin:0;
}
body .sn-mis-panel form .sn-note,
body .sn-after-sales-panel form .sn-note{
  grid-column:1/-1;
}
body .sn-mis-panel form button,
body .sn-after-sales-panel form button{
  justify-self:start;
}
body .sn-mis-panel [style*="max-height:260px"]{
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  background:#f8fafc!important;
  padding:10px!important;
  gap:8px!important;
}
body .sn-mis-panel [style*="max-height:260px"] label{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:8px 10px!important;
}
body .sn-mis-panel [style*="max-height:260px"] input[type="checkbox"]{
  width:auto;
  min-height:auto;
}
body .sn-after-sales-panel td form{
  min-width:240px;
  display:grid!important;
  grid-template-columns:1fr!important;
}
body .sn-flow-steps{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin:12px 0 18px;
}
body .sn-flow-step{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:4px 10px;
  align-items:start;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  padding:10px;
}
body .sn-flow-step span,
body .sn-step-index{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-weight:900;
  font-size:12px;
  direction:ltr;
}
body .sn-flow-step strong{
  color:#0f172a;
  font-size:13px;
  line-height:1.7;
}
body .sn-flow-step small{
  grid-column:2;
  color:#64748b;
  line-height:1.8;
  font-size:11px;
}
body .sn-flow-card > summary{
  display:flex;
  align-items:center;
  gap:8px;
}
body .sn-helper-card{
  border-color:#dbeafe;
  background:linear-gradient(180deg,#eff6ff,#fff);
}
body .sn-technical-report{
  border:1px dashed #cbd5e1!important;
  background:#f8fafc!important;
}
body .sn-technical-report > summary{
  cursor:pointer;
  color:#475569;
  font-weight:900;
}
body .sn-technical-report pre{
  margin-top:10px;
  white-space:pre-wrap;
}
body .sn-empty-state{
  width:100%;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#f8fafc;
  color:#64748b;
  padding:14px;
  text-align:center;
  line-height:1.9;
}
body .sn-highlight-row{
  background:#ecfdf5!important;
  box-shadow:inset 4px 0 0 #22c55e;
}
body .sn-invoice-list-meta{
  margin:8px 0 12px;
  padding:10px 12px!important;
}
body .sn-invoice-list-meta p{
  margin:4px 0 0;
}
body .sn-internal-context-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border-radius:9px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1d4ed8!important;
  padding:4px 8px;
  font-size:12px;
  font-weight:800;
  text-decoration:none!important;
  line-height:1.7;
}
body .sn-internal-context-link:hover{
  background:#dbeafe;
  color:#1e40af!important;
}
body .sn-route-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  color:#334155;
  border-radius:999px;
  padding:3px 9px;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}
body .sn-portal .sn-success,
body .sn-panel.sn-portal .sn-success{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#15803d;
}
body .sn-portal .sn-status,
body .sn-panel.sn-portal .sn-status{
  direction:rtl;
}
body.sn-dark-mode .sn-portal,
body.sn-dark-mode .sn-panel.sn-portal{
  background:#0f172a;
  border-color:#334155;
  color:#e5e7eb;
}
body.sn-dark-mode .sn-portal .sn-card,
body.sn-dark-mode .sn-panel.sn-portal .sn-card,
body.sn-dark-mode .sn-section,
body.sn-dark-mode .sn-portal table.sn-table,
body.sn-dark-mode .sn-panel.sn-portal table.sn-table{
  background:#111827;
  border-color:#334155;
  color:#e5e7eb;
}
body.sn-dark-mode .sn-portal table.sn-table th,
body.sn-dark-mode .sn-panel.sn-portal table.sn-table th,
body.sn-dark-mode .sn-portal .sn-tabs,
body.sn-dark-mode .sn-panel.sn-portal .sn-tabs,
body.sn-dark-mode .sn-portal .sn-subtabs,
body.sn-dark-mode .sn-panel.sn-portal .sn-subtabs{
  background:#1e293b;
  color:#cbd5e1;
}
body.sn-dark-mode .sn-portal input,
body.sn-dark-mode .sn-portal select,
body.sn-dark-mode .sn-portal textarea,
body.sn-dark-mode .sn-panel.sn-portal input,
body.sn-dark-mode .sn-panel.sn-portal select,
body.sn-dark-mode .sn-panel.sn-portal textarea{
  background:#0f172a;
  border-color:#475569;
  color:#e5e7eb;
}
body.sn-dark-mode .sn-flow-step,
body.sn-dark-mode .sn-helper-card,
body.sn-dark-mode .sn-technical-report,
body.sn-dark-mode .sn-empty-state,
body.sn-dark-mode .sn-internal-context-link,
body.sn-dark-mode .sn-route-badge,
body.sn-dark-mode .sn-customer-chip,
body.sn-dark-mode .sn-context-grid>div{
  background:#111827!important;
  border-color:#334155!important;
  color:#e5e7eb;
}
.sn-customer-profile .sn-context-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.sn-customer-profile .sn-context-grid>div{
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:10px 12px;
  background:#f8fafc;
}
.sn-customer-profile .sn-context-grid span,
.sn-customer-profile .sn-context-grid strong{
  display:block;
}
.sn-customer-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  padding:3px 8px;
  text-decoration:none;
  max-width:100%;
}
.sn-customer-chip code{
  background:transparent;
  color:inherit;
  padding:0;
}
.sn-portal-shell{
  direction:rtl;
}
.sn-portal-nav{
  direction:rtl;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#ffffff;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}
.sn-portal-nav-title{
  font-weight:800;
  color:#0f172a;
  white-space:nowrap;
}
.sn-portal-nav-list{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.sn-portal-nav a,
.sn-portal-nav span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  color:#334155;
  text-decoration:none;
  font-size:13px;
  line-height:1.4;
}
.sn-portal-nav a:hover,
.sn-portal-nav a.is-active{
  border-color:#2563eb;
  background:#eff6ff;
  color:#1d4ed8;
}
.sn-portal-nav .is-disabled{
  opacity:.55;
  cursor:not-allowed;
}
.sn-portal-route-context{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 14px;
}
.sn-portal-route-context span{
  display:inline-flex;
  align-items:center;
  border:1px solid #e5e7eb;
  background:#f8fafc;
  color:#475569;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
}
.sn-my-panel-entry{
  max-width:920px;
  margin:0 auto;
}
.sn-portal-entry-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px;
  border:1px solid #dbe3ef;
  border-radius:18px;
  background:#fff;
  box-shadow:0 12px 32px rgba(15,23,42,.08);
}
.sn-portal-entry-card h2{
  margin:0 0 8px;
  font-size:24px;
  color:#0f172a;
}
.sn-portal-entry-detected{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
  padding:8px 12px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#f8fafc;
}
.sn-portal-entry-detected span{
  color:#64748b;
  font-size:12px;
}
.sn-portal-entry-detected strong{
  color:#0f172a;
}
.sn-portal-entry-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  min-width:220px;
}
.sn-portal-entry-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.sn-portal-entry-links a{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid #e2e8f0;
  background:#f8fafc;
  text-decoration:none;
  color:#334155;
  font-size:12px;
}
body.sn-dark-mode .sn-portal-nav{
  background:#111827;
  border-color:#334155;
  box-shadow:none;
}
body.sn-dark-mode .sn-portal-nav-title{
  color:#f8fafc;
}
body.sn-dark-mode .sn-portal-nav a,
body.sn-dark-mode .sn-portal-nav span,
body.sn-dark-mode .sn-portal-route-context span{
  background:#0f172a;
  border-color:#334155;
  color:#e5e7eb;
}
body.sn-dark-mode .sn-portal-nav a:hover,
body.sn-dark-mode .sn-portal-nav a.is-active{
  border-color:#60a5fa;
  background:#172554;
  color:#bfdbfe;
}
body.sn-dark-mode .sn-portal-entry-card{
  background:#111827;
  border-color:#334155;
  box-shadow:none;
}
body.sn-dark-mode .sn-portal-entry-card h2,
body.sn-dark-mode .sn-portal-entry-detected strong{
  color:#f8fafc;
}
body.sn-dark-mode .sn-portal-entry-detected,
body.sn-dark-mode .sn-portal-entry-links a{
  background:#0f172a;
  border-color:#334155;
  color:#e5e7eb;
}
.sn-reports-panel .sn-export-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.sn-reports-panel .sn-note,
.sn-customer-profile .sn-note{
  color:#64748b;
  font-size:13px;
}
@media(max-width:1100px){
  body .sn-portal .sn-dashboard-grid,
  body .sn-panel.sn-portal .sn-dashboard-grid,
  body .sn-portal .sn-dashboard-cards,
  body .sn-panel.sn-portal .sn-dashboard-cards,
  body .sn-portal .sn-kpi-grid,
  body .sn-panel.sn-portal .sn-kpi-grid,
  body .sn-card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body .sn-finance-flow-guide .sn-flow-steps{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .sn-customer-profile .sn-context-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:720px){
  body .sn-portal,
  body .sn-panel.sn-portal{
    padding:12px;
    border-radius:12px;
  }
  body .sn-portal .sn-panel-header,
  body .sn-panel.sn-portal .sn-panel-header,
  body .sn-portal-header{
    display:block;
  }
  body .sn-portal .sn-dashboard-grid,
  body .sn-panel.sn-portal .sn-dashboard-grid,
  body .sn-portal .sn-dashboard-cards,
  body .sn-panel.sn-portal .sn-dashboard-cards,
  body .sn-portal .sn-kpi-grid,
  body .sn-panel.sn-portal .sn-kpi-grid,
  body .sn-card-grid{
    grid-template-columns:1fr!important;
  }
  body .sn-finance-flow-guide .sn-flow-steps{
    grid-template-columns:1fr;
  }
  body .sn-portal form.sn-grid,
  body .sn-panel.sn-portal form.sn-grid,
  body .sn-portal .sn-filter-form .sn-grid,
  body .sn-panel.sn-portal .sn-filter-form .sn-grid,
  body .sn-form-grid,
  body .sn-filter-bar{
    grid-template-columns:1fr;
  }
  .sn-portal .sn-compact-form-grid,
  .sn-panel.sn-portal .sn-compact-form-grid{
    grid-template-columns:1fr;
  }
  body .sn-portal table.sn-table,
  body .sn-panel.sn-portal table.sn-table{
    min-width:720px;
  }
  .sn-customer-profile .sn-context-grid{
    grid-template-columns:1fr;
  }
  .sn-portal-entry-card{
    display:block;
  }
  .sn-portal-entry-actions{
    align-items:stretch;
    min-width:0;
    margin-top:16px;
  }
  .sn-portal-entry-links{
    justify-content:flex-start;
  }
}

.sn-auth-wrap{
  min-height:420px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 14px;
  background:linear-gradient(135deg,#f8fafc,#eef2ff);
  border-radius:18px;
}
.sn-auth-card{
  width:min(440px,100%);
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  box-shadow:0 18px 48px rgba(15,23,42,.12);
  padding:24px;
}
.sn-auth-card .sn-field{
  display:grid;
  gap:6px;
  margin-bottom:12px;
}
.sn-auth-card input{
  width:100%;
  box-sizing:border-box;
  border:1px solid #d1d5db;
  border-radius:10px;
  padding:10px 12px;
}
.sn-inline-save-state{
  min-height:20px;
  font-size:12px;
  font-weight:700;
  padding:2px 4px;
}
.sn-auto-save:focus{
  outline:2px solid rgba(37,99,235,.18);
  border-color:#2563eb!important;
}
.sn-payment-local-msg{
  margin:0 0 12px;
}
.sn-reject-meta,
.sn-reject-reason{
  background:#fff1f2;
  border:1px solid #fecdd3;
  border-radius:10px;
  color:#9f1239;
  padding:8px 10px;
  margin:6px 0;
  line-height:1.8;
}
.sn-reject-meta small{
  display:block;
  color:#64748b;
  margin-top:2px;
}
.sn-resubmit-meta{
  background:#eff6ff;
  border:1px solid #bfdbfe;
  border-radius:10px;
  color:#1e3a8a;
  padding:8px 10px;
  margin:6px 0;
  line-height:1.8;
}
.sn-resubmit-meta p{
  margin:4px 0;
}
.sn-resubmit-meta small{
  display:block;
  color:#475569;
}
.sn-seller-resend-card .sn-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.sn-seller-resend-card textarea,
.sn-seller-resend-card input{
  width:100%;
  box-sizing:border-box;
}
.sn-seller-resend-card textarea{
  grid-column:1/-1;
}
.sn-resend-receipt-field{
  grid-column:1/-1;
  padding:10px;
  border:1px dashed #cbd5e1;
  border-radius:10px;
  background:#f8fafc;
}
.sn-mis-operator-guide h3{
  margin:0 0 8px;
}
.sn-mis-operator-guide .sn-flow-step{
  align-items:flex-start;
  min-height:132px;
}
.sn-mis-operator-guide .sn-flow-step small{
  line-height:1.8;
}
.sn-readable-summary{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:10px;
  padding:10px 12px;
  margin:10px 0;
  color:#334155;
  line-height:1.8;
}
.sn-mis-panel .sn-technical-report pre,
.sn-mis-panel details pre{
  max-height:260px;
  overflow:auto;
  direction:ltr;
  text-align:left;
}

/* Phase 3G tabbed portal UX */
.sn-portal .sn-panel-toolbar,
.sn-panel.sn-portal .sn-panel-toolbar{
  margin:14px 0 18px;
  padding:8px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
  overflow-x:auto;
}
.sn-portal .sn-tab-nav,
.sn-panel.sn-portal .sn-tab-nav{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:nowrap;
  min-width:max-content;
}
.sn-portal .sn-tab-button,
.sn-panel.sn-portal .sn-tab-button{
  appearance:none;
  border:1px solid transparent;
  background:transparent;
  color:#475569;
  border-radius:10px;
  padding:9px 13px;
  font-size:13px;
  font-weight:800;
  line-height:1.5;
  cursor:pointer;
  white-space:nowrap;
}
.sn-portal .sn-tab-button:hover,
.sn-panel.sn-portal .sn-tab-button:hover{
  background:#eef2ff;
  color:#1e40af;
}
.sn-portal .sn-tab-button-active,
.sn-panel.sn-portal .sn-tab-button-active{
  background:#1d4ed8;
  border-color:#1d4ed8;
  color:#fff;
  box-shadow:0 8px 18px rgba(29,78,216,.18);
}
.sn-portal .sn-tab-panel,
.sn-panel.sn-portal .sn-tab-panel{
  display:block;
  animation:snTabFade .16s ease-out;
}
.sn-portal .sn-tab-panel:not(.sn-tab-panel-active),
.sn-panel.sn-portal .sn-tab-panel:not(.sn-tab-panel-active){
  display:none;
}
.sn-portal.sn-tabs-initialized .sn-tab-panel,
.sn-panel.sn-portal.sn-tabs-initialized .sn-tab-panel{
  display:none;
}
.sn-portal .sn-tab-panel-active,
.sn-panel.sn-portal .sn-tab-panel-active,
.sn-portal.sn-tabs-initialized .sn-tab-panel-active,
.sn-panel.sn-portal.sn-tabs-initialized .sn-tab-panel-active{
  display:block;
}
@keyframes snTabFade{
  from{opacity:.75; transform:translateY(3px);}
  to{opacity:1; transform:none;}
}
.sn-portal .sn-compact-grid,
.sn-panel.sn-portal .sn-compact-grid,
.sn-portal .sn-compact-form,
.sn-panel.sn-portal .sn-compact-form{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
  align-items:end;
}
.sn-portal .sn-compact-card,
.sn-panel.sn-portal .sn-compact-card{
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
}
.sn-portal .sn-step-tabs,
.sn-panel.sn-portal .sn-step-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.sn-portal .sn-card,
.sn-panel.sn-portal .sn-card{
  margin-bottom:14px;
}
.sn-portal .sn-dashboard-grid .sn-card,
.sn-panel.sn-portal .sn-dashboard-grid .sn-card,
.sn-portal .sn-dashboard-cards .sn-card,
.sn-panel.sn-portal .sn-dashboard-cards .sn-card{
  min-height:auto;
}
.sn-portal .sn-table,
.sn-panel.sn-portal .sn-table{
  border-collapse:separate;
  border-spacing:0;
}
.sn-portal .sn-table th,
.sn-panel.sn-portal .sn-table th{
  white-space:nowrap;
}
.sn-mis-panel .sn-flow-card,
.sn-after-sales-panel .sn-card,
.sn-hr-panel .sn-hr-section,
#sn-financial-panel .sn-section{
  scroll-margin-top:18px;
}
.sn-portal .sn-compact-form-grid,
.sn-panel.sn-portal .sn-compact-form-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px 12px;
  align-items:end;
  margin:10px 0 0;
}
.sn-portal .sn-compact-form-grid label,
.sn-panel.sn-portal .sn-compact-form-grid label{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin:0;
  font-size:12px;
  font-weight:800;
  color:#334155;
}
.sn-portal .sn-compact-form-grid input,
.sn-portal .sn-compact-form-grid select,
.sn-portal .sn-compact-form-grid textarea,
.sn-panel.sn-portal .sn-compact-form-grid input,
.sn-panel.sn-portal .sn-compact-form-grid select,
.sn-panel.sn-portal .sn-compact-form-grid textarea{
  width:100%;
  min-height:38px;
}
.sn-portal .sn-compact-form-grid .sn-full,
.sn-panel.sn-portal .sn-compact-form-grid .sn-full{
  grid-column:1 / -1;
}
.sn-portal .sn-compact-form-grid .sn-actions,
.sn-panel.sn-portal .sn-compact-form-grid .sn-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin:0;
}
.sn-hr-panel .sn-hr-edit-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:12px;
}
.sn-hr-panel .sn-hr-edit-card{
  margin:0;
}
.sn-hr-panel .sn-hr-toggle-form{
  margin-top:8px;
  justify-content:flex-end;
}
body.sn-dark-mode .sn-portal .sn-panel-toolbar,
body.sn-dark-mode .sn-panel.sn-portal .sn-panel-toolbar{
  background:#0f172a;
  border-color:#334155;
}
body.sn-dark-mode .sn-portal .sn-tab-button,
body.sn-dark-mode .sn-panel.sn-portal .sn-tab-button{
  color:#cbd5e1;
}
body.sn-dark-mode .sn-portal .sn-tab-button:hover,
body.sn-dark-mode .sn-panel.sn-portal .sn-tab-button:hover{
  background:#1e293b;
  color:#bfdbfe;
}
body.sn-dark-mode .sn-portal .sn-tab-button-active,
body.sn-dark-mode .sn-panel.sn-portal .sn-tab-button-active{
  background:#2563eb;
  color:#fff;
}
.sn-portal .sn-distribution-role .sn-table td,
.sn-portal .sn-distribution-delivery .sn-table td,
.sn-portal .sn-distribution-chain-admin .sn-table td{
  vertical-align:top;
}
.sn-portal .sn-distribution-role select,
.sn-portal .sn-distribution-role input,
.sn-portal .sn-distribution-delivery select,
.sn-portal .sn-distribution-delivery input,
.sn-portal .sn-distribution-chain-admin select,
.sn-portal .sn-distribution-chain-admin input{
  max-width:100%;
}
.sn-portal .sn-distribution-role input[type="checkbox"][name="distribution_item_ids[]"]{
  display:inline-block !important;
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:auto !important;
  width:18px;
  height:18px;
  min-width:18px;
  vertical-align:middle;
  accent-color:#2563eb;
}
.sn-portal .sn-distribution-role .sn-muted,
.sn-portal .sn-distribution-chain-admin .sn-muted{
  display:inline-block;
  margin-top:3px;
  font-size:11px;
  color:#64748b;
}
body.sn-dark-mode .sn-portal .sn-distribution-role .sn-muted,
body.sn-dark-mode .sn-portal .sn-distribution-chain-admin .sn-muted{
  color:#94a3b8;
}
.sn-hr-panel .sn-hr-audit-cards{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  margin:10px 0 14px;
}
.sn-hr-panel .sn-hr-selection-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  margin:10px 0;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}
.sn-hr-panel .sn-hr-workforce-table{
  min-width:1680px;
}
.sn-hr-panel .sn-hr-workforce-table th,
.sn-hr-panel .sn-hr-workforce-table td{
  vertical-align:top;
  white-space:normal;
}
.sn-hr-panel .sn-hr-workforce-table select,
.sn-hr-panel .sn-hr-workforce-table input[type="number"],
.sn-hr-panel .sn-hr-workforce-table input[type="date"]{
  width:100%;
  min-width:120px;
}
.sn-hr-panel .sn-hr-manager-select{
  min-width:210px;
}
.sn-hr-panel .sn-hr-bulk-grid{
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
}
.sn-hr-panel .sn-hr-bulk-users{
  display:grid;
  gap:6px;
  max-height:360px;
  overflow:auto;
  padding-inline-end:4px;
}
.sn-hr-panel .sn-check,
.sn-hr-panel .sn-hr-bulk-users .sn-check{
  display:flex;
  align-items:center;
  gap:7px;
  line-height:1.7;
}
body.sn-dark-mode .sn-hr-panel .sn-hr-selection-bar{
  background:#0f172a;
  border-color:#334155;
}
.sn-portal .sn-card-warning,
.sn-panel.sn-portal .sn-card-warning{
  border-color:#f59e0b;
  background:#fffbeb;
}
body.sn-dark-mode .sn-portal .sn-card-warning,
body.sn-dark-mode .sn-panel.sn-portal .sn-card-warning{
  background:#2a1f09;
  border-color:#b45309;
}
.sn-portal .sn-mis-launch-check .sn-table td,
.sn-panel.sn-portal .sn-mis-launch-check .sn-table td{
  vertical-align:top;
}
.sn-hr-panel .sn-hr-login-credentials textarea{
  direction:rtl;
  min-height:120px;
}
.sn-portal input[type="text"],
.sn-portal input[type="search"],
.sn-portal input[type="email"],
.sn-portal input[type="tel"],
.sn-portal input[type="number"],
.sn-portal input[type="date"],
.sn-portal input[type="url"],
.sn-portal input[type="password"],
.sn-portal select,
.sn-panel.sn-portal input[type="text"],
.sn-panel.sn-portal input[type="search"],
.sn-panel.sn-portal input[type="email"],
.sn-panel.sn-portal input[type="tel"],
.sn-panel.sn-portal input[type="number"],
.sn-panel.sn-portal input[type="date"],
.sn-panel.sn-portal input[type="url"],
.sn-panel.sn-portal input[type="password"],
.sn-panel.sn-portal select{
  min-height:38px;
  padding:7px 10px;
  font-size:13px;
  line-height:1.45;
  border-radius:8px;
}
.sn-portal textarea,
.sn-panel.sn-portal textarea{
  min-height:76px;
  padding:8px 10px;
  font-size:13px;
  line-height:1.65;
  border-radius:8px;
}
.sn-portal input[type="checkbox"],
.sn-portal input[type="radio"],
.sn-panel.sn-portal input[type="checkbox"],
.sn-panel.sn-portal input[type="radio"]{
  width:16px;
  height:16px;
  min-width:16px;
  min-height:16px;
  padding:0;
  margin:0 0 0 6px;
  flex:0 0 16px;
}
.sn-portal .sn-card,
.sn-panel.sn-portal .sn-card{
  padding:14px;
}
.sn-portal .sn-section,
.sn-panel.sn-portal .sn-section{
  padding:14px;
}
.sn-portal .sn-table th,
.sn-portal .sn-table td,
.sn-panel.sn-portal .sn-table th,
.sn-panel.sn-portal .sn-table td{
  padding:8px 10px;
}
.sn-portal .sn-btn,
.sn-panel.sn-portal .sn-btn{
  min-height:36px;
  padding:7px 12px;
}
.sn-portal .sn-btn-sm,
.sn-panel.sn-portal .sn-btn-sm{
  min-height:30px;
  padding:5px 9px;
  font-size:12px;
}
.sn-portal .sn-form-grid,
.sn-panel.sn-portal .sn-form-grid,
.sn-portal .sn-compact-form-grid,
.sn-panel.sn-portal .sn-compact-form-grid{
  gap:10px;
}
.sn-portal .sn-check,
.sn-panel.sn-portal .sn-check{
  align-items:center;
}
@media(max-width:720px){
  .sn-portal .sn-panel-toolbar,
  .sn-panel.sn-portal .sn-panel-toolbar{
    margin-inline:-4px;
    border-radius:12px;
  }
  .sn-portal .sn-tab-button,
  .sn-panel.sn-portal .sn-tab-button{
    padding:8px 10px;
  }
}
@media(max-width:720px){
  .sn-seller-resend-card .sn-form-grid{
    grid-template-columns:1fr;
  }
}

/* Launch polish: supervisor/senior-supervisor V4 distribution embedded in the legacy allocation UI */
body #sn-supervisor-panel .sn-distribution-role-embedded,
body .sn-senior-supervisor-panel .sn-distribution-role-embedded{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  grid-column:1 / -1 !important;
  box-sizing:border-box !important;
}
body #sn-supervisor-panel .sn-distribution-head,
body .sn-senior-supervisor-panel .sn-distribution-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
body #sn-supervisor-panel .sn-distribution-head h3,
body .sn-senior-supervisor-panel .sn-distribution-head h3{
  margin:0 0 4px !important;
}
body #sn-supervisor-panel .sn-distribution-kpis,
body .sn-senior-supervisor-panel .sn-distribution-kpis{
  display:grid !important;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap:12px !important;
  margin:12px 0 14px !important;
}
body #sn-supervisor-panel .sn-distribution-kpis > div,
body .sn-senior-supervisor-panel .sn-distribution-kpis > div{
  min-height:86px;
  padding:15px 16px;
  border:1px solid rgba(203,213,225,.9);
  border-radius:18px;
  background:linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
  box-shadow:0 10px 26px rgba(15,23,42,.05);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:5px;
}
body #sn-supervisor-panel .sn-distribution-kpis strong,
body .sn-senior-supervisor-panel .sn-distribution-kpis strong{
  font-size:1.35rem;
  line-height:1.35;
  color:#0f172a;
}
body #sn-supervisor-panel .sn-distribution-kpis span,
body .sn-senior-supervisor-panel .sn-distribution-kpis span{
  color:#64748b;
  font-size:.88rem;
  font-weight:800;
}
body #sn-supervisor-panel .sn-distribution-transfer-controls,
body .sn-senior-supervisor-panel .sn-distribution-transfer-controls{
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fafc;
  padding:12px;
  margin-bottom:12px;
}
body #sn-supervisor-panel .sn-distribution-owned-table,
body .sn-senior-supervisor-panel .sn-distribution-owned-table{
  min-width:980px;
}
body #sn-supervisor-panel .sn-distribution-owned-table th,
body #sn-supervisor-panel .sn-distribution-owned-table td,
body .sn-senior-supervisor-panel .sn-distribution-owned-table th,
body .sn-senior-supervisor-panel .sn-distribution-owned-table td{
  text-align:right;
  vertical-align:top;
}
body #sn-supervisor-panel .sn-distribution-inline-note,
body .sn-senior-supervisor-panel .sn-distribution-inline-note{
  margin:0 0 12px !important;
}
body.sn-dark-mode #sn-supervisor-panel .sn-distribution-kpis > div,
body.sn-dark-mode .sn-senior-supervisor-panel .sn-distribution-kpis > div,
body.sn-dark-mode #sn-supervisor-panel .sn-distribution-transfer-controls,
body.sn-dark-mode .sn-senior-supervisor-panel .sn-distribution-transfer-controls{
  background:rgba(15,23,42,.76);
  border-color:rgba(148,163,184,.24);
}
body.sn-dark-mode #sn-supervisor-panel .sn-distribution-kpis strong,
body.sn-dark-mode .sn-senior-supervisor-panel .sn-distribution-kpis strong{
  color:#e5e7eb;
}

/* Supervisor allocation UX restored on V4 backend */
body #sn-supervisor-panel .sn-allocation-mode-grid,
body .sn-senior-supervisor-panel .sn-allocation-mode-grid{
  align-items:stretch;
}
body #sn-supervisor-panel .sn-allocation-mode-card,
body .sn-senior-supervisor-panel .sn-allocation-mode-card{
  padding:16px;
  border:1px solid #dbe7f3;
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,252,.92));
}
body #sn-supervisor-panel .sn-allocation-mode-card h4,
body .sn-senior-supervisor-panel .sn-allocation-mode-card h4{
  margin:0 0 10px;
  font-weight:900;
}
body #sn-supervisor-panel .sn-allocation-mode-card label,
body .sn-senior-supervisor-panel .sn-allocation-mode-card label{
  display:block;
  margin:8px 0;
  font-weight:800;
}
body #sn-supervisor-panel .sn-allocation-mode-card input,
body #sn-supervisor-panel .sn-allocation-mode-card select,
body .sn-senior-supervisor-panel .sn-allocation-mode-card input,
body .sn-senior-supervisor-panel .sn-allocation-mode-card select{
  width:100%;
  margin-top:5px;
}
body.sn-dark-mode #sn-supervisor-panel .sn-allocation-mode-card,
body.sn-dark-mode .sn-senior-supervisor-panel .sn-allocation-mode-card{
  background:rgba(15,23,42,.76);
  border-color:rgba(148,163,184,.24);
}

/* Seller old panel: robust inline editor row for legacy leads and V4 distribution items */
body .sn-lead-expand-row > td {
  background: #f8fbff;
}
body .sn-inline-error {
  display: block;
  color: #dc2626;
  font-size: .78rem;
  margin-top: 4px;
}
body .sn-phone-toggle[aria-expanded="true"] {
  box-shadow: 0 0 0 2px rgba(59,130,246,.18);
}

/* ============================================================
   CRM UI/UX Cleanup Pass 2026-06-09
   - no admin guide/debug cards in operational panels
   - universal side tabs for shortcode panels
   - local notices remain in the active tab after actions
   ============================================================ */
body .sn-panel .sn-helper-card,
body .sn-panel .sn-admin-guide,
body .sn-panel .sn-admin-debug,
body .sn-panel .sn-debug,
body .sn-panel .sn-debug-panel,
body .sn-panel .sn-dev-note,
body .sn-panel .sn-operator-guide,
body .sn-panel .sn-guide-card,
body .sn-panel [data-sn-admin-guide],
body .sn-panel [data-sn-debug-panel]{
  display:none!important;
}

body .sn-panel > .sn-panel-toolbar{
  grid-column:1;
  grid-row:2;
  min-width:0;
  align-self:start;
  position:sticky;
  top:18px;
  z-index:2;
  margin:0!important;
  padding:18px!important;
  border:0!important;
  border-radius:26px!important;
  background:
    linear-gradient(180deg,rgba(15,23,42,.96),rgba(30,41,59,.96)),
    radial-gradient(circle at 0 0,rgba(99,102,241,.28),transparent 38%)!important;
  box-shadow:0 24px 60px rgba(15,23,42,.22)!important;
}
body .sn-panel > .sn-panel-toolbar .sn-tabs,
body .sn-panel > .sn-panel-toolbar .sn-tab-nav{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  overflow:visible!important;
}
body .sn-panel > .sn-panel-toolbar::before{
  content:"پنل عملیاتی";
  color:#fff;
  font-weight:900;
  font-size:1.05rem;
  padding:12px 14px 16px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.11);
  display:block;
}
body #sn-sales-manager-panel > .sn-panel-toolbar::before{content:"پنل مدیر فروش";}
body #sn-sales-deputy-panel > .sn-panel-toolbar::before{content:"پنل معاون فروش";}
body #sn-senior-supervisor-panel > .sn-panel-toolbar::before{content:"پنل سرپرست ارشد";}
body #sn-hr-panel > .sn-panel-toolbar::before{content:"پنل منابع انسانی";}
body #sn-mis-panel > .sn-panel-toolbar::before{content:"پنل MIS";}
body #sn-financial-panel > .sn-panel-toolbar::before{content:"پنل مالی";}
body #sn-after-sales-panel > .sn-panel-toolbar::before{content:"خدمات پس از فروش";}
body #sn-reports-panel > .sn-panel-toolbar::before{content:"گزارش‌ها";}
body .sn-panel > .sn-panel-toolbar .sn-tab-button,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{
  width:100%!important;
  margin:0!important;
  padding:14px!important;
  border:1px solid transparent!important;
  border-radius:16px!important;
  color:rgba(255,255,255,.72)!important;
  background:transparent!important;
  text-align:right!important;
  font-weight:800!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  box-shadow:none!important;
  transition:all .18s ease!important;
}
body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before{
  content:"•";
  width:28px;height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:11px;
  background:rgba(255,255,255,.09);
  color:#cbd5e1;
  font-size:18px;
  line-height:1;
}
body .sn-panel > .sn-panel-toolbar .sn-tab-button:hover,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]:hover{
  color:#fff!important;
  background:rgba(255,255,255,.08)!important;
  transform:translateX(-2px);
}
body .sn-panel > .sn-panel-toolbar .sn-tab-button-active,
body .sn-panel > .sn-panel-toolbar .sn-tab-button.active,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target].active{
  color:#fff!important;
  background:linear-gradient(135deg,var(--sn-modern-accent),#8b5cf6)!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 16px 34px rgba(99,102,241,.32)!important;
}
body .sn-panel > .sn-panel-toolbar + .sn-tab-panel,
body .sn-panel > .sn-tab-panel{
  grid-column:2;
  grid-row:2;
  min-width:0;
  background:rgba(255,255,255,.52);
  border:1px solid rgba(226,232,240,.72);
  border-radius:26px;
  padding:20px;
  box-shadow:var(--sn-modern-shadow-soft);
  backdrop-filter:blur(10px);
}
body .sn-local-notice-slot{
  margin:0 0 14px;
}
body .sn-local-notice-slot .sn-notice,
body .sn-local-notice-slot .notice,
body .sn-local-notice-slot .sn-alert{
  margin:0 0 10px!important;
  border-radius:16px!important;
}
body .sn-panel .sn-form-result,
body .sn-panel .sn-action-result,
body .sn-panel [data-sn-result],
body .sn-panel .sn-inline-result{
  border-radius:16px;
  margin-top:10px;
}
@media (max-width: 820px){
  body .sn-panel > .sn-panel-toolbar{
    position:relative;
    top:auto;
    margin-bottom:14px!important;
    padding:10px!important;
    border-radius:22px!important;
  }
  body .sn-panel > .sn-panel-toolbar::before{display:none;}
  body .sn-panel > .sn-panel-toolbar .sn-tabs,
  body .sn-panel > .sn-panel-toolbar .sn-tab-nav{
    flex-direction:row!important;
    overflow-x:auto!important;
  }
  body .sn-panel > .sn-panel-toolbar .sn-tab-button,
  body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{
    min-width:max-content!important;
    padding:11px 12px!important;
  }
  body .sn-panel > .sn-tab-panel{
    border-radius:22px;
    padding:14px;
  }
}

/* SN Operational UI Enforcement - final hotfix */
body .sn-panel.sn-has-sidebar-tabs,
body .sn-panel:has(> .sn-panel-toolbar),
body .sn-panel:has(> .sn-tabs){
  display:grid!important;
  grid-template-columns:minmax(230px,282px) minmax(0,1fr)!important;
  grid-template-rows:auto 1fr!important;
  gap:18px!important;
  overflow:visible!important;
}
body .sn-panel.sn-has-sidebar-tabs > .sn-panel-header,
body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-header,
body .sn-panel:has(> .sn-tabs) > .sn-panel-header{
  grid-column:1 / -1!important;
  grid-row:1!important;
}
body .sn-panel.sn-has-sidebar-tabs > .sn-tabs,
body .sn-panel:has(> .sn-tabs) > .sn-tabs,
body .sn-panel.sn-has-sidebar-tabs > .sn-panel-toolbar,
body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-toolbar{
  grid-column:1!important;
  grid-row:2!important;
  min-width:0!important;
  align-self:start!important;
  position:sticky!important;
  top:18px!important;
}
body .sn-panel.sn-has-sidebar-tabs > .sn-tab-content,
body .sn-panel:has(> .sn-tabs) > .sn-tab-content,
body .sn-panel.sn-has-sidebar-tabs > .sn-tab-panel,
body .sn-panel:has(> .sn-panel-toolbar) > .sn-tab-panel{
  grid-column:2!important;
  grid-row:2!important;
  min-width:0!important;
}
body .sn-panel:has(> .sn-panel-toolbar) > .sn-tab-panel:not(.sn-tab-panel-active):not(.active),
body .sn-panel.sn-has-sidebar-tabs > .sn-tab-panel:not(.sn-tab-panel-active):not(.active){
  display:none!important;
}
body .sn-panel:has(> .sn-panel-toolbar) > .sn-tab-panel-active,
body .sn-panel:has(> .sn-panel-toolbar) > .sn-tab-panel.active,
body .sn-panel.sn-has-sidebar-tabs > .sn-tab-panel-active,
body .sn-panel.sn-has-sidebar-tabs > .sn-tab-panel.active{
  display:block!important;
}
body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-toolbar,
body .sn-panel.sn-has-sidebar-tabs > .sn-panel-toolbar{
  min-height:520px!important;
}
body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-toolbar .sn-tab-button,
body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-toolbar [data-sn-tab-target],
body .sn-panel:has(> .sn-tabs) > .sn-tabs .sn-tab{
  cursor:pointer!important;
  pointer-events:auto!important;
  user-select:none!important;
}
body .sn-panel button,
body .sn-panel .sn-btn,
body .sn-panel input,
body .sn-panel select,
body .sn-panel textarea,
body .sn-panel a{
  pointer-events:auto!important;
}
body .sn-panel .sn-technical-report,
body .sn-panel details.sn-technical-report,
body .sn-panel details.sn-advanced,
body .sn-panel .sn-hr-advanced,
body .sn-panel details:has(> summary){
  /* keep logs usable; specific known technical/debug panels are hidden */
}
body .sn-panel .sn-technical-report,
body .sn-panel .sn-debug-panel,
body .sn-panel .sn-admin-debug,
body .sn-panel .sn-helper-card,
body .sn-panel .sn-guide-card,
body .sn-panel [data-sn-admin-guide],
body .sn-panel [data-sn-debug-panel]{
  display:none!important;
}
@media (max-width: 900px){
  body .sn-panel.sn-has-sidebar-tabs,
  body .sn-panel:has(> .sn-panel-toolbar),
  body .sn-panel:has(> .sn-tabs){
    display:block!important;
  }
  body .sn-panel.sn-has-sidebar-tabs > .sn-tabs,
  body .sn-panel.sn-has-sidebar-tabs > .sn-panel-toolbar,
  body .sn-panel:has(> .sn-tabs) > .sn-tabs,
  body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-toolbar{
    position:relative!important;
    top:auto!important;
    min-height:0!important;
    margin-bottom:16px!important;
  }
}


/* SN v1.0.40 - Dark mode restored without removing panel sections */
body .sn-panel-header{gap:10px;align-items:center}
body .sn-panel-header .sn-dark-toggle{margin-inline-start:auto;margin-inline-end:8px;white-space:nowrap}
body .sn-dark-toggle{display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-height:38px;line-height:1}
body.sn-dark-mode,
body.sn-dark-mode .site-content,
body.sn-dark-mode .main-page-wrapper,
body.sn-dark-mode .wd-content-layout{background:#07111f!important;color:#e5eefb!important}
body.sn-dark-mode .sn-panel,
body.sn-dark-mode .sn-portal,
body.sn-dark-mode .sn-invoice-page,
body.sn-dark-mode .sn-auth-wrap{background:linear-gradient(135deg,#07111f,#111827)!important;color:#e5eefb!important}
body.sn-dark-mode .sn-panel *,
body.sn-dark-mode .sn-invoice-page *,
body.sn-dark-mode .sn-auth-wrap *{color:inherit}
body.sn-dark-mode .sn-panel-header,
body.sn-dark-mode .sn-tabs,
body.sn-dark-mode .sn-tab-content,
body.sn-dark-mode .sn-card,
body.sn-dark-mode .sn-kpi-card,
body.sn-dark-mode .sn-table-wrap,
body.sn-dark-mode .sn-auth-card,
body.sn-dark-mode .sn-notice,
body.sn-dark-mode #sn-leads-list,
body.sn-dark-mode #sn-invoices-list,
body.sn-dark-mode #sn-sellers-table{background:linear-gradient(145deg,rgba(15,23,42,.96),rgba(30,41,59,.90))!important;color:#e5eefb!important;border-color:rgba(71,85,105,.85)!important;box-shadow:0 20px 44px rgba(0,0,0,.34)!important}
body.sn-dark-mode .sn-panel h1,
body.sn-dark-mode .sn-panel h2,
body.sn-dark-mode .sn-panel h3,
body.sn-dark-mode .sn-panel h4,
body.sn-dark-mode .sn-panel label,
body.sn-dark-mode .sn-panel strong,
body.sn-dark-mode .sn-panel td,
body.sn-dark-mode .sn-panel th,
body.sn-dark-mode .sn-panel p,
body.sn-dark-mode .sn-panel span{color:#e5eefb}
body.sn-dark-mode .sn-panel small,
body.sn-dark-mode .sn-muted,
body.sn-dark-mode .sn-note{color:#cbd5e1!important}
body.sn-dark-mode .sn-tab{color:#cbd5e1!important;background:transparent!important}
body.sn-dark-mode .sn-tab.active{color:#fff!important;background:linear-gradient(135deg,#6366f1,#8b5cf6)!important}
body.sn-dark-mode table.sn-table,
body.sn-dark-mode table.sn-table td,
body.sn-dark-mode table.sn-table th{color:#e5eefb!important;border-color:rgba(71,85,105,.65)!important;background:rgba(15,23,42,.72)!important}
body.sn-dark-mode table.sn-table thead th{background:rgba(15,23,42,.98)!important;color:#f8fafc!important}
body.sn-dark-mode input,
body.sn-dark-mode select,
body.sn-dark-mode textarea{background:#0f172a!important;color:#f8fafc!important;border-color:#475569!important}
body.sn-dark-mode input::placeholder,
body.sn-dark-mode textarea::placeholder{color:#94a3b8!important}
body.sn-dark-mode .sn-dark-toggle{background:#f8fafc!important;color:#0f172a!important;border:1px solid #94a3b8!important;box-shadow:0 10px 24px rgba(0,0,0,.35)!important}
@media (max-width: 768px){body .sn-panel-header{flex-wrap:wrap}body .sn-panel-header .sn-dark-toggle{order:2;margin-inline-start:0}}


/* SN v1.0.41 - public base readability fallback; full override lives in public-performance.css */
body .sn-dark-toggle{display:inline-flex!important}
body.sn-dark-mode .sn-panel{background:#07111f!important;color:#e5eefb!important}


/* Payment reward contact form */
.sn-reward-contact-form{display:grid;gap:12px;max-width:520px;margin:0 auto;text-align:right}
.sn-reward-contact-form label{font-weight:800;color:#1f2937}
.sn-reward-contact-form input[type=tel]{width:100%;direction:ltr;text-align:left;border:1px solid #cbd5e1;border-radius:14px;padding:12px 14px;font-size:16px;background:#fff;color:#0f172a}
.sn-reward-customer-note{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px 12px;color:#475569}
.sn-dark-mode .sn-reward-contact-form label{color:#e5e7eb}
.sn-dark-mode .sn-reward-contact-form input[type=tel]{background:#111827;color:#f8fafc;border-color:#334155}
.sn-dark-mode .sn-reward-customer-note{background:#0f172a;border-color:#334155;color:#cbd5e1}

/* 1.0.55 lightweight operational panels */
.sn-helper-card,
.sn-finance-flow-guide,
.sn-regression-readiness,
.sn-technical-report:not([open]) {
  display: none !important;
}
.sn-team-daily-report .sn-filter-bar,
.sn-lite-filter,
.sn-filter-bar {
  gap: 10px;
  align-items: end;
}
.sn-extra-number-approve,
.sn-extra-number-reject,
.sn-fin-edit-approve,
.sn-paid-referral-cancel {
  white-space: nowrap;
}
.sn-team-daily-report .sn-table-wrap,
.sn-extra-number-requests .sn-table-wrap {
  overflow-x: auto;
}
