
/* =============================================================
   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;
}


/* v1.0.65 fullscreen unified login + password eye toggle */
body .sn-unified-login-full{
  width:100vw!important;
  max-width:none!important;
  min-height:100vh!important;
  margin:0!important;
  margin-inline:calc(50% - 50vw)!important;
  padding:clamp(24px,5vw,72px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:
    radial-gradient(circle at 15% 10%, rgba(124,58,237,.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(14,165,233,.14), transparent 30%),
    linear-gradient(135deg,#f8fafc 0%,#eef2ff 48%,#ffffff 100%)!important;
  box-sizing:border-box!important;
}
body .sn-unified-login-full .sn-unified-login-shell{
  width:min(1180px,100%)!important;
  min-height:min(720px,calc(100vh - 64px))!important;
  display:grid!important;
  grid-template-columns:minmax(320px,460px) minmax(360px,1fr)!important;
  gap:clamp(28px,5vw,80px)!important;
  align-items:center!important;
  justify-content:center!important;
  padding:clamp(24px,4vw,64px)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:36px!important;
  background:rgba(255,255,255,.72)!important;
  box-shadow:0 32px 90px rgba(15,23,42,.10)!important;
  backdrop-filter:blur(18px)!important;
  box-sizing:border-box!important;
}
body .sn-unified-login-full .sn-unified-login-copy{
  order:2!important;
  margin:0!important;
  max-width:520px!important;
  text-align:right!important;
}
body .sn-unified-login-full .sn-login-kicker{
  display:inline-flex!important;
  margin-bottom:16px!important;
  padding:8px 14px!important;
  border-radius:999px!important;
  background:rgba(124,58,237,.10)!important;
  color:#5b21b6!important;
  font-weight:800!important;
  font-size:.9rem!important;
}
body .sn-unified-login-full .sn-auth-logo h2{
  font-size:clamp(2rem,4vw,4rem)!important;
  line-height:1.18!important;
  margin:0 0 18px!important;
  color:#0f172a!important;
}
body .sn-unified-login-full .sn-auth-logo p{
  max-width:560px!important;
  font-size:clamp(1rem,1.5vw,1.25rem)!important;
  line-height:2!important;
  color:#475569!important;
}
body .sn-unified-login-full .sn-unified-login-card{
  order:1!important;
  width:min(100%,420px)!important;
  padding:clamp(28px,4vw,44px)!important;
  border-radius:30px!important;
  background:#fff!important;
  box-shadow:0 28px 80px rgba(15,23,42,.14)!important;
  border:1px solid rgba(203,213,225,.78)!important;
}
body .sn-unified-login-full .sn-field{margin-bottom:20px!important}
body .sn-unified-login-full .sn-field label{
  margin-bottom:9px!important;
  color:#0f172a!important;
  font-weight:900!important;
}
body .sn-unified-login-full .sn-field input{
  min-height:56px!important;
  border-radius:18px!important;
  font-size:1rem!important;
  background:#fff!important;
  color:#0f172a!important;
}
body .sn-unified-login-full .sn-password-control{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
}
body .sn-unified-login-full .sn-password-control input{
  width:100%!important;
  padding-left:56px!important;
}
body .sn-unified-login-full .sn-password-toggle{
  position:absolute!important;
  left:10px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:42px!important;
  height:42px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  border-radius:14px!important;
  background:rgba(124,58,237,.10)!important;
  color:#4c1d95!important;
  cursor:pointer!important;
  font-size:1.05rem!important;
  line-height:1!important;
}
body .sn-unified-login-full .sn-password-toggle:hover,
body .sn-unified-login-full .sn-password-toggle:focus{
  background:rgba(124,58,237,.18)!important;
  outline:2px solid rgba(124,58,237,.20)!important;
}
body .sn-unified-login-full .sn-auth-submit{
  width:100%!important;
  min-height:56px!important;
  border-radius:18px!important;
  font-size:1.02rem!important;
}
body .sn-unified-login-full .sn-auth-footer{
  margin-top:22px!important;
  text-align:center!important;
}
body.sn-dark-mode .sn-unified-login-full{
  background:
    radial-gradient(circle at 20% 10%, rgba(124,58,237,.28), transparent 26%),
    radial-gradient(circle at 80% 25%, rgba(14,165,233,.20), transparent 30%),
    linear-gradient(135deg,#020617 0%,#0f172a 55%,#111827 100%)!important;
}
body.sn-dark-mode .sn-unified-login-full .sn-unified-login-shell,
body.sn-dark-mode .sn-unified-login-full .sn-unified-login-card{
  background:rgba(15,23,42,.78)!important;
  border-color:rgba(148,163,184,.28)!important;
}
body.sn-dark-mode .sn-unified-login-full .sn-auth-logo h2,
body.sn-dark-mode .sn-unified-login-full .sn-field label{color:#e5eefb!important}
body.sn-dark-mode .sn-unified-login-full .sn-auth-logo p{color:#cbd5e1!important}
body.sn-dark-mode .sn-unified-login-full .sn-field input{background:#020617!important;color:#f8fafc!important;border-color:#334155!important}
@media (max-width: 860px){
  body .sn-unified-login-full{padding:18px!important;align-items:flex-start!important}
  body .sn-unified-login-full .sn-unified-login-shell{
    min-height:calc(100vh - 36px)!important;
    grid-template-columns:1fr!important;
    gap:24px!important;
    border-radius:26px!important;
  }
  body .sn-unified-login-full .sn-unified-login-copy{order:1!important;text-align:center!important;margin-inline:auto!important}
  body .sn-unified-login-full .sn-unified-login-card{order:2!important;margin-inline:auto!important}
  body .sn-unified-login-full .sn-auth-logo p{margin-inline:auto!important}
}

/* 1.0.67: payment success direct reward contact form */
.sn-payment-reward-direct-box{
  margin:18px 0 24px;
  padding:20px;
  border:1px solid #bbf7d0;
  border-radius:22px;
  background:linear-gradient(135deg,#f0fdf4,#ecfeff);
  box-shadow:0 14px 34px rgba(15,23,42,.08);
  text-align:right;
}
.sn-payment-reward-direct-box h3{
  margin:0 0 12px;
  font-size:18px;
  font-weight:900;
  color:#14532d;
}
.sn-payment-reward-direct-box .sn-reward-contact-form{
  max-width:100%;
  margin:0;
}
.sn-payment-reward-direct-box .sn-reward-contact-form input[type=tel]{
  min-height:48px;
}
.sn-payment-reward-direct-box .sn-reward-contact-form .sn-btn{
  min-height:48px;
  font-size:15px;
}
.sn-dark-mode .sn-payment-reward-direct-box{
  background:linear-gradient(135deg,#052e16,#083344);
  border-color:#166534;
}
.sn-dark-mode .sn-payment-reward-direct-box h3{color:#bbf7d0;}

/* ============================================================
   SN v1.0.67 visual port from sales-network-v2_3
   Scope: visual/UX only. Keeps 1.0.67 PHP/AJAX/business logic intact.
   Maps legacy .sn-tabs/.sn-tab-content and new .sn-panel-toolbar/.sn-tab-panel.
   ============================================================ */
:root{
  --sn-v23-bg:#eef3fb;
  --sn-v23-surface:rgba(255,255,255,.88);
  --sn-v23-sidebar:#0f172a;
  --sn-v23-sidebar-2:#1e293b;
  --sn-v23-accent:#6366f1;
  --sn-v23-accent-2:#06b6d4;
  --sn-v23-green:#10b981;
  --sn-v23-orange:#f59e0b;
  --sn-v23-red:#ef4444;
  --sn-v23-radius:22px;
  --sn-v23-shadow:0 24px 70px rgba(15,23,42,.12);
  --sn-v23-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 > .sn-tab-panel,
body .sn-panel > .sn-tab-content{
  scroll-margin-top:84px;
}
body .sn-panel{
  max-width:1240px;
  margin:26px auto!important;
  padding:18px!important;
  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-v23-bg) 100%)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:30px!important;
  box-shadow:var(--sn-v23-shadow)!important;
  overflow:visible!important;
  position:relative;
}
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;
}
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);
  z-index:0;
}
body .sn-panel > *{
  position:relative;
  z-index:1;
}
body .sn-panel-header,
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;
  margin:0!important;
  padding:18px 20px!important;
  border:1px solid rgba(226,232,240,.84)!important;
  border-radius:24px!important;
  background:rgba(255,255,255,.72)!important;
  box-shadow:var(--sn-v23-shadow-soft)!important;
  backdrop-filter:blur(14px);
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
body .sn-panel-header h1,
body .sn-panel-header h2,
body .sn-panel-header h3{
  font-size:1.35rem!important;
  letter-spacing:-.02em;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  margin:0!important;
}
body .sn-panel-header h1::before,
body .sn-panel-header h2::before,
body .sn-panel-header h3::before{
  content:"";
  width:42px;
  height:42px;
  flex:0 0 42px;
  border-radius:16px;
  background:linear-gradient(135deg,var(--sn-v23-accent),var(--sn-v23-accent-2));
  box-shadow:0 12px 26px rgba(99,102,241,.26);
  display:inline-block;
}
body .sn-panel-header p{
  color:#64748b;
}
body .sn-panel-header form,
body .sn-panel-header .sn-dark-toggle{
  margin-inline-start:auto!important;
}

/* legacy and 1.0.67 tab sidebars */
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,
body .sn-panel > .sn-tabs,
body .sn-panel > .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;
  z-index:2!important;
  min-height:520px!important;
  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;
  overflow:visible!important;
}
body .sn-panel > .sn-panel-toolbar .sn-tabs,
body .sn-panel > .sn-panel-toolbar .sn-tab-nav,
body .sn-panel > .sn-tabs{
  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-tabs::before,
body .sn-panel > .sn-panel-toolbar::before{
  content:"شبکه فروش";
  color:#fff!important;
  font-weight:900!important;
  font-size:1.05rem!important;
  padding:12px 14px 16px!important;
  margin:0 0 14px!important;
  border-bottom:1px solid rgba(255,255,255,.11)!important;
  display:block!important;
}
body #sn-seller-panel > .sn-tabs::before{content:"پنل فروشنده";}
body #sn-supervisor-panel > .sn-tabs::before{content:"پنل سرپرست";}
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-tabs .sn-tab,
body .sn-panel > .sn-panel-toolbar .sn-tab-button,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{
  width:100%!important;
  min-height:46px!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;
  cursor:pointer!important;
  transition:transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease!important;
  box-shadow:none!important;
  white-space:normal!important;
}
body .sn-panel > .sn-tabs .sn-tab::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before{
  content:"•";
  width:28px!important;
  height:28px!important;
  flex:0 0 28px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:11px!important;
  background:rgba(255,255,255,.09)!important;
  color:#cbd5e1!important;
  font-size:18px!important;
  line-height:1!important;
}
body .sn-panel > .sn-tabs .sn-tab:nth-child(1)::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:nth-child(1)::before{content:"👥";}
body .sn-panel > .sn-tabs .sn-tab:nth-child(2)::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:nth-child(2)::before{content:"🧾";}
body .sn-panel > .sn-tabs .sn-tab:nth-child(3)::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:nth-child(3)::before{content:"📊";}
body .sn-panel > .sn-tabs .sn-tab:nth-child(4)::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:nth-child(4)::before{content:"💼";}
body .sn-panel > .sn-tabs .sn-tab:nth-child(5)::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:nth-child(5)::before{content:"💳";}
body .sn-panel > .sn-tabs .sn-tab:nth-child(6)::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:nth-child(6)::before{content:"⚙️";}
body .sn-panel > .sn-tabs .sn-tab:hover,
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)!important;
}
body .sn-panel > .sn-tabs .sn-tab.active,
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-v23-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-tabs .sn-tab.active::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button-active::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button.active::before,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target].active::before{
  background:rgba(255,255,255,.20)!important;
  color:#fff!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,
body .sn-panel > .sn-tab-content,
body .sn-panel > .sn-tab-panel{
  grid-column:2!important;
  grid-row:2!important;
  min-width:0!important;
  background:rgba(255,255,255,.52)!important;
  border:1px solid rgba(226,232,240,.72)!important;
  border-radius:26px!important;
  padding:20px!important;
  box-shadow:var(--sn-v23-shadow-soft)!important;
  backdrop-filter:blur(10px);
}
body .sn-panel > .sn-tab-content.active,
body .sn-panel > .sn-tab-panel-active,
body .sn-panel > .sn-tab-panel.active{
  animation:snV23Fade .22s ease both;
}
@keyframes snV23Fade{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

/* cards, form controls, buttons */
body .sn-card,
body .sn-invoice-card,
body .sn-auth-card,
body .sn-compact-card,
body .sn-hr-section,
body .sn-section,
body .sn-flow-card{
  border:1px solid rgba(226,232,240,.82)!important;
  border-radius:24px!important;
  background:var(--sn-v23-surface)!important;
  box-shadow:var(--sn-v23-shadow-soft)!important;
  backdrop-filter:blur(14px);
}
body .sn-card h3,
body .sn-section h3,
body .sn-flow-card h3,
body .sn-hr-section h3{
  font-size:1.08rem;
  letter-spacing:-.01em;
}
body .sn-card h3::before,
body .sn-section h3::before,
body .sn-flow-card h3::before,
body .sn-hr-section h3::before{
  width:8px;
  height:28px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--sn-v23-accent),var(--sn-v23-accent-2));
}
body .sn-field label,
body .sn-panel label,
body .sn-compact-form-grid label{
  color:#334155;
  font-weight:900;
}
body .sn-field input,
body .sn-field select,
body .sn-field textarea,
body .sn-panel input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
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,.90)!important;
  min-height:42px!important;
  box-shadow:0 1px 0 rgba(15,23,42,.03)!important;
}
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-v23-accent)!important;
  box-shadow:0 0 0 4px rgba(99,102,241,.13)!important;
  outline:0!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,
body .sn-panel button[type="submit"]{
  background:linear-gradient(135deg,var(--sn-v23-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,
body .sn-status{
  border-radius:999px!important;
  min-height:28px;
  padding:4px 12px!important;
  font-weight:900!important;
}
body .sn-badge{
  background:linear-gradient(135deg,var(--sn-v23-red),#fb7185);
  box-shadow:0 8px 18px rgba(239,68,68,.18);
}
body .sn-notice{
  border-radius:18px!important;
  box-shadow:0 10px 24px rgba(15,23,42,.05)!important;
}
body .sn-radio-group,
body .sn-pay-methods,
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!important;
}

/* KPI and dashboard cards from v2_3 */
body .sn-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:0 0 18px;
}
body .sn-kpi-card,
body .sn-dashboard-cards .sn-card,
body .sn-dashboard-grid .sn-card{
  position:relative;
  overflow:hidden;
  min-height:112px;
  padding:18px 18px 14px!important;
  border-radius:24px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.92),rgba(248,250,252,.82))!important;
  border:1px solid rgba(226,232,240,.9)!important;
  box-shadow:0 16px 38px rgba(15,23,42,.075)!important;
  isolation:isolate;
}
body .sn-kpi-card::before,
body .sn-dashboard-cards .sn-card::before,
body .sn-dashboard-grid .sn-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-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,
body .sn-dashboard-cards .sn-card small,
body .sn-dashboard-grid .sn-card small{
  display:block;
  color:#64748b;
  font-weight:900;
  margin-bottom:5px;
}
body .sn-kpi-card strong,
body .sn-dashboard-cards .sn-card strong,
body .sn-dashboard-grid .sn-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);}

/* tables */
body .sn-table-wrap{
  max-width:100%;
  overflow:auto;
  border-radius:22px!important;
  -webkit-overflow-scrolling:touch;
}
body .sn-table-wrap,
body table.sn-table,
body table.widefat{
  border-radius:20px!important;
  overflow:hidden;
}
body table.sn-table,
body .sn-panel table.widefat{
  border-collapse:separate!important;
  border-spacing:0!important;
  box-shadow:0 10px 26px rgba(15,23,42,.06)!important;
}
body table.sn-table thead tr,
body .sn-panel table.widefat thead tr,
body table.sn-table thead th,
body .sn-panel table.widefat thead th{
  background:linear-gradient(180deg,#f8fafc,#eef2ff)!important;
}
body table.sn-table th,
body .sn-panel table.widefat th{
  color:#475569!important;
  font-weight:900!important;
  white-space:nowrap;
}
body table.sn-table th,
body table.sn-table td,
body .sn-panel table.widefat th,
body .sn-panel table.widefat td{
  padding:12px 14px!important;
  border-bottom-color:#edf2f7!important;
}
body table.sn-table tbody tr:hover td,
body .sn-panel table.widefat tbody tr:hover td{
  background:#f8fbff!important;
}

/* keep important operational details visible while still hiding known guide/debug cards */
body .sn-panel details.sn-technical-report,
body .sn-panel .sn-technical-report,
body .sn-panel details.sn-advanced,
body .sn-panel .sn-hr-advanced{
  display:block!important;
}
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;
}

