:root{
  --nan-primary:#1e3a8a;
  --nan-primary-2:#2563eb;
  --nan-accent:#0f766e;
  --nan-success:#16a34a;
  --nan-warning:#f59e0b;
  --nan-danger:#dc2626;
  --nan-ink:#0f172a;
  --nan-text:#334155;
  --nan-muted:#64748b;
  --nan-border:#e2e8f0;
  --nan-border-strong:#cbd5e1;
  --nan-soft:#f8fafc;
  --nan-soft-2:#eef2ff;
  --nan-white:#ffffff;
  --nan-shadow:0 18px 50px rgba(15,23,42,.10);
  --nan-shadow-soft:0 10px 30px rgba(15,23,42,.07);
  --nan-radius:20px;
  --nan-radius-sm:12px;
}

.nan-card,
.nan-box,
.nan-layer,
.nan-modal,
.nan-tabs,
.nan-tab,
.nan-panel,
.nan-panel-tabs,
.nan-panel-tab,
.nan-table,
.nan-letter-view,
.nan-pager,
.nan-filter,
.nan-dropzone,
.nan-alert-card,
.nan-chip,
.nan-ref-block,
.nan-actions,
.nan-status,
.nan-status-tag,
.nan-ref-badge,
.nan-tab-pane,
.nan-panel-pane,
.nan-page a,
.nan-page span,
.nan-help,
.nan-muted,
.nan-flow,
.nan-attach-list,
.nan-ref-row,
.nan-ref-results,
.nan-selected-users,
.nan-suite{
  direction:rtl;
  text-align:right;
  font-family:Vazirmatn,Vazir,Tahoma,Arial,sans-serif;
  color:var(--nan-text);
  box-sizing:border-box;
}

.nan-card *,
.nan-panel *,
.nan-layer *,
.nan-modal *,
.nan-alert-card *,
.nan-suite *{box-sizing:border-box;}

.nan-card,
.nan-suite.nan-card{
  position:relative;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  border:1px solid rgba(148,163,184,.35);
  border-radius:var(--nan-radius);
  padding:1.25rem;
  box-shadow:var(--nan-shadow-soft);
  margin:1rem 0;
  overflow:hidden;
}

.nan-card::before,
.nan-panel::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--nan-primary),var(--nan-primary-2),var(--nan-accent));
  opacity:.95;
}

.nan-wide{width:100%;max-width:100%;}
.nan-suite{width:100%;}

.nan-card h2,
.nan-panel h2{
  margin:0;
  color:var(--nan-ink);
  font-size:clamp(1.15rem,2vw,1.65rem);
  line-height:1.8;
  font-weight:900;
  letter-spacing:-.03em;
}
.nan-card-lead{
  margin:.35rem 0 1.1rem;
  color:var(--nan-muted);
  font-size:.95rem;
  line-height:1.9;
}

