    /* ── Reset & Base ─────────────────────────────── */
    * { font-family: 'Vazirmatn', Tahoma, sans-serif; box-sizing: border-box; margin: 0; padding: 0; }

    body {
      background: #ede9fb;
      background-image:
        radial-gradient(ellipse at 12% 0%,   rgba(124,58,237,.22) 0%, transparent 52%),
        radial-gradient(ellipse at 88% 100%,  rgba(79,70,229,.18)  0%, transparent 52%),
        radial-gradient(ellipse at 55% 48%,   rgba(167,139,250,.09) 0%, transparent 65%),
        linear-gradient(160deg, #f0ebff 0%, #e8e0ff 40%, #f0ebff 100%);
      background-attachment: fixed;
      min-height: 100vh;
      color: #1e1b4b;
    }

    @keyframes shimmer {
      0%   { background-position: -600px 0; }
      100% { background-position: 600px 0; }
    }
    @keyframes pulseGlow {
      0%,100% { box-shadow: 0 6px 24px rgba(124,58,237,.4); }
      50%      { box-shadow: 0 10px 40px rgba(124,58,237,.7), 0 0 0 6px rgba(124,58,237,.1); }
    }
    @keyframes fadeUp {
      from { opacity:0; transform:translateY(14px); }
      to   { opacity:1; transform:translateY(0); }
    }
    @keyframes countUp {
      from { opacity:0; transform:scale(.8); }
      to   { opacity:1; transform:scale(1); }
    }

    /* ── Custom Scrollbar ─────────────────────────── */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: var(--ui-gray-100, #f1f5f9); border-radius: 3px; }
    ::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--ui-accent, #4f46e5); }

    /* ── Navigation ───────────────────────────────── */
    .bi-nav {
      background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4c1d95 100%);
      padding: 0 20px;
      display: flex;
      align-items: center;
      gap: 0;
      position: sticky;
      top: 0;
      z-index: 40;
      box-shadow: 0 4px 24px rgba(0,0,0,.25);
      min-height: 58px;
      flex-wrap: wrap;
    }
    .bi-nav-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: 20px;
      padding: 10px 0;
      flex-shrink: 0;
      border-left: 1px solid rgba(255,255,255,.1);
      padding-left: 0;
      margin-left: 0;
      padding-right: 20px;
    }
    .bi-nav-logo {
      width: 38px; height: 38px;
      background: linear-gradient(135deg,rgba(255,255,255,.25),rgba(255,255,255,.1));
      border: 1px solid rgba(255,255,255,.2);
      border-radius: 11px;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.2rem; color: #fff;
      box-shadow: 0 2px 8px rgba(0,0,0,.2);
    }
    .bi-nav-title { font-weight: 900; font-size: .95rem; color: #fff; line-height: 1.2; }
    .bi-nav-sub { font-size: .65rem; color: rgba(255,255,255,.45); }
    .bi-nav-links {
      display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
      padding-right: 16px;
    }
    .nav-btn {
      background: transparent;
      color: rgba(255,255,255,.65);
      border: none; border-bottom: 3px solid transparent;
      padding: 0 14px;
      height: 58px;
      font-size: .82rem; font-weight: 600;
      cursor: pointer;
      transition: all .2s;
      white-space: nowrap;
      font-family: inherit;
      display: flex; align-items: center; gap: 5px;
    }
    .nav-btn:hover { color: #fff; background: rgba(255,255,255,.07); border-bottom-color: rgba(167,139,250,.5); }
    .nav-btn.nav-active { color: #fff; background: rgba(255,255,255,.1); border-bottom-color: #a78bfa; }
    .nav-back {
      background: rgba(255,255,255,.1);
      color: rgba(255,255,255,.75);
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 9px;
      padding: 7px 14px;
      font-size: .8rem; font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      margin-right: 8px;
      transition: all .2s;
      align-self: center;
    }
    .nav-back:hover { background: rgba(255,255,255,.18); color: #fff; }

    /* ── Cards ────────────────────────────────────── */
    .card {
      background: rgba(255,255,255,.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-radius: 20px;
      box-shadow: 0 2px 8px rgba(0,0,0,.04), 0 8px 32px rgba(124,58,237,.09);
      padding: 18px;
      border: 1px solid rgba(196,181,253,.35);
      transition: box-shadow .3s, transform .3s;
      animation: fadeUp .35s ease both;
    }

    /* ── Panel Section Headers ───────────────────── */
    .ph {
      display: flex; align-items: center; gap: 8px;
      margin-bottom: 14px;
      padding-bottom: 12px;
      border-bottom: 1.5px solid var(--ui-accent-soft, #eef2ff);
    }
    .ph-icon {
      width: 32px; height: 32px;
      background: linear-gradient(135deg,var(--ui-accent, #4f46e5),#4f46e5);
      color: #fff; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: .85rem; flex-shrink: 0;
      box-shadow: 0 3px 12px rgba(124,58,237,.35);
    }
    .ph-title { font-weight: 900; color: #1e1b4b; font-size: .88rem; flex: 1; letter-spacing: .01em; }
    .ph-action { font-size: .72rem; font-weight: 800; color: var(--ui-accent, #4f46e5); background: none; border: none; cursor: pointer; padding: 3px 8px; border-radius: 7px; transition: background .15s; }
    .ph-action:hover { background: #ede9fe; text-decoration: none; }

    /* ── Labels ──────────────────────────────────── */
    .lbl {
      font-size: .72rem; font-weight: 700;
      color: #6b7280; margin-bottom: 5px;
      display: block; letter-spacing: .02em;
    }

    /* ── Inputs & Selects ────────────────────────── */
    .inp {
      width: 100%;
      border: 2px solid #e5e7eb;
      border-radius: 10px;
      padding: 8px 12px;
      font-size: .84rem;
      outline: none;
      background: #fafafa;
      transition: border-color .2s, box-shadow .2s, background .2s;
      font-family: inherit;
    }
    .inp:focus {
      border-color: var(--ui-accent, #4f46e5);
      box-shadow: 0 0 0 3px rgba(124,58,237,.1);
      background: #fff;
    }
    .sel {
      width: 100%;
      border: 2px solid #e5e7eb;
      border-radius: 10px;
      padding: 8px 12px;
      font-size: .82rem;
      outline: none;
      background: #fafafa;
      cursor: pointer;
      transition: border-color .2s, box-shadow .2s;
      font-family: inherit;
      appearance: auto;
    }
    .sel:focus {
      border-color: var(--ui-accent, #4f46e5);
      box-shadow: 0 0 0 3px rgba(124,58,237,.1);
    }

    /* ── Buttons ─────────────────────────────────── */
    .run-btn {
      width: 100%;
      background: linear-gradient(135deg, var(--ui-accent, #4f46e5) 0%, #4f46e5 50%, #6d28d9 100%);
      color: #fff; border: none;
      border-radius: 16px; padding: 15px;
      font-weight: 900; font-size: 1rem;
      cursor: pointer; font-family: inherit;
      transition: all .25s cubic-bezier(.34,1.56,.64,1);
      animation: pulseGlow 3s ease-in-out infinite;
      letter-spacing: .06em;
      position: relative; overflow: hidden;
    }
    .run-btn::after {
      content: '';
      position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
      animation: shimmer 2.5s ease-in-out infinite;
    }
    .run-btn:hover { transform: translateY(-2px) scale(1.01); animation: none; box-shadow: 0 14px 40px rgba(124,58,237,.6); }
    .run-btn:active { transform: translateY(0) scale(.99); }

    /* ── Table ───────────────────────────────────── */
    #resultTable {
      width: 100%; border-collapse: collapse; font-size: .82rem;
    }
    #resultTable th {
      background: linear-gradient(135deg,#4c1d95,var(--ui-accent, #4f46e5));
      color: #fff; padding: 11px 14px;
      text-align: right; white-space: nowrap;
      position: sticky; top: 0;
      font-weight: 800; letter-spacing: .04em;
      font-size: .78rem;
    }
    #resultTable th:first-child { border-radius: 0 12px 0 0; }
    #resultTable th:last-child  { border-radius: 12px 0 0 0; }
    #resultTable td {
      padding: 9px 14px;
      border-bottom: 1px solid var(--ui-accent-soft, #eef2ff);
      text-align: right; color: #374151;
      transition: background .15s;
    }
    #resultTable tr:hover td { background: #f9f8ff !important; }
    #resultTable tr:nth-child(even) td { background: #f8f5ff; }

    /* ── Loader ──────────────────────────────────── */
    .loader {
      width: 28px; height: 28px;
      border: 3px solid #ede9fe;
      border-top-color: var(--ui-accent, #4f46e5);
      border-radius: 50%;
      animation: spin .7s linear infinite;
      margin: auto;
    }
    @keyframes spin { to { transform: rotate(360deg) } }

    /* ── Modal ───────────────────────────────────── */
    .modal-bg {
      position: fixed; inset: 0;
      background: rgba(15,14,23,.65);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      z-index: 50;
      display: flex; align-items: center; justify-content: center;
      padding: 16px;
    }
    .modal-box {
      background: rgba(255,255,255,.97);
      backdrop-filter: blur(24px);
      border-radius: 24px;
      padding: 26px; width: 100%;
      max-width: 500px; max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 32px 100px rgba(0,0,0,.2), 0 0 0 1.5px rgba(196,181,253,.4);
      animation: modalIn .24s cubic-bezier(.34,1.56,.64,1);
    }
    @keyframes modalIn {
      from { transform: scale(.94) translateY(12px); opacity: 0; }
      to   { transform: scale(1)   translateY(0);    opacity: 1; }
    }

    /* ── Page Hero Headers ───────────────────────── */
    .page-hero {
      background: linear-gradient(135deg, rgba(255,255,255,.85) 0%, var(--ui-accent-soft, #eef2ff) 100%);
      backdrop-filter: blur(16px);
      border-radius: 20px; padding: 18px 22px;
      margin-bottom: 20px;
      display: flex; flex-wrap: wrap;
      align-items: center; justify-content: space-between;
      gap: 12px;
      border: 1.5px solid #ddd6fe;
      box-shadow: 0 4px 20px rgba(124,58,237,.08);
    }
    .page-hero h2 { font-size:1.18rem; font-weight:900; color:#4c1d95; }
    .page-hero p  { font-size:.76rem; color:#a78bfa; margin-top:4px; font-weight:600; }

    /* ── KPI Stat Boxes ──────────────────────────── */
    .stat-box {
      background: #fff !important;
      border-radius: 22px !important;
      padding: 22px 14px !important;
      text-align: center;
      border: 1.5px solid #ddd6fe !important;
      border-top: 4px solid var(--ui-accent, #4f46e5) !important;
      box-shadow: 0 6px 28px rgba(124,58,237,.13) !important;
      transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s;
      position: relative; overflow: hidden;
    }
    .stat-box::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 64px;
      background: linear-gradient(180deg, rgba(124,58,237,.07) 0%, transparent 100%);
      pointer-events: none;
    }
    .stat-box:hover {
      transform: translateY(-4px) scale(1.02);
      box-shadow: 0 16px 44px rgba(124,58,237,.22) !important;
    }
    .stat-box .stat-label {
      font-size: .63rem; color: #a78bfa;
      margin-bottom: 8px; font-weight: 800;
      letter-spacing: .1em; text-transform: uppercase;
      position: relative;
    }
    .stat-box .stat-val {
      font-size: 1.75rem; font-weight: 900;
      line-height: 1; color: #6d28d9;
      animation: countUp .4s cubic-bezier(.34,1.56,.64,1) both;
      position: relative;
    }

    /* ── Preset shortcut buttons ─────────────────── */
    .preset-btn {
      width: 100%; text-align: right;
      font-size: .78rem; border-radius: 10px;
      padding: 8px 10px; font-weight: 700;
      cursor: pointer; transition: all .15s;
      font-family: inherit; display: flex;
      align-items: center; gap: 6px;
    }
    .preset-btn:hover { transform: translateX(-2px); }

    /* ── Empty States ────────────────────────────── */
    .empty-state {
      text-align: center; padding: 52px 20px;
      color: #c4b5fd;
    }
    .empty-state .empty-icon {
      font-size: 3.2rem; margin-bottom: 14px;
      display: block;
      filter: drop-shadow(0 4px 12px rgba(124,58,237,.2));
    }
    .empty-state p { font-size: .88rem; font-weight: 700; color: #9ca3af; }
    .empty-state small { font-size: .76rem; display: block; margin-top: 6px; color: #c4b5fd; }

    /* ── Widget Card (generated by JS) ──────────── */
    .wcard {
      background: rgba(255,255,255,.97);
      border-radius: 20px;
      border: 1.5px solid rgba(196,181,253,.35);
      border-top: 3.5px solid var(--ui-accent, #4f46e5);
      box-shadow: 0 4px 20px rgba(124,58,237,.1), 0 1px 4px rgba(0,0,0,.04);
      display: flex; flex-direction: column;
      min-height: 210px;
      overflow: hidden;
      transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s;
      animation: fadeUp .35s ease both;
    }
    .wcard:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 40px rgba(124,58,237,.18), 0 2px 8px rgba(0,0,0,.06);
    }
    .wcard-hdr {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px 10px;
      border-bottom: 1px solid var(--ui-accent-soft, #eef2ff);
    }
    .wcard-title {
      font-weight: 800; font-size: .85rem; color: #4c1d95;
      display: flex; align-items: center; gap: 8px;
    }
    .wcard-dot {
      width: 9px; height: 9px;
      background: linear-gradient(135deg,var(--ui-accent, #4f46e5),#a78bfa);
      border-radius: 50%;
      flex-shrink: 0;
      box-shadow: 0 0 0 3px rgba(124,58,237,.15);
    }
    .wcard-del {
      width: 26px; height: 26px;
      background: transparent; border: none; cursor: pointer;
      color: #c4b5fd; font-size: 1.1rem; font-weight: 700;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      transition: background .15s, color .15s;
      font-family: inherit;
    }
    .wcard-del:hover { background: #ede9fe; color: var(--ui-accent, #4f46e5); }
    .wcard-body {
      flex: 1; display: flex;
      align-items: center; justify-content: center;
      padding: 12px 14px 14px;
    }
  


/* ── hover هایی که قبلاً با onmouseover/onmouseout inline نوشته می‌شد ── */
.hov-row:hover  { background: var(--ui-accent-soft, #eef2ff) !important; }
.hov-row2:hover { background: #ede9fe !important; }
.bi-card:hover  { border-color: var(--ui-accent, #4f46e5) !important; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(124,58,237,.15) !important; }
#btn-save-report:hover { background: #dcfce7 !important; }
#btn-export-csv:hover  { background: #ede9fe !important; }