/* Jalali picker visual from v2_3, compatible with current sn-jalali-date markup */
body .sn-panel .sn-jalali-wrap,
body .sn-invoice-page .sn-jalali-wrap,
body .sn-myaccount-invoices .sn-jalali-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
body .sn-panel .sn-jalali-trigger,
body .sn-invoice-page .sn-jalali-trigger,
body .sn-myaccount-invoices .sn-jalali-trigger{
  min-height:42px;
  border-radius:14px!important;
  background:linear-gradient(135deg,#eef2ff,#e0f2fe)!important;
  color:#1e40af!important;
  border:1px solid #bfdbfe!important;
}
body .sn-jalali-picker,
body .sn-jalali-picker-box{
  border-radius:20px!important;
  background:linear-gradient(180deg,#fff,#f8fafc)!important;
  border:1px solid #e2e8f0!important;
  box-shadow:0 18px 42px rgba(15,23,42,.12)!important;
}
body .sn-jalali-row select,
body .sn-jalali-picker select{
  border-radius:14px!important;
}

/* dark mode adapted from v2_3 */
body .sn-dark-toggle{
  appearance:none;
  border:1px solid rgba(148,163,184,.35)!important;
  background:rgba(255,255,255,.74)!important;
  color:#0f172a!important;
  padding:9px 14px!important;
  border-radius:999px!important;
  cursor:pointer;
  font-weight:900!important;
  box-shadow:0 10px 22px rgba(15,23,42,.08)!important;
  transition:.18s ease;
}
body .sn-dark-toggle:hover{transform:translateY(-1px);box-shadow:0 14px 26px rgba(15,23,42,.12)!important;}
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;
  border-color:rgba(148,163,184,.24)!important;
}
body.sn-dark-mode .sn-panel-header,
body.sn-dark-mode .sn-card,
body.sn-dark-mode .sn-tab-content,
body.sn-dark-mode .sn-tab-panel,
body.sn-dark-mode .sn-invoice-card,
body.sn-dark-mode .sn-auth-card,
body.sn-dark-mode .sn-kpi-card,
body.sn-dark-mode .sn-table-wrap,
body.sn-dark-mode .sn-notice,
body.sn-dark-mode .sn-compact-card,
body.sn-dark-mode .sn-hr-section,
body.sn-dark-mode .sn-section,
body.sn-dark-mode .sn-flow-card{
  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-kpi-card strong{
  color:#e5eefb!important;
}
body.sn-dark-mode .sn-panel p,
body.sn-dark-mode .sn-panel small,
body.sn-dark-mode .sn-panel em{
  color:#cbd5e1!important;
}
body.sn-dark-mode .sn-panel input:not([type="checkbox"]):not([type="radio"]),
body.sn-dark-mode .sn-panel select,
body.sn-dark-mode .sn-panel textarea{
  background:#020617!important;
  border-color:#334155!important;
  color:#f8fafc!important;
}
body.sn-dark-mode table.sn-table,
body.sn-dark-mode .sn-panel table.widefat{
  background:#0f172a!important;
  color:#e5eefb!important;
}
body.sn-dark-mode table.sn-table thead tr,
body.sn-dark-mode .sn-panel table.widefat thead tr,
body.sn-dark-mode table.sn-table thead th,
body.sn-dark-mode .sn-panel table.widefat thead th{
  background:#111827!important;
  color:#dbeafe!important;
}
body.sn-dark-mode table.sn-table td,
body.sn-dark-mode .sn-panel table.widefat td{
  border-color:#1f2937!important;
}
body.sn-dark-mode table.sn-table tbody tr:hover td,
body.sn-dark-mode .sn-panel table.widefat tbody tr:hover td{
  background:#1e293b!important;
}
body.sn-dark-mode .sn-dark-toggle{
  background:#1e293b!important;
  color:#e5eefb!important;
  border-color:#334155!important;
}

/* responsive behavior from v2_3: sidebar becomes horizontal scroll */
@media (max-width: 1024px){
  body .sn-panel.sn-has-sidebar-tabs,
  body .sn-panel:has(> .sn-panel-toolbar),
  body .sn-panel:has(> .sn-tabs){
    grid-template-columns:230px minmax(0,1fr)!important;
    padding:14px!important;
  }
  body .sn-panel > .sn-tabs,
  body .sn-panel > .sn-panel-toolbar{padding:14px!important;min-height:520px!important;}
  body .sn-panel > .sn-tab-content,
  body .sn-panel > .sn-tab-panel{padding:16px!important;}
}
@media (max-width: 820px){
  body .sn-panel,
  body .sn-panel.sn-has-sidebar-tabs,
  body .sn-panel:has(> .sn-panel-toolbar),
  body .sn-panel:has(> .sn-tabs){
    display:block!important;
    border-radius:22px!important;
    margin:14px auto!important;
  }
  body .sn-panel-header{margin-bottom:14px!important;}
  body .sn-panel > .sn-tabs,
  body .sn-panel > .sn-panel-toolbar,
  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;
    flex-direction:row!important;
    overflow-x:auto!important;
    border-radius:22px!important;
    margin-bottom:14px!important;
    padding:10px!important;
  }
  body .sn-panel > .sn-tabs,
  body .sn-panel > .sn-panel-toolbar .sn-tabs,
  body .sn-panel > .sn-panel-toolbar .sn-tab-nav{
    flex-direction:row!important;
    gap:8px!important;
    min-width:max-content!important;
  }
  body .sn-panel > .sn-tabs::before,
  body .sn-panel > .sn-panel-toolbar::before{display:none!important;}
  body .sn-panel > .sn-tabs .sn-tab,
  body .sn-panel > .sn-panel-toolbar .sn-tab-button,
  body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{
    min-width:max-content!important;
    width:auto!important;
    padding:11px 12px!important;
    white-space:nowrap!important;
  }
  body .sn-panel > .sn-tab-content,
  body .sn-panel > .sn-tab-panel{
    border-radius:22px!important;
    padding:14px!important;
  }
  body .sn-form-grid,
  body .sn-compact-form-grid{grid-template-columns:1fr!important;}
  body .sn-kpi-grid{grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px;}
  body .sn-kpi-card{min-height:96px;padding:14px!important;border-radius:20px!important;}
  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!important;margin-inline:-4px;padding-bottom:4px;}
  body table.sn-table,
  body .sn-panel table.widefat{min-width:760px;}
  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: 520px){
  body .sn-panel{padding:10px!important;background:#f8fafc!important;}
  body .sn-panel-header{padding:14px!important;border-radius:18px!important;}
  body .sn-panel-header h1,
  body .sn-panel-header h2,
  body .sn-panel-header h3{font-size:1.06rem!important;}
  body .sn-panel-header h1::before,
  body .sn-panel-header h2::before,
  body .sn-panel-header h3::before{width:34px;height:34px;flex-basis:34px;border-radius:13px;}
  body .sn-card{padding:16px!important;border-radius:18px!important;}
  body .sn-pay-methods .sn-btn{min-width:100%;}
  body .sn-kpi-grid{grid-template-columns:1fr;}
  body .sn-dark-toggle{width:100%;justify-content:center;}
}


/* SN v2.3 sidebar hamburger/collapse final fix */
body .sn-panel.sn-has-sidebar-tabs,
body .sn-panel:has(> .sn-panel-toolbar),
body .sn-panel:has(> .sn-tabs){
  --sn-sidebar-open-width:340px;
  --sn-sidebar-collapsed-width:86px;
  grid-template-columns:minmax(300px,var(--sn-sidebar-open-width)) minmax(0,1fr)!important;
  overflow:visible!important;
}
body .sn-panel.sn-sidebar-collapsed.sn-has-sidebar-tabs,
body .sn-panel.sn-sidebar-collapsed:has(> .sn-panel-toolbar),
body .sn-panel.sn-sidebar-collapsed:has(> .sn-tabs){
  grid-template-columns:var(--sn-sidebar-collapsed-width) minmax(0,1fr)!important;
}
body .sn-panel > .sn-tabs,
body .sn-panel > .sn-panel-toolbar,
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{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  isolation:isolate!important;
  z-index:30!important;
  padding:18px 14px!important;
  scrollbar-width:thin;
  scrollbar-color:rgba(148,163,184,.45) transparent;
}
body .sn-panel > .sn-tabs::-webkit-scrollbar,
body .sn-panel > .sn-panel-toolbar::-webkit-scrollbar{width:6px;height:6px;}
body .sn-panel > .sn-tabs::-webkit-scrollbar-thumb,
body .sn-panel > .sn-panel-toolbar::-webkit-scrollbar-thumb{background:rgba(148,163,184,.45);border-radius:999px;}
body .sn-panel > .sn-tabs::before,
body .sn-panel > .sn-panel-toolbar::before{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  padding-left:52px!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  line-height:1.55!important;
}
body .sn-sidebar-toggle{
  position:absolute!important;
  left:14px!important;
  top:16px!important;
  z-index:60!important;
  width:38px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0!important;
  border-radius:14px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(2,6,23,.18)!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  cursor:pointer!important;
  font-size:20px!important;
  line-height:1!important;
  font-weight:900!important;
}
body .sn-sidebar-toggle:hover,
body .sn-sidebar-toggle:focus{
  background:rgba(255,255,255,.20)!important;
  outline:0!important;
  transform:none!important;
}
body .sn-panel > .sn-panel-toolbar .sn-tabs,
body .sn-panel > .sn-panel-toolbar .sn-tab-nav,
body .sn-panel > .sn-tabs{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}
body .sn-panel > .sn-tabs .sn-tab,
body .sn-panel > .sn-panel-toolbar .sn-tab-button,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:clip!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.45!important;
  color:rgba(255,255,255,.86)!important;
  transform:none!important;
}
body .sn-panel > .sn-tabs .sn-tab:hover,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:hover,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]:hover{
  transform:none!important;
  color:#fff!important;
}
body .sn-panel > .sn-tabs .sn-tab::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before{
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
  margin:0!important;
}
body .sn-panel > .sn-tab-content,
body .sn-panel > .sn-tab-panel{
  z-index:1!important;
}
body .sn-panel > .sn-tab-content:not(.active),
body .sn-panel > .sn-tab-panel[hidden],
body .sn-panel > .sn-tab-panel:not(.sn-tab-panel-active):not(.active){
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
body .sn-panel > .sn-tab-content.active,
body .sn-panel > .sn-tab-panel-active,
body .sn-panel > .sn-tab-panel.active{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-tabs,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar,
body .sn-panel.sn-sidebar-collapsed.sn-has-sidebar-tabs > .sn-tabs,
body .sn-panel.sn-sidebar-collapsed.sn-has-sidebar-tabs > .sn-panel-toolbar,
body .sn-panel.sn-sidebar-collapsed:has(> .sn-tabs) > .sn-tabs,
body .sn-panel.sn-sidebar-collapsed:has(> .sn-panel-toolbar) > .sn-panel-toolbar{
  padding:68px 10px 14px!important;
  min-height:520px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-tabs::before,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar::before{
  display:none!important;
}
body .sn-panel.sn-sidebar-collapsed .sn-sidebar-toggle{
  left:50%!important;
  transform:translateX(-50%)!important;
}
body .sn-panel.sn-sidebar-collapsed .sn-sidebar-toggle:hover,
body .sn-panel.sn-sidebar-collapsed .sn-sidebar-toggle:focus{
  transform:translateX(-50%)!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tabs,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-nav,
body .sn-panel.sn-sidebar-collapsed > .sn-tabs{
  align-items:center!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]{
  width:48px!important;
  height:48px!important;
  min-height:48px!important;
  max-width:48px!important;
  padding:9px!important;
  justify-content:center!important;
  gap:0!important;
  font-size:0!important;
  line-height:0!important;
  border-radius:17px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab::before,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button::before,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]::before{
  width:30px!important;
  height:30px!important;
  flex:0 0 30px!important;
  font-size:18px!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab > *,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button > *,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target] > *{
  display:none!important;
}
@media (min-width: 1280px){
  body .sn-panel.sn-has-sidebar-tabs,
  body .sn-panel:has(> .sn-panel-toolbar),
  body .sn-panel:has(> .sn-tabs){
    --sn-sidebar-open-width:360px;
    grid-template-columns:minmax(320px,var(--sn-sidebar-open-width)) minmax(0,1fr)!important;
  }
  body .sn-panel.sn-sidebar-collapsed.sn-has-sidebar-tabs,
  body .sn-panel.sn-sidebar-collapsed:has(> .sn-panel-toolbar),
  body .sn-panel.sn-sidebar-collapsed:has(> .sn-tabs){
    grid-template-columns:var(--sn-sidebar-collapsed-width) minmax(0,1fr)!important;
  }
}
@media (max-width: 1024px) and (min-width: 821px){
  body .sn-panel.sn-has-sidebar-tabs,
  body .sn-panel:has(> .sn-panel-toolbar),
  body .sn-panel:has(> .sn-tabs){
    --sn-sidebar-open-width:300px;
    grid-template-columns:minmax(270px,var(--sn-sidebar-open-width)) minmax(0,1fr)!important;
  }
  body .sn-panel.sn-sidebar-collapsed.sn-has-sidebar-tabs,
  body .sn-panel.sn-sidebar-collapsed:has(> .sn-panel-toolbar),
  body .sn-panel.sn-sidebar-collapsed:has(> .sn-tabs){
    grid-template-columns:var(--sn-sidebar-collapsed-width) minmax(0,1fr)!important;
  }
}
@media (max-width: 820px){
  body .sn-panel.sn-sidebar-collapsed,
  body .sn-panel.sn-sidebar-collapsed.sn-has-sidebar-tabs,
  body .sn-panel.sn-sidebar-collapsed:has(> .sn-panel-toolbar),
  body .sn-panel.sn-sidebar-collapsed:has(> .sn-tabs){
    display:block!important;
  }
  body .sn-sidebar-toggle{display:none!important;}
  body .sn-panel.sn-sidebar-collapsed > .sn-tabs,
  body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar{
    padding:10px!important;
    min-height:0!important;
  }
  body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab,
  body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button,
  body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]{
    width:auto!important;
    max-width:none!important;
    height:auto!important;
    min-height:42px!important;
    font-size:.9rem!important;
    line-height:1.35!important;
    padding:11px 12px!important;
    gap:8px!important;
  }
  body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab > *,
  body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button > *,
  body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target] > *{
    display:initial!important;
  }
}

/* ============================================================
   SN v2.3 sidebar readability + action colors + workflow layout fix
   Fixes: low-contrast inactive sidebar items, harsh action button colors,
   and .sn-flow-steps overlapping under the sticky sidebar.
   ============================================================ */
body .sn-panel > .sn-tabs .sn-tab,
body .sn-panel > .sn-panel-toolbar .sn-tab-button,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{
  opacity:1!important;
  color:#e8eef8!important;
  background:rgba(255,255,255,.055)!important;
  border-color:rgba(255,255,255,.075)!important;
  text-shadow:0 1px 1px rgba(2,6,23,.28)!important;
}
body .sn-panel > .sn-tabs .sn-tab::before,
body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before{
  background:rgba(255,255,255,.16)!important;
  color:#f8fafc!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)!important;
  text-shadow:none!important;
}
body .sn-panel > .sn-tabs .sn-tab:not(.active):hover,
body .sn-panel > .sn-panel-toolbar .sn-tab-button:not(.sn-tab-button-active):not(.active):hover,
body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]:not(.sn-tab-button-active):not(.active):hover{
  color:#fff!important;
  background:rgba(255,255,255,.13)!important;
  border-color:rgba(255,255,255,.18)!important;
}
body .sn-panel > .sn-tabs .sn-tab.active,
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{
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
  border-color:rgba(255,255,255,.22)!important;
  color:#fff!important;
  box-shadow:0 16px 34px rgba(37,99,235,.30)!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]{
  background:rgba(255,255,255,.08)!important;
}
body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab.active,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button-active,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button.active,
body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target].active{
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
}