.nan-hero{
  display:grid;
  grid-template-columns:1fr auto;
  gap:1rem;
  align-items:center;
  margin:0 0 1.1rem;
  padding:1.05rem;
  border:1px solid rgba(191,219,254,.75);
  border-radius:calc(var(--nan-radius) - 4px);
  background:
    radial-gradient(circle at top left,rgba(37,99,235,.14),transparent 32%),
    linear-gradient(135deg,#eff6ff 0%,#ffffff 55%,#f0fdfa 100%);
}
.nan-hero-main{display:flex;align-items:center;gap:.85rem;min-width:0;}
.nan-hero-icon{
  display:grid;
  place-items:center;
  flex:0 0 54px;
  width:54px;height:54px;
  border-radius:18px;
  background:linear-gradient(135deg,var(--nan-primary),var(--nan-primary-2));
  color:#fff;
  box-shadow:0 14px 28px rgba(37,99,235,.22);
  font-size:1.45rem;
}
.nan-hero-text h2{margin:0;color:var(--nan-ink);}
.nan-hero-text p{
  margin:.12rem 0 0;
  color:var(--nan-muted);
  line-height:1.9;
}
.nan-hero-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:.55rem;
}
.nan-stats{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(4,minmax(130px,1fr));
  gap:.75rem;
}
.nan-stat-card{
  background:rgba(255,255,255,.86);
  border:1px solid rgba(226,232,240,.95);
  border-radius:16px;
  padding:.85rem .95rem;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
  gap:.1rem;
}
.nan-stat-card strong{
  color:var(--nan-ink);
  font-size:1.4rem;
  line-height:1.4;
  letter-spacing:-.02em;
}
.nan-stat-card span{color:var(--nan-muted);font-size:.88rem;}
.nan-stat-card--blue{border-color:#bfdbfe;background:linear-gradient(180deg,#eff6ff,#fff);}
.nan-stat-card--green{border-color:#bbf7d0;background:linear-gradient(180deg,#f0fdf4,#fff);}
.nan-stat-card--orange{border-color:#fed7aa;background:linear-gradient(180deg,#fff7ed,#fff);}
.nan-stat-card--gray{border-color:#e2e8f0;background:linear-gradient(180deg,#f8fafc,#fff);}

.nan-panel{
  position:relative;
  background:#fff;
  border:1px solid rgba(148,163,184,.32);
  border-radius:24px;
  box-shadow:var(--nan-shadow);
  padding:1.2rem;
  margin:1rem 0;
  overflow:hidden;
}
.nan-panel-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 1rem 1.1rem;
  margin:-.1rem -.1rem 1rem;
  border:1px solid rgba(226,232,240,.8);
  border-radius:20px;
  background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 52%,#0f766e 100%);
  color:#fff;
}
.nan-panel-header h2{color:#fff;}
.nan-panel-header p{margin:.25rem 0 0;color:rgba(255,255,255,.78);line-height:1.8;}
.nan-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  color:#dbeafe;
  font-size:.82rem;
  margin-bottom:.2rem;
}
.nan-panel-sub{margin-top:.65rem;}

.nan-tabs,
.nan-panel-tabs{
  display:flex;
  gap:.45rem;
  flex-wrap:wrap;
  margin:.8rem 0 1rem;
  padding:.35rem;
  border:1px solid var(--nan-border);
  border-radius:18px;
  background:#f1f5f9;
}
.nan-tab,
.nan-panel-tab{
  appearance:none;
  border:0;
  cursor:pointer;
  border-radius:14px;
  padding:.65rem 1rem;
  min-height:42px;
  color:#475569;
  background:transparent;
  font-weight:800;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.nan-tab:hover,
.nan-panel-tab:hover{background:#fff;transform:translateY(-1px);}
.nan-tab.active,
.nan-panel-tab.active{
  background:#fff;
  color:var(--nan-primary);
  box-shadow:0 8px 22px rgba(15,23,42,.10);
}

.nan-tabs,
.nan-panel-tabs{
  scrollbar-width:thin;
  scrollbar-color:#cbd5e1 transparent;
}
.nan-tab:focus-visible,
.nan-panel-tab:focus-visible{
  outline:3px solid rgba(37,99,235,.22);
  outline-offset:2px;
}
.nan-tab-pane,
.nan-panel-pane{display:none;}
.nan-tab-pane.active,
.nan-panel-pane.active{display:block;}

.nan-form-row{margin-bottom:1rem;}
.nan-form-row label{
  display:block;
  margin:0 0 .42rem;
  color:var(--nan-ink);
  font-weight:800;
}
.nan-form-row input[type="text"],
.nan-form-row input[type="password"],
.nan-form-row input[type="url"],
.nan-form-row input[type="number"],
.nan-form-row input[type="file"],
.nan-form-row select,
.nan-form-row textarea,
.nan-filter input,
.nan-filter select,
.nan-card input[type="text"],
.nan-card input[type="password"],
.nan-card input[type="url"],
.nan-card input[type="number"],
.nan-card select,
.nan-card textarea,
.nan-modal input[type="text"],
.nan-modal input[type="password"],
.nan-modal input[type="url"],
.nan-modal input[type="number"],
.nan-modal select,
.nan-modal textarea,
.nan-panel input[type="text"],
.nan-panel input[type="password"],
.nan-panel input[type="url"],
.nan-panel input[type="number"],
.nan-panel select,
.nan-panel textarea{
  width:100%;
  border:1px solid var(--nan-border);
  border-radius:14px;
  min-height:46px;
  padding:.72rem .9rem;
  background:#fff;
  color:var(--nan-ink);
  box-shadow:0 1px 0 rgba(15,23,42,.02);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
  font-family:Vazirmatn,Vazir,Tahoma,Arial,sans-serif;
  font-size:.95rem;
  line-height:1.65;
}
.nan-form-row select,
.nan-filter select,
.nan-card select,
.nan-modal select,
.nan-panel select{
  appearance:auto;
}
.nan-form-row textarea,
.nan-card textarea,
.nan-modal textarea,
.nan-panel textarea,
.nan-ref-text,
#nan-report-text,
#nan-exec-text{
  min-height:118px;
  resize:vertical;
  padding:.85rem .95rem;
  line-height:1.9;
}
.nan-modal .nan-form-row{margin-bottom:.9rem;}
.nan-modal .nan-form-row label,
.nan-modal .nan-ref-row .label{font-size:.92rem;}
.nan-modal input[type="file"]{padding:.55rem .75rem;}
.nan-form-row input:focus,
.nan-form-row select:focus,
.nan-form-row textarea:focus,
.nan-filter input:focus,
.nan-filter select:focus,
.nan-card input:focus,
.nan-card select:focus,
.nan-card textarea:focus,
.nan-modal input:focus,
.nan-modal select:focus,
.nan-modal textarea:focus,
.nan-panel input:focus,
.nan-panel select:focus,
.nan-panel textarea:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}
.nan-card .wp-editor-wrap{
  border:1px solid var(--nan-border);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
}
.nan-card .quicktags-toolbar,
.nan-card .mce-toolbar-grp{background:#f8fafc!important;}

.nan-actions,
.nan-bulk-bar,
.nan-topbar,
.nan-actions-bar{
  display:flex;
  align-items:center;
  gap:.55rem;
  flex-wrap:wrap;
}
.nan-actions{margin-top:.25rem;}
.nan-bulk-bar{
  justify-content:space-between;
  padding:.75rem;
  margin:.3rem 0 .9rem;
  border:1px dashed var(--nan-border-strong);
  border-radius:16px;
  background:#f8fafc;
}
.nan-bulk-bar .nan-bulk-action{max-width:280px;}
.nan-filter-status:empty{display:none;}

.nan-card .button,
.nan-panel .button,
.nan-modal .button,
.nan-alert-card .button,
.nan-hero-btn,
.nan-actions-bar .button{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  min-height:42px;
  padding:.58rem 1.05rem!important;
  border-radius:13px!important;
  border:1px solid var(--nan-border-strong)!important;
  background:#fff!important;
  color:var(--nan-ink)!important;
  box-shadow:0 8px 18px rgba(15,23,42,.06)!important;
  font-weight:800!important;
  text-decoration:none!important;
  line-height:1.4!important;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.nan-card .button:hover,
.nan-panel .button:hover,
.nan-modal .button:hover,
.nan-alert-card .button:hover,
.nan-actions-bar .button:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(15,23,42,.10)!important;
}
.nan-card .button-primary,
.nan-panel .button-primary,
.nan-modal .button-primary,
.nan-alert-card .button-primary,
.nan-send-btn,
.nan-create-btn{
  background:linear-gradient(135deg,var(--nan-primary),var(--nan-primary-2))!important;
  border-color:transparent!important;
  color:#fff!important;
}
.nan-send-btn,
.nan-create-btn{background:linear-gradient(135deg,#059669,#10b981)!important;}
.nan-delete-admin,
.nan-delete{color:#991b1b!important;border-color:#fecaca!important;background:#fff5f5!important;}

.nan-table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid var(--nan-border);
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 26px rgba(15,23,42,.05);
}
.nan-table{
  width:100%;
  min-width:980px;
  border-collapse:separate;
  border-spacing:0;
}
.nan-table thead th{
  position:sticky;
  top:0;
  z-index:1;
  padding:.82rem .7rem;
  background:linear-gradient(180deg,#f8fafc,#eef2ff);
  color:#334155;
  border-bottom:1px solid var(--nan-border);
  font-size:.9rem;
  font-weight:900;
  white-space:nowrap;
}
.nan-table tbody td{
  padding:.72rem .7rem;
  border-bottom:1px solid #eef2f7;
  vertical-align:middle;
  color:#334155;
  line-height:1.8;
}
.nan-table tbody tr.nan-item:hover td{background:#f8fafc;}
.nan-table tbody tr.nan-row-actions td{
  background:#fbfdff;
  padding:.65rem .75rem .95rem;
}
.nan-col-check{width:48px;text-align:center;}
.nan-col-check input,
.nan-item-check,
.nan-check-all{transform:scale(1.08);accent-color:var(--nan-primary-2);}
.nan-actions-bar{justify-content:flex-start;}

.nan-status.ok,
.nan-status.wait{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:.18rem .55rem;
  font-weight:900;
}
.nan-status.ok{color:#166534;background:#dcfce7;}
.nan-status.wait{color:#92400e;background:#fef3c7;}
.nan-status-tag,
.nan-ref-badge{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  padding:.24rem .65rem;
  border-radius:999px;
  border:1px solid var(--nan-border);
  font-size:.84rem;
  font-weight:800;
  white-space:nowrap;
}
.nan-ref-badge{background:#eef2ff;color:#3730a3;border-color:#c7d2fe;}
.nan-status-tag.open{background:#ecfdf5;border-color:#a7f3d0;color:#166534;}
.nan-status-tag.closed{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;}
.nan-status-tag.archived{background:#f1f5f9;border-color:#cbd5e1;color:#475569;}
.nan-row-ref td{background:#f8fbff;}
.nan-row-exec td{background:#f0fdf4;}
tr.is-editable td{background:#f8fafc;}
tr.is-locked td{background:#fff;}

.nan-chips{display:flex;gap:.42rem;flex-wrap:wrap;padding:.15rem 0;}
.nan-chip{
  display:inline-flex;
  align-items:center;
  gap:.3rem;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  color:#1e3a8a;
  padding:.28rem .62rem;
  border-radius:999px;
  font-size:.84rem;
  font-weight:800;
}
.nan-chip-recipient{background:#fff1f2;border-color:#fecdd3;color:#9f1239;}
.nan-chip .rm{margin-inline-start:.25rem;cursor:pointer;}

.nan-box{
  background:#fff7ed;
  border:1px solid #fed7aa;
  color:#7c2d12;
  padding:.95rem 1rem;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(15,23,42,.04);
}
.nan-box.nan-error{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
.nan-muted,
.nan-help{color:var(--nan-muted);font-size:.9rem;line-height:1.8;}

.nan-alert-card{
  border:1px solid #bfdbfe;
  border-radius:18px;
  padding:1rem;
  background:linear-gradient(135deg,#eff6ff,#ffffff);
  box-shadow:var(--nan-shadow-soft);
  margin:1rem 0;
}
.nan-alert-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  color:var(--nan-ink);
  font-weight:900;
  margin-bottom:.55rem;
}
.nan-alert-badge{
  display:inline-grid;
  place-items:center;
  min-width:30px;height:30px;
  border-radius:999px;
  background:var(--nan-primary-2);
  color:#fff;
}

.nan-pager{
  display:flex;
  gap:.35rem;
  flex-wrap:wrap;
  margin:1rem 0 0;
  align-items:center;
}
.nan-page a,
.nan-page span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  min-height:36px;
  border:1px solid var(--nan-border);
  border-radius:12px;
  padding:.25rem .65rem;
  background:#fff;
  text-decoration:none;
}
.nan-page .current{
  background:var(--nan-primary-2);
  color:#fff;
  border-color:var(--nan-primary-2);
}

.nan-layer{
  position:fixed;
  inset:0;
  display:none;
  align-items:flex-start;
  justify-content:center;
  z-index:99999;
  padding:clamp(.75rem,2vw,1.4rem);
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(7px);
  overflow:auto;
}
body.nan-modal-open{overflow:hidden;}
.nan-modal{
  position:relative;
  width:min(960px,100%);
  max-height:calc(100vh - 3rem);
  overflow:auto;
  margin:auto;
  background:#fff;
  border:1px solid rgba(226,232,240,.9);
  border-radius:22px;
  padding:1.15rem;
  box-shadow:0 30px 80px rgba(15,23,42,.28);
}
.nan-modal::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg,var(--nan-primary),var(--nan-primary-2),var(--nan-accent));
}
.nan-modal h3{
  margin:.25rem 2.5rem 1rem 0;
  color:var(--nan-ink);
  font-size:1.18rem;
  font-weight:900;
}
.nan-close{
  position:absolute;
  inset-inline-start:.85rem;
  inset-block-start:.75rem;
  z-index:2;
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid var(--nan-border)!important;
  background:#fff!important;
  color:#0f172a!important;
  border-radius:14px;
  cursor:pointer;
  font-size:22px;
  line-height:1;
  box-shadow:0 8px 22px rgba(15,23,42,.09);
}
.nan-close:hover{background:#f8fafc!important;}

.nan-letter-view{
  position:relative;
  background:#fff;
  border-radius:18px;
  padding:.25rem;
}
.nan-letter-view .lv-header{
  min-height:18px;
  border-radius:16px;
  background:linear-gradient(135deg,#f8fafc,#fff);
  margin-bottom:1rem;
  overflow:hidden;
}
.nan-letter-view .lv-header img{
  max-width:100%;
  max-height:170px;
  width:auto;
  height:auto;
  display:block;
  margin:0 auto;
  object-fit:contain;
}
.nan-letter-view .lv-meta{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.7rem;
  border:1px solid var(--nan-border);
  padding:.75rem;
  border-radius:16px;
  margin-bottom:1rem;
  background:#f8fafc;
}
.nan-letter-view .lv-badge{
  justify-self:start;
  padding:.3rem .75rem;
  border-radius:999px;
  border:1px solid var(--nan-border);
  font-weight:900;
}
.nan-letter-view .lv-badge.normal{background:#ecfdf5;border-color:#bbf7d0;color:#166534;}
.nan-letter-view .lv-badge.urgent{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
.nan-letter-view .lv-badge.very_urgent{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}
.nan-letter-view .lv-phrase{
  color:#0f172a;
  font-weight:900;
  margin:1rem 0 1.2rem;
  line-height:2;
  white-space:pre-line;
}
.nan-letter-view .lv-content{
  line-height:2;
  color:#334155;
  padding:1rem;
  border:1px solid var(--nan-border);
  border-radius:16px;
  background:#fff;
}
.nan-letter-view .lv-signature{margin-top:1.4rem;text-align:left;}
.nan-letter-view .lv-signature .sig-wrap{position:relative;display:inline-block;}
.nan-letter-view .lv-signature img{max-width:420px;max-height:150px;width:auto;height:auto;}
.nan-letter-view .lv-signature .sig-overlay{
  position:absolute;
  left:1.5cm;
  bottom:6px;
  line-height:1.4;
  font-size:.92em;
  text-align:left;
}
.nan-letter-view .lv-actions{
  display:flex;
  justify-content:flex-end;
  gap:.55rem;
  flex-wrap:wrap;
  margin-top:1rem;
}

.nan-dropzone{
  border:2px dashed #cbd5e1;
  border-radius:18px;
  padding:1.2rem;
  text-align:center;
  background:linear-gradient(180deg,#f8fafc,#fff);
  transition:border-color .18s ease, background .18s ease;
}
.nan-dropzone.drag{background:#eff6ff;border-color:#93c5fd;}
#nan-sig-preview{
  margin-top:.75rem;
  padding:.75rem;
  border-radius:14px;
  background:#fff;
  border:1px solid var(--nan-border);
}
#nan-sig-preview img{max-height:120px;max-width:100%;}

#nan-user-results,
.nan-user-results{
  margin:.5rem 0;
  border:1px solid var(--nan-border);
  border-radius:14px;
  padding:.35rem;
  max-height:220px;
  overflow:auto;
  background:#fff;
}
#nan-user-results div,
.nan-user-results div{
  padding:.5rem .65rem;
  cursor:pointer;
  border-radius:10px;
}
#nan-user-results div:hover,
.nan-user-results div:hover{background:#eff6ff;}
.nan-ref-block{
  border:1px solid var(--nan-border);
  border-radius:18px;
  padding:1rem;
  margin:.75rem 0;
  background:#f8fafc;
}
.nan-ref-row{margin:.55rem 0;}
.nan-ref-row .label{display:block;font-weight:900;color:var(--nan-ink);margin-bottom:.35rem;}
.nan-ref-remove{
  border:1px solid #fecaca;
  background:#fff5f5;
  color:#991b1b;
  border-radius:10px;
  padding:.35rem .6rem;
  cursor:pointer;
}
.nan-flow{
  margin:0;
  padding:0 1.25rem 0 0;
}
.nan-flow li{
  margin-bottom:.75rem;
  padding:.75rem .85rem;
  border:1px solid var(--nan-border);
  border-radius:14px;
  background:#fff;
}
.nan-attach-list{
  list-style:none;
  padding:0;
  margin:0;
}
.nan-attach-list li{margin:.5rem 0;}

@media (min-width: 769px){
  .nan-table tbody tr.nan-item td:first-child{border-inline-start:4px solid transparent;}
  .nan-table tbody tr.nan-row-ref td:first-child{border-inline-start-color:#6366f1;}
  .nan-table tbody tr.nan-row-exec td:first-child{border-inline-start-color:#22c55e;}
}

@media (max-width: 900px){
  .nan-hero{grid-template-columns:1fr;}
  .nan-hero-actions{justify-content:flex-start;}
  .nan-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
  .nan-panel-header{align-items:flex-start;flex-direction:column;}
  .nan-panel-header .button{width:100%;}
}

@media (max-width: 768px){
  .nan-card,
  .nan-panel{padding:.85rem;border-radius:18px;}
  .nan-hero{padding:.85rem;border-radius:16px;}
  .nan-hero-main{align-items:flex-start;}
  .nan-hero-icon{width:46px;height:46px;flex-basis:46px;border-radius:15px;font-size:1.2rem;}
  .nan-tabs,
  .nan-panel-tabs{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    gap:.4rem;
    padding:.35rem;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }
  .nan-tabs::-webkit-scrollbar,
  .nan-panel-tabs::-webkit-scrollbar{height:6px;}
  .nan-tabs::-webkit-scrollbar-thumb,
  .nan-panel-tabs::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:999px;}
  .nan-tab,
  .nan-panel-tab{
    width:auto;
    flex:0 0 auto;
    min-width:118px;
    padding:.58rem .75rem;
    scroll-snap-align:start;
    white-space:nowrap;
  }
  .nan-stats{grid-template-columns:1fr 1fr;gap:.5rem;}
  .nan-stat-card{padding:.7rem;}
  .nan-table{min-width:0;display:block;}
  .nan-table thead{display:none;}
  .nan-table tbody{display:block;}
  .nan-table tbody tr.nan-item{
    display:block;
    margin:.75rem 0 0;
    border:1px solid var(--nan-border);
    border-radius:18px 18px 0 0;
    background:#fff;
    box-shadow:0 10px 26px rgba(15,23,42,.06);
    overflow:hidden;
  }
  .nan-table tbody tr.nan-row-actions{
    display:block;
    margin:0 0 .9rem;
    border:1px solid var(--nan-border);
    border-top:0;
    border-radius:0 0 18px 18px;
    background:#fbfdff;
    overflow:hidden;
  }
  .nan-table tbody tr:not(.nan-item):not(.nan-row-actions){
    display:block;
    border:1px solid var(--nan-border);
    border-radius:18px;
    padding:.75rem;
    margin:.75rem 0;
  }
  .nan-table tbody td{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:.75rem;
    border:0;
    padding:.55rem .75rem;
  }
  .nan-table tbody td::before{
    content:attr(data-label);
    color:var(--nan-muted);
    font-size:.84rem;
    white-space:nowrap;
    font-weight:800;
  }
  .nan-row-actions td{display:block!important;}
  .nan-actions-bar{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:.5rem;
  }
  .nan-row-actions .button,
  .nan-actions-bar .button{width:100%;}
  .nan-table-wrap{border:0;box-shadow:none;background:transparent;overflow:visible;}
  .nan-letter-view .lv-meta{grid-template-columns:1fr;}
  .nan-modal{border-radius:18px;padding:1rem;max-height:calc(100vh - 1.5rem);}
}

@media (max-width: 520px){
  .nan-stats,
  .nan-actions-bar{grid-template-columns:1fr;}
  .nan-tab,
  .nan-panel-tab{min-width:108px;}
  .nan-card .button,
  .nan-panel .button,
  .nan-modal .button,
  .nan-alert-card .button{width:100%;}
}

.nan-layer[style*="display: block"],.nan-layer.is-open{display:flex!important;}

/* v14.01.18 UI refinements */
.nan-modal .nan-close{
  left:.85rem;
  right:auto;
  inset-inline-start:auto;
  inset-inline-end:auto;
}
.nan-modal h3{
  margin:.25rem 0 1rem 2.75rem;
  padding-inline-start:0;
  padding-inline-end:0;
}
.nan-newletter-modal{
  width:min(1040px,100%);
  padding:1.25rem 1.4rem 1.35rem;
}
.nan-newletter-modal .nan-card--embedded{
  margin:0;
  padding:0;
  border:0;
  box-shadow:none;
  background:transparent;
  overflow:visible;
}
.nan-newletter-modal .nan-card--embedded::before{display:none;}
.nan-newletter-modal .nan-card-lead{
  margin:-.25rem 0 1rem;
  padding:.65rem .85rem;
  border:1px solid #e0e7ff;
  border-radius:14px;
  background:linear-gradient(180deg,#f8fafc,#fff);
}
.nan-form-footer-actions{
  justify-content:flex-start;
  padding-top:.45rem;
  border-top:1px solid rgba(226,232,240,.85);
}
.nan-modal-cancel{background:#f8fafc!important;}
.nan-topbar--actions{
  justify-content:flex-start;
  margin:.65rem 0 1rem;
  padding:.75rem;
  border:1px solid var(--nan-border);
  border-radius:18px;
  background:linear-gradient(180deg,#f8fafc,#fff);
}
.nan-filter-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.8rem;
}
.nan-filter--modal .nan-form-row{margin:0;}
.nan-bulk-modal .nan-bulk-bar--modal{
  justify-content:flex-start;
  align-items:flex-end;
  border-style:solid;
  margin-top:.8rem;
}
.nan-bulk-modal .nan-bulk-action{min-width:260px;}
.nan-reset-filter{color:#475569!important;background:#f8fafc!important;}

.nan-table tbody tr.nan-item.nan-row-ref td,
.nan-table tbody tr.nan-item.nan-row-ref + tr.nan-row-actions td{
  background:linear-gradient(90deg,rgba(238,242,255,.98),rgba(255,255,255,.98));
}
.nan-table tbody tr.nan-item.nan-row-exec td,
.nan-table tbody tr.nan-item.nan-row-exec + tr.nan-row-actions td{
  background:linear-gradient(90deg,rgba(240,253,244,.98),rgba(255,255,255,.98));
}
.nan-table tbody tr.nan-item.nan-row-ref:hover td,
.nan-table tbody tr.nan-item.nan-row-ref:hover + tr.nan-row-actions td{background:#eef2ff;}
.nan-table tbody tr.nan-item.nan-row-exec:hover td,
.nan-table tbody tr.nan-item.nan-row-exec:hover + tr.nan-row-actions td{background:#dcfce7;}
.nan-table tbody tr.nan-item.nan-row-ref td:first-child{border-inline-start:4px solid #6366f1;}
.nan-table tbody tr.nan-item.nan-row-exec td:first-child{border-inline-start:4px solid #22c55e;}

@media (max-width:768px){
  .nan-newletter-modal{padding:1rem;}
  .nan-filter-grid{grid-template-columns:1fr;}
  .nan-topbar--actions{align-items:stretch;}
  .nan-topbar--actions .button{flex:1 1 160px;}
  .nan-table tbody tr.nan-item.nan-row-ref{border-inline-start:4px solid #6366f1;}
  .nan-table tbody tr.nan-item.nan-row-exec{border-inline-start:4px solid #22c55e;}
}

/* v14.01.19 unified row-state coloring
   ردیف نامه و ردیف عملیات آن با یک رنگ ثابت نمایش داده می‌شوند؛
   این بخش برای جلوگیری از گرادیان تکرارشونده روی تک‌تک سلول‌ها اضافه شده است. */
.nan-table tbody tr.nan-item,
.nan-table tbody tr.nan-row-actions{
  --nan-row-bg:#ffffff;
  --nan-row-bg-hover:#f8fafc;
  --nan-row-strip:transparent;
  --nan-row-border:#eef2f7;
}
.nan-table tbody tr.nan-item.nan-row-ref,
.nan-table tbody tr.nan-row-actions.nan-row-ref{
  --nan-row-bg:#f5f7ff;
  --nan-row-bg-hover:#eef2ff;
  --nan-row-strip:#6366f1;
  --nan-row-border:#c7d2fe;
}
.nan-table tbody tr.nan-item.nan-row-exec,
.nan-table tbody tr.nan-row-actions.nan-row-exec{
  --nan-row-bg:#f0fdf4;
  --nan-row-bg-hover:#e7f8ee;
  --nan-row-strip:#16a34a;
  --nan-row-border:#bbf7d0;
}
.nan-table tbody tr.nan-item.nan-row-ref td,
.nan-table tbody tr.nan-row-actions.nan-row-ref td,
.nan-table tbody tr.nan-item.nan-row-ref + tr.nan-row-actions td,
.nan-table tbody tr.nan-item.nan-row-exec td,
.nan-table tbody tr.nan-row-actions.nan-row-exec td,
.nan-table tbody tr.nan-item.nan-row-exec + tr.nan-row-actions td{
  background:var(--nan-row-bg)!important;
  border-bottom-color:var(--nan-row-border)!important;
}
.nan-table tbody tr.nan-item.nan-row-ref:hover td,
.nan-table tbody tr.nan-row-actions.nan-row-ref:hover td,
.nan-table tbody tr.nan-item.nan-row-ref:hover + tr.nan-row-actions td,
.nan-table tbody tr.nan-item.nan-row-exec:hover td,
.nan-table tbody tr.nan-row-actions.nan-row-exec:hover td,
.nan-table tbody tr.nan-item.nan-row-exec:hover + tr.nan-row-actions td{
  background:var(--nan-row-bg-hover)!important;
}
.nan-table tbody tr.nan-item.nan-row-ref td:first-child,
.nan-table tbody tr.nan-item.nan-row-exec td:first-child,
.nan-table tbody tr.nan-row-actions.nan-row-ref td:first-child,
.nan-table tbody tr.nan-row-actions.nan-row-exec td:first-child{
  border-inline-start:4px solid var(--nan-row-strip)!important;
}
.nan-table tbody tr.nan-row-actions.nan-row-ref td,
.nan-table tbody tr.nan-row-actions.nan-row-exec td,
.nan-table tbody tr.nan-item.nan-row-ref + tr.nan-row-actions td,
.nan-table tbody tr.nan-item.nan-row-exec + tr.nan-row-actions td{
  padding-top:.55rem;
  padding-bottom:.95rem;
}
.nan-table tbody tr.nan-row-actions.nan-row-ref .nan-actions-bar,
.nan-table tbody tr.nan-row-actions.nan-row-exec .nan-actions-bar,
.nan-table tbody tr.nan-item.nan-row-ref + tr.nan-row-actions .nan-actions-bar,
.nan-table tbody tr.nan-item.nan-row-exec + tr.nan-row-actions .nan-actions-bar{
  padding:.55rem;
  border:1px solid var(--nan-row-border);
  border-radius:14px;
  background:rgba(255,255,255,.62);
}
.nan-table tbody tr.nan-row-ref .nan-status-select,
.nan-table tbody tr.nan-row-exec .nan-status-select,
.nan-table tbody tr.nan-row-ref select,
.nan-table tbody tr.nan-row-exec select{
  background:rgba(255,255,255,.82)!important;
  border-color:var(--nan-row-border)!important;
}
.nan-chip-recipient{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#1e3a8a;
}
.nan-row-ref .nan-chip-recipient{
  background:#eef2ff;
  border-color:#c7d2fe;
  color:#3730a3;
}
.nan-row-exec .nan-chip-recipient{
  background:#ecfdf5;
  border-color:#bbf7d0;
  color:#166534;
}
.nan-table tbody tr.nan-row-ref .nan-ref-badge{
  background:#eef2ff;
  color:#3730a3;
  border-color:#c7d2fe;
}
.nan-table tbody tr.nan-row-exec .nan-ref-badge{
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}
.nan-table tbody tr.nan-item.nan-row-ref td,
.nan-table tbody tr.nan-item.nan-row-exec td{
  transition:background .18s ease, border-color .18s ease;
}
@media (max-width:768px){
  .nan-table tbody tr.nan-item.nan-row-ref,
  .nan-table tbody tr.nan-row-actions.nan-row-ref{
    background:var(--nan-row-bg)!important;
    border-color:var(--nan-row-border)!important;
    border-inline-start:4px solid var(--nan-row-strip)!important;
  }
  .nan-table tbody tr.nan-item.nan-row-exec,
  .nan-table tbody tr.nan-row-actions.nan-row-exec{
    background:var(--nan-row-bg)!important;
    border-color:var(--nan-row-border)!important;
    border-inline-start:4px solid var(--nan-row-strip)!important;
  }
  .nan-table tbody tr.nan-item.nan-row-ref td,
  .nan-table tbody tr.nan-row-actions.nan-row-ref td,
  .nan-table tbody tr.nan-item.nan-row-exec td,
  .nan-table tbody tr.nan-row-actions.nan-row-exec td{
    background:transparent!important;
  }
}
