@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Estedad-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/Estedad-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Estedad-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/Estedad-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/Estedad-ExtraBold.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-v20-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-v20-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-mono-v20-latin-600.woff2') format('woff2');
}
:root{
  /* ===== پالت «موج مثبت»: عمق ناوی + طلایی گرم + سبز-آبیِ اعتماد ===== */
  --ink:#14163A; --ink-2:#1C2168; --ink-3:#2A2F8C;
  --paper:#FBF8F1; --paper-2:#F1ECDE;
  --gold:#A97A1E; --gold-2:#CE9B2E; --gold-3:#EDC469; --gold-soft:#FBF0D3;
  --warm:#C5652B; --warm-soft:#FCE9D9;
  --teal:#1D8A6F; --teal-2:#2FB593; --teal-soft:#DEF5ED;
  --danger:#C1483A; --danger-soft:#FBE5E1; --warn:#B0800F;
  --line: rgba(20,22,58,0.10); --line-gold: rgba(206,155,46,0.36);
  --shadow: 0 2px 6px rgba(20,22,58,0.07), 0 1px 2px rgba(20,22,58,0.05);
  --shadow-md: 0 16px 34px rgba(20,22,58,0.12);
  --shadow-lg: 0 30px 70px rgba(20,22,58,0.20);
  --shadow-gold: 0 14px 32px rgba(206,155,46,0.32);
  --radius: 16px; --radius-lg:22px;
  --ease: cubic-bezier(.22,1,.36,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  --wave: linear-gradient(90deg, var(--teal-2), var(--gold-3), var(--warm), var(--gold-3), var(--teal-2));
}

/* ===================== حالت شب (تم تاریک) — نسخه‌ی شیک و لوکس ===================== */
body.dark-theme{
  --paper:#15172E; --paper-2:#1D2040;
  --ink:#EAE8F5;
  --line: rgba(255,255,255,0.08); --line-gold: rgba(230,180,90,0.35);
  --gold-soft: rgba(230,180,90,0.14);
  --teal-soft: rgba(56,196,163,0.14);
  --danger-soft: rgba(224,90,74,0.16);
  --warm-soft: rgba(214,120,60,0.16);
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-md: 0 20px 48px rgba(0,0,0,0.45);
  --shadow-lg: 0 36px 80px rgba(0,0,0,0.55);
  background:
    radial-gradient(1100px 600px at 108% -10%, rgba(230,180,90,0.10), transparent 60%),
    radial-gradient(950px 520px at -10% 6%, rgba(90,100,220,0.16), transparent 55%),
    radial-gradient(850px 460px at -6% 110%, rgba(45,190,150,0.08), transparent 55%),
    linear-gradient(175deg, #0F1126 0%, #15172E 45%, #191C3A 100%);
}
body.dark-theme::before{ opacity:.4; }

/* لوگین: عمق بصری بیشتر، سرمه‌ای پررنگ‌تر از پس‌زمینه‌ی اصلی */
body.dark-theme #loginScreen{
  background:
    radial-gradient(1000px 620px at 12% 6%, rgba(230,180,90,0.16), transparent 62%),
    radial-gradient(820px 560px at 92% 94%, rgba(45,190,150,0.18), transparent 62%),
    radial-gradient(700px 500px at 100% 0%, rgba(60,66,170,0.28), transparent 60%),
    linear-gradient(160deg, #0F1126 0%, #171A38 55%, #1F2350 100%);
}
body.dark-theme .brand-mark{ background:linear-gradient(150deg, #1F2350, #0F1126); box-shadow:0 14px 30px rgba(0,0,0,0.45), 0 0 0 6px rgba(230,180,90,0.10); }
body.dark-theme .login-card{ background:#15172E; border-color:rgba(255,255,255,0.06); box-shadow:0 40px 100px rgba(0,0,0,0.6), 0 2px 0 rgba(255,255,255,0.03) inset; }
body.dark-theme .login-btn{ background:linear-gradient(135deg, #262A56, #14152C); color:#F3E7C8; box-shadow:0 14px 30px rgba(0,0,0,0.5); }
body.dark-theme .field input{ background:#1B1D3B; color:var(--ink); border-color:rgba(255,255,255,0.08); }
body.dark-theme .field input:focus{ background:#20234A; border-color:var(--gold-2); box-shadow:0 0 0 4px rgba(230,180,90,0.14); }

body.dark-theme .sidebar{
  background: linear-gradient(190deg, #0E1024 0%, #171A38 55%, #1D2150 130%);
  box-shadow: 4px 0 40px rgba(0,0,0,0.5);
}
body.dark-theme .sidebar::before{ background:radial-gradient(circle, rgba(230,180,90,0.16), transparent 70%); }
body.dark-theme .sidebar::after{ background:radial-gradient(circle, rgba(45,190,150,0.14), transparent 70%); }

body.dark-theme .btn-primary{ background:linear-gradient(135deg,#2A2F5E,#14152C); color:#F3E7C8; box-shadow:0 10px 24px rgba(0,0,0,0.4); }
body.dark-theme .btn-gold{ box-shadow:0 10px 26px rgba(230,180,90,0.22); }
body.dark-theme .subtab.active{ background:linear-gradient(135deg,#2A2F5E,#14152C); color:#F3E7C8; }
body.dark-theme .info-cat-tab.active{ box-shadow:0 10px 26px rgba(230,180,90,0.2); }
body.dark-theme .toast{ background:linear-gradient(135deg,#2A2F5E,#14152C); box-shadow:0 20px 46px rgba(0,0,0,0.5); }
body.dark-theme .promo-head{ background:linear-gradient(160deg, #0F1126 0%, #171A38 55%, #1F2350 120%); }

/* کارت‌ها و سطوح: شیشه‌ای و با یک حاشیه‌ی ظریف نورانی به‌جای سفید تخت */
body.dark-theme .card, body.dark-theme .stat, body.dark-theme .modal-box,
body.dark-theme .autocomplete-list, body.dark-theme .jdp-popup,
body.dark-theme .login-card{
  background: linear-gradient(165deg, #191C3A 0%, #15172E 100%);
  border-color: rgba(255,255,255,0.07);
}
body.dark-theme .modal-box::-webkit-scrollbar-thumb{ border-color:#191C3A; }
body.dark-theme .card:hover{ border-color: rgba(230,180,90,0.30); box-shadow: 0 22px 50px rgba(0,0,0,0.45); }
body.dark-theme .stat:hover{ box-shadow: 0 22px 46px rgba(0,0,0,0.45); }
body.dark-theme .card h3 .badge{ background:linear-gradient(150deg, rgba(230,180,90,0.18), rgba(255,255,255,0.03)); border-color: rgba(230,180,90,0.28); }
body.dark-theme .promo-box{ background:linear-gradient(165deg, #191C3A 0%, #15172E 130%); }
body.dark-theme .promo-tier{ background:#1D2040; border-color: rgba(230,180,90,0.22); }
body.dark-theme .fld input, body.dark-theme .fld select, body.dark-theme .fld textarea{ background:#1B1D3B; border-color: rgba(255,255,255,0.08); color:var(--ink); }
body.dark-theme .fld input:focus, body.dark-theme .fld select:focus, body.dark-theme .fld textarea:focus{
  background:#20234A; border-color:var(--gold-2); box-shadow:0 0 0 4px rgba(230,180,90,0.14);
}
body.dark-theme .fld .readonly{ background:#1B1D3B; }
body.dark-theme .btn-ghost{ background:#1D2040; color:var(--ink); }
body.dark-theme .btn-ghost:hover{ background:#262A52; }
body.dark-theme th{ background:#1B1D3B; color:#B9B5D6; border-bottom-color: rgba(230,180,90,0.28); }
body.dark-theme td{ color:#D6D3EC; border-bottom-color: rgba(255,255,255,0.06); }
body.dark-theme tr.clickable:hover{ background: rgba(230,180,90,0.08); }
body.dark-theme tbody tr:not(.clickable):hover td{ background:#1D2040; }
body.dark-theme .cascade-row{ background:#1D2040; }
body.dark-theme .cascade-row:hover{ background: rgba(45,190,150,0.10); }
body.dark-theme .org-node, body.dark-theme .perf-node-box{ background:#1D2040; border-color: rgba(255,255,255,0.08); }
body.dark-theme .org-node-self, body.dark-theme .perf-node-self{ background: rgba(230,180,90,0.10); border-color: rgba(230,180,90,0.30); }
body.dark-theme .acc-group{ border-color: rgba(255,255,255,0.08); }
body.dark-theme .acc-head{ background:#1D2040; }
body.dark-theme .acc-head:hover{ background:#262A52; }
body.dark-theme .btn-danger:hover{ background:rgba(224,90,74,0.28); }

/* متن‌های خاکستریِ ثابت که باید روشن‌تر بشن */
body.dark-theme .fld label{ color:#9C97C2; }
body.dark-theme .page-head p{ color:#9C97C2; }
body.dark-theme .stat .lbl{ color:#9C97C2; }
body.dark-theme .modal-box .sub{ color:#9C97C2; }
body.dark-theme .login-hint, body.dark-theme .login-trust span{ color:#9C97C2; }
body.dark-theme .login-card .tag{ color:#9C97C2; }
body.dark-theme .subtab{ color:#B5B2CE; }
body.dark-theme .subtab:hover, body.dark-theme .info-cat-tab:hover{ background:#262A52; color:#EAE8F5; }
body.dark-theme .info-cat-tab{ color:#B5B2CE; background:#1D2040; }
body.dark-theme .detail-grid .k{ color:#9C97C2; }
body.dark-theme .empty-hint, body.dark-theme .empty-row td{ color:#7C78A0; }
body.dark-theme .org-node-mobile, body.dark-theme .ac-mobile{ color:#9C97C2; }
body.dark-theme .blog-seo-hint, body.dark-theme .blog-slug-box span{ color:#9C97C2; }
body.dark-theme .jdp-weekdays span{ color:#8C88AE; }
body.dark-theme .jdp-day{ color:var(--ink); }
body.dark-theme .jdp-day:hover{ background: rgba(230,180,90,0.14); }
body.dark-theme .jdp-head .jdp-nav{ background:#1D2040; border-color: rgba(255,255,255,0.08); }

/* نشان‌های وضعیت — روشن‌تر و خواناتر روی پس‌زمینه‌ی تیره */
body.dark-theme .tag-pending{ background:rgba(214,150,50,0.20); color:#F0C766; }
body.dark-theme .notif.warning{ background:rgba(214,150,50,0.14); color:#F0C766; }
body.dark-theme .notif.info{ background: rgba(45,190,150,0.12); color:#5EE3B8; }
body.dark-theme .tag-active{ background: rgba(45,190,150,0.14); color:#5EE3B8; }
body.dark-theme .tag-cancel{ background: rgba(224,90,74,0.16); color:#F0897A; }
body.dark-theme .inst-notif-urgent .inst-notif-days{ background:rgba(214,150,50,0.22); color:#F0C766; }
body.dark-theme .inst-notif-upcoming{ background: rgba(45,190,150,0.06); }
body.dark-theme .inst-notif-overdue{ background: rgba(224,90,74,0.06); }
body.dark-theme .inst-notif-name, body.dark-theme .inst-notif-amount{ color: var(--ink); }

/* متن گرادیانیِ اعداد داشبورد */
body.dark-theme .stat .val{
  background:linear-gradient(120deg,#F3DFA9,#E6B45A);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}

/* اسکرول‌بار در حالت شب */
body.dark-theme ::-webkit-scrollbar-thumb{ background:#3A3E68; border-color:#15172E; }
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{font-family:'Estedad', sans-serif; position:relative; isolation:isolate;
  background:
    radial-gradient(1200px 560px at 105% -12%, rgba(206,155,46,0.10), transparent 60%),
    radial-gradient(1000px 520px at -12% 8%, rgba(42,47,140,0.07), transparent 55%),
    radial-gradient(900px 460px at -8% 112%, rgba(29,138,111,0.08), transparent 55%),
    var(--paper);
  color:var(--ink); min-height:100vh;}
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.55;
  background:
    radial-gradient(560px 340px at 12% 18%, rgba(237,196,105,0.16), transparent 70%),
    radial-gradient(620px 380px at 92% 78%, rgba(29,138,111,0.12), transparent 70%);
  animation:auroraDrift 18s ease-in-out infinite alternate;
}
@keyframes auroraDrift{ from{transform:translate(0,0) scale(1);} to{transform:translate(-2%,2%) scale(1.06);} }
.mono{font-family:'IBM Plex Mono','Estedad',monospace; direction:ltr; display:inline-block;}
td.mono{ display: table-cell; text-align: right; }
::selection{background:var(--gold-soft); color:var(--ink);}

/* ===================== صفحه ورود ===================== */
#loginScreen{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden; padding:24px;
  background:
    radial-gradient(1000px 620px at 12% 6%, rgba(237,196,105,0.20), transparent 62%),
    radial-gradient(820px 560px at 92% 94%, rgba(47,181,147,0.24), transparent 62%),
    radial-gradient(700px 500px at 100% 0%, rgba(42,47,140,0.30), transparent 60%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink-3) 100%);
}
#loginScreen::before{
  content:""; position:absolute; inset:-10%; z-index:0; pointer-events:none;
  background:
    radial-gradient(420px 420px at 20% 25%, rgba(237,196,105,0.16), transparent 70%),
    radial-gradient(480px 480px at 82% 75%, rgba(47,181,147,0.18), transparent 70%);
  animation:auroraDrift 14s ease-in-out infinite alternate;
}
.login-blob{ display:none; }

.login-card{
  width:100%; max-width:410px; position:relative; z-index:2;
  background:var(--paper); border-radius:26px; border:1px solid rgba(255,255,255,0.10);
  box-shadow:0 40px 100px rgba(0,0,0,0.48), 0 2px 0 rgba(255,255,255,0.55) inset;
  padding:48px 36px 36px; text-align:center; overflow:hidden;
  animation:cardRise .5s var(--ease-bounce);
}
@keyframes cardRise{ from{opacity:0; transform:translateY(18px) scale(.96);} to{opacity:1; transform:translateY(0) scale(1);} }
.login-card::before{ content:""; position:absolute; top:0; right:0; left:0; height:4px;
  background:var(--wave); background-size:240% 100%;
  animation:shimmerBar 7s linear infinite; }
@keyframes shimmerBar{ 0%{background-position:0% 0;} 100%{background-position:240% 0;} }

.brand-mark{
  width:70px;height:70px;margin:0 auto 22px; border-radius:20px;
  background:linear-gradient(150deg, var(--ink-2), var(--ink));
  display:flex;align-items:center;justify-content:center;
  position:relative; box-shadow:0 14px 30px rgba(0,0,0,0.32), 0 0 0 6px rgba(206,155,46,0.14);
  animation:brandGlow 3.4s ease-in-out infinite;
}
@keyframes brandGlow{ 0%,100%{box-shadow:0 14px 30px rgba(0,0,0,0.32), 0 0 0 6px rgba(206,155,46,0.14);} 50%{box-shadow:0 14px 34px rgba(0,0,0,0.36), 0 0 0 9px rgba(206,155,46,0.22);} }
.brand-mark::after{ display:none; }
.brand-mark svg{width:30px;height:30px;}

.login-card h1{font-size:22px;font-weight:800;margin:0 0 6px; color:var(--ink); letter-spacing:-.2px;}
.login-card .tag{color:#8A8398;font-size:12.5px;margin:0 0 32px; font-weight:500;}

.field{text-align:right;margin-bottom:17px;}
.field label{display:block;font-size:11.5px;color:#7A7590;margin-bottom:7px;font-weight:600; letter-spacing:.2px;}
.field input{
  width:100%;padding:13px 15px;border-radius:13px; border:1.5px solid var(--line);
  background:#fff; font-family:inherit;font-size:14px;color:var(--ink); outline:none;
  transition:border-color .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease);
}
.field input:focus{border-color:var(--gold-2); box-shadow:0 0 0 4px rgba(206,155,46,0.16); transform:translateY(-1px);}

.login-btn{
  width:100%;margin-top:8px;padding:14.5px;border:none;border-radius:13px;
  background:linear-gradient(135deg, var(--ink-2), var(--ink));
  color:#FBF6E9;font-family:inherit;font-weight:700;font-size:14.5px;
  cursor:pointer; position:relative; overflow:hidden;
  transition:transform .16s var(--ease), box-shadow .16s var(--ease), opacity .16s;
  box-shadow:0 12px 28px rgba(20,22,58,0.32);
}
.login-btn::after{ content:""; position:absolute; inset:0; background:linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.22) 48%, transparent 66%); background-size:220% 100%; background-position:120% 0; transition:background-position .55s var(--ease); }
.login-btn:hover::after{ background-position:-20% 0; }
.login-btn:hover{transform:translateY(-2px); box-shadow:0 20px 40px rgba(20,22,58,0.4);}
.login-btn:active{transform:translateY(0); opacity:.92;}
.login-btn:disabled{opacity:.5; cursor:default; transform:none;}
.login-err{color:var(--danger); font-size:12.5px; margin-top:12px; min-height:16px; font-weight:600;}

.login-hint{margin-top:24px; font-size:11px; color:#A79FBE; line-height:1.9;}
.login-trust{ display:flex; align-items:center; justify-content:center; gap:14px; margin-top:22px; padding-top:20px; border-top:1px solid var(--line); }
.login-trust span{ font-size:10.5px; color:#9992AA; font-weight:600; display:flex; align-items:center; gap:5px; }

/* ===================== پنل اصلی ===================== */
#appScreen{display:none; min-height:100vh;}
.shell{display:flex; min-height:100vh;}
.sidebar{
  width:266px; flex-shrink:0; color:#EDEBF5; padding:22px 16px;
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 62%, var(--ink-3) 130%);
  box-shadow: 3px 0 30px rgba(0,0,0,0.16);
  position:sticky; overflow-y:auto; overflow-x:hidden;
}
.sidebar::before{
  content:""; position:absolute; top:-120px; right:-90px; width:260px; height:260px; border-radius:50%;
  background:radial-gradient(circle, rgba(237,196,105,0.20), transparent 70%); pointer-events:none;
  animation:auroraDrift 12s ease-in-out infinite alternate;
}
.sidebar::after{
  content:""; position:absolute; bottom:-140px; left:-100px; width:280px; height:280px; border-radius:50%;
  background:radial-gradient(circle, rgba(47,181,147,0.18), transparent 70%); pointer-events:none;
  animation:auroraDrift 16s ease-in-out infinite alternate-reverse;
}
.sidebar > *{ position:relative; z-index:1; }
.sidebar .brand{display:flex; align-items:center; gap:10px; padding:0 6px 20px; border-bottom:1px solid rgba(255,255,255,0.09); margin-bottom:18px;}
.sidebar .brand .mark{width:40px;height:40px;border-radius:12px;background:linear-gradient(150deg,var(--gold-3),var(--gold-2));display:flex;align-items:center;justify-content:center;flex-shrink:0; box-shadow:0 8px 20px rgba(206,155,46,0.35);}
.sidebar .brand .mark svg{width:19px;height:19px;}
.sidebar .brand .txt{font-weight:700; font-size:14px; line-height:1.3;}
.sidebar .brand .txt span{display:block; font-weight:400; font-size:10.5px; color:#A7A3C9;}
.theme-toggle-btn{
  margin-inline-start:auto; width:30px; height:30px; border-radius:10px; flex-shrink:0;
  background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.10); color:#F3DFA9;
  display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0;
  transition:background .18s, transform .15s, box-shadow .18s;
}
.theme-toggle-btn:hover{ background:rgba(206,155,46,0.22); transform:scale(1.08) rotate(-8deg); box-shadow:0 6px 16px rgba(206,155,46,0.28); }
.theme-toggle-btn:active{ transform:scale(0.94); }
.theme-toggle-btn svg{ width:15px; height:15px; display:block; }

.nav-item{
  display:flex; align-items:center; gap:10px; padding:11px 12px; border-radius:11px; margin-bottom:3px;
  font-size:13px; font-weight:500; color:#B5B2CE; cursor:pointer; border:1px solid transparent;
  transition:background .2s var(--ease), color .2s var(--ease), transform .14s var(--ease), box-shadow .2s var(--ease); position:relative;
}
.nav-item:hover{background:rgba(255,255,255,0.07); color:#fff; transform:translateX(-3px);}
.nav-item.active{background:linear-gradient(90deg, rgba(206,155,46,0.20), rgba(206,155,46,0.04)); color:#F3DFA9; box-shadow:inset 0 0 0 1px rgba(206,155,46,0.22);}
.nav-item.active::before{ content:""; position:absolute; right:-16px; top:50%; transform:translateY(-50%); width:3px; height:64%; border-radius:3px; background:linear-gradient(180deg,var(--gold-3),var(--gold-2)); box-shadow:0 0 12px rgba(206,155,46,0.7);}
.nav-num{ width:21px;height:21px;border-radius:7px;background:rgba(255,255,255,0.07); display:flex;align-items:center;justify-content:center;font-size:10.5px;font-family:'IBM Plex Mono';flex-shrink:0; transition:background .2s, transform .2s; }
.nav-item:hover .nav-num{ transform:scale(1.08); }
.nav-item.active .nav-num{background:linear-gradient(150deg,var(--gold-3),var(--gold-2)); color:var(--ink);}
.nav-subitem{ margin-right:10px; padding-right:8px; border-right:2px solid rgba(255,255,255,0.08); font-size:12.5px; }
#navGroupItems.collapsed{ display:none; }
#navGroup2Items.collapsed{ display:none; }
#navGroup3Items.collapsed{ display:none; }
#navGroup4Items.collapsed{ display:none; }
#navGroup5Items.collapsed{ display:none; }
#navGroup6Items.collapsed{ display:none; }
#navGroup7Items.collapsed{ display:none; }
#navGroup8Items.collapsed{ display:none; }
#navGroup9Items.collapsed{ display:none; }
#navGroupOnlineItems.collapsed, #navReqItems.collapsed, #navCarItems.collapsed, #navThirdItems.collapsed{ display:none; }
#navGroupStaffItems.collapsed{ display:none; }
#navGroupToggle.group-active, #navGroup2Toggle.group-active, #navGroup3Toggle.group-active, #navGroup4Toggle.group-active, #navGroup5Toggle.group-active, #navGroup6Toggle.group-active, #navGroup7Toggle.group-active, #navGroup8Toggle.group-active, #navGroup9Toggle.group-active, #navGroupOnlineToggle.group-active, #navGroupStaffToggle.group-active{ color:#F3DFA9; }
.nav-nested-2{ margin-right:10px; }
.nav-nested-3{ margin-right:20px; }
.nav-nested-4{ margin-right:30px; }
.nav-nested-2 .nav-subitem, .nav-nested-3 .nav-subitem, .nav-nested-4 .nav-subitem{ font-size:12px; }
.nav-badge{ position:absolute; left:10px; background:linear-gradient(135deg,var(--danger),#A8362A); color:#fff; font-size:10px; font-weight:700; border-radius:20px; padding:1px 6px; font-family:'IBM Plex Mono'; box-shadow:0 3px 10px rgba(193,72,58,0.45); animation:badgePulse 2.2s ease-in-out infinite;}
@keyframes badgePulse{ 0%,100%{transform:scale(1);} 50%{transform:scale(1.12);} }
.sidebar-foot{margin-top:auto; padding-top:14px; border-top:1px solid rgba(255,255,255,0.09);}
.user-chip{display:flex; align-items:center; gap:9px; font-size:12px; color:#C7C4E0; background:rgba(255,255,255,0.05); padding:10px 12px; border-radius:12px; border:1px solid rgba(255,255,255,0.06);}
.user-chip .dot{width:6px;height:6px;border-radius:50%;background:#5FBF9B; flex-shrink:0; box-shadow:0 0 8px #5FBF9B; animation:dotPulse 2s ease-in-out infinite;}
@keyframes dotPulse{ 0%,100%{opacity:1;} 50%{opacity:.4;} }
.logout-link{margin-top:10px; font-size:11.5px; color:#9C97BE; cursor:pointer; transition:color .18s, background .18s, border-color .18s, transform .16s var(--ease); display:inline-flex; align-items:center; gap:8px; padding:7px 12px 7px 8px; border-radius:30px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03);}
.logout-link .ic-badge{width:22px;height:22px;border-radius:50%;background:rgba(206,155,46,0.16); display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:background .15s;}
.logout-link svg{width:12px;height:12px;flex-shrink:0; color:var(--gold-2);}
.logout-link .lbl{font-weight:600;}
.logout-link:hover{color:#F3DFA9; border-color:rgba(206,155,46,0.4); background:rgba(206,155,46,0.1); transform:translateX(-2px);}
.logout-link:hover .ic-badge{background:rgba(206,155,46,0.32);}
.logout-link{justify-content:space-between; width:100%;}
.inactivity-timer{
  font-size:10px; font-weight:700; font-family:'IBM Plex Mono'; direction:ltr;
  color:#8C88AE; flex-shrink:0; transition:color .2s;
}
.inactivity-timer-warn{
  color:#F0897A; animation:dotPulse 1.2s ease-in-out infinite;
}
.main{flex:1; padding:30px 34px; max-width:100%; overflow-x:hidden;}
.page-head{margin-bottom:26px; animation:fadeUp .4s var(--ease);}
@keyframes fadeUp{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);} }
.page-head .eyebrow{font-size:11px; color:var(--teal); font-weight:700; letter-spacing:1.5px; margin-bottom:7px; font-family:'IBM Plex Mono'; direction:ltr; display:inline-flex; align-items:center; gap:6px; background:var(--teal-soft); padding:4px 12px; border-radius:20px;}
.page-head .eyebrow::before{content:""; width:6px;height:6px;border-radius:50%;background:var(--teal-2); box-shadow:0 0 8px var(--teal-2); animation:dotPulse 2s ease-in-out infinite;}
.page-head h2{font-size:22px; font-weight:800; margin:0; color:var(--ink); letter-spacing:-.3px;}
.page-head p{font-size:12.5px; color:#7A7590; margin:6px 0 0;}

.card{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius-lg); padding:22px 24px; margin-bottom:20px;
  box-shadow:var(--shadow); transition:border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
  position:relative; overflow:hidden;
}
.card::before{ content:""; position:absolute; top:0; right:0; left:0; height:3px; background:var(--wave); background-size:240% 100%; opacity:0; transition:opacity .25s var(--ease); animation:shimmerBar 8s linear infinite; }
.card:hover{border-color:var(--line-gold); box-shadow:var(--shadow-md); transform:translateY(-2px);}
.card:hover::before{ opacity:1; }
.card h3{font-size:14px; font-weight:800; margin:0 0 15px; display:flex; align-items:center; gap:9px; color:var(--ink);}
.card h3 .badge{width:25px;height:25px;border-radius:9px;background:linear-gradient(150deg,var(--gold-soft),#fff);display:flex;align-items:center;justify-content:center;font-size:11px; font-family:'IBM Plex Mono'; color:var(--gold); font-weight:700; border:1px solid var(--line-gold); box-shadow:0 3px 8px rgba(206,155,46,0.15);}

.grid{display:grid; gap:14px;}
.g2{grid-template-columns:1fr 1fr;} .g3{grid-template-columns:1fr 1fr 1fr;} .g4{grid-template-columns:1fr 1fr 1fr 1fr;} .g6{grid-template-columns:repeat(6,1fr);}
@media (max-width:1000px){ .g2,.g3,.g4,.g6{grid-template-columns:1fr 1fr;} .main{padding:20px;} }
@media (max-width:560px){ .g2,.g3,.g4,.g6{grid-template-columns:1fr;} }

/* ===== ریسپانسیو: سایدبار موبایل ===== */
.mobile-topbar{ display:none; }
.sidebar-overlay{ display:none; }
@media (max-width:880px){
  .shell{ flex-direction:column; }
  .mobile-topbar{
    display:flex; align-items:center; gap:12px; color:#fff;
    background:linear-gradient(180deg, var(--ink), var(--ink-2));
    padding:12px 16px; position:sticky; top:0; z-index:600; box-shadow:0 4px 18px rgba(0,0,0,0.2);
  }
  .mobile-topbar .hamburger-btn{
    background:rgba(255,255,255,0.1); border:none; color:#fff; width:38px; height:38px;
    border-radius:11px; font-size:18px; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center;
    transition:background .15s;
  }
  .mobile-topbar .hamburger-btn:hover{ background:rgba(255,255,255,0.18); }
  .mobile-topbar .mtb-brand{ font-weight:700; font-size:14px; }
  .mobile-topbar .mtb-brand span{ display:block; font-weight:400; font-size:10px; color:#A7A3C9; }

  .sidebar{
    position:fixed; top:0; right:0; height:100vh; width:270px; max-width:82vw;
    transform:translateX(100%); transition:transform .32s var(--ease); z-index:750;
    box-shadow:-18px 0 44px rgba(0,0,0,0.38);
  }
  .sidebar.open{ transform:translateX(0); }
  .sidebar-overlay{
    display:block; position:fixed; inset:0; background:rgba(15,18,50,0.52); backdrop-filter:blur(2px);
    opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:700;
  }
  .sidebar-overlay.show{ opacity:1; pointer-events:auto; }

  .main{ padding:16px; }
  .page-head h2{ font-size:17px; }
  .stat-row{ gap:10px; }
  .stat{ flex-basis:calc(50% - 5px); }
  .card{ padding:16px 15px; }
  .fld input, .fld select, .fld textarea, .field input{ font-size:16px; }
}
@media (max-width:400px){
  .login-card{ padding:34px 22px 26px; }
}
@media (max-width:520px){
  .stat{ flex-basis:100%; }
  .page-head h2{ font-size:16px; }
  .card{ padding:14px 12px; }
  .btn{ font-size:12.5px; padding:9px 14px; }
  .subtabs{ gap:5px; }
  .subtab{ padding:7px 12px; font-size:11.5px; }
}

/* ===== ریسپانسیو: جدول‌ها با اسکرول افقی ===== */
.table-scroll{ width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.table-scroll table{ min-width:640px; }

/* ===== ریسپانسیو: مودال‌ها ===== */
@media (max-width:640px){
  .modal-box{ padding:20px 16px; max-height:92vh; border-radius:20px; }
  .detail-grid{ grid-template-columns:1fr; gap:8px; }
  .grid.g2 .fld, .grid.g3 .fld, .grid.g4 .fld{ min-width:0; }
}

.fld{margin-bottom:2px;}
.fld label{display:block; font-size:11.5px; font-weight:600; color:#6E6885; margin-bottom:5px;}
.fld input, .fld select, .fld textarea{ width:100%; padding:10px 12px; border-radius:11px; border:1.5px solid var(--line);
  font-family:inherit; font-size:13px; color:var(--ink); background:var(--paper-2); outline:none; transition:border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s; }
.fld input:focus, .fld select:focus, .fld textarea:focus{border-color:var(--gold-2); background:#fff; box-shadow:0 0 0 4px rgba(206,155,46,0.14);}
.fld .readonly{background:var(--paper-2); color:var(--teal); font-weight:700; font-family:'IBM Plex Mono'; direction:ltr; text-align:left;}
.fld small{display:block; margin-top:4px; font-size:10.5px; color:#A29CB8;}

.btn{ padding:10.5px 18px; border-radius:11px; border:none; font-family:inherit; font-weight:700; font-size:13px;
  cursor:pointer; display:inline-flex; align-items:center; gap:7px; transition:transform .16s var(--ease), box-shadow .16s var(--ease), opacity .16s;
  position:relative; overflow:hidden; }
.btn::after{ content:""; position:absolute; inset:0; background:linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.28) 48%, transparent 66%); background-size:220% 100%; background-position:130% 0; transition:background-position .5s var(--ease); pointer-events:none; }
.btn:hover::after{ background-position:-30% 0; }
.btn:hover{transform:translateY(-2px);} .btn:active{transform:translateY(0); opacity:.85;} .btn:disabled{opacity:.5; cursor:default; transform:none;}
.btn-primary{background:linear-gradient(135deg,var(--ink-2),var(--ink)); color:#fff; box-shadow:0 8px 20px rgba(20,22,58,0.26);}
.btn-primary:hover{box-shadow:0 14px 28px rgba(20,22,58,0.34);}
.btn-gold{background:linear-gradient(135deg,var(--gold-3),var(--gold-2)); color:#3A2B05; box-shadow:0 8px 20px rgba(206,155,46,0.32);}
.btn-gold:hover{box-shadow:0 14px 30px rgba(206,155,46,0.42);}
.btn-ghost{background:var(--paper-2); color:var(--ink); box-shadow:none;}
.btn-ghost:hover{background:#EAE5D5;}
.btn-danger{background:var(--danger-soft); color:var(--danger); box-shadow:none;}
.btn-danger:hover{background:#F6D2CB;}
.btn-sm{padding:6.5px 12px; font-size:11.5px; border-radius:9px;}

table{width:100%; border-collapse:collapse; font-size:12.5px;}
th{background:var(--paper-2); text-align:right; padding:12px 10px; font-weight:700; color:#514C68; border-bottom:2px solid var(--line-gold); letter-spacing:.2px;}
td{padding:10.5px 10px; border-bottom:1px solid var(--line); color:#39355A;}
tr:last-child td{border-bottom:none;}
tbody tr{transition:background .16s var(--ease);}
tr.clickable{cursor:pointer;} tr.clickable:hover{background:var(--gold-soft);}
tbody tr:not(.clickable):hover td{background:var(--paper-2);}
.num{font-family:'IBM Plex Mono'; direction:ltr; display:inline-block;}
.tag-pill{display:inline-block; padding:3px 11px; border-radius:20px; font-size:10.5px; font-weight:700;}
.tag-active{background:var(--teal-soft); color:var(--teal);}
.tag-cancel{background:var(--danger-soft); color:var(--danger);}
.tag-pending{background:rgba(176,128,15,0.12); color:#7A5A0B;}
.empty-row td{text-align:center; color:#B0AAC4; padding:30px; font-size:12.5px;}
.menu-access-group-row td{ background:var(--paper-2); font-weight:800; font-size:12.5px; color:var(--ink); border-top:1.5px solid var(--line-gold); padding:11px 10px; }

.cascade{display:flex; flex-direction:column; gap:7px; margin-top:6px;}
.cascade-row{display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border-radius:11px; background:var(--paper-2); font-size:12px; transition:background .16s, transform .16s;}
.cascade-row:hover{background:var(--teal-soft); transform:translateX(-2px);}
.cascade-row .lvl{font-weight:600; display:flex; align-items:center; gap:8px;}
.cascade-row .lvl .lv-dot{width:6px;height:6px;border-radius:50%;background:var(--teal); box-shadow:0 0 6px var(--teal);}
.cascade-row .amt{font-family:'IBM Plex Mono'; direction:ltr; font-weight:700; color:var(--teal);}
.cascade-total{display:flex; justify-content:space-between; padding:12px 14px; margin-top:4px; border-top:1.5px dashed var(--line); font-weight:800; font-size:13px;}

.section{display:none;} .section.active{display:block; animation:sectionFade .3s var(--ease);}
@keyframes sectionFade{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);} }
.subtabs{display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap;}
.subtab{padding:8.5px 16px; border-radius:11px; background:var(--paper-2); font-size:12.5px; font-weight:700; cursor:pointer; color:#6E6885; transition:background .18s var(--ease), color .18s var(--ease), transform .15s var(--ease);}
.subtab:hover{transform:translateY(-1px);}
.subtab.active{background:linear-gradient(135deg,var(--ink-2),var(--ink)); color:#fff; box-shadow:0 8px 18px rgba(20,22,58,0.26);}
.subsection{display:none;} .subsection.active{display:block; animation:sectionFade .22s var(--ease);}
/* ===== تب‌های دسته‌بندی سطح‌بالا (مثلاً صفحه‌ی «اطلاعات» زیر بیمه‌نامه آنلاین) ===== */
.info-cat-tabs{display:flex; gap:10px; margin-bottom:22px; flex-wrap:wrap;}
.info-cat-tab{padding:11px 22px; border-radius:13px; background:var(--paper-2); font-size:13px; font-weight:800; cursor:pointer; color:#6E6885; border:1.5px solid transparent; transition:background .18s var(--ease), color .18s var(--ease), transform .15s var(--ease), border-color .18s var(--ease);}
.info-cat-tab:hover{transform:translateY(-1px);}
.info-cat-tab.active{background:linear-gradient(135deg,var(--gold-3),var(--gold-2)); color:#3A2B05; box-shadow:0 8px 20px rgba(206,155,46,0.32); border-color:var(--line-gold);}
.info-cat-panel{display:none;} .info-cat-panel.active{display:block; animation:sectionFade .25s var(--ease);}

.stat-row{display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-bottom:24px;}
.dash-head-row{display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;}
.dash-circles-row{display:flex; align-items:center; gap:14px; flex-shrink:0;}
@media (max-width:760px){ .dash-head-row{justify-content:flex-start;} .dash-circles-row{width:100%;} }
.stat{background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:19px 20px; position:relative; overflow:hidden; transition:transform .22s var(--ease), box-shadow .22s var(--ease); flex:1 1 210px; min-width:0; display:flex; flex-direction:column; justify-content:center;}
.stat:hover{transform:translateY(-4px); box-shadow:var(--shadow-md);}
.stat::before{ content:""; position:absolute; top:0; right:0; left:0; height:3px; background:var(--wave); background-size:240% 100%; animation:shimmerBar 9s linear infinite;}
.stat::after{ content:""; position:absolute; left:-30px; bottom:-30px; width:90px; height:90px; border-radius:50%; background:radial-gradient(circle, rgba(206,155,46,0.10), transparent 70%); pointer-events:none;}
.stat .lbl{font-size:11px; color:#8A8398; font-weight:600; margin-bottom:9px;}
.stat .val{font-size:21px; font-weight:800; font-family:'IBM Plex Mono'; direction:ltr; background:linear-gradient(120deg,var(--ink),var(--ink-2)); -webkit-background-clip:text; background-clip:text; color:transparent;}
.stat.stat-circle{ flex:0 0 148px; aspect-ratio:1/1; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; background:linear-gradient(150deg,var(--gold-soft),#fff); border:1.5px solid var(--line-gold); box-shadow:var(--shadow-gold); padding:12px; }
.stat.stat-circle::before, .stat.stat-circle::after{ display:none; }
.stat.stat-circle:hover{ transform:translateY(-4px) scale(1.03); }
.stat.stat-circle .lbl{ font-size:10.5px; margin-bottom:6px; line-height:1.35; }
.stat.stat-circle .val{ font-size:19px; background:linear-gradient(120deg,var(--gold-2),var(--gold)); -webkit-background-clip:text; background-clip:text; }
@media (max-width:520px){ .stat.stat-circle{ flex:0 0 118px; padding:8px; } .stat.stat-circle .val{ font-size:16px; } .stat.stat-circle .lbl{ font-size:9.5px; } }

@media (max-width:900px){.stat{flex-basis:calc(50% - 7px);}}

.notif{display:flex; align-items:flex-start; gap:10px; padding:13px 14px; border-radius:11px; margin-bottom:8px; font-size:12.5px; line-height:1.7; transition:transform .16s var(--ease);}
.notif:hover{transform:translateX(-3px);}
.notif-clickable{ cursor:pointer; }
.notif.warning{background:rgba(176,128,15,0.09); color:#7A5A0B;}
.notif.info{background:var(--teal-soft); color:var(--teal);}
.notif .dot{width:6px;height:6px;border-radius:50%; margin-top:6px; flex-shrink:0;}
.notif.warning .dot{background:var(--warn); box-shadow:0 0 6px var(--warn);} .notif.info .dot{background:var(--teal); box-shadow:0 0 6px var(--teal);}
#notifList{ display:flex; flex-wrap:wrap; gap:10px; }
.inst-notif-card{
  flex:1 1 220px; max-width:260px; min-width:200px;
  display:flex; flex-direction:column; gap:5px;
  border:1.4px solid var(--line); border-right:3px solid var(--line);
  border-radius:12px; padding:10px 14px; overflow:hidden;
  transition:transform .14s var(--ease), box-shadow .14s var(--ease);
}
.inst-notif-card:hover{transform:translateY(-2px); box-shadow:var(--shadow);}
.inst-notif-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.inst-notif-name{ font-size:11.5px; font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; flex:1 1 auto; }
.inst-notif-days{ font-size:10px; font-weight:700; padding:3px 9px; border-radius:20px; white-space:nowrap; flex-shrink:0; }
.inst-notif-bottom{ display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:10.5px; color:#8A8398; flex-wrap:wrap; min-width:0; }
.inst-notif-bottom > span:first-child{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; flex:1 1 auto; }
.inst-notif-amount{ color:var(--ink); font-weight:700; flex-shrink:0; white-space:nowrap; }
.inst-notif-upcoming{ background:rgba(29,138,111,0.05); border-color:var(--line); border-right-color:var(--teal); }
.inst-notif-upcoming .inst-notif-days{ background:var(--teal-soft); color:var(--teal); }
.inst-notif-urgent{ background:rgba(176,128,15,0.05); border-color:var(--line); border-right-color:var(--warn); }
.inst-notif-urgent .inst-notif-days{ background:rgba(176,128,15,0.14); color:#7A5A0B; }
.inst-notif-overdue{ background:rgba(193,72,58,0.05); border-color:var(--line); border-right-color:var(--danger); }
.inst-notif-overdue .inst-notif-days{ background:var(--danger-soft); color:var(--danger); }
.toast{position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px); background:linear-gradient(135deg,var(--ink-2),var(--ink)); color:#fff; padding:13px 24px; border-radius:13px; font-size:13px; font-weight:600; opacity:0; pointer-events:none; transition:all .28s var(--ease-bounce); z-index:999; box-shadow:0 18px 40px rgba(0,0,0,0.34);}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
.toast.error{background:linear-gradient(135deg,var(--danger),#A8362A);}

.empty-hint{text-align:center; padding:34px 10px; color:#A79FBE; font-size:12.5px;}
.autocomplete-list{ position:absolute; top:100%; right:0; left:0; background:#fff; border:1.5px solid var(--line); border-radius:13px; max-height:264px; overflow-y:auto; z-index:50; box-shadow:var(--shadow-lg); display:none; margin-top:5px; }
.autocomplete-list.show{ display:block; animation:sectionFade .15s var(--ease); }
.autocomplete-item{ height:44px; box-sizing:border-box; padding:0 12px; font-size:12.5px; cursor:pointer; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:8px; transition:background .12s; }
.autocomplete-item:last-child{ border-bottom:none; }
.autocomplete-item:hover{ background:var(--gold-soft); }
.autocomplete-item .ac-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; color:var(--ink); }
.autocomplete-item .ac-tags{ display:flex; align-items:center; gap:5px; flex-shrink:0; }
.autocomplete-item .role-tag{ font-size:10.5px; font-weight:700; color:var(--teal); background:var(--teal-soft); padding:3px 10px; border-radius:20px; white-space:nowrap; }
.autocomplete-item .pending-tag{ font-size:9.5px; font-weight:700; color:#7A5A0B; background:rgba(176,128,15,0.14); padding:3px 9px; border-radius:20px; white-space:nowrap; }
.autocomplete-item .ac-mobile{ font-size:10.5px; font-weight:600; color:#9992AA; font-family:'IBM Plex Mono'; direction:ltr; white-space:nowrap; }
::-webkit-scrollbar{width:8px; height:8px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--gold-3); border-radius:10px; border:2px solid var(--paper);}

.modal-overlay{position:fixed; inset:0; background:rgba(15,17,50,0.58); backdrop-filter:blur(4px); display:none; align-items:center; justify-content:center; z-index:800; padding:20px;}
.modal-overlay.show{display:flex; animation:sectionFade .2s var(--ease);}
.modal-box{background:#fff; border-radius:22px; max-width:640px; width:100%; max-height:86vh; overflow-y:auto; padding:28px 30px; box-shadow:0 44px 100px rgba(0,0,0,0.36); animation:cardRise .3s var(--ease-bounce); position:relative;}
.modal-box::before{ content:""; position:absolute; top:0; right:0; left:0; height:4px; background:var(--wave); background-size:240% 100%; animation:shimmerBar 8s linear infinite; border-radius:22px 22px 0 0;}
.modal-box{ scrollbar-width:thin; scrollbar-color:var(--gold-3) transparent; }
.modal-box::-webkit-scrollbar{ width:7px; }
.modal-box::-webkit-scrollbar-track{ background:transparent; }
.modal-box::-webkit-scrollbar-thumb{ background:var(--gold-3); border-radius:20px; border:2px solid #fff; }
.modal-box::-webkit-scrollbar-thumb:hover{ background:var(--gold-2); }
.modal-box h2{font-size:16.5px; margin:0 0 4px; color:var(--ink); font-weight:800;}
.modal-box .sub{font-size:12px; color:#A79FBE; margin-bottom:18px;}
.modal-close{
  position:sticky; top:0; float:left;
  transform:translate(-20px, -18px);
  background:var(--paper-2); border:none; border-radius:12px;
  width:34px; height:34px; cursor:pointer; font-size:15px; color:var(--ink);
  box-shadow:0 6px 14px rgba(20,22,58,0.14);
  display:flex; align-items:center; justify-content:center;
  transition:background .18s, transform .15s, box-shadow .18s;
}
.modal-close:hover{background:var(--gold-soft); transform:translate(-20px, -18px) rotate(90deg); box-shadow:0 8px 18px rgba(206,155,46,0.22);}
.detail-grid{display:grid; grid-template-columns:1fr 1fr; gap:11px 20px; font-size:12.5px; margin-bottom:16px;}
.detail-grid .k{color:#A79FBE; font-weight:600;}
.detail-grid .v{font-weight:700; color:var(--ink);}
.modal-section-title{font-size:12.5px; font-weight:800; margin:18px 0 8px; color:var(--ink); display:flex; align-items:center; gap:6px;}
.org-tree{display:flex; flex-direction:column; align-items:stretch; gap:0; margin-bottom:6px;}
.org-node{background:var(--paper-2); border:1.5px solid var(--line); border-radius:12px; padding:11px 15px; display:flex; flex-direction:column; gap:2px; transition:transform .16s var(--ease);}
.org-node:hover{transform:translateX(-3px);}
.org-node-self{background:var(--gold-soft); border-color:var(--line-gold);}
.org-node-role{font-size:10.5px; font-weight:700; color:var(--teal);}
.org-node-name{font-size:13px; font-weight:700; color:var(--ink);}
.org-self-tag{font-size:10.5px; font-weight:600; color:var(--gold);}
.org-node-mobile{font-size:11px; color:#8A8398; direction:ltr; text-align:left;}
.org-connector{text-align:center; font-size:13px; color:#B0AAC4; padding:2px 0;}
.org-tree-warning{margin-top:8px; padding:11px 14px; border-radius:11px; background:rgba(176,128,15,0.09); color:#7A5A0B; font-size:11.5px; line-height:1.7;}
.perf-node-self{ background:var(--gold-soft); border-color:var(--line-gold); }
.perf-node-box{ display:flex; align-items:center; justify-content:space-between; gap:10px; background:var(--paper-2); border:1.5px solid var(--line); border-radius:12px; padding:11px 15px; margin-bottom:8px; flex-wrap:wrap; transition:transform .16s var(--ease); }
.perf-node-box:hover{transform:translateX(-3px);}
.perf-node-box .pn-name{ font-weight:700; font-size:12.5px; color:var(--ink); }
.perf-node-box .pn-role{ font-size:10.5px; font-weight:700; color:var(--teal); margin-right:6px; }
.perf-node-box .pn-amt{ font-family:'IBM Plex Mono'; direction:ltr; font-weight:700; color:var(--teal); font-size:12.5px; }
.perf-children{ margin-right:22px; padding-right:14px; border-right:2px dashed var(--line); }

.acc-group{ border:1.5px solid var(--line); border-radius:14px; margin-bottom:10px; overflow:hidden; transition:box-shadow .2s var(--ease); }
.acc-group:hover{ box-shadow:var(--shadow); }
.acc-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 17px; background:var(--paper-2); cursor:pointer; flex-wrap:wrap; transition:background .16s; }
.acc-head:hover{ background:#ECE6D6; }
.acc-head .ah-name{ font-weight:800; font-size:13.5px; color:var(--ink); display:inline-flex; align-items:center; gap:8px; }
.acc-head .ah-role{ font-size:10.5px; font-weight:700; color:var(--teal); background:var(--teal-soft); padding:3px 10px; border-radius:20px; white-space:nowrap; }
.acc-head .ah-meta{ font-size:11.5px; color:#8A8398; }
.acc-body{ display:none; padding:13px 17px; }
.acc-body.open{ display:block; animation:sectionFade .2s var(--ease); }
.acc-arrow{ transition:transform .2s var(--ease); display:inline-block; }
.acc-arrow.open{ transform:rotate(180deg); }

/* ===== بلاگ‌نویسی ===== */
.blog-cover-preview{ width:100%; max-width:280px; height:150px; object-fit:cover; border-radius:14px; border:1.5px solid var(--line); display:none; margin-top:8px; box-shadow:var(--shadow); }
.blog-cover-preview.show{ display:block; }
#blogEditorBox{ background:#fff; border-radius:11px; }
#blogEditorBox .ql-editor{ min-height:260px; font-family:'Estedad',sans-serif; font-size:14px; }
#blogEditorBox .ql-toolbar{ border-radius:11px 11px 0 0; border-color:var(--line); }
#blogEditorBox .ql-container{ border-radius:0 0 11px 11px; border-color:var(--line); }
.blog-slug-box{ display:flex; align-items:center; gap:6px; direction:ltr; }
.blog-slug-box span{ color:#A79FBE; font-size:11.5px; font-family:'IBM Plex Mono'; }
.blog-seo-hint{ font-size:11px; color:#A29CB8; margin-top:4px; }

/* ===== حرکت ملایم ورود برای کارت‌ها و ردیف‌های جدول (بدون نیاز به جاوااسکریپت) ===== */
.section.active .card{ animation:fadeUp .38s var(--ease) backwards; }
.section.active .card:nth-of-type(2){ animation-delay:.04s; }
.section.active .card:nth-of-type(3){ animation-delay:.08s; }
.section.active .card:nth-of-type(4){ animation-delay:.12s; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}

/* ===== انتخابگر تاریخ شمسی (تقویم کشویی) ===== */
input.jdp{ cursor:pointer; }
.jdp-popup{
  position:fixed; z-index:1000; width:300px; background:#fff; border:1.5px solid var(--line);
  border-radius:16px; box-shadow:var(--shadow-lg); padding:14px; display:none;
}
.jdp-popup.show{ display:block; animation:sectionFade .15s var(--ease); }
.jdp-head{ display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:12px; }
.jdp-head .jdp-nav{ width:30px; height:30px; border-radius:9px; border:1.5px solid var(--line); background:var(--paper-2); cursor:pointer; font-size:14px; color:var(--ink); display:flex; align-items:center; justify-content:center; transition:background .15s; flex-shrink:0; }
.jdp-head .jdp-nav:hover{ background:var(--gold-soft); }
.jdp-label{ display:flex; gap:4px; align-items:center; flex:1; justify-content:center; min-width:0; }
.jdp-label select{ border:none; background:transparent; font-family:inherit; font-size:12.5px; font-weight:800; color:var(--ink); cursor:pointer; padding:2px 0; max-width:120px; }
.jdp-label select:focus{ outline:none; }
.jdp-year-select{ direction:ltr; }
.jdp-weekdays{ display:grid; grid-template-columns:repeat(7,1fr); gap:2px; margin-bottom:4px; }
.jdp-weekdays span{ text-align:center; font-size:10.5px; font-weight:700; color:#A79FBE; padding:4px 0; }
.jdp-days{ display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
.jdp-day{ text-align:center; font-size:12.5px; font-family:'IBM Plex Mono'; direction:ltr; padding:8px 0; border-radius:9px; cursor:pointer; color:var(--ink); transition:background .12s, color .12s; }
.jdp-day:hover{ background:var(--gold-soft); }
.jdp-day.jdp-today{ box-shadow:inset 0 0 0 1.5px var(--gold-2); font-weight:700; }
.jdp-day.jdp-selected{ background:linear-gradient(135deg,var(--gold-3),var(--gold-2)); color:#3A2B05; font-weight:800; }
.jdp-day.jdp-empty{ cursor:default; }
.jdp-day.jdp-empty:hover{ background:none; }
.jdp-foot{ display:flex; justify-content:space-between; margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); }
.jdp-foot button{ font-size:11px; font-weight:700; color:var(--teal); background:none; border:none; cursor:pointer; padding:5px 10px; border-radius:8px; font-family:inherit; }
.jdp-foot button:hover{ background:var(--teal-soft); }
@media (max-width:400px){
  .jdp-popup{ width:88vw; }
}

/* ===== مودال جشنواره فروش (با هر بار ورود، برای همه‌ی نیروها نمایش داده می‌شه) ===== */
.promo-modal-overlay{
  position:fixed; inset:0; background:rgba(15,17,50,0.62); backdrop-filter:blur(5px);
  display:none; align-items:center; justify-content:center; z-index:950; padding:20px;
}
.promo-modal-overlay.show{ display:flex; animation:sectionFade .25s var(--ease); }
.promo-box{
  position:relative; width:100%; max-width:460px; max-height:90vh; overflow-y:auto;
  background:linear-gradient(165deg, #fff 0%, var(--gold-soft) 130%);
  border-radius:28px; box-shadow:0 50px 110px rgba(0,0,0,0.42);
  padding:0; animation:cardRise .35s var(--ease-bounce);
}
.promo-head{
  position:relative; overflow:hidden; padding:34px 28px 26px; text-align:center;
  background:linear-gradient(150deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink-3) 120%);
  border-radius:28px 28px 0 0;
}
.promo-head::before{
  content:""; position:absolute; top:0; right:0; left:0; height:5px;
  background:var(--wave); background-size:240% 100%; animation:shimmerBar 6s linear infinite;
}
.promo-head .p-emoji{ font-size:34px; margin-bottom:8px; display:block; }
.promo-head .p-brand{
  font-size:28px; font-weight:900; color:#fff; margin-bottom:10px; letter-spacing:-.3px;
  display:flex; align-items:center; justify-content:center; gap:7px; flex-wrap:wrap;
  text-shadow:0 4px 18px rgba(0,0,0,0.3);
}
.promo-head .p-brand .p-brand-hi{
  background:linear-gradient(100deg, var(--gold) 0%, var(--gold-3) 25%, var(--gold-3) 50%, var(--gold-2) 75%, var(--gold) 100%);
  background-size:250% auto;
  -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:promoBrandShimmer 4.5s linear infinite;
}
@keyframes promoBrandShimmer{ 0%{background-position:0% 50%;} 100%{background-position:250% 50%;} }
.promo-head h2{ margin:0 0 6px; font-size:16.5px; font-weight:700; color:rgba(255,255,255,0.88); line-height:1.5; }
.promo-head .p-sub{ font-size:12px; color:var(--gold-3); font-weight:700; }
.promo-close{
  position:absolute; top:14px; left:14px; width:32px; height:32px; border-radius:10px;
  background:rgba(255,255,255,0.12); border:none; color:#fff; font-size:15px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:background .18s, transform .15s;
}
.promo-close:hover{ background:rgba(255,255,255,0.25); transform:rotate(90deg); }
.promo-body{ padding:26px 26px 28px; }
.promo-tiers{ display:flex; flex-direction:column; gap:12px; margin-bottom:18px; }
.promo-tier{
  border-radius:16px; padding:15px 17px; background:#fff; border:1.5px solid var(--line-gold);
  box-shadow:var(--shadow); display:flex; flex-direction:column; gap:4px;
}
.promo-tier .pt-range{ font-size:12px; font-weight:700; color:#6E6885; }
.promo-tier .pt-reward{ font-size:15px; font-weight:800; color:var(--ink); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.promo-tier .pt-reward b{ color:var(--gold); font-family:'IBM Plex Mono'; direction:ltr; display:inline-block; }
.promo-tier .pt-extra{ font-size:11.5px; color:var(--teal); font-weight:700; }
.promo-note{
  display:flex; align-items:center; gap:8px; background:var(--teal-soft); color:var(--teal);
  padding:10px 14px; border-radius:12px; font-size:12px; font-weight:700; margin-bottom:14px;
}
.promo-dates{
  display:flex; align-items:center; justify-content:center; gap:6px; padding:12px 14px;
  border-radius:14px; background:var(--paper-2); font-size:12.5px; font-weight:700; color:var(--ink);
  border:1.4px dashed var(--line-gold); text-align:center; flex-wrap:wrap;
}
.promo-dates .mono{ color:var(--gold); }
.promo-cta{
  width:100%; margin-top:18px; padding:13px; border:none; border-radius:13px; cursor:pointer;
  background:linear-gradient(135deg,var(--gold-3),var(--gold-2)); color:#3A2B05; font-family:inherit;
  font-weight:800; font-size:13.5px; box-shadow:0 10px 24px rgba(206,155,46,0.35);
  transition:transform .16s var(--ease), box-shadow .16s var(--ease);
}
.promo-cta:hover{ transform:translateY(-2px); box-shadow:0 16px 32px rgba(206,155,46,0.42); }
/* ===== کیف پول من: کارت موجودی و لیست تراکنش‌ها ===== */
.wallet-hero{
  position:relative; overflow:hidden; border-radius:26px; padding:28px 26px;
  background:linear-gradient(135deg, var(--ink-2) 0%, var(--ink) 60%, var(--ink-3) 130%);
  box-shadow:0 20px 50px rgba(20,22,58,0.28); margin-bottom:20px;
}
.wallet-hero::before{
  content:""; position:absolute; top:0; right:0; left:0; height:4px;
  background:var(--wave); background-size:240% 100%; animation:shimmerBar 7s linear infinite;
}
.wallet-hero::after{
  content:""; position:absolute; top:-100px; left:-60px; width:220px; height:220px; border-radius:50%;
  background:radial-gradient(circle, rgba(206,155,46,0.22), transparent 70%); pointer-events:none;
}
.wallet-balance-lbl{ position:relative; z-index:1; font-size:12px; font-weight:700; color:rgba(255,255,255,0.72); margin-bottom:10px; display:flex; align-items:center; gap:8px; }
.wallet-balance-lbl .dot{ width:6px; height:6px; border-radius:50%; background:var(--gold-3); box-shadow:0 0 8px var(--gold-3); animation:dotPulse 2s ease-in-out infinite; }
.wallet-balance-val{
  position:relative; z-index:1;
  font-family:'IBM Plex Mono','Estedad',sans-serif; direction:ltr; display:block; text-align:left;
  font-size:clamp(28px,5vw,40px); font-weight:800; color:#fff; margin-bottom:22px;
}
.wallet-balance-val .rl{ font-family:'Estedad',sans-serif; font-size:14px; font-weight:600; color:rgba(255,255,255,0.62); margin-left:10px; }
.wallet-sub-row{ position:relative; z-index:1; display:flex; gap:14px; flex-wrap:wrap; }
.wallet-sub-stat{
  flex:1 1 160px; background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.14);
  border-radius:16px; padding:13px 16px; display:flex; align-items:center; gap:10px;
}
.wallet-sub-stat .wss-ic{
  width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:800; flex-shrink:0;
}
.wallet-sub-stat.deposit .wss-ic{ background:rgba(47,181,147,0.20); color:#5EE3B8; }
.wallet-sub-stat.withdraw .wss-ic{ background:rgba(193,72,58,0.20); color:#F0897A; }
.wallet-sub-stat .wss-txt{ min-width:0; }
.wallet-sub-stat .wss-lbl{ font-size:10.5px; color:rgba(255,255,255,0.68); margin-bottom:3px; }
.wallet-sub-stat .wss-val{ font-family:'IBM Plex Mono','Estedad',sans-serif; direction:ltr; display:inline-block; font-size:14px; font-weight:800; color:#fff; }

.wallet-tx-list{ display:flex; flex-direction:column; gap:8px; }
.wallet-tx-item{
  display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:14px;
  background:var(--paper-2); border:1px solid var(--line); transition:transform .16s var(--ease), box-shadow .16s var(--ease);
}
.wallet-tx-item:hover{ transform:translateX(-3px); box-shadow:var(--shadow); }
.wallet-tx-icon{
  width:38px; height:38px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:800;
}
.wallet-tx-item.deposit .wallet-tx-icon{ background:var(--teal-soft); color:var(--teal); }
.wallet-tx-item.withdraw .wallet-tx-icon{ background:var(--danger-soft); color:var(--danger); }
.wallet-tx-info{ flex:1; min-width:0; }
.wallet-tx-name{ font-size:12.5px; font-weight:700; color:var(--ink); margin-bottom:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wallet-tx-date{ font-size:10.5px; color:#8A8398; }
.wallet-tx-amount{ font-family:'IBM Plex Mono','Estedad',sans-serif; direction:ltr; font-weight:800; font-size:13.5px; white-space:nowrap; flex-shrink:0; }
.wallet-tx-item.deposit .wallet-tx-amount{ color:var(--teal); }
.wallet-tx-item.withdraw .wallet-tx-amount{ color:var(--danger); }
@media (max-width:520px){
  .wallet-hero{ padding:22px 18px; border-radius:22px; }
  .wallet-sub-stat{ flex-basis:100%; }
}
/* ===== کیف پول نیروها: کارت‌های لیست (شبیه کیف پول من) ===== */
.staff-wallet-list{ display:flex; flex-direction:column; gap:10px; }
.staff-wallet-card{
  display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:16px;
  background:var(--paper-2); border:1.4px solid var(--line); cursor:pointer;
  transition:transform .16s var(--ease), box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.staff-wallet-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow); border-color:var(--line-gold); }
.swc-avatar{
  width:44px; height:44px; border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:800; color:#fff;
  background:linear-gradient(135deg,var(--ink-2),var(--ink));
  box-shadow:0 6px 14px rgba(20,22,58,0.22);
}
.swc-info{ flex:1; min-width:0; }
.swc-name{ font-size:13px; font-weight:800; color:var(--ink); margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.swc-meta{ font-size:11px; color:#8A8398; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.swc-role-tag{ font-size:10px; font-weight:700; color:var(--teal); background:var(--teal-soft); padding:2px 9px; border-radius:20px; white-space:nowrap; }
.swc-balance-box{ text-align:left; flex-shrink:0; }
.swc-balance-lbl{ font-size:10px; color:#8A8398; margin-bottom:3px; }
.swc-balance-val{ font-family:'IBM Plex Mono','Estedad',sans-serif; direction:ltr; font-weight:800; font-size:15px; color:var(--gold); white-space:nowrap; }
.swc-balance-val .rl2{ font-family:'Estedad',sans-serif; font-size:10px; font-weight:600; color:#8A8398; margin-left:4px; }
@media (max-width:520px){
  .staff-wallet-card{ flex-wrap:wrap; }
  .swc-balance-box{ width:100%; text-align:right; margin-top:6px; }
}

/* ===== فرم‌ها: کاشی شرکت‌های بیمه ===== */
.forms-company-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:16px; }
.forms-company-tile{
  cursor:pointer; text-align:center; padding:22px 14px 18px; border-radius:20px;
  background:var(--paper-2); border:1.5px solid var(--line);
  transition:transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.forms-company-tile:hover{ transform:translateY(-4px); border-color:var(--line-gold); box-shadow:var(--shadow-md); }
.forms-company-tile:active{ transform:translateY(-1px); }
.fct-logo{
  width:96px; height:96px; margin:0 auto 12px; border-radius:18px; background:#fff;
  border:1px solid var(--line); display:flex; align-items:center; justify-content:center;
  overflow:hidden; font-size:38px;
}
.fct-logo img{ width:100%; height:100%; object-fit:contain; padding:12px; }
.fct-name{ font-weight:800; font-size:13.5px; color:var(--ink); line-height:1.6; }
.fct-count{ font-size:11px; color:#8A8398; margin-top:4px; }
body.dark-theme .forms-company-tile{ background:#1D2040; border-color:rgba(255,255,255,0.08); }
body.dark-theme .forms-company-tile:hover{ border-color:rgba(230,180,90,0.35); }
@media (max-width:520px){
  .forms-company-grid{ grid-template-columns:repeat(2, 1fr); gap:12px; }
  .fct-logo{ width:80px; height:80px; }
}

/* اصلاح عرض محتوای اصلی پنل */
.shell{ width:100%; }
.main{ flex:1 1 0; min-width:0; width:auto; max-width:none; }
.section{ width:100%; max-width:none; }