/* Action buttons: calmer v2.3-like palette; primary blue/teal, secondary light. */
body .sn-panel .sn-actions .sn-btn,
body .sn-panel .sn-btn,
body .sn-panel button.sn-btn,
body .sn-panel input[type="submit"].sn-btn,
body .sn-panel button[type="submit"]{
  border-radius:14px!important;
  min-height:42px!important;
  padding:10px 17px!important;
  border:1px solid rgba(14,165,233,.20)!important;
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
  color:#fff!important;
  font-weight:900!important;
  box-shadow:0 10px 24px rgba(37,99,235,.18)!important;
  transform:none!important;
}
body .sn-panel .sn-actions .sn-btn:hover,
body .sn-panel .sn-btn:hover,
body .sn-panel button.sn-btn:hover,
body .sn-panel input[type="submit"].sn-btn:hover,
body .sn-panel button[type="submit"]:hover{
  background:linear-gradient(135deg,#1d4ed8,#0284c7)!important;
  box-shadow:0 14px 28px rgba(37,99,235,.23)!important;
  transform:translateY(-1px)!important;
}
body .sn-panel .sn-btn-secondary,
body .sn-panel button.sn-btn-secondary,
body .sn-panel input[type="submit"].sn-btn-secondary{
  background:linear-gradient(180deg,#ffffff,#f8fafc)!important;
  color:#0f172a!important;
  border:1px solid #cbd5e1!important;
  box-shadow:0 8px 18px rgba(15,23,42,.08)!important;
}
body .sn-panel .sn-btn-secondary:hover,
body .sn-panel button.sn-btn-secondary:hover,
body .sn-panel input[type="submit"].sn-btn-secondary:hover{
  background:linear-gradient(180deg,#f0f9ff,#e0f2fe)!important;
  border-color:#38bdf8!important;
  color:#075985!important;
  box-shadow:0 10px 22px rgba(14,165,233,.16)!important;
}
body .sn-panel .sn-btn-danger,
body .sn-panel button.sn-btn-danger{
  background:linear-gradient(135deg,#dc2626,#f97316)!important;
  border-color:rgba(248,113,113,.35)!important;
  box-shadow:0 10px 24px rgba(220,38,38,.16)!important;
}

/* Keep workflow steps out from behind the sidebar. */
body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps),
body .sn-panel:has(> .sn-panel-toolbar):has(> .sn-flow-steps),
body .sn-panel:has(> .sn-tabs):has(> .sn-flow-steps){
  grid-template-rows:auto auto 1fr!important;
}
body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-tabs,
body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-panel-toolbar,
body .sn-panel:has(> .sn-panel-toolbar):has(> .sn-flow-steps) > .sn-panel-toolbar,
body .sn-panel:has(> .sn-tabs):has(> .sn-flow-steps) > .sn-tabs{
  grid-row:2 / 4!important;
}
body .sn-panel.sn-has-sidebar-tabs > .sn-flow-steps,
body .sn-panel:has(> .sn-flow-steps) > .sn-flow-steps{
  grid-column:2!important;
  grid-row:2!important;
  z-index:4!important;
  position:relative!important;
  margin:0 0 16px!important;
  padding:12px!important;
  border:1px solid rgba(226,232,240,.85)!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.78)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.07)!important;
  backdrop-filter:blur(10px)!important;
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(145px,1fr))!important;
  gap:10px!important;
  min-width:0!important;
  overflow:visible!important;
}
body .sn-panel > .sn-flow-steps .sn-flow-step{
  margin:0!important;
  padding:10px 12px!important;
  border:1px solid rgba(203,213,225,.70)!important;
  border-radius:16px!important;
  background:linear-gradient(180deg,#fff,#f8fafc)!important;
  box-shadow:none!important;
  min-width:0!important;
}
body .sn-panel > .sn-flow-steps .sn-flow-step span{
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
  color:#fff!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-weight:900!important;
}
body .sn-panel > .sn-flow-steps .sn-flow-step strong{
  color:#0f172a!important;
  font-weight:900!important;
}
body .sn-panel > .sn-flow-steps .sn-flow-step small{
  color:#64748b!important;
  line-height:1.7!important;
}
body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-tab-content,
body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-tab-panel,
body .sn-panel:has(> .sn-flow-steps) > .sn-tab-content,
body .sn-panel:has(> .sn-flow-steps) > .sn-tab-panel{
  grid-column:2!important;
  grid-row:3!important;
}
@media (max-width: 820px){
  body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps),
  body .sn-panel:has(> .sn-panel-toolbar):has(> .sn-flow-steps),
  body .sn-panel:has(> .sn-tabs):has(> .sn-flow-steps){
    display:block!important;
  }
  body .sn-panel.sn-has-sidebar-tabs > .sn-flow-steps,
  body .sn-panel:has(> .sn-flow-steps) > .sn-flow-steps{
    display:flex!important;
    overflow-x:auto!important;
    margin:0 0 14px!important;
    padding:10px!important;
  }
  body .sn-panel > .sn-flow-steps .sn-flow-step{
    min-width:190px!important;
  }
}

/* ============================================================
   SN 1.0.67 theme contrast final: coherent light/dark portal UI
   Scope: visual only. Fixes unreadable sidebar items, mixed light/dark
   panels, form controls, alerts, and primary/secondary action colors.
   ============================================================ */
html body{--sn-ui-sidebar-bg:linear-gradient(180deg,#121a2b 0%,#182337 100%);--sn-ui-sidebar-border:rgba(148,163,184,.22);--sn-ui-sidebar-text:#e6eefb;--sn-ui-sidebar-muted:#c7d3e4;--sn-ui-sidebar-hover:rgba(255,255,255,.105);--sn-ui-accent:#2563eb;--sn-ui-accent-2:#0ea5e9;--sn-ui-accent-soft:#eaf4ff;--sn-ui-light-bg:#f4f7fb;--sn-ui-light-surface:#ffffff;--sn-ui-light-surface-2:#f8fafc;--sn-ui-light-text:#0f172a;--sn-ui-light-muted:#475569;--sn-ui-light-border:#dbe3ef;--sn-ui-dark-bg:#07111f;--sn-ui-dark-surface:#0f172a;--sn-ui-dark-surface-2:#111827;--sn-ui-dark-text:#f8fafc;--sn-ui-dark-muted:#cbd5e1;--sn-ui-dark-border:#334155}
html body:not(.sn-dark-mode) .sn-panel,
html body:not(.sn-dark-mode) .sn-portal,
html body:not(.sn-dark-mode) .sn-invoice-page,
html body:not(.sn-dark-mode) .sn-auth-wrap{background:linear-gradient(135deg,#eef4ff,#f8fafc)!important;color:var(--sn-ui-light-text)!important;border-color:var(--sn-ui-light-border)!important}
html body:not(.sn-dark-mode) .sn-panel-header,
html body:not(.sn-dark-mode) .sn-panel > .sn-tab-content,
html body:not(.sn-dark-mode) .sn-panel > .sn-tab-panel,
html body:not(.sn-dark-mode) .sn-card,
html body:not(.sn-dark-mode) .sn-flow-card,
html body:not(.sn-dark-mode) .sn-section,
html body:not(.sn-dark-mode) .sn-hr-section,
html body:not(.sn-dark-mode) .sn-table-wrap,
html body:not(.sn-dark-mode) .sn-kpi-card,
html body:not(.sn-dark-mode) .sn-compact-card,
html body:not(.sn-dark-mode) details.sn-card,
html body:not(.sn-dark-mode) #sn-leads-list,
html body:not(.sn-dark-mode) #sn-invoices-list,
html body:not(.sn-dark-mode) #sn-sellers-table,
html body:not(.sn-dark-mode) #sn-supervisor-invoice-list{background:var(--sn-ui-light-surface)!important;color:var(--sn-ui-light-text)!important;border-color:var(--sn-ui-light-border)!important;box-shadow:0 10px 26px rgba(15,23,42,.06)!important}
html body:not(.sn-dark-mode) .sn-panel h1,
html body:not(.sn-dark-mode) .sn-panel h2,
html body:not(.sn-dark-mode) .sn-panel h3,
html body:not(.sn-dark-mode) .sn-panel h4,
html body:not(.sn-dark-mode) .sn-panel strong,
html body:not(.sn-dark-mode) .sn-panel label,
html body:not(.sn-dark-mode) .sn-panel td,
html body:not(.sn-dark-mode) .sn-panel th,
html body:not(.sn-dark-mode) .sn-panel p,
html body:not(.sn-dark-mode) .sn-panel summary{color:var(--sn-ui-light-text)!important;text-shadow:none!important}
html body:not(.sn-dark-mode) .sn-panel small,
html body:not(.sn-dark-mode) .sn-panel em,
html body:not(.sn-dark-mode) .sn-muted,
html body:not(.sn-dark-mode) .sn-note,
html body:not(.sn-dark-mode) .sn-kpi-card small,
html body:not(.sn-dark-mode) .sn-kpi-card em{color:var(--sn-ui-light-muted)!important;text-shadow:none!important}
html body:not(.sn-dark-mode) .sn-panel input:not([type="checkbox"]):not([type="radio"]),
html body:not(.sn-dark-mode) .sn-panel select,
html body:not(.sn-dark-mode) .sn-panel textarea{background:#fff!important;color:var(--sn-ui-light-text)!important;border-color:#cbd5e1!important;box-shadow:0 1px 0 rgba(15,23,42,.03)!important}
html body:not(.sn-dark-mode) .sn-panel input::placeholder,
html body:not(.sn-dark-mode) .sn-panel textarea::placeholder{color:#64748b!important;opacity:1!important}
html body:not(.sn-dark-mode) .sn-panel input[type="file"]{background:#fff!important;color:#0f172a!important;border-color:#cbd5e1!important}
html body:not(.sn-dark-mode) .sn-panel input[type="file"]::file-selector-button{border:0;border-inline-end:1px solid #cbd5e1;background:#eef6ff;color:#1e40af;border-radius:12px;padding:8px 12px;margin-inline-end:10px;font-weight:900}
html body .sn-panel > .sn-tabs,
html body .sn-panel > .sn-panel-toolbar,
html body .sn-panel.sn-has-sidebar-tabs > .sn-tabs,
html body .sn-panel.sn-has-sidebar-tabs > .sn-panel-toolbar,
html body .sn-panel:has(> .sn-tabs) > .sn-tabs,
html body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-toolbar{background:var(--sn-ui-sidebar-bg)!important;color:var(--sn-ui-sidebar-text)!important;border-color:var(--sn-ui-sidebar-border)!important;box-shadow:0 18px 42px rgba(15,23,42,.18)!important}
html body .sn-panel > .sn-tabs::before,
html body .sn-panel > .sn-panel-toolbar::before{color:#fff!important;border-bottom-color:rgba(255,255,255,.14)!important;text-shadow:0 1px 1px rgba(2,6,23,.35)!important}
html body .sn-panel > .sn-tabs .sn-tab,
html body .sn-panel > .sn-panel-toolbar .sn-tab-button,
html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{opacity:1!important;filter:none!important;color:var(--sn-ui-sidebar-text)!important;-webkit-text-fill-color:var(--sn-ui-sidebar-text)!important;background:rgba(255,255,255,.045)!important;border-color:rgba(255,255,255,.06)!important;text-shadow:none!important;font-weight:900!important}
html body .sn-panel > .sn-tabs .sn-tab *,
html body .sn-panel > .sn-panel-toolbar .sn-tab-button *,
html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target] *{color:inherit!important;-webkit-text-fill-color:inherit!important;opacity:1!important}
html body .sn-panel > .sn-tabs .sn-tab::before,
html body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before{background:rgba(255,255,255,.18)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:rgba(255,255,255,.10)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)!important;opacity:1!important}
html body .sn-panel > .sn-tabs .sn-tab:hover,
html body .sn-panel > .sn-panel-toolbar .sn-tab-button:hover,
html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]:hover{background:var(--sn-ui-sidebar-hover)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:rgba(255,255,255,.18)!important}
html body .sn-panel > .sn-tabs .sn-tab.active,
html body .sn-panel > .sn-tabs .sn-tab.sn-tab-active,
html body .sn-panel > .sn-panel-toolbar .sn-tab-button-active,
html body .sn-panel > .sn-panel-toolbar .sn-tab-button.active,
html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target].sn-tab-button-active,
html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target].active{background:linear-gradient(135deg,var(--sn-ui-accent),var(--sn-ui-accent-2))!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:rgba(255,255,255,.24)!important;box-shadow:0 14px 28px rgba(37,99,235,.30)!important}
html body .sn-sidebar-toggle{background:rgba(255,255,255,.12)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:rgba(255,255,255,.20)!important}
html body .sn-sidebar-toggle:hover{background:rgba(255,255,255,.20)!important}
html body:not(.sn-dark-mode) table.sn-table,
html body:not(.sn-dark-mode) table.sn-table td,
html body:not(.sn-dark-mode) table.sn-table th,
html body:not(.sn-dark-mode) .sn-panel table.widefat,
html body:not(.sn-dark-mode) .sn-panel table.widefat td,
html body:not(.sn-dark-mode) .sn-panel table.widefat th{background:#fff!important;color:#0f172a!important;border-color:#e2e8f0!important}
html body:not(.sn-dark-mode) table.sn-table thead th,
html body:not(.sn-dark-mode) .sn-panel table.widefat thead th{background:#f1f5f9!important;color:#334155!important}
html body:not(.sn-dark-mode) table.sn-table tbody tr:hover td,
html body:not(.sn-dark-mode) .sn-panel table.widefat tbody tr:hover td{background:#f8fbff!important}
html body:not(.sn-dark-mode) .sn-alert,
html body:not(.sn-dark-mode) .sn-notice,
html body:not(.sn-dark-mode) .sn-inline-result{background:#eff6ff!important;color:#1e3a8a!important;border:1px solid #bfdbfe!important;box-shadow:none!important}
html body:not(.sn-dark-mode) .sn-alert *,
html body:not(.sn-dark-mode) .sn-notice *,
html body:not(.sn-dark-mode) .sn-inline-result *{color:inherit!important;-webkit-text-fill-color:inherit!important}
html body .sn-panel .sn-btn,
html body .sn-panel button.sn-btn,
html body .sn-panel input[type="submit"].sn-btn,
html body .sn-panel button[type="submit"]{background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border:1px solid rgba(14,165,233,.35)!important;border-radius:14px!important;box-shadow:none!important;font-weight:900!important}
html body .sn-panel .sn-btn:hover,
html body .sn-panel button.sn-btn:hover,
html body .sn-panel input[type="submit"].sn-btn:hover,
html body .sn-panel button[type="submit"]:hover{background:linear-gradient(135deg,#1d4ed8,#0284c7)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html body .sn-panel .sn-btn-secondary,
html body .sn-panel button.sn-btn-secondary,
html body .sn-panel input[type="submit"].sn-btn-secondary,
html body .sn-panel button[name="run_mode"][value="dry_run"]{background:#ffffff!important;color:#075985!important;-webkit-text-fill-color:#075985!important;border:1px solid #bae6fd!important;box-shadow:none!important}
html body .sn-panel .sn-btn-secondary:hover,
html body .sn-panel button.sn-btn-secondary:hover,
html body .sn-panel input[type="submit"].sn-btn-secondary:hover,
html body .sn-panel button[name="run_mode"][value="dry_run"]:hover{background:#e0f2fe!important;color:#0c4a6e!important;-webkit-text-fill-color:#0c4a6e!important;border-color:#38bdf8!important}
html body.sn-dark-mode,
html body.sn-dark-mode .site-content,
html body.sn-dark-mode .main-page-wrapper,
html body.sn-dark-mode .wd-content-layout,
html body.sn-dark-mode .website-wrapper,
html body.sn-dark-mode .wp-site-blocks,
html body.sn-dark-mode main,
html body.sn-dark-mode .entry-content{background:#07111f!important;color:#e5eefb!important}
html body.sn-dark-mode .sn-panel,
html body.sn-dark-mode .sn-portal,
html body.sn-dark-mode .sn-invoice-page,
html body.sn-dark-mode .sn-auth-wrap{background:linear-gradient(135deg,#07111f,#0b1220)!important;color:var(--sn-ui-dark-text)!important;border-color:var(--sn-ui-dark-border)!important}
html body.sn-dark-mode .sn-panel-header,
html body.sn-dark-mode .sn-panel > .sn-tab-content,
html body.sn-dark-mode .sn-panel > .sn-tab-panel,
html body.sn-dark-mode .sn-card,
html body.sn-dark-mode .sn-flow-card,
html body.sn-dark-mode .sn-section,
html body.sn-dark-mode .sn-hr-section,
html body.sn-dark-mode .sn-table-wrap,
html body.sn-dark-mode .sn-kpi-card,
html body.sn-dark-mode .sn-compact-card,
html body.sn-dark-mode details.sn-card,
html body.sn-dark-mode #sn-leads-list,
html body.sn-dark-mode #sn-invoices-list,
html body.sn-dark-mode #sn-sellers-table,
html body.sn-dark-mode #sn-supervisor-invoice-list{background:#111827!important;color:var(--sn-ui-dark-text)!important;border-color:var(--sn-ui-dark-border)!important;box-shadow:0 12px 30px rgba(0,0,0,.24)!important}
html body.sn-dark-mode .sn-panel h1,
html body.sn-dark-mode .sn-panel h2,
html body.sn-dark-mode .sn-panel h3,
html body.sn-dark-mode .sn-panel h4,
html body.sn-dark-mode .sn-panel strong,
html body.sn-dark-mode .sn-panel label,
html body.sn-dark-mode .sn-panel td,
html body.sn-dark-mode .sn-panel th,
html body.sn-dark-mode .sn-panel p,
html body.sn-dark-mode .sn-panel summary{color:var(--sn-ui-dark-text)!important;text-shadow:none!important}
html body.sn-dark-mode .sn-panel small,
html body.sn-dark-mode .sn-panel em,
html body.sn-dark-mode .sn-muted,
html body.sn-dark-mode .sn-note,
html body.sn-dark-mode .sn-kpi-card small,
html body.sn-dark-mode .sn-kpi-card em{color:var(--sn-ui-dark-muted)!important;text-shadow:none!important}
html body.sn-dark-mode .sn-panel input:not([type="checkbox"]):not([type="radio"]),
html body.sn-dark-mode .sn-panel select,
html body.sn-dark-mode .sn-panel textarea{background:#0b1220!important;color:#f8fafc!important;border-color:#475569!important;box-shadow:none!important}
html body.sn-dark-mode .sn-panel input::placeholder,
html body.sn-dark-mode .sn-panel textarea::placeholder{color:#94a3b8!important;opacity:1!important}
html body.sn-dark-mode .sn-panel input[type="file"]{background:#0b1220!important;color:#f8fafc!important;border-color:#475569!important}
html body.sn-dark-mode .sn-panel input[type="file"]::file-selector-button{border:0;border-inline-end:1px solid #475569;background:#1e293b;color:#e0f2fe;border-radius:12px;padding:8px 12px;margin-inline-end:10px;font-weight:900}
html body.sn-dark-mode table.sn-table,
html body.sn-dark-mode table.sn-table td,
html body.sn-dark-mode table.sn-table th,
html body.sn-dark-mode .sn-panel table.widefat,
html body.sn-dark-mode .sn-panel table.widefat td,
html body.sn-dark-mode .sn-panel table.widefat th{background:#111827!important;color:#e5eefb!important;border-color:#334155!important}
html body.sn-dark-mode table.sn-table thead th,
html body.sn-dark-mode .sn-panel table.widefat thead th{background:#0b1220!important;color:#f8fafc!important}
html body.sn-dark-mode table.sn-table tbody tr:hover td,
html body.sn-dark-mode .sn-panel table.widefat tbody tr:hover td{background:#1e293b!important}
html body.sn-dark-mode .sn-alert,
html body.sn-dark-mode .sn-notice,
html body.sn-dark-mode .sn-inline-result{background:#0f1f38!important;color:#dbeafe!important;border:1px solid #2563eb!important;box-shadow:none!important}
html body.sn-dark-mode .sn-alert *,
html body.sn-dark-mode .sn-notice *,
html body.sn-dark-mode .sn-inline-result *{color:inherit!important;-webkit-text-fill-color:inherit!important}
html body.sn-dark-mode .sn-panel .sn-btn-secondary,
html body.sn-dark-mode .sn-panel button.sn-btn-secondary,
html body.sn-dark-mode .sn-panel input[type="submit"].sn-btn-secondary,
html body.sn-dark-mode .sn-panel button[name="run_mode"][value="dry_run"]{background:#1e293b!important;color:#e0f2fe!important;-webkit-text-fill-color:#e0f2fe!important;border:1px solid #475569!important}
html body.sn-dark-mode .sn-panel .sn-btn-secondary:hover,
html body.sn-dark-mode .sn-panel button.sn-btn-secondary:hover,
html body.sn-dark-mode .sn-panel input[type="submit"].sn-btn-secondary:hover,
html body.sn-dark-mode .sn-panel button[name="run_mode"][value="dry_run"]:hover{background:#263449!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#60a5fa!important}
html body.sn-dark-mode .sn-dark-toggle{background:#1e293b!important;color:#f8fafc!important;-webkit-text-fill-color:#f8fafc!important;border-color:#475569!important}

/* ============================================================
   SN 1.0.67 mobile responsive final pass
   Scope: CSS only. Keeps desktop/sidebar behavior, but switches
   operational portals to mobile-first stacked layout below 900px.
   ============================================================ */
html body{overflow-x:hidden!important;}
html body .sn-panel,
html body .sn-panel *{box-sizing:border-box!important;}

@media (max-width: 1100px){
  html body .entry-content,
  html body .wp-block-post-content,
  html body main,
  html body .wp-site-blocks{max-width:100%!important;overflow-x:hidden!important;}
  html body .sn-panel,
  html body .sn-portal,
  html body .sn-invoice-page{max-width:calc(100vw - 24px)!important;width:calc(100vw - 24px)!important;margin-inline:auto!important;}
  html body .sn-panel.sn-has-sidebar-tabs,
  html body .sn-panel:has(> .sn-panel-toolbar),
  html body .sn-panel:has(> .sn-tabs){--sn-sidebar-open-width:280px;grid-template-columns:minmax(250px,var(--sn-sidebar-open-width)) minmax(0,1fr)!important;gap:14px!important;padding:14px!important;}
  html body .sn-panel > .sn-tabs,
  html body .sn-panel > .sn-panel-toolbar{padding:16px 12px!important;}
  html body .sn-panel > .sn-tabs .sn-tab,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]{font-size:.9rem!important;padding:13px 10px!important;}
}

@media (max-width: 900px){
  html body,
  html body.sn-dark-mode{min-width:0!important;}
  html body .wp-site-blocks,
  html body .entry-content,
  html body .wp-block-post-content,
  html body main,
  html body .has-global-padding{padding-inline:8px!important;margin-inline:0!important;max-width:100%!important;width:100%!important;}
  html body .wp-block-post-title{font-size:1.35rem!important;margin:12px 0 14px!important;}

  html body .sn-panel,
  html body .sn-panel.sn-has-sidebar-tabs,
  html body .sn-panel:has(> .sn-panel-toolbar),
  html body .sn-panel:has(> .sn-tabs),
  html body .sn-panel.sn-sidebar-collapsed,
  html body .sn-panel.sn-sidebar-collapsed.sn-has-sidebar-tabs,
  html body .sn-panel.sn-sidebar-collapsed:has(> .sn-panel-toolbar),
  html body .sn-panel.sn-sidebar-collapsed:has(> .sn-tabs){display:block!important;width:100%!important;max-width:100%!important;margin:10px auto!important;padding:10px!important;border-radius:22px!important;overflow:hidden!important;min-width:0!important;}

  html body .sn-sidebar-toggle{display:none!important;}

  html body .sn-panel > .sn-tabs,
  html body .sn-panel > .sn-panel-toolbar,
  html body .sn-panel.sn-has-sidebar-tabs > .sn-tabs,
  html body .sn-panel.sn-has-sidebar-tabs > .sn-panel-toolbar,
  html body .sn-panel:has(> .sn-tabs) > .sn-tabs,
  html body .sn-panel:has(> .sn-panel-toolbar) > .sn-panel-toolbar,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar{position:sticky!important;top:0!important;z-index:70!important;width:100%!important;max-width:100%!important;min-height:0!important;max-height:none!important;margin:0 0 12px!important;padding:10px!important;border-radius:20px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;scroll-snap-type:x proximity!important;overscroll-behavior-x:contain!important;box-shadow:0 12px 28px rgba(15,23,42,.16)!important;}

  html body.admin-bar .sn-panel > .sn-tabs,
  html body.admin-bar .sn-panel > .sn-panel-toolbar{top:32px!important;}

  html body .sn-panel > .sn-tabs::before,
  html body .sn-panel > .sn-panel-toolbar::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar::before{display:none!important;}

  html body .sn-panel > .sn-panel-toolbar .sn-tabs,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-nav,
  html body .sn-panel > .sn-tabs,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tabs,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-nav,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs{display:flex!important;flex-direction:row!important;align-items:stretch!important;justify-content:flex-start!important;gap:8px!important;width:max-content!important;min-width:max-content!important;max-width:none!important;overflow:visible!important;padding:0!important;margin:0!important;}

  html body .sn-panel > .sn-tabs .sn-tab,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target],
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]{display:inline-flex!important;flex:0 0 auto!important;width:auto!important;max-width:none!important;min-width:130px!important;height:auto!important;min-height:46px!important;padding:11px 12px!important;border-radius:16px!important;font-size:.88rem!important;line-height:1.35!important;text-align:center!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;scroll-snap-align:start!important;gap:8px!important;}

  html body .sn-panel > .sn-tabs .sn-tab::before,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]::before{flex:0 0 28px!important;width:28px!important;height:28px!important;font-size:16px!important;margin:0!important;}

  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab > *,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button > *,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target] > *{display:initial!important;}

  html body .sn-panel > .sn-tab-content,
  html body .sn-panel > .sn-tab-panel,
  html body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-tab-content,
  html body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-tab-panel,
  html body .sn-panel:has(> .sn-flow-steps) > .sn-tab-content,
  html body .sn-panel:has(> .sn-flow-steps) > .sn-tab-panel{display:block!important;width:100%!important;max-width:100%!important;grid-column:auto!important;grid-row:auto!important;margin:0!important;padding:12px!important;border-radius:20px!important;overflow:visible!important;min-width:0!important;}
  html body .sn-panel > .sn-tab-panel:not(.sn-tab-panel-active):not(.active),
  html body .sn-panel > .sn-tab-content:not(.active){display:none!important;}

  html body .sn-panel-header,
  html body .sn-card,
  html body details.sn-card,
  html body .sn-flow-card,
  html body .sn-section,
  html body .sn-hr-section,
  html body .sn-table-wrap{width:100%!important;max-width:100%!important;margin-inline:0!important;border-radius:18px!important;padding:14px!important;overflow:hidden!important;}
  html body .sn-panel-header{display:block!important;margin-bottom:12px!important;}
  html body .sn-panel-header h1,
  html body .sn-panel-header h2,
  html body .sn-panel-header h3{font-size:1.15rem!important;line-height:1.6!important;margin:0 0 6px!important;}
  html body .sn-panel-header p{font-size:.9rem!important;line-height:1.9!important;margin:0!important;}

  html body .sn-flow-steps,
  html body .sn-panel > .sn-flow-steps,
  html body .sn-panel.sn-has-sidebar-tabs > .sn-flow-steps,
  html body .sn-panel:has(> .sn-flow-steps) > .sn-flow-steps{display:flex!important;grid-column:auto!important;grid-row:auto!important;width:100%!important;max-width:100%!important;margin:0 0 12px!important;padding:8px!important;overflow-x:auto!important;overflow-y:hidden!important;border-radius:18px!important;gap:8px!important;scroll-snap-type:x proximity!important;}
  html body .sn-flow-steps .sn-flow-step,
  html body .sn-panel > .sn-flow-steps .sn-flow-step{flex:0 0 220px!important;min-width:220px!important;scroll-snap-align:start!important;padding:10px!important;}

  html body .sn-form-grid,
  html body .sn-compact-form-grid,
  html body .sn-filter-form,
  html body .sn-hr-three-col,
  html body .sn-hr-two-col,
  html body .sn-grid,
  html body .sn-distribution-kpis,
  html body .sn-allocation-mode-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;max-width:100%!important;}
  html body .sn-kpi-grid,
  html body .sn-hr-dashboard,
  html body .sn-stats-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;width:100%!important;}

  html body .sn-field,
  html body .sn-field-wide,
  html body .sn-full,
  html body label.sn-field{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;grid-column:1/-1!important;}
  html body .sn-panel input:not([type="checkbox"]):not([type="radio"]),
  html body .sn-panel select,
  html body .sn-panel textarea{width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:44px!important;font-size:16px!important;line-height:1.6!important;padding:10px 12px!important;border-radius:14px!important;}
  html body .sn-panel textarea{min-height:92px!important;}
  html body .sn-panel input[type="file"]{width:100%!important;max-width:100%!important;min-height:48px!important;white-space:normal!important;padding:8px!important;}
  html body .sn-panel input[type="checkbox"],
  html body .sn-panel input[type="radio"]{width:18px!important;height:18px!important;min-width:18px!important;vertical-align:middle!important;}

  html body .sn-actions,
  html body .sn-form-actions,
  html body .sn-manager-filter-actions{display:flex!important;flex-wrap:wrap!important;align-items:stretch!important;justify-content:flex-start!important;gap:8px!important;width:100%!important;max-width:100%!important;grid-column:1/-1!important;}
  html body .sn-panel .sn-btn,
  html body .sn-panel button.sn-btn,
  html body .sn-panel input[type="submit"].sn-btn,
  html body .sn-panel button[type="submit"],
  html body .sn-panel a.sn-btn{flex:1 1 160px!important;min-height:44px!important;min-width:0!important;max-width:100%!important;padding:10px 14px!important;border-radius:14px!important;white-space:normal!important;line-height:1.45!important;text-align:center!important;}

  html body .sn-table-wrap{overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;-webkit-overflow-scrolling:touch!important;}
  html body table.sn-table,
  html body .sn-panel table.widefat{width:max-content!important;min-width:680px!important;max-width:none!important;border-collapse:separate!important;}
  html body table.sn-table th,
  html body table.sn-table td,
  html body .sn-panel table.widefat th,
  html body .sn-panel table.widefat td{padding:10px 9px!important;font-size:.86rem!important;white-space:normal!important;vertical-align:top!important;}

  html body .sn-jalali-picker,
  html body .sn-datepicker,
  html body .sn-calendar{max-width:calc(100vw - 24px)!important;left:12px!important;right:12px!important;width:auto!important;}
}

@media (max-width: 600px){
  html body.admin-bar .sn-panel > .sn-tabs,
  html body.admin-bar .sn-panel > .sn-panel-toolbar{top:46px!important;}
}

@media (max-width: 520px){
  html body .wp-site-blocks,
  html body .entry-content,
  html body .wp-block-post-content,
  html body main,
  html body .has-global-padding{padding-inline:5px!important;}
  html body .sn-panel,
  html body .sn-portal,
  html body .sn-invoice-page{margin:6px auto!important;padding:8px!important;border-radius:18px!important;}
  html body .sn-panel > .sn-tabs,
  html body .sn-panel > .sn-panel-toolbar{border-radius:18px!important;margin-bottom:10px!important;padding:8px!important;}
  html body .sn-panel > .sn-tabs .sn-tab,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target],
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]{min-width:112px!important;min-height:42px!important;padding:9px 10px!important;font-size:.8rem!important;border-radius:14px!important;}
  html body .sn-panel > .sn-tabs .sn-tab::before,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before{width:25px!important;height:25px!important;flex-basis:25px!important;font-size:14px!important;border-radius:10px!important;}
  html body .sn-panel > .sn-tab-content,
  html body .sn-panel > .sn-tab-panel{padding:10px!important;border-radius:17px!important;}
  html body .sn-card,
  html body details.sn-card,
  html body .sn-flow-card,
  html body .sn-section,
  html body .sn-hr-section,
  html body .sn-panel-header{padding:12px!important;border-radius:16px!important;}
  html body .sn-kpi-grid,
  html body .sn-hr-dashboard,
  html body .sn-stats-grid{grid-template-columns:1fr!important;}
  html body .sn-kpi-card,
  html body .sn-hr-stat{min-height:auto!important;padding:12px!important;border-radius:16px!important;}
  html body .sn-actions,
  html body .sn-form-actions{display:grid!important;grid-template-columns:1fr!important;}
  html body .sn-panel .sn-btn,
  html body .sn-panel button.sn-btn,
  html body .sn-panel input[type="submit"].sn-btn,
  html body .sn-panel button[type="submit"],
  html body .sn-panel a.sn-btn{width:100%!important;flex:1 1 100%!important;}
  html body table.sn-table,
  html body .sn-panel table.widefat{min-width:620px!important;}
  html body .sn-flow-steps .sn-flow-step,
  html body .sn-panel > .sn-flow-steps .sn-flow-step{flex-basis:190px!important;min-width:190px!important;}
}


/* SN Mobile full-screen drawer override — keep sidebar/hamburger model on mobile */
@media (max-width: 900px){
  html body.sn-mobile-sidebar-lock{overflow:hidden!important;touch-action:none!important;}

  html body .sn-panel.sn-has-sidebar-tabs,
  html body .sn-panel:has(> .sn-tabs),
  html body .sn-panel:has(> .sn-panel-toolbar){
    display:block!important;
    grid-template-columns:none!important;
    position:relative!important;
    min-height:auto!important;
    overflow:visible!important;
  }

  html body .sn-mobile-sidebar-toggle{
    display:inline-flex!important;
    position:fixed!important;
    top:calc(env(safe-area-inset-top, 0px) + 12px)!important;
    right:calc(env(safe-area-inset-right, 0px) + 12px)!important;
    z-index:100004!important;
    width:52px!important;
    height:52px!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:17px!important;
    border:1px solid rgba(255,255,255,.22)!important;
    background:linear-gradient(135deg,rgba(30,41,59,.98),rgba(15,23,42,.98))!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    box-shadow:0 18px 42px rgba(2,6,23,.24),inset 0 1px 0 rgba(255,255,255,.12)!important;
    font-size:28px!important;
    font-weight:900!important;
    line-height:1!important;
    cursor:pointer!important;
  }
  html body.admin-bar .sn-mobile-sidebar-toggle{top:58px!important;}
  html body .sn-panel.sn-mobile-sidebar-open .sn-mobile-sidebar-toggle{
    background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
    border-color:rgba(255,255,255,.35)!important;
  }

  html body .sn-panel > .sn-tabs,
  html body .sn-panel > .sn-panel-toolbar,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    max-width:100vw!important;
    min-width:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    z-index:100003!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:12px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:calc(env(safe-area-inset-top, 0px) + 76px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 22px) max(16px, env(safe-area-inset-left, 0px))!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:linear-gradient(180deg,#101827 0%,#162238 100%)!important;
    box-shadow:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateX(105%)!important;
    transition:transform .22s ease, opacity .18s ease, visibility .18s ease!important;
    scroll-snap-type:none!important;
  }
  html body.admin-bar .sn-panel > .sn-tabs,
  html body.admin-bar .sn-panel > .sn-panel-toolbar,
  html body.admin-bar .sn-panel.sn-sidebar-collapsed > .sn-tabs,
  html body.admin-bar .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar{
    padding-top:calc(env(safe-area-inset-top, 0px) + 104px)!important;
  }
  html body .sn-panel.sn-mobile-sidebar-open > .sn-tabs,
  html body .sn-panel.sn-mobile-sidebar-open > .sn-panel-toolbar,
  html body .sn-panel.sn-mobile-sidebar-open.sn-sidebar-collapsed > .sn-tabs,
  html body .sn-panel.sn-mobile-sidebar-open.sn-sidebar-collapsed > .sn-panel-toolbar{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translateX(0)!important;
  }

  html body .sn-panel > .sn-tabs::before,
  html body .sn-panel > .sn-panel-toolbar::before{
    position:static!important;
    display:block!important;
    width:100%!important;
    padding:0 2px 18px!important;
    margin:0 0 8px!important;
    border-bottom:1px solid rgba(255,255,255,.16)!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font-size:1.32rem!important;
    line-height:1.6!important;
    font-weight:950!important;
    text-align:right!important;
    white-space:normal!important;
  }

  html body .sn-panel > .sn-panel-toolbar .sn-tab-nav,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-nav,
  html body .sn-panel > .sn-tabs,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    gap:10px!important;
    overflow:visible!important;
    padding:0!important;
    margin:0!important;
  }

  html body .sn-panel > .sn-tabs .sn-tab,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target],
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]{
    display:flex!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:56px!important;
    height:auto!important;
    padding:13px 14px!important;
    border-radius:18px!important;
    text-align:right!important;
    justify-content:flex-start!important;
    align-items:center!important;
    gap:12px!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    font-size:1rem!important;
    line-height:1.55!important;
    font-weight:950!important;
    color:#eaf2ff!important;
    -webkit-text-fill-color:#eaf2ff!important;
    background:rgba(255,255,255,.07)!important;
    border:1px solid rgba(255,255,255,.08)!important;
    box-shadow:none!important;
    scroll-snap-align:none!important;
  }
  html body .sn-panel > .sn-tabs .sn-tab::before,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button::before,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target]::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button::before,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]::before{
    flex:0 0 36px!important;
    width:36px!important;
    height:36px!important;
    margin:0!important;
    border-radius:13px!important;
    font-size:19px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:rgba(255,255,255,.16)!important;
  }
  html body .sn-panel > .sn-tabs .sn-tab.active,
  html body .sn-panel > .sn-tabs .sn-tab.sn-tab-active,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button-active,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button.active,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target].sn-tab-button-active,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target].active{
    background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    border-color:rgba(255,255,255,.28)!important;
    box-shadow:0 14px 32px rgba(37,99,235,.24)!important;
  }

  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab > *,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button > *,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target] > *{
    display:initial!important;
  }

  html body .sn-panel > .sn-tabs .sn-sidebar-toggle,
  html body .sn-panel > .sn-panel-toolbar .sn-sidebar-toggle{
    position:absolute!important;
    top:calc(env(safe-area-inset-top, 0px) + 12px)!important;
    right:calc(env(safe-area-inset-right, 0px) + 12px)!important;
    z-index:1!important;
    width:52px!important;
    height:52px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:17px!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    background:rgba(255,255,255,.10)!important;
    border:1px solid rgba(255,255,255,.20)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.10)!important;
  }
  html body.admin-bar .sn-panel > .sn-tabs .sn-sidebar-toggle,
  html body.admin-bar .sn-panel > .sn-panel-toolbar .sn-sidebar-toggle{top:calc(env(safe-area-inset-top, 0px) + 46px)!important;}

  html body .sn-panel > .sn-tab-content,
  html body .sn-panel > .sn-tab-panel,
  html body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-tab-content,
  html body .sn-panel.sn-has-sidebar-tabs:has(> .sn-flow-steps) > .sn-tab-panel,
  html body .sn-panel:has(> .sn-flow-steps) > .sn-tab-content,
  html body .sn-panel:has(> .sn-flow-steps) > .sn-tab-panel{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    grid-column:auto!important;
    grid-row:auto!important;
    margin:0!important;
    padding:12px!important;
    border-radius:20px!important;
    overflow:visible!important;
    min-width:0!important;
  }
  html body .sn-panel > .sn-tab-panel:not(.sn-tab-panel-active):not(.active),
  html body .sn-panel > .sn-tab-content:not(.active){display:none!important;}
}

@media (max-width: 520px){
  html body .sn-mobile-sidebar-toggle,
  html body .sn-panel > .sn-tabs .sn-sidebar-toggle,
  html body .sn-panel > .sn-panel-toolbar .sn-sidebar-toggle{
    width:48px!important;
    height:48px!important;
    border-radius:16px!important;
    font-size:25px!important;
  }
  html body .sn-panel > .sn-tabs,
  html body .sn-panel > .sn-panel-toolbar,
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar{
    padding-right:max(12px, env(safe-area-inset-right, 0px))!important;
    padding-left:max(12px, env(safe-area-inset-left, 0px))!important;
  }
  html body .sn-panel > .sn-tabs .sn-tab,
  html body .sn-panel > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel > .sn-panel-toolbar [data-sn-tab-target],
  html body .sn-panel.sn-sidebar-collapsed > .sn-tabs .sn-tab,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar .sn-tab-button,
  html body .sn-panel.sn-sidebar-collapsed > .sn-panel-toolbar [data-sn-tab-target]{
    min-width:0!important;
    width:100%!important;
    min-height:54px!important;
    padding:12px!important;
    font-size:.94rem!important;
  }
}

/* Hide mobile drawer trigger outside mobile breakpoints. */
html body .sn-mobile-sidebar-toggle{display:none!important;}
@media (max-width: 900px){html body .sn-mobile-sidebar-toggle{display:inline-flex!important;}}

/* HR lookup AJAX save feedback */
.sn-ajax-saving { opacity: .78; pointer-events: none; }
.sn-ajax-form-msg { margin-top: 10px; padding: 9px 12px; border-radius: 12px; font-size: 13px; font-weight: 800; display: none; }
.sn-ajax-form-msg.sn-success, .sn-ajax-form-msg.sn-error { display: block; }
.sn-ajax-form-msg.sn-success { color: #065f46; background: #d1fae5; border: 1px solid #a7f3d0; }
.sn-ajax-form-msg.sn-error { color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; }
body.sn-dark-mode .sn-ajax-form-msg.sn-success { color: #a7f3d0; background: rgba(16,185,129,.14); border-color: rgba(16,185,129,.35); }
body.sn-dark-mode .sn-ajax-form-msg.sn-error { color: #fecaca; background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.35); }

/* HR UX cleanup — workforce/search/bulk/modal */
body .sn-hr-header p,
body .sn-hr-workflow,
body #hr-distribution-chain,
body [data-sn-tab-target="hr-distribution-chain"]{display:none!important;}
body .sn-hr-workforce-toolbar{display:grid!important;grid-template-columns:minmax(240px,1.4fr) repeat(3,minmax(150px,.8fr)) auto;gap:14px;align-items:end;margin:18px 0;padding:16px;border:1px solid rgba(148,163,184,.28);border-radius:18px;background:rgba(248,250,252,.72)}
body.sn-dark-mode .sn-hr-workforce-toolbar{background:rgba(15,23,42,.58);border-color:rgba(148,163,184,.18)}
body .sn-hr-workforce-toolbar label,
body .sn-hr-selection-bar-clean label,
body .sn-hr-bulk-layout-clean label{display:flex!important;flex-direction:column;gap:7px;font-weight:800;color:#0f172a}
body.sn-dark-mode .sn-hr-workforce-toolbar label,
body.sn-dark-mode .sn-hr-selection-bar-clean label,
body.sn-dark-mode .sn-hr-bulk-layout-clean label{color:#e5edf8}
body .sn-hr-selection-bar-clean{display:flex!important;flex-wrap:wrap;align-items:center;gap:12px;margin:14px 0 18px;padding:14px 16px;border:1px solid rgba(148,163,184,.28);border-radius:18px;background:rgba(255,255,255,.72)}
body.sn-dark-mode .sn-hr-selection-bar-clean{background:rgba(15,23,42,.62);border-color:rgba(148,163,184,.18)}
body .sn-hr-selection-bar-clean .sn-btn{align-self:center;white-space:nowrap}
body .sn-hr-table-filter-row th{padding:8px!important;background:rgba(241,245,249,.72)!important}
body.sn-dark-mode .sn-hr-table-filter-row th{background:rgba(15,23,42,.88)!important}
body .sn-hr-table-filter-row input{width:100%;min-width:90px;border-radius:12px;padding:8px 10px;font-size:12px;border:1px solid rgba(148,163,184,.4);background:#fff;color:#0f172a}
body.sn-dark-mode .sn-hr-table-filter-row input{background:#0b1220;color:#f8fafc;border-color:rgba(148,163,184,.28)}
body .sn-hr-workforce-table th, body .sn-hr-workforce-table td{vertical-align:middle!important;white-space:normal!important;line-height:1.75}
body .sn-hr-workforce-table td:nth-child(3){font-weight:800;color:#0f172a}
body.sn-dark-mode .sn-hr-workforce-table td:nth-child(3){color:#f8fafc}
body .sn-hr-profile-modal[hidden]{display:none!important}
body .sn-hr-profile-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:24px;direction:rtl}
body .sn-hr-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.58);backdrop-filter:blur(6px)}
body .sn-hr-modal-dialog{position:relative;width:min(880px,94vw);max-height:88vh;overflow:auto;border-radius:24px;padding:18px;background:#fff;color:#0f172a;border:1px solid rgba(148,163,184,.35);box-shadow:0 26px 80px rgba(15,23,42,.35)}
body.sn-dark-mode .sn-hr-modal-dialog{background:#111827;color:#f8fafc;border-color:rgba(148,163,184,.22)}
body .sn-hr-modal-head, body .sn-hr-modal-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid rgba(148,163,184,.24)}
body .sn-hr-modal-actions{justify-content:flex-start;border-bottom:0;border-top:1px solid rgba(148,163,184,.24);padding-top:12px;margin-top:12px;margin-bottom:0;padding-bottom:0}
body .sn-hr-modal-title{font-size:18px;font-weight:900}
body.sn-hr-modal-open{overflow:hidden}
body .sn-hr-bulk-layout-clean{display:grid;grid-template-columns:minmax(260px,1.05fr) minmax(240px,.8fr) minmax(300px,1.1fr);gap:16px;align-items:start}
body .sn-hr-bulk-layout-clean>.sn-card{height:auto!important;min-height:0!important}
body .sn-hr-bulk-users{max-height:460px;overflow:auto;border:1px solid rgba(148,163,184,.25);border-radius:16px;padding:10px;background:rgba(248,250,252,.58)}
body.sn-dark-mode .sn-hr-bulk-users{background:rgba(2,6,23,.28);border-color:rgba(148,163,184,.16)}
body .sn-hr-bulk-user-row{padding:9px 8px;border-radius:12px;border-bottom:1px solid rgba(148,163,184,.12);font-weight:700!important}
body .sn-hr-bulk-user-row:hover{background:rgba(37,99,235,.08)}
body.sn-dark-mode .sn-hr-bulk-user-row:hover{background:rgba(96,165,250,.12)}
body .sn-hr-bulk-field-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body .sn-hr-bulk-field-group[style*="display: none"]{display:none!important}
body .sn-hr-bulk-submit{margin-top:16px;justify-content:flex-start!important}
body .sn-hr-download-links{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:10px 0 18px;padding:12px 14px;border:1px dashed rgba(37,99,235,.35);border-radius:16px;background:rgba(239,246,255,.8);font-weight:800}
body.sn-dark-mode .sn-hr-download-links{background:rgba(30,41,59,.72);border-color:rgba(96,165,250,.35)}
body .sn-ajax-form-msg{margin:0 0 14px!important}
body .sn-ajax-saving{opacity:.72;pointer-events:none}
@media (max-width:900px){
  body .sn-hr-workforce-toolbar{grid-template-columns:1fr!important}
  body .sn-hr-bulk-layout-clean{grid-template-columns:1fr!important}
  body .sn-hr-bulk-field-group{grid-template-columns:1fr!important}
  body .sn-hr-selection-bar-clean{align-items:stretch;flex-direction:column}
  body .sn-hr-selection-bar-clean .sn-btn, body .sn-hr-selection-bar-clean select{width:100%}
  body .sn-hr-profile-modal{padding:10px;align-items:stretch}
  body .sn-hr-modal-dialog{width:100%;max-height:calc(100vh - 20px);border-radius:18px}
}


/* HR workforce inline Excel-like table controls */
body .sn-hr-workforce-toolbar-clean{grid-template-columns:minmax(260px,1fr) auto!important;align-items:end!important}
body .sn-hr-workforce-table thead th{position:relative;white-space:nowrap;vertical-align:middle!important}
body .sn-hr-workforce-table .sn-hr-th-label{display:inline-flex;align-items:center;gap:6px;padding-left:26px}
body .sn-hr-excel-filter-btn{position:absolute;left:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;border-radius:8px;border:1px solid rgba(148,163,184,.38);background:rgba(255,255,255,.82);color:#334155;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-weight:900;line-height:1;box-shadow:0 4px 12px rgba(15,23,42,.08)}
body .sn-hr-excel-filter-btn:hover,body .sn-hr-excel-filter-btn.is-open{background:#e0f2fe;color:#0369a1;border-color:#7dd3fc}
body.sn-dark-mode .sn-hr-excel-filter-btn{background:rgba(15,23,42,.92);color:#dbeafe;border-color:rgba(148,163,184,.34)}
body.sn-dark-mode .sn-hr-excel-filter-btn:hover,body.sn-dark-mode .sn-hr-excel-filter-btn.is-open{background:#1e40af;color:#fff;border-color:#60a5fa}
body .sn-hr-table-filter-row{display:none!important}
body .sn-hr-workforce-table select.sn-hr-inline-autosave{min-width:132px;max-width:190px;width:100%;height:38px;border-radius:12px;border:1px solid rgba(148,163,184,.45);background:#fff;color:#0f172a;padding:6px 10px;font-size:13px;font-weight:800;box-shadow:0 4px 14px rgba(15,23,42,.04)}
body .sn-hr-workforce-table select.sn-hr-inline-autosave:focus{outline:none;border-color:#38bdf8;box-shadow:0 0 0 3px rgba(56,189,248,.18)}
body.sn-dark-mode .sn-hr-workforce-table select.sn-hr-inline-autosave{background:#0b1220;color:#e5edf8;border-color:rgba(148,163,184,.28)}
body .sn-hr-row-save-state{display:block;min-height:18px;margin-top:6px;font-size:11px;font-weight:800;color:#0f766e;white-space:nowrap}
body .sn-hr-row-save-state.is-error{color:#dc2626}
body .sn-hr-workforce-table tr.sn-row-saving{opacity:.72}
body .sn-hr-excel-filter-menu{position:fixed;z-index:100000;background:#fff;color:#0f172a;border:1px solid rgba(148,163,184,.35);border-radius:16px;box-shadow:0 24px 70px rgba(15,23,42,.24);padding:12px;direction:rtl;font-size:13px}
body.sn-dark-mode .sn-hr-excel-filter-menu{background:#0f172a;color:#e5edf8;border-color:rgba(148,163,184,.25);box-shadow:0 24px 80px rgba(0,0,0,.5)}
body .sn-hr-excel-filter-title{font-weight:900;margin-bottom:8px;color:inherit}
body .sn-hr-excel-filter-search{width:100%;height:38px;border-radius:12px;border:1px solid rgba(148,163,184,.38);padding:7px 10px;margin-bottom:8px;background:#f8fafc;color:#0f172a}
body.sn-dark-mode .sn-hr-excel-filter-search{background:#020617;color:#e5edf8;border-color:rgba(148,163,184,.28)}
body .sn-hr-excel-filter-values{max-height:240px;overflow:auto;border:1px solid rgba(148,163,184,.18);border-radius:12px;padding:6px;background:rgba(248,250,252,.72)}
body.sn-dark-mode .sn-hr-excel-filter-values{background:rgba(2,6,23,.54);border-color:rgba(148,163,184,.16)}
body .sn-hr-excel-value,body .sn-hr-excel-select-all{display:flex!important;align-items:center;gap:8px;padding:6px 8px;border-radius:9px;cursor:pointer;font-weight:700;color:inherit}
body .sn-hr-excel-value:hover,body .sn-hr-excel-select-all:hover{background:rgba(14,165,233,.11)}
body .sn-hr-excel-filter-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}
@media(max-width:720px){body .sn-hr-workforce-toolbar-clean{grid-template-columns:1fr!important}body .sn-hr-workforce-table select.sn-hr-inline-autosave{min-width:140px}body .sn-hr-excel-filter-menu{left:10px!important;right:10px!important;width:auto!important;max-width:none}}

/* HR workforce: final table filter and grouped action polish */
body .sn-hr-workforce-table thead th[data-sn-label],
body .sn-hr-workforce-table thead th:has(.sn-hr-excel-filter-btn){
  padding-left:42px!important;
  min-width:110px;
}
body .sn-hr-workforce-table thead th .sn-hr-excel-filter-btn{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:4!important;
}
body .sn-hr-workforce-table thead th .sn-hr-th-label{
  padding-left:0!important;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
body .sn-hr-workforce-table thead th:first-child,
body .sn-hr-workforce-table thead th:last-child{
  padding-left:14px!important;
}
body .sn-hr-selection-bar-clean{
  display:grid!important;
  grid-template-columns:minmax(190px,.9fr) minmax(120px,.55fr) minmax(210px,.9fr) minmax(190px,.8fr) auto auto!important;
  align-items:center!important;
  gap:12px!important;
  padding:16px 18px!important;
}
body .sn-hr-selection-bar-clean > label,
body .sn-hr-selection-bar-clean > span{
  margin:0!important;
  min-width:0!important;
}
body .sn-hr-selection-bar-clean > span{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
body .sn-hr-selection-bar-clean label.sn-check{
  flex-direction:row!important;
  align-items:center!important;
  justify-content:flex-start!important;
  white-space:nowrap!important;
}
body .sn-hr-selection-bar-clean label:not(.sn-check){
  display:grid!important;
  grid-template-columns:auto minmax(150px,1fr)!important;
  align-items:center!important;
  gap:8px!important;
  white-space:nowrap!important;
}
body .sn-hr-selection-bar-clean select{
  min-height:42px!important;
}
body .sn-hr-selection-bar-clean .sn-btn{
  height:46px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding-inline:18px!important;
}
body .sn-hr-bulk-selected-summary{
  display:inline-flex!important;
  width:max-content!important;
  margin:0 0 12px!important;
  padding:7px 12px!important;
}
body .sn-hr-excel-filter-menu{
  min-width:250px!important;
}
@media(max-width:1280px){
  body .sn-hr-selection-bar-clean{
    grid-template-columns:repeat(2,minmax(220px,1fr))!important;
  }
  body .sn-hr-selection-bar-clean .sn-btn{width:100%!important;}
}
@media(max-width:720px){
  body .sn-hr-selection-bar-clean{
    grid-template-columns:1fr!important;
  }
  body .sn-hr-selection-bar-clean label:not(.sn-check){
    grid-template-columns:1fr!important;
  }
}

/* HR workforce: true in-header spreadsheet filters */
body .sn-hr-workforce-table thead th[data-sn-label]{
  padding:12px 14px!important;
  min-width:118px;
  vertical-align:middle!important;
}
body .sn-hr-workforce-table thead th .sn-hr-th-inner{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
  white-space:nowrap!important;
  line-height:1.4!important;
}
body .sn-hr-workforce-table thead th .sn-hr-th-label{
  display:inline-block!important;
  padding:0!important;
  max-width:calc(100% - 28px)!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  vertical-align:middle!important;
}
body .sn-hr-workforce-table .sn-hr-excel-filter-btn,
body .sn-hr-workforce-table thead th .sn-hr-excel-filter-btn{
  position:static!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  width:21px!important;
  min-width:21px!important;
  height:21px!important;
  margin:0!important;
  padding:0!important;
  border-radius:7px!important;
  border:0!important;
  background:transparent!important;
  color:#15803d!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:15px!important;
  line-height:1!important;
  cursor:pointer!important;
}
body .sn-hr-workforce-table .sn-hr-excel-filter-btn:hover,
body .sn-hr-workforce-table .sn-hr-excel-filter-btn.is-open,
body .sn-hr-workforce-table .sn-hr-excel-filter-btn.is-filtered{
  background:rgba(34,197,94,.12)!important;
  color:#166534!important;
}
body.sn-dark-mode .sn-hr-workforce-table .sn-hr-excel-filter-btn{
  color:#86efac!important;
}
body.sn-dark-mode .sn-hr-workforce-table .sn-hr-excel-filter-btn:hover,
body.sn-dark-mode .sn-hr-workforce-table .sn-hr-excel-filter-btn.is-open,
body.sn-dark-mode .sn-hr-workforce-table .sn-hr-excel-filter-btn.is-filtered{
  background:rgba(34,197,94,.18)!important;
  color:#bbf7d0!important;
}
body .sn-hr-workforce-table thead th:first-child,
body .sn-hr-workforce-table thead th:last-child{
  padding:12px 14px!important;
}
body .sn-hr-excel-filter-menu{
  width:280px!important;
  max-width:min(280px,calc(100vw - 24px))!important;
  border-radius:14px!important;
  padding:12px!important;
}
body .sn-hr-excel-filter-title{
  font-size:13px!important;
  font-weight:900!important;
  margin-bottom:8px!important;
}
body .sn-hr-excel-filter-search{
  box-sizing:border-box!important;
}
body .sn-hr-excel-filter-actions .sn-hr-excel-apply{display:none!important;}
body .sn-hr-workforce-toolbar-clean .sn-hr-search-wide input.sn-hr-live-search{
  min-width:min(420px,100%)!important;
}
@media(max-width:720px){
  body .sn-hr-workforce-table thead th .sn-hr-th-inner{justify-content:flex-start!important;}
  body .sn-hr-workforce-table thead th[data-sn-label]{min-width:130px;}
}

/* MIS operator cleanup */

body .sn-mis-workbench{
  border:1px solid rgba(37,99,235,.18)!important;
  background:linear-gradient(135deg,rgba(239,246,255,.92),rgba(255,255,255,.96))!important;
  margin-bottom:16px!important;
}
body.sn-dark-mode .sn-mis-workbench{background:linear-gradient(135deg,rgba(30,41,59,.92),rgba(15,23,42,.96))!important;border-color:rgba(96,165,250,.24)!important;}
body .sn-mis-workbench-hero{display:grid!important;grid-template-columns:minmax(0,1.5fr) minmax(280px,.75fr)!important;gap:18px!important;align-items:stretch!important;}
body .sn-mis-workbench-hero h3{margin:8px 0!important;font-size:26px!important;font-weight:950!important;color:#0f172a!important;}
body .sn-mis-workbench-hero p{margin:0!important;font-size:15px!important;line-height:2!important;font-weight:800!important;color:#334155!important;}
body.sn-dark-mode .sn-mis-workbench-hero h3{color:#f8fafc!important;} body.sn-dark-mode .sn-mis-workbench-hero p{color:#dbeafe!important;}
body .sn-mis-primary-action-card{display:flex!important;flex-direction:column!important;gap:10px!important;border-radius:20px!important;padding:18px!important;background:#0f172a!important;color:#fff!important;box-shadow:0 18px 45px rgba(15,23,42,.18)!important;}
body .sn-mis-primary-action-card strong{font-size:18px!important;font-weight:950!important;color:#fff!important;}
body .sn-mis-primary-action-card span{font-size:13px!important;line-height:1.9!important;font-weight:750!important;color:#dbeafe!important;}
body .sn-mis-primary-action-card .sn-btn{width:100%!important;justify-content:center!important;margin-top:auto!important;background:#fff!important;color:#0f172a!important;border-color:#fff!important;}
body .sn-mis-plain-funnel{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:10px!important;margin-top:18px!important;}
body .sn-mis-plain-funnel>div{position:relative;border:1px solid rgba(148,163,184,.25)!important;border-radius:18px!important;background:rgba(255,255,255,.9)!important;padding:14px 12px!important;min-height:105px!important;}
body.sn-dark-mode .sn-mis-plain-funnel>div{background:rgba(15,23,42,.72)!important;border-color:rgba(148,163,184,.22)!important;}
body .sn-mis-plain-funnel strong{display:block!important;font-size:25px!important;line-height:1!important;font-weight:950!important;color:#2563eb!important;margin-bottom:8px!important;}
body .sn-mis-plain-funnel span{display:block!important;font-size:13px!important;font-weight:950!important;color:#0f172a!important;margin-bottom:5px!important;}
body .sn-mis-plain-funnel small{display:block!important;font-size:11px!important;line-height:1.8!important;font-weight:750!important;color:#64748b!important;}
body.sn-dark-mode .sn-mis-plain-funnel strong{color:#60a5fa!important;} body.sn-dark-mode .sn-mis-plain-funnel span{color:#f8fafc!important;} body.sn-dark-mode .sn-mis-plain-funnel small{color:#cbd5e1!important;}
body .sn-mis-simple-board{margin-bottom:16px!important;}
body .sn-mis-operator-table th, body .sn-mis-operator-table td{vertical-align:middle!important;white-space:nowrap!important;}
body .sn-mis-operator-table td:first-child{white-space:normal!important;min-width:210px!important;}
body .sn-mis-operator-table .sn-btn{padding:8px 12px!important;min-height:auto!important;}
body .sn-mis-operator-help{margin-bottom:16px!important;}

body .sn-mis-action-card{margin:14px 0!important;border-color:rgba(34,197,94,.22)!important;background:rgba(240,253,244,.72)!important;}
body.sn-dark-mode .sn-mis-action-card{background:rgba(20,83,45,.18)!important;border-color:rgba(34,197,94,.24)!important;}
body .sn-mis-primary-form{margin:0!important;align-items:end!important;}
body .sn-mis-primary-form .sn-section-title-row{margin-bottom:4px!important;}
body .sn-mis-primary-form .sn-section-title-row h3{margin:0!important;font-size:18px!important;font-weight:950!important;}
body .sn-mis-secondary-details{margin-bottom:16px!important;}
body .sn-mis-secondary-details>summary{cursor:pointer!important;font-weight:900!important;padding:4px 0!important;}
body .sn-mis-operator-help h3{margin:0 0 12px!important;font-size:18px!important;font-weight:950!important;}
@media(max-width:1100px){body .sn-mis-plain-funnel{grid-template-columns:repeat(3,minmax(0,1fr))!important;} body .sn-mis-workbench-hero{grid-template-columns:1fr!important;}}
@media(max-width:640px){body .sn-mis-plain-funnel{grid-template-columns:1fr!important;} body .sn-mis-workbench-hero h3{font-size:22px!important;}}

body .sn-mis-top-summary{
  display:grid!important;
  grid-template-columns:minmax(0,2fr) minmax(280px,1fr)!important;
  gap:16px!important;
  align-items:stretch!important;
  margin-bottom:18px!important;
}
body .sn-mis-dashboard-grid{
  margin:0!important;
}
body .sn-mis-stat-card{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  min-height:96px!important;
  justify-content:center!important;
}
body .sn-mis-stat-card strong{
  font-size:28px!important;
  line-height:1!important;
  color:#2563eb!important;
}
body .sn-mis-stat-card span{
  font-weight:800!important;
  color:#1e293b!important;
}
body.sn-dark-mode .sn-mis-stat-card span{color:#dbeafe!important;}
body.sn-dark-mode .sn-mis-stat-card strong{color:#60a5fa!important;}
body .sn-mis-last-import-card h3,
body .sn-mis-import-result h3,
body .sn-mis-guide-compact h3{
  margin:0 0 12px!important;
  font-size:18px!important;
  font-weight:900!important;
}
body .sn-mis-result-badges{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin:10px 0!important;
}
body .sn-mis-guide-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
body .sn-mis-guide-grid>div{
  border:1px solid rgba(148,163,184,.24)!important;
  border-radius:18px!important;
  padding:14px!important;
  background:rgba(248,250,252,.8)!important;
}
body.sn-dark-mode .sn-mis-guide-grid>div{
  background:rgba(15,23,42,.72)!important;
  border-color:rgba(148,163,184,.22)!important;
}
body .sn-mis-guide-grid strong{
  display:block!important;
  margin-bottom:8px!important;
  font-size:14px!important;
  color:#0f172a!important;
}
body .sn-mis-guide-grid span{
  display:block!important;
  color:#475569!important;
  font-size:13px!important;
  line-height:1.9!important;
  font-weight:700!important;
}
body.sn-dark-mode .sn-mis-guide-grid strong{color:#f8fafc!important;}
body.sn-dark-mode .sn-mis-guide-grid span{color:#cbd5e1!important;}
body .sn-mis-batch-form label small{
  display:block!important;
  margin-top:6px!important;
  color:#64748b!important;
  font-size:12px!important;
  line-height:1.7!important;
  font-weight:700!important;
}
body.sn-dark-mode .sn-mis-batch-form label small{color:#aebbd0!important;}
body .sn-mis-sample-download{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:center!important;
  gap:12px!important;
  padding:12px 14px!important;
  border:1px dashed rgba(37,99,235,.3)!important;
  border-radius:18px!important;
  background:rgba(239,246,255,.72)!important;
  margin-bottom:14px!important;
}
body.sn-dark-mode .sn-mis-sample-download{
  background:rgba(30,41,59,.72)!important;
  border-color:rgba(96,165,250,.35)!important;
}
body .sn-mis-sample-download span{
  font-weight:800!important;
  color:#334155!important;
}
body.sn-dark-mode .sn-mis-sample-download span{color:#dbeafe!important;}
body .sn-mis-import-result details,
body .sn-mis-last-import-card details{
  margin-top:12px!important;
}
body .sn-mis-delivery-inline{
  margin-top:16px!important;
}
body .sn-mis-delivery-inline .sn-card,
body .sn-mis-delivery-inline details.sn-card{
  margin-top:0!important;
}
@media(max-width:980px){
  body .sn-mis-top-summary{grid-template-columns:1fr!important;}
  body .sn-mis-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:640px){
  body .sn-mis-guide-grid{grid-template-columns:1fr!important;}
  body .sn-mis-stat-card{min-height:78px!important;}
}

/* HR password tools and modal save polish */
.sn-hr-password-card{
  margin-top:16px;
  padding:16px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:18px;
  background:rgba(248,250,252,.82);
}
.sn-hr-password-card h4{margin:0 0 8px;font-size:15px;font-weight:900;color:#0f172a}
.sn-hr-password-card .sn-note{margin:0 0 12px;color:#64748b;font-size:12px}
.sn-hr-password-grid{align-items:end}
.sn-hr-password-state,.sn-hr-row-save-state{display:inline-flex;align-items:center;min-height:28px;margin-inline-start:8px;font-size:12px;font-weight:800;color:#475569}
.sn-hr-password-state.is-ok,.sn-hr-row-save-state.is-ok{color:#047857}
.sn-hr-password-state.is-error,.sn-hr-row-save-state.is-error{color:#dc2626}
.sn-hr-password-tools{margin-top:16px}
.sn-hr-password-toolbar{grid-template-columns:1.2fr minmax(180px,240px) minmax(180px,240px) auto;align-items:end}
.sn-hr-modal-actions .sn-check{margin-inline-end:auto;white-space:nowrap}
body.sn-dark-mode .sn-hr-password-card{background:rgba(15,23,42,.72);border-color:rgba(148,163,184,.22)}
body.sn-dark-mode .sn-hr-password-card h4{color:#f8fafc}
body.sn-dark-mode .sn-hr-password-card .sn-note{color:#cbd5e1}
@media (max-width: 760px){.sn-hr-password-toolbar{grid-template-columns:1fr}.sn-hr-modal-actions{flex-wrap:wrap}.sn-hr-modal-actions .sn-check{width:100%}}

/* HR bulk password modal */
body .sn-hr-bulk-password-modal[hidden]{display:none!important}
body .sn-hr-bulk-password-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:24px;direction:rtl}
body .sn-hr-bulk-password-modal .sn-hr-modal-dialog{width:min(680px,94vw)}
body .sn-hr-bulk-password-state{display:block;margin-top:10px;font-weight:800;color:#2563eb}
body .sn-hr-bulk-password-state.is-ok{color:#059669}
body .sn-hr-bulk-password-state.is-error{color:#dc2626}
body .sn-hr-selection-bar-clean .sn-hr-open-bulk-password-modal{white-space:nowrap}
body.sn-dark-mode .sn-hr-bulk-password-state{color:#93c5fd}
body.sn-dark-mode .sn-hr-bulk-password-state.is-ok{color:#86efac}
body.sn-dark-mode .sn-hr-bulk-password-state.is-error{color:#fca5a5}
@media (max-width:760px){
  body .sn-hr-bulk-password-modal{padding:10px;align-items:stretch}
  body .sn-hr-bulk-password-modal .sn-hr-modal-dialog{width:100%;max-height:calc(100vh - 20px);border-radius:18px}
}

/* Seller leads source badges */
.sn-lead-source-badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 8px;
  border-radius:999px;
  font-size:.74rem;
  line-height:1.7;
  font-weight:800;
  background:#eef2ff;
  color:#3730a3;
  border:1px solid rgba(99,102,241,.22);
  white-space:nowrap;
}
.sn-lead-source-badge-wrap{margin-top:5px;display:flex;flex-wrap:wrap;gap:4px}
.sn-extra-approved-badge{background:#ecfdf5;color:#047857;border-color:rgba(16,185,129,.22)}
.sn-mis-delivered-badge{background:#eff6ff;color:#1d4ed8;border-color:rgba(59,130,246,.22)}


/* SN 1.0.67 seller panel badges + repeat action form polish */
#sn-seller-panel .sn-tab{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#sn-seller-panel .sn-tab-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  padding:0 8px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font-weight:800;
  font-size:.9rem;
  line-height:1;
  box-shadow:0 10px 24px rgba(239,68,68,.22);
  flex:0 0 auto;
}
#sn-seller-panel .sn-tab-badge[hidden]{display:none!important}
#sn-seller-panel .sn-tab.active .sn-tab-badge{
  background:#ffffff;
  color:#2563eb;
  box-shadow:0 10px 24px rgba(255,255,255,.28);
}

#sn-tab-repeat-actions .sn-paid-referral-actions .sn-table td:last-child,
#sn-tab-repeat-actions .sn-paid-referral-actions .sn-table th:last-child{
  min-width:460px;
}
#sn-tab-repeat-actions .sn-paid-referral-actions details.sn-inline-edit{
  display:block;
  width:100%;
  margin-bottom:10px;
}
#sn-tab-repeat-actions .sn-paid-referral-actions details.sn-inline-edit > summary{
  list-style:none;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
#sn-tab-repeat-actions .sn-paid-referral-actions details.sn-inline-edit > summary::-webkit-details-marker{display:none}
#sn-tab-repeat-actions .sn-paid-referral-actions details.sn-inline-edit[open] > summary{
  margin-bottom:12px;
}
#sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  padding:14px;
  border:1px solid #dbeafe;
  background:linear-gradient(180deg,#f8fbff 0%,#eff6ff 100%);
  border-radius:18px;
}
#sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-weight:700;
  color:#0f172a;
}
#sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form label:nth-of-type(5){
  grid-column:1 / -1;
}
#sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form .sn-actions{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
#sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form input,
#sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form select{
  width:100%;
}
#sn-tab-repeat-actions .sn-paid-referral-actions td .sn-btn{
  margin:4px 0;
}

@media (max-width: 900px){
  #sn-seller-panel .sn-tab{
    gap:8px;
  }
  #sn-seller-panel .sn-tab-badge{
    min-width:24px;
    height:24px;
    font-size:.82rem;
  }
  #sn-tab-repeat-actions .sn-paid-referral-actions .sn-table td:last-child,
  #sn-tab-repeat-actions .sn-paid-referral-actions .sn-table th:last-child{
    min-width:320px;
  }
  #sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form{
    grid-template-columns:minmax(0,1fr);
  }
  #sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form label:nth-of-type(5),
  #sn-tab-repeat-actions .sn-paid-referral-actions .sn-repeat-action-invoice-form .sn-actions{
    grid-column:auto;
  }
}


/* SN 1.0.67 repeat action cancelled rows */
#sn-tab-repeat-actions .sn-repeat-action-cancelled{
  opacity:.82;
}
#sn-tab-repeat-actions .sn-repeat-action-cancelled td{
  background:#fff7ed!important;
}
#sn-tab-repeat-actions .sn-repeat-cancelled-box{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:flex-start;
  padding:10px 12px;
  border:1px solid #fed7aa;
  border-radius:14px;
  background:#fffaf3;
}
#sn-tab-repeat-actions .sn-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:6px 12px;
  font-weight:900;
  font-size:.86rem;
}
#sn-tab-repeat-actions .sn-status-danger{
  background:#fee2e2;
  color:#b91c1c;
  border:1px solid #fecaca;
}


/* SN seller resend-to-finance permission/modal polish */
#sn-seller-resend-modal.sn-seller-resend-modal{
  position:fixed!important;
  inset:0!important;
  z-index:999999!important;
  display:none;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
  direction:rtl!important;
}
#sn-seller-resend-modal.sn-seller-resend-modal[aria-hidden="false"]{
  display:flex!important;
}
#sn-seller-resend-modal .sn-modal-backdrop{
  position:absolute!important;
  inset:0!important;
  background:rgba(15,23,42,.58)!important;
  backdrop-filter:blur(5px)!important;
}
#sn-seller-resend-modal .sn-seller-resend-card{
  position:relative!important;
  width:min(760px,calc(100vw - 42px))!important;
  max-height:min(86vh,760px)!important;
  overflow:auto!important;
  border-radius:26px!important;
  background:#fff!important;
  border:1px solid rgba(191,219,254,.9)!important;
  box-shadow:0 30px 90px rgba(15,23,42,.28)!important;
  padding:0!important;
  color:#0f172a!important;
}
#sn-seller-resend-modal .sn-resend-head{
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:16px!important;
  padding:22px 24px 16px!important;
  border-bottom:1px solid #e5edf8!important;
  background:linear-gradient(135deg,#f8fbff 0%,#eff6ff 100%)!important;
}
#sn-seller-resend-modal .sn-modal-kicker{
  display:inline-flex!important;
  margin-bottom:8px!important;
  padding:5px 10px!important;
  border-radius:999px!important;
  background:#dbeafe!important;
  color:#1d4ed8!important;
  font-weight:800!important;
  font-size:12px!important;
}
#sn-seller-resend-modal h3{
  margin:0!important;
  font-size:22px!important;
  line-height:1.5!important;
  color:#0f172a!important;
}
#sn-seller-resend-modal .sn-modal-x{
  width:42px!important;
  height:42px!important;
  border:0!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#334155!important;
  font-size:24px!important;
  line-height:1!important;
  cursor:pointer!important;
  box-shadow:0 8px 20px rgba(15,23,42,.08)!important;
}
#sn-seller-resend-modal .sn-resend-body{
  padding:22px 24px 24px!important;
}
#sn-seller-resend-modal .sn-resend-help{
  margin:0 0 18px!important;
  padding:12px 14px!important;
  border:1px solid #bfdbfe!important;
  border-radius:16px!important;
  background:#eff6ff!important;
  color:#1e3a8a!important;
  line-height:1.9!important;
  font-size:14px!important;
}
#sn-seller-resend-modal .sn-resend-form-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
#sn-seller-resend-modal .sn-field{
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
  margin:0!important;
  font-size:14px!important;
  font-weight:800!important;
  color:#1f2937!important;
}
#sn-seller-resend-modal .sn-field span{
  font-size:14px!important;
  color:#334155!important;
}
#sn-seller-resend-modal .sn-full{
  grid-column:1/-1!important;
}
#sn-seller-resend-modal input,
#sn-seller-resend-modal textarea{
  width:100%!important;
  min-height:46px!important;
  box-sizing:border-box!important;
  border:1px solid #cbd5e1!important;
  border-radius:14px!important;
  background:#fff!important;
  color:#0f172a!important;
  padding:10px 12px!important;
  font-size:14px!important;
  line-height:1.6!important;
  outline:none!important;
}
#sn-seller-resend-modal textarea{
  min-height:94px!important;
  resize:vertical!important;
}
#sn-seller-resend-modal input:focus,
#sn-seller-resend-modal textarea:focus{
  border-color:#60a5fa!important;
  box-shadow:0 0 0 4px rgba(96,165,250,.18)!important;
}
#sn-seller-resend-modal .sn-resend-receipt-field{
  padding:14px!important;
  border:1px dashed #93c5fd!important;
  border-radius:18px!important;
  background:#f8fbff!important;
}
#sn-seller-resend-modal .sn-resend-receipt-field small{
  color:#64748b!important;
  font-weight:600!important;
}
#sn-seller-resend-modal .sn-resend-msg{
  margin-top:14px!important;
}
#sn-seller-resend-modal .sn-resend-actions{
  display:flex!important;
  justify-content:flex-start!important;
  gap:10px!important;
  margin-top:18px!important;
  padding-top:16px!important;
  border-top:1px solid #eef2f7!important;
}
#sn-seller-resend-modal .sn-resend-actions .sn-btn{
  min-height:44px!important;
  border-radius:14px!important;
  padding:10px 18px!important;
  font-size:14px!important;
}
@media(max-width:720px){
  #sn-seller-resend-modal.sn-seller-resend-modal{padding:12px!important;align-items:flex-start!important;overflow:auto!important}
  #sn-seller-resend-modal .sn-seller-resend-card{width:calc(100vw - 24px)!important;max-height:none!important;margin:12px 0!important}
  #sn-seller-resend-modal .sn-resend-head{padding:18px 16px 14px!important}
  #sn-seller-resend-modal .sn-resend-body{padding:18px 16px!important}
  #sn-seller-resend-modal .sn-resend-form-grid{grid-template-columns:1fr!important}
  #sn-seller-resend-modal .sn-full{grid-column:auto!important}
  #sn-seller-resend-modal .sn-resend-actions{flex-direction:column-reverse!important}
  #sn-seller-resend-modal .sn-resend-actions .sn-btn{width:100%!important}
}


/* SN 1.0.67 finance review UX fix */
.sn-finance-review-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:6px;
  padding:5px 10px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
  font-weight:800;
  font-size:.82rem;
}
.sn-finance-review-by{
  display:block;
  margin-top:5px;
  color:#64748b;
  font-size:.78rem;
}
.sn-inline-result{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:14px;
  font-weight:800;
}
.sn-inline-result.sn-success{background:#ecfdf5;color:#047857;border:1px solid #a7f3d0}
.sn-inline-result.sn-error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.sn-finance-row-reviewed{opacity:.88}
.sn-finance-review-modal .sn-modal-card{
  max-width:560px;
  border-radius:24px;
}
.sn-finance-review-modal .sn-modal-body{
  display:grid;
  gap:14px;
}
.sn-finance-review-modal .sn-finance-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-weight:800;
  color:#0f172a;
}
.sn-finance-review-modal textarea{
  width:100%;
  min-height:130px;
  box-sizing:border-box;
  resize:vertical;
  border:1px solid #cbd5e1;
  border-radius:16px;
  padding:12px 14px;
  font:inherit;
  background:#fff;
  color:#0f172a;
}
body.sn-dark-mode .sn-finance-review-tag{background:#064e3b;color:#d1fae5;border-color:#10b981}
body.sn-dark-mode .sn-finance-review-by{color:#cbd5e1}
body.sn-dark-mode .sn-finance-review-modal textarea{background:#0f172a;color:#f8fafc;border-color:#334155}


/* SN 1.0.67 admin/user header fixes */
.sn-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.sn-panel-user-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-inline-start:auto;
}
.sn-panel-user-chip{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:180px;
  padding:9px 13px;
  border:1px solid rgba(148,163,184,.35);
  border-radius:16px;
  background:rgba(255,255,255,.78);
  color:#0f172a;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}
.sn-panel-user-chip span,
.sn-panel-user-chip small{
  color:#64748b;
  font-size:.78rem;
  line-height:1.35;
}
.sn-panel-user-chip strong{
  font-size:.95rem;
  line-height:1.45;
  font-weight:900;
}
.sn-panel-logout-form{margin:0!important;display:inline-flex!important}
.sn-panel-logout-form .sn-btn{white-space:nowrap}
.sn-dark-mode .sn-panel-user-chip,
body.sn-dark-mode .sn-panel-user-chip{
  background:rgba(15,23,42,.72);
  border-color:rgba(148,163,184,.28);
  color:#e5e7eb;
}
.sn-dark-mode .sn-panel-user-chip span,
.sn-dark-mode .sn-panel-user-chip small,
body.sn-dark-mode .sn-panel-user-chip span,
body.sn-dark-mode .sn-panel-user-chip small{color:#94a3b8}
@media (max-width: 768px){
  .sn-panel-header{align-items:stretch}
  .sn-panel-user-actions{width:100%;justify-content:space-between;margin-inline-start:0}
  .sn-panel-user-chip{min-width:0;flex:1}
}

/* SN 1.0.67: simple distribution assignment UI */
.sn-simple-assign-card{
  padding:22px 26px!important;
  border:1px solid #dbeafe!important;
  border-radius:24px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
  box-shadow:0 22px 60px rgba(15,23,42,.08)!important;
}
.sn-simple-assign-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px;
}
.sn-simple-assign-head h3{
  margin:0!important;
  font-size:1.1rem!important;
  font-weight:900!important;
  color:#0f172a!important;
}
.sn-simple-assign-modes{
  display:flex;
  gap:18px;
  align-items:center;
  flex-wrap:wrap;
  padding:18px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fafc;
  margin-bottom:16px;
}
.sn-simple-assign-modes label,
.sn-recipient-select-all,
.sn-simple-recipient-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  color:#1e293b;
  cursor:pointer;
}
.sn-simple-count-field,
.sn-simple-note-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-weight:800;
  color:#334155;
  margin-bottom:12px;
}
.sn-simple-count-field input,
.sn-simple-note-field input{
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:16px;
  padding:13px 16px;
  background:#fff;
}
.sn-simple-count-field.is-disabled{
  opacity:.5;
}
.sn-simple-recipients{
  margin-top:14px;
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fafc;
}
.sn-simple-recipients-title{
  font-weight:900;
  margin-bottom:12px;
  color:#0f172a;
}
.sn-simple-recipient-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(180px,1fr));
  gap:10px;
  margin-top:10px;
}
.sn-simple-recipient-chip{
  min-height:52px;
  padding:10px 12px;
  border:1px solid #dbeafe;
  border-radius:12px;
  background:#fff;
  justify-content:flex-start;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sn-simple-recipient-chip:hover{
  border-color:#60a5fa;
  background:#eff6ff;
}
.sn-simple-manual-note{
  display:none;
  margin:12px 0 0;
  padding:10px 12px;
  border-radius:14px;
  background:#eef6ff;
  color:#075985;
  font-weight:800;
}
.sn-simple-assign-actions{
  margin-top:14px;
  justify-content:flex-end;
}
.sn-distribution-assign-notice .sn-notice{
  margin:0 0 12px!important;
}
.sn-distribution-owned-table input[name="distribution_item_ids[]"]:disabled{
  opacity:.35;
}
@media (max-width: 780px){
  .sn-simple-assign-head{align-items:flex-start;flex-direction:column}
  .sn-simple-assign-modes{gap:10px;align-items:flex-start;flex-direction:column}
  .sn-simple-recipient-list{grid-template-columns:1fr}
}

/* SN 1.0.67: distribution case metadata and case-based allocation */
.sn-distribution-case-summary{
  margin:16px 0;
  padding:14px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:20px;
  background:linear-gradient(180deg,rgba(248,250,252,.94),rgba(239,246,255,.68));
}
.sn-distribution-case-summary-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.sn-distribution-case-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:10px;
}
.sn-distribution-case-card{
  cursor:pointer;
  border:1px solid #dbeafe;
  border-radius:18px;
  padding:12px;
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
  transition:.18s ease;
}
.sn-distribution-case-card:hover,
.sn-distribution-case-card.is-active{
  border-color:#2563eb;
  box-shadow:0 14px 34px rgba(37,99,235,.14);
  transform:translateY(-1px);
}
.sn-case-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.sn-case-card-top span{
  display:inline-flex;
  padding:5px 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:.82rem;
  font-weight:800;
  white-space:nowrap;
}
.sn-case-card-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:8px 0;
}
.sn-case-card-meta span{
  padding:4px 8px;
  border-radius:999px;
  background:#f1f5f9;
  color:#334155;
  font-size:.78rem;
}
.sn-simple-case-filter-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  grid-column:1/-1;
}
.sn-simple-case-filter-field select{
  min-height:48px;
}
.sn-distribution-owned-table td:nth-child(3),
.sn-distribution-owned-table td:nth-child(4){
  min-width:180px;
}
.sn-dark-mode .sn-distribution-case-summary{
  background:linear-gradient(180deg,rgba(15,23,42,.94),rgba(30,41,59,.72));
  border-color:rgba(148,163,184,.22);
}
.sn-dark-mode .sn-distribution-case-card{
  background:#111827;
  border-color:#334155;
  color:#e5e7eb;
}
.sn-dark-mode .sn-distribution-case-card:hover,
.sn-dark-mode .sn-distribution-case-card.is-active{
  border-color:#60a5fa;
  box-shadow:0 14px 34px rgba(96,165,250,.14);
}
.sn-dark-mode .sn-case-card-meta span{
  background:#1f2937;
  color:#cbd5e1;
}

/* SN 1.0.67 MIS complete case report */
.sn-mis-case-report-card{display:grid;gap:18px}
.sn-section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.sn-mis-report-filters{align-items:end;background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:14px}
.sn-mis-case-summary-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.sn-mis-breakdown-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}
.sn-mis-breakdown-card{padding:14px!important}
.sn-mis-breakdown-card h4{margin:0 0 10px}
.sn-mis-case-report-table-wrap{max-height:720px;overflow:auto;border:1px solid #e2e8f0;border-radius:18px;background:#fff}
.sn-mis-case-report-table{min-width:1400px}
.sn-mis-case-report-table thead th{position:sticky;top:0;z-index:2;background:#f1f5f9}
.sn-mis-case-report-table td[dir="ltr"]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;letter-spacing:.3px;text-align:left}
@media(max-width:900px){.sn-section-title-row{align-items:flex-start}.sn-mis-report-filters{grid-template-columns:1fr}.sn-mis-case-report-table{min-width:1100px}}

/* SN 1.0.67 assignment role chooser polish */
.sn-simple-target-position-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-weight:800;
  color:#0f172a;
  margin:12px 0;
}
.sn-simple-target-position-field select{
  width:100%;
  min-height:46px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  padding:8px 12px;
  background:#fff;
  color:#0f172a;
}
.sn-simple-recipient-position-hint{
  margin:-4px 0 10px;
  font-size:.9rem;
}
.sn-simple-recipient-chip[style*="display: none"]{
  pointer-events:none;
}
.sn-distribution-case-card.is-active{
  border-color:#2563eb!important;
  box-shadow:0 18px 42px rgba(37,99,235,.18)!important;
  background:#eff6ff!important;
}

/* SN 1.0.67 quick bug fixes */
.sn-simple-assign-actions{
  align-items:center!important;
  gap:12px!important;
  flex-wrap:wrap!important;
}
.sn-distribution-inline-result{
  flex:1 1 360px;
  min-width:260px;
}
.sn-distribution-inline-result .sn-notice{
  margin:0!important;
  padding:12px 14px!important;
}
.sn-recipient-summary-cell{
  min-width:110px!important;
  max-width:180px!important;
  white-space:normal!important;
}
.sn-recipient-summary-cell details{margin-top:6px}
.sn-recipient-summary-cell summary{cursor:pointer;color:#2563eb;font-weight:800}
.sn-recipient-mini-list{
  max-width:220px;
  max-height:120px;
  overflow:auto;
  line-height:1.8;
  color:#475569;
  font-size:.86rem;
}
.sn-issued-by-badge{
  display:inline-flex!important;
  margin-top:6px!important;
  background:#eef2ff!important;
  color:#3730a3!important;
  border:1px solid #c7d2fe!important;
}
.sn-customer-actions-filter{
  display:grid!important;
  grid-template-columns:minmax(220px,1fr) auto auto!important;
  gap:10px!important;
  align-items:end!important;
}
@media(max-width:780px){
  .sn-customer-actions-filter{grid-template-columns:1fr!important}
  .sn-distribution-inline-result{flex-basis:100%}
}

/* SN 1.0.71: manager distribution card UX + hide HR scope diagnostics in front panels */
html body #sn-sales-manager-panel .sn-technical-report[data-sn-hidden-scope="1"]{display:none!important;}
html body .sn-distribution-role .sn-distribution-card-kpis{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
  gap:12px!important;
  margin:14px 0 16px!important;
}
html body .sn-distribution-role .sn-distribution-kpi-card,
html body .sn-distribution-role .sn-distribution-kpis > div{
  min-height:92px!important;
  padding:16px!important;
  border:1px solid rgba(203,213,225,.9)!important;
  border-radius:20px!important;
  background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(248,250,252,.94))!important;
  box-shadow:0 12px 28px rgba(15,23,42,.06)!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  gap:6px!important;
}
html body .sn-distribution-role .sn-distribution-kpi-card strong,
html body .sn-distribution-role .sn-distribution-kpis > div strong{
  font-size:1.45rem!important;
  line-height:1.25!important;
  color:#0f172a!important;
}
html body .sn-distribution-role .sn-distribution-kpi-card span,
html body .sn-distribution-role .sn-distribution-kpis > div span{
  color:#64748b!important;
  font-weight:800!important;
  font-size:.9rem!important;
}
html body.sn-dark-mode .sn-distribution-role .sn-distribution-kpi-card,
html body.sn-dark-mode .sn-distribution-role .sn-distribution-kpis > div{
  background:linear-gradient(145deg,rgba(15,23,42,.98),rgba(30,41,59,.92))!important;
  border-color:rgba(148,163,184,.25)!important;
}
html body.sn-dark-mode .sn-distribution-role .sn-distribution-kpi-card strong,
html body.sn-dark-mode .sn-distribution-role .sn-distribution-kpis > div strong{color:#fff!important;}
html body.sn-dark-mode .sn-distribution-role .sn-distribution-kpi-card span,
html body.sn-dark-mode .sn-distribution-role .sn-distribution-kpis > div span{color:#cbd5e1!important;}

/* SN 1.0.94: Supervisor assignment form UI refresh */
.sn-modern-assign-card{
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #dbe3ef!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 18px 48px rgba(15,23,42,.08)!important;
}
.sn-modern-assign-head{
  margin:0!important;
  padding:18px 22px!important;
  border-bottom:1px solid #e2e8f0!important;
  background:linear-gradient(180deg,#fff 0%,#f8fafc 100%)!important;
}
.sn-modern-assign-title{display:flex;align-items:center;gap:12px;min-width:0}
.sn-modern-assign-title h3{font-size:1.2rem!important;font-weight:950!important;letter-spacing:-.01em!important}
.sn-modern-assign-icon,
.sn-modern-panel-icon,
.sn-modern-empty-icon{
  width:38px;height:38px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:12px;background:linear-gradient(135deg,#2563eb,#0ea5e9);color:#fff;
  box-shadow:0 10px 22px rgba(37,99,235,.22);font-size:1.05rem;flex:0 0 auto;
}
.sn-modern-panel-icon{width:30px;height:30px;border-radius:10px;background:#eff6ff;color:#2563eb;box-shadow:none;border:1px solid #dbeafe;font-size:.95rem}
.sn-modern-assign-status{
  display:inline-flex!important;align-items:center!important;gap:8px!important;
  padding:9px 14px!important;border-radius:10px!important;border:1px solid #bfdbfe!important;
  background:#eff6ff!important;color:#1d4ed8!important;font-weight:900!important;
  box-shadow:0 8px 18px rgba(37,99,235,.08)!important;white-space:nowrap!important;
}
.sn-modern-dot{width:7px;height:7px;border-radius:999px;background:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.sn-modern-assign-body{padding:20px 24px 16px;background:#fff}
.sn-modern-assign-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.sn-modern-assign-panel{
  border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:16px;
  box-shadow:0 10px 24px rgba(15,23,42,.035);min-width:0;
}
.sn-modern-panel-head{display:flex;align-items:center;gap:10px;margin-bottom:14px;color:#0f172a;font-size:.98rem;font-weight:950}
.sn-modern-radio-group{
  display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:0!important;margin:0!important;
  border:0!important;background:transparent!important;border-radius:0!important;
}
.sn-modern-radio-option{
  min-height:42px;padding:9px 12px!important;border:1px solid #e2e8f0;border-radius:12px;background:#fff;
  color:#1e293b!important;font-size:.92rem;transition:.16s ease;justify-content:flex-start!important;
}
.sn-modern-radio-option:hover{border-color:#93c5fd;background:#f8fbff}
.sn-modern-radio-option input{accent-color:#2563eb;width:18px;height:18px;flex:0 0 auto}
.sn-modern-radio-option:has(input:checked){border-color:#2563eb;background:#eff6ff;box-shadow:0 8px 20px rgba(37,99,235,.1)}
.sn-modern-radio-option input:checked + span{color:#1d4ed8;font-weight:950}
.sn-modern-field-row{display:grid;grid-template-columns:180px minmax(0,1fr);gap:12px;align-items:end}
.sn-modern-field,
.sn-modern-assign-card .sn-simple-count-field,
.sn-modern-assign-card .sn-simple-note-field,
.sn-modern-assign-card .sn-simple-case-filter-field,
.sn-modern-assign-card .sn-simple-target-position-field{
  display:flex!important;flex-direction:column!important;gap:7px!important;margin:0!important;
  color:#334155!important;font-weight:850!important;font-size:.9rem!important;
}
.sn-modern-field input,
.sn-modern-field select,
.sn-modern-assign-card input[name="per_seller_count"],
.sn-modern-assign-card input[name="note"],
.sn-modern-assign-card .sn-distribution-case-filter,
.sn-modern-assign-card .sn-simple-target-position{
  width:100%!important;height:44px!important;min-height:44px!important;border:1px solid #cbd5e1!important;
  border-radius:12px!important;padding:8px 12px!important;background:#fff!important;color:#0f172a!important;
  font-size:.94rem!important;box-shadow:none!important;outline:none!important;
}
.sn-modern-field input:focus,
.sn-modern-field select:focus,
.sn-modern-assign-card input[name="per_seller_count"]:focus,
.sn-modern-assign-card input[name="note"]:focus,
.sn-modern-assign-card .sn-distribution-case-filter:focus,
.sn-modern-assign-card .sn-simple-target-position:focus{border-color:#2563eb!important;box-shadow:0 0 0 3px rgba(37,99,235,.12)!important}
.sn-modern-helper{display:block;color:#64748b;font-size:.82rem;font-weight:700;line-height:1.85;margin-top:4px}
.sn-modern-recipients-shell{display:contents!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
.sn-modern-target-card{min-height:174px}
.sn-modern-checkbox-line{margin-top:12px!important;color:#334155!important;font-size:.9rem!important;font-weight:850!important}
.sn-modern-checkbox-line input{width:18px;height:18px;accent-color:#2563eb}
.sn-simple-recipient-position-hint{font-size:.82rem!important;color:#64748b!important;margin:7px 0 0!important;font-weight:700!important}
.sn-modern-recipients-panel{grid-column:1/-1;padding:14px!important}
.sn-modern-recipients-title{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;margin:0 0 12px!important;color:#0f172a!important}
.sn-modern-recipients-title strong{display:block;font-weight:950;margin-bottom:2px}
.sn-modern-recipients-title .sn-modern-panel-icon{margin-top:2px}
.sn-modern-assign-card .sn-simple-recipient-list{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-top:0;min-height:0;
}
.sn-modern-assign-card .sn-simple-recipient-list[hidden]{display:none!important}
.sn-modern-assign-card .sn-simple-recipient-chip{
  min-height:44px;padding:9px 11px;border:1px solid #dbeafe;border-radius:12px;background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.035);font-size:.88rem;line-height:1.5;
}
.sn-modern-assign-card .sn-simple-recipient-chip:has(input:checked){border-color:#2563eb;background:#eff6ff;box-shadow:0 10px 22px rgba(37,99,235,.12)}
.sn-modern-assign-card .sn-simple-recipient-chip input{width:16px;height:16px;accent-color:#2563eb}
.sn-modern-empty-state{
  min-height:112px;border:1px dashed #cbd5e1;border-radius:14px;background:linear-gradient(180deg,#fff,#f8fafc);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;color:#0f172a;padding:16px;
}
.sn-modern-empty-state[hidden]{display:none!important}
.sn-modern-empty-icon{width:42px;height:42px;border-radius:14px;background:#eff6ff;color:#2563eb;box-shadow:none;border:1px solid #bfdbfe;margin-bottom:2px}
.sn-modern-empty-state strong{font-size:.95rem;font-weight:950;color:#1e293b}
.sn-modern-empty-state small{font-size:.82rem;color:#64748b;font-weight:750}
.sn-modern-assign-card .sn-simple-manual-note{margin:14px 0 0!important;padding:10px 12px!important;border-radius:12px!important;font-size:.86rem!important;background:#eff6ff!important;color:#075985!important}
.sn-modern-assign-footer{
  margin:0!important;padding:14px 22px!important;border-top:1px solid #e2e8f0;background:#f8fafc!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;flex-wrap:wrap!important;
}
.sn-modern-assign-footer .sn-simple-assign-submit{
  min-width:190px;height:46px!important;border-radius:10px!important;background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
  color:#fff!important;font-weight:950!important;box-shadow:0 12px 26px rgba(37,99,235,.24)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
}
.sn-modern-assign-cancel{
  height:46px!important;border-radius:10px!important;background:#fff!important;color:#334155!important;border:1px solid #dbe3ef!important;
  min-width:104px;font-weight:900!important;box-shadow:none!important;
}
.sn-modern-assign-cancel:hover{border-color:#94a3b8!important;background:#f8fafc!important}
.sn-modern-assign-footer .sn-distribution-inline-result{order:2;flex:1 1 320px;min-width:240px}
.sn-modern-assign-footer .sn-modern-assign-cancel{order:1}.sn-modern-assign-footer .sn-simple-assign-submit{order:3}
.sn-modern-assign-card .sn-simple-count-field.is-disabled{opacity:.55}
.sn-modern-assign-card .sn-simple-count-field.is-disabled input{background:#f8fafc!important;color:#94a3b8!important}
body.sn-dark-mode .sn-modern-assign-card{background:#0f172a!important;border-color:#334155!important;box-shadow:0 18px 48px rgba(0,0,0,.28)!important}
body.sn-dark-mode .sn-modern-assign-head,body.sn-dark-mode .sn-modern-assign-footer{background:#111827!important;border-color:#334155!important}
body.sn-dark-mode .sn-modern-assign-body{background:#0f172a!important}
body.sn-dark-mode .sn-modern-assign-panel,body.sn-dark-mode .sn-modern-empty-state,body.sn-dark-mode .sn-modern-radio-option,body.sn-dark-mode .sn-modern-assign-card .sn-simple-recipient-chip{background:#111827!important;border-color:#334155!important;color:#e5e7eb!important}
body.sn-dark-mode .sn-modern-panel-head,body.sn-dark-mode .sn-modern-assign-title h3,body.sn-dark-mode .sn-modern-recipients-title strong{color:#e5e7eb!important}
@media(max-width:980px){.sn-modern-assign-grid{grid-template-columns:1fr}.sn-modern-field-row{grid-template-columns:1fr}.sn-modern-recipients-panel{grid-column:auto}}
@media(max-width:640px){
  .sn-modern-assign-head{align-items:flex-start!important;flex-direction:column!important}.sn-modern-assign-body{padding:14px!important}.sn-modern-assign-grid{gap:12px}.sn-modern-assign-panel{padding:13px}.sn-modern-assign-footer{padding:12px 14px!important;align-items:stretch!important;flex-direction:column!important}.sn-modern-assign-footer .sn-distribution-inline-result{order:1;width:100%;min-width:0;flex:1 1 auto}.sn-modern-assign-footer .sn-simple-assign-submit,.sn-modern-assign-footer .sn-modern-assign-cancel{width:100%;min-width:0}.sn-modern-assign-footer .sn-modern-assign-cancel{order:3}.sn-modern-assign-footer .sn-simple-assign-submit{order:2}.sn-modern-assign-card .sn-simple-recipient-list{grid-template-columns:1fr}
}

/* Scope overview filters: keep senior/deputy dashboard filters compact and prevent broken-looking long selects. */
.sn-scope-filter-form{overflow:hidden!important;border:1px solid #dbe3ef!important;border-radius:16px!important;background:#fff!important;box-shadow:0 12px 32px rgba(15,23,42,.045)!important;padding:16px!important}
.sn-scope-filter-form .sn-note{margin:0 0 14px!important;color:#334155!important;font-size:.92rem!important;line-height:1.9!important;font-weight:750!important}
.sn-scope-filter-form .sn-grid{align-items:end!important}
.sn-scope-filter-form label{display:flex!important;flex-direction:column!important;gap:7px!important;margin:0!important;color:#0f172a!important;font-size:.86rem!important;font-weight:900!important;line-height:1.5!important;min-width:0!important}
.sn-scope-filter-form input,
.sn-scope-filter-form select{width:100%!important;max-width:100%!important;height:42px!important;min-height:42px!important;border:1px solid #cbd5e1!important;border-radius:12px!important;background:#fff!important;color:#0f172a!important;padding:8px 11px!important;font-size:.9rem!important;box-shadow:none!important;outline:none!important;line-height:1.4!important;white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important}
.sn-scope-filter-form select{appearance:auto!important;display:block!important}
.sn-scope-filter-form input:focus,
.sn-scope-filter-form select:focus{border-color:#2563eb!important;box-shadow:0 0 0 3px rgba(37,99,235,.12)!important}
.sn-scope-filter-form p:last-child{margin:12px 0 0!important;display:flex!important;justify-content:flex-start!important}
.sn-scope-filter-form .sn-btn{height:42px!important;border-radius:12px!important;padding:0 18px!important;font-size:.9rem!important;font-weight:900!important}
@media(max-width:720px){.sn-scope-filter-form{padding:12px!important}.sn-scope-filter-form .sn-grid{grid-template-columns:1fr!important}.sn-scope-filter-form .sn-btn{width:100%!important}}

/* Seller panel Ajax pagination */
.sn-lead-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.sn-lead-search-box{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-inline-start:auto}
.sn-lead-search-box input[type="search"]{width:260px;max-width:100%;height:38px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:#0f172a;padding:7px 12px;font-size:.9rem;outline:none;box-shadow:none}
.sn-lead-search-box select{height:38px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:#0f172a;padding:7px 10px;font-size:.88rem;outline:none}
.sn-lead-search-box input[type="search"]:focus,.sn-lead-search-box select:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.sn-seller-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:14px 0 0;padding:12px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;color:#334155;font-size:.88rem}
.sn-seller-pagination-info{font-weight:800;color:#475569}
.sn-seller-pagination-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sn-seller-pagination-actions .sn-btn[disabled]{opacity:.45;cursor:not-allowed;pointer-events:none}
@media(max-width:720px){.sn-lead-tools{align-items:stretch}.sn-lead-search-box{width:100%;margin-inline-start:0}.sn-lead-search-box input[type="search"]{width:100%;flex:1 1 220px}.sn-lead-search-box select{flex:0 0 110px}.sn-seller-pagination{align-items:stretch;flex-direction:column}.sn-seller-pagination-actions{justify-content:center}.sn-seller-pagination-actions .sn-btn{min-width:48px}}

/* MIS focus/highlight helpers */
.sn-mis-focus-batch-card{border-color:#bae6fd!important;background:#f0f9ff!important;color:#0f172a!important}
.sn-table tr.sn-row-highlight>td{background:#f0f9ff!important}
.sn-table tr.sn-row-highlight>td:first-child{box-shadow:inset -4px 0 0 #0ea5e9!important}
