/* فونت فارسی وزیرمتن — از CDN با fallback به فونت‌های سیستم (آفلاین هم زیبا می‌ماند) */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css') screen;

:root{
    --teal:#0d7a6e; --teal-dark:#0a5c53; --teal-soft:#e3f2f0;
    --teal-mid:#12a394; --teal-grad:linear-gradient(135deg,#0d5c56 0%,#0d7a6e 55%,#12a394 100%);
    --gold:#b8860b; --gold-soft:#fdf6e3;
    --blue:#1a5276; --blue-soft:#eaf2fa;
    --ok:#22c55e; --ok-soft:#e8f9ef;
    --warn:#f59e0b; --warn-soft:#fef4e4;
    --bad:#ef4444; --bad-soft:#feecec;
    --none:#cbd5e1; --none-soft:#f1f5f9;
    --ink:#1f2933; --muted:#5f6b7a; --line:#dde5ea; --bg:#f4f8f8; --card:#fff;
    --soft:#f1f5f9; --text:#0f172a;
    --shadow-sm:0 1px 3px rgba(15,23,42,.06);
    --shadow-md:0 6px 18px rgba(15,23,42,.08);
    --shadow-lg:0 14px 34px rgba(15,23,42,.13);
    --radius-sm:10px; --radius-md:14px; --radius-lg:20px;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{scroll-behavior:smooth;}
  body{font-family:"Vazirmatn","Vazirmatn FD","Segoe UI",Tahoma,"IRANSans",sans-serif; background:var(--bg); color:var(--ink); font-size:15px; line-height:1.9; letter-spacing:.1px; text-rendering:optimizeLegibility; -webkit-font-smoothing:antialiased;}


  /* ---------- Theme system (accent colors + dark mode) ---------- */
  [data-accent="purple"]{ --teal:#7c5cd6; --teal-dark:#5f3fb8; --teal-soft:#efeafc; }
  [data-accent="rose"]{ --teal:#c2607a; --teal-dark:#a04a63; --teal-soft:#fdeef2; }
  [data-accent="navy"]{ --teal:#33639a; --teal-dark:#274c78; --teal-soft:#e8f0f9; }
  [data-accent="forest"]{ --teal:#2f8a5b; --teal-dark:#226b45; --teal-soft:#e6f5ec; }
  [data-accent="amber"]{ --teal:#b7791f; --teal-dark:#94600f; --teal-soft:#fbf3e0; }
  [data-theme="dark"] .otp-inputs input{color:var(--ink); background:var(--card); border-color:var(--line);}
  /* نایت مود: کادرهای ورودی به‌جای سفید، #0d4161 می‌شوند (درخواست کاربر) */
  [data-theme="dark"] input[type="text"],[data-theme="dark"] input[type="tel"],
  [data-theme="dark"] input[type="email"],[data-theme="dark"] input[type="number"],
  [data-theme="dark"] input[type="date"],[data-theme="dark"] input[type="password"],
  [data-theme="dark"] input[type="search"],[data-theme="dark"] select,[data-theme="dark"] textarea{
    background:#0d4161 !important; color:#e2f0fb !important; border-color:#1b5a83 !important;
  }
  [data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#8fb7d6 !important;}
  [data-theme="dark"] .otp-inputs input{background:#0d4161 !important; color:#e2f0fb !important; border-color:#1b5a83 !important;}
  /* کادرهای نتیجه/هشدار/خالی که سفید هاردکد دارند → #0d4161 در نایت مود */
  [data-theme="dark"] .result-box,[data-theme="dark"] .warn-box,[data-theme="dark"] .note,[data-theme="dark"] .empty,
  [data-theme="dark"] .score-big,[data-theme="dark"] .filter-chip,[data-theme="dark"] .tag.none,
  [data-theme="dark"] .modal .card,[data-theme="dark"] .pay-box,[data-theme="dark"] .cap-note{
    background-color:#0d4161 !important;
  }
  [data-theme="dark"] .filter-chip{color:#d7ecfb !important; border-color:#1b5a83 !important;}
  [data-theme="dark"] .pz-piece{background-color:#0d4161 !important;}

  [data-theme="dark"] .otp-inputs input:focus{border-color:var(--teal);}
  [data-theme="dark"]{
    --teal:#2bb8a9; --teal-dark:#179b90; --teal-soft:#123f3a;
    --gold:#e0a83c; --gold-soft:#3a2f14;
    --blue:#6ea8d8; --blue-soft:#152a3d;
    --ok:#4ade80; --ok-soft:#12301f;
    --warn:#fbbf24; --warn-soft:#36290f;
    --bad:#f87171; --bad-soft:#3a1513;
    --none:#64748b; --none-soft:#1e293b;
    --ink:#e5edf3; --muted:#94a3b8; --line:#2b3e4d;
    --bg:#0d1720; --card:#062943;
    --soft:#0b2038; --text:#e5edf3;
  }
  [data-theme="dark"][data-accent="purple"]{ --teal:#8f78e0; --teal-dark:#6f56c9; --teal-soft:#251d40; }
  [data-theme="dark"][data-accent="rose"]{ --teal:#d17a94; --teal-dark:#b0556f; --teal-soft:#3c1f28; }
  [data-theme="dark"][data-accent="navy"]{ --teal:#4f82bd; --teal-dark:#3a6699; --teal-soft:#16283d; }
  [data-theme="dark"][data-accent="forest"]{ --teal:#3f9d6d; --teal-dark:#2f7d55; --teal-soft:#12291d; }
  [data-theme="dark"][data-accent="amber"]{ --teal:#d19a3a; --teal-dark:#ad7c22; --teal-soft:#33290f; }
  .theme-btn{background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.25); color:#fff; width:38px; height:38px; border-radius:12px; font-size:17px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex:0 0 auto; transition:.2s;}
  .theme-btn:hover{background:rgba(255,255,255,.28);}
  .swatches{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0;}
  .swatch{width:34px; height:34px; border-radius:50%; cursor:pointer; border:3px solid transparent; box-shadow:0 0 0 1.5px var(--line); transition:.15s;}
  .swatch:hover{transform:scale(1.1);}
  .swatch.active{border-color:var(--ink); box-shadow:0 0 0 2px var(--ink);}
  .switch-row{display:flex; align-items:center; gap:12px; margin:12px 0;}
  .switch{position:relative; width:52px; height:28px; flex:0 0 auto; cursor:pointer;}
  .switch input{opacity:0; width:0; height:0;}
  .switch .sl{position:absolute; inset:0; background:var(--line); border-radius:999px; transition:.25s;}
  .switch .sl::before{content:""; position:absolute; width:22px; height:22px; border-radius:50%; left:3px; top:3px; background:#fff; transition:.25s;}
  .switch input:checked + .sl{background:var(--teal);}
  .switch input:checked + .sl::before{transform:translateX(24px);}

  /* ---------- Top bar ---------- */
  /* فقط حذف دکمه همبرگری (سه‌خط) قالب در صفحات کامپوننت — هدر و منوی اصلی سایت دست‌نخورده می‌مانند */
  body.com_avayesalamat .navbar-toggler,
  body.com_avayesalamat .navbar-toggler-icon,
  body.com_avayesalamat .hamburger,
  body.com_avayesalamat .menu-hamburger,
  body.com_avayesalamat .menu-toggle,
  body.com_avayesalamat .mobile-menu-toggle,
  body.com_avayesalamat .nav-toggle,
  body.com_avayesalamat .burger,
  body.com_avayesalamat .toggler,
  body.com_avayesalamat #offcanvas-toggler,
  body.com_avayesalamat .off-canvas-toggle,
  body.com_avayesalamat .offcanvas-toggle,
  body.com_avayesalamat .uk-navbar-toggle,
  body.com_avayesalamat .burger-menu,
  body.com_avayesalamat .toggle-menu,
  body.com_avayesalamat .open-menu,
  body.com_avayesalamat .fa-bars,
  body.com_avayesalamat .fa-navicon{ display:none !important; }
  body.com_avayesalamat .container-component{ background:var(--bg,#f4f8f8); }
  /* فشرده‌سازی هدر قالب در صفحات کامپوننت — منوی اصلی می‌ماند ولی ارتفاعش کم می‌شود تا آیکون‌ها به بالای صفحه نزدیک شوند */
  body.com_avayesalamat .container-header{ padding-top:4px !important; padding-bottom:4px !important; }
  body.com_avayesalamat .container-header .grid-child{ min-height:0 !important; padding-top:2px !important; padding-bottom:2px !important; }
  body.com_avayesalamat .navbar-brand{ margin:0 !important; padding:2px 0 !important; }
  body.com_avayesalamat .navbar-brand .brand-logo{ max-height:28px !important; }
  body.com_avayesalamat .container-nav .navbar{ padding-top:2px !important; padding-bottom:2px !important; }
  body.com_avayesalamat .container-nav .mod-menu{ margin:0 !important; }
  /* همبرگری منتقل‌شده به پنل — هم‌شکل آیکون‌های پنل */
  body.com_avayesalamat .avaye-hamburger-relocated{
    display:inline-flex !important; align-items:center; justify-content:center;
    width:42px; height:42px; border-radius:12px; border:1px solid var(--line,#dde5ea);
    background:var(--card,#fff); color:var(--ink,#1f2933); font-size:17px; cursor:pointer;
    margin:0; padding:0; box-shadow:none;
  }
  .page-top{height:60px;} /* ~2cm فاصله از بالای صفحه */
  .icon-menu{display:none;}
  .rsidebar{display:none;}
  .page-top{height:24px;}
  body.logged-in .icon-menu{display:flex;}
  body.logged-in .rsidebar{display:block;}
  body.logged-in .page-top{height:8px;} /* فاصله بسیار کم از بالای صفحه */
  body.auth-mode .icon-menu{display:none !important;}
  body.auth-mode .rsidebar{display:none !important;}
  body.auth-mode .page-top{height:20px !important;}
  body.auth-mode .layout{padding-top:6px;}
  .auth-back{display:inline-flex; align-items:center; gap:6px; background:var(--card); border:1px solid var(--line); color:var(--ink); border-radius:999px; padding:6px 16px; font-size:13px; font-weight:700; cursor:pointer; margin-bottom:12px;}
  .auth-back:hover{border-color:var(--teal); color:var(--teal-dark);}
  .rsidebar{width:205px; flex:0 0 205px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:12px 8px; position:sticky; top:50px; align-self:flex-start;}
  .rside-item{display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:12px; cursor:pointer; color:var(--ink); font-size:14px; transition:.15s; margin-bottom:2px;}
  .rside-item:hover{background:var(--teal-soft);}
  .rside-item.active{background:var(--teal); color:#fff; font-weight:700;}
  .rside-item .ico{font-size:16px;}
  .rside-sep{height:1px; background:var(--line); margin:10px 8px;}
  /* سوییچ پنل‌ها در سایدبار — ۳ پنل (کاربر/پزشک/آگهی) با برجسته‌شدن پنل فعال */
  .rside-switch{display:flex; flex-direction:column; gap:2px; padding:2px 0;}
  .rside-switch .rside-sw{font-size:13px; padding:7px 10px; border:1px solid var(--line); border-radius:10px; margin-bottom:2px;}
  .rside-switch .rside-sw .ico{font-size:14px;}
  .rside-switch .rside-sw.active{background:var(--teal); border-color:var(--teal); color:#fff; font-weight:800; box-shadow:0 3px 10px rgba(13,122,110,.25);}
  .rside-switch .rside-sw:not(.active):hover{border-color:var(--teal);}
  @media(max-width:960px){.rsidebar{display:none;}}
  .icon-menu{display:flex; flex-direction:column; align-items:center; gap:2cm; max-width:1200px; margin:0 auto; padding:6px 16px 8px;}
  .im-group{display:flex; gap:6px; flex-wrap:wrap; justify-content:center;}
  .im-item{display:flex; flex-direction:column; align-items:center; gap:3px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:9px 13px; cursor:pointer; transition:all .18s ease; color:var(--ink); min-width:62px; box-shadow:var(--shadow-sm);}
  .im-item .im-ico{font-size:19px; line-height:1;}
  .im-item .im-txt{font-size:10.5px; font-weight:800; color:var(--muted); letter-spacing:.2px;}
  .im-item:hover{border-color:var(--teal); background:var(--teal-soft); transform:translateY(-2px);}
  .im-item.active{background:var(--teal); border-color:var(--teal); color:#fff; box-shadow:0 6px 18px rgba(13,122,110,.35); transform:scale(1.08);}
  .im-item.active .im-txt{color:#fff; font-size:11.5px;}
  .im-item.active .im-ico{font-size:25px;}
  .rside-item.active{background:var(--teal); color:#fff; font-weight:800; font-size:14.5px; box-shadow:0 4px 12px rgba(13,122,110,.25); transform:scale(1.02);}
  body.doctor-mode #imUserGroup{display:none !important;}
  body.doctor-mode #imDoctorGroup{display:flex !important;}
  body.doctor-mode #rsideUser{display:none !important;}
  body.doctor-mode #rsideDoctor{display:block !important;}
  body.advertiser-mode #imUserGroup{display:none !important;}
  body.advertiser-mode #imAdvertiserGroup{display:flex !important;}
  body.advertiser-mode #rsideUser{display:none !important;}
  body.advertiser-mode #rsideAdvertiser{display:block !important;}
  .im-item.big{background:var(--gold); border-color:var(--gold); color:#fff;}
  .im-item.big .im-txt{color:#fff;}
  .im-item.big.active{background:var(--teal); border-color:var(--teal);}
  .im-utils{margin-inline-start:0; display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap;}
  .role-switch{display:inline-flex; border:1.5px solid var(--line); border-radius:999px; overflow:hidden; background:var(--card); flex:0 0 auto; gap:4px; padding:4px;}
  .role-btn{border:1.5px solid var(--line); border-radius:999px; padding:8px 16px; font-family:inherit; font-size:13px; font-weight:800; cursor:pointer; transition:.15s; color:var(--muted); background:var(--card);}
  .role-btn:hover{border-color:var(--teal); color:var(--teal-dark);}
  .role-btn.active{background:var(--teal); border-color:var(--teal); color:#fff; font-weight:900; box-shadow:0 4px 14px rgba(13,122,110,.3);}
  .theme-btn{background:var(--card); border:1px solid var(--line); color:var(--ink); width:38px; height:38px; border-radius:12px; font-size:17px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex:0 0 auto; transition:.2s;}
  .theme-btn:hover{border-color:var(--teal);}
  .avatar{width:38px; height:38px; border-radius:50%; background:var(--teal-soft); color:var(--teal-dark); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:16px; border:2px solid var(--teal); cursor:pointer; flex:0 0 auto;}
  .search-mini{display:flex; align-items:center; gap:6px; background:var(--none-soft); border:1px solid var(--line); border-radius:999px; padding:4px 12px;}
  .search-mini input{background:transparent; border:0; outline:0; color:var(--ink); width:110px; font-family:inherit; font-size:12.5px;}
  .date-jalali{display:flex; gap:6px; align-items:center;}
  .date-jalali input{width:100%; min-width:0; text-align:center; font-size:14px; letter-spacing:1px; direction:ltr; font-family:Consolas,monospace;}
  .date-jalali #dm_bd_year{flex:1.6;}
  .date-jalali #dm_bd_month{flex:1;}
  .date-jalali #dm_bd_day{flex:1;}
  .date-jalali .btn-sm{flex:0 0 auto;}
  .hamburger{display:none !important; background:var(--card); border:1px solid var(--line); color:var(--ink); width:38px; height:38px; border-radius:12px; font-size:19px; cursor:pointer; align-items:center; justify-content:center;}
  /* OTP: چپ به راست */
  .otp-inputs{direction:ltr;}
  /* هایلایت کپچای ناقص */
  .captcha-error{ border:2px solid var(--bad,#ef4444) !important; border-radius:14px; box-shadow:0 0 0 4px rgba(239,68,68,.18); animation:avayeShake .45s; }
  @keyframes avayeShake{ 0%,100%{transform:translateX(0);} 20%{transform:translateX(-6px);} 40%{transform:translateX(6px);} 60%{transform:translateX(-4px);} 80%{transform:translateX(4px);} }
  /* Placeholder و بک‌گراند فیلدها: پیش‌فرض ملایم → هنگام تایپ روشن */
  input[type=text],input[type=tel],input[type=email],input[type=number],input[type=date],select,textarea{background:var(--none-soft);}
  input::placeholder{color:var(--muted); opacity:.85; font-style:italic;}
  input:focus,textarea:focus,select:focus{background:var(--card);}
  input:not(:placeholder-shown){background:var(--card);}
  .field.req-empty input,.field.req-empty select{border-color:var(--bad); background:var(--bad-soft); box-shadow:0 0 0 2px rgba(239,68,68,.15);}
  .field.req-empty label{color:var(--bad);}
  .req-msg{color:var(--bad); font-size:11px; font-weight:700; display:block; margin-top:3px;}
  select:has(option[value=""]:checked){color:var(--muted);}
  .role-switch{display:inline-flex; border:1.5px solid var(--line); border-radius:999px; overflow:hidden; background:var(--card); flex:0 0 auto; gap:4px; padding:4px;}
  .role-btn{border:1.5px solid var(--line); border-radius:999px; padding:8px 16px; font-family:inherit; font-size:13px; font-weight:800; cursor:pointer; transition:.15s; color:var(--muted); background:var(--card);}
  .role-btn:hover{border-color:var(--teal); color:var(--teal-dark);}
  .role-btn.active{background:var(--teal); border-color:var(--teal); color:#fff; font-weight:900; box-shadow:0 4px 14px rgba(13,122,110,.3);}

  /* ---------- Main menu ---------- */
  .topnav{display:flex; gap:4px; padding:0 0 8px; flex-wrap:wrap;}
  .nav-item{display:inline-flex; align-items:center; gap:7px; background:var(--none-soft); border:1px solid var(--line); color:var(--ink); border-radius:999px; padding:6px 15px; font-size:13px; font-weight:700; cursor:pointer; transition:.15s;}
  .nav-item:hover{background:var(--teal-soft); color:var(--teal-dark); border-color:var(--teal);}
  .nav-item.active{background:var(--teal); color:#fff; border-color:var(--teal);}
  .nav-item .lock{font-size:11px; opacity:.75;}
  .nav-item.big{background:var(--gold); border-color:var(--gold); color:#fff;}
  .nav-item.big:hover{background:#a3740a; color:#fff;}

  /* ---------- Mobile menu overlay ---------- */
  .mobile-menu{position:fixed; inset:0; background:rgba(15,40,36,.6); z-index:120; display:none;}
  .mobile-menu.show{display:block;}
  .mobile-menu .panel{position:absolute; top:0; bottom:0; right:0; width:min(300px,85vw); background:var(--card); color:var(--ink); padding:20px 16px; overflow-y:auto; animation:slideR .25s;}
  @keyframes slideR{from{transform:translateX(60px); opacity:0;} to{transform:none; opacity:1;}}
  .mobile-menu .mm-item{display:flex; align-items:center; gap:10px; padding:12px 10px; border-radius:12px; font-weight:700; cursor:pointer; border-bottom:1px solid var(--line);}
  .mobile-menu .mm-item:hover{background:var(--teal-soft);}
  .mobile-menu .mm-close{width:100%; margin-top:14px;}

  /* ---------- Layout ---------- */
  .layout{max-width:1240px; margin:0 auto; padding:18px 16px 60px; display:flex; gap:18px; align-items:flex-start; background:var(--bg,#f4f8f8);}
  .avaye-shell,.avaye-view{background:var(--bg,#f4f8f8);}
  .sidebar{width:215px; flex:0 0 215px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:14px 10px; position:sticky; top:84px;}
  .side-item{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:12px; cursor:pointer; color:var(--ink); font-size:13.5px; transition:.15s; margin-bottom:2px;}
  .side-item:hover{background:var(--teal-soft);}
  .side-item.active{background:var(--teal); color:#fff; font-weight:700;}
  .side-item .ico{font-size:16px;}
  .side-sep{height:1px; background:var(--line); margin:10px 8px;}
  .content{flex:1; min-width:0;}
  .screen{display:none; animation:fade .25s;}
  .screen.show{display:block;}
  @keyframes fade{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:none;}}

  .card{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:16px 18px; margin-bottom:16px; box-shadow:var(--shadow-sm); transition:box-shadow .2s;}
  .card:hover{box-shadow:var(--shadow-md);}
  .card h3{font-size:15.5px; margin-bottom:10px; color:var(--teal-dark); display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-weight:800;}
  h2{color:var(--ink); font-weight:900; letter-spacing:.2px;}
  h4{color:var(--ink); font-weight:800;}
  .muted{color:var(--muted); font-size:13.5px;}
  .small{font-size:13px;}
  .grid2{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
  .grid3{display:grid; grid-template-columns:repeat(3,1fr); gap:14px;}
  @media(max-width:900px){.grid3{grid-template-columns:1fr 1fr;} .grid2{grid-template-columns:1fr;}}
  @media(max-width:860px){.page-top{height:52px;} .im-item{min-width:52px; padding:8px 6px;} .im-item .im-txt{font-size:9.5px;} .role-btn{padding:6px 10px; font-size:11.5px;}}
  @media(max-width:620px){.im-item .im-txt{display:none;} .im-item{min-width:46px;} .im-group{flex-wrap:nowrap; overflow-x:auto; max-width:100%; padding-bottom:4px;} .role-switch{width:100%; justify-content:center;} .role-btn{flex:1; text-align:center;} .im-utils{margin-inline-start:0; width:100%; justify-content:center;}}
  @media(max-width:560px){.grid3{grid-template-columns:1fr;}}

  .stat{display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--card);}
  .stat .ico{width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:20px; flex:0 0 auto;}
  .stat b{font-size:17px; display:block; line-height:1.3;}
  .stat span{font-size:12px; color:var(--muted);}

  .btn{display:inline-flex; align-items:center; gap:7px; border:0; border-radius:12px; padding:10px 18px; font-family:inherit; font-size:14px; font-weight:700; cursor:pointer; transition:all .18s ease; letter-spacing:.1px;}
  .btn:active{transform:translateY(1px) scale(.99);}
  .btn-primary{background:var(--teal); color:#fff; box-shadow:0 4px 14px rgba(13,122,110,.28);}
  .btn-primary:hover{background:var(--teal-dark); box-shadow:0 6px 18px rgba(13,122,110,.36); transform:translateY(-1px);}
  .btn-outline{background:var(--card); color:var(--teal-dark); border:1.5px solid var(--teal);}
  .btn-outline:hover{background:var(--teal-soft); border-color:var(--teal-dark);}
  .btn-gold{background:linear-gradient(135deg,#b8860b,#d99a1e); color:#fff; box-shadow:0 4px 14px rgba(184,134,11,.28);}
  .btn-gold:hover{filter:brightness(1.06); transform:translateY(-1px);}
  .btn-ghost{background:transparent; color:var(--muted); border:1px solid var(--line);}
  .btn-ghost:hover{background:var(--soft); color:var(--ink);}
  .btn-danger{background:var(--bad); color:#fff; box-shadow:0 4px 12px rgba(239,68,68,.25);}
  .btn-danger:hover{background:#dc2626;}
  .btn-sm{padding:6px 12px; font-size:12.5px; border-radius:9px;}
  .btn-block{width:100%; justify-content:center;}

  .tag{display:inline-block; background:var(--teal-soft); color:var(--teal-dark); border-radius:999px; padding:2px 10px; font-size:11px; font-weight:700; margin:2px;}
  .tag.gold{background:var(--gold-soft); color:var(--gold);}
  .tag.blue{background:var(--blue-soft); color:var(--blue);}
  .tag.ok{background:var(--ok-soft); color:#15803d;}
  .tag.warn{background:var(--warn-soft); color:#b45309;}
  .tag.red{background:var(--bad-soft); color:var(--bad);}
  .tag.none{background:var(--none-soft); color:#64748b;}

  .tool-card{border:1px solid var(--line); border-radius:16px; padding:14px; cursor:pointer; transition:all .2s ease; background:var(--card); display:flex; flex-direction:column; gap:6px; box-shadow:var(--shadow-sm);}
  .tool-card:hover{transform:translateY(-4px); box-shadow:0 10px 26px rgba(13,122,110,.16); border-color:var(--teal);}
  .tool-card .ico{width:44px; height:44px; border-radius:13px; display:flex; align-items:center; justify-content:center; font-size:21px;}
  .tool-card b{font-size:13.5px;}
  .tool-card .desc{font-size:11.5px; color:var(--muted); line-height:1.6; flex:1;}
  .tool-card .meta{display:flex; justify-content:space-between; align-items:center; font-size:11px; color:var(--muted); flex-wrap:wrap; gap:4px;}
  .badge-pay{background:var(--gold-soft); color:var(--gold); border-radius:999px; padding:1px 10px; font-size:11px; font-weight:800;}
  .badge-free{background:var(--teal-soft); color:var(--teal-dark); border-radius:999px; padding:1px 10px; font-size:11px; font-weight:800;}
  .badge-soon{background:var(--none-soft); color:#64748b; border-radius:999px; padding:1px 10px; font-size:11px; font-weight:800;}
  .tool-group-title{font-size:14px; font-weight:800; color:var(--teal-dark); margin:16px 2px 10px; display:flex; align-items:center; gap:8px;}
  .tool-group-title::after{content:""; flex:1; height:1px; background:var(--line);}
  .filter-row{display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; align-items:center;}
  .filter-chip{border:1.5px solid var(--line); background:var(--card); color:var(--ink); border-radius:999px; padding:5px 14px; font-size:12.5px; font-weight:700; cursor:pointer; font-family:inherit; transition:.15s; color:var(--ink);}
  .filter-chip:hover{border-color:var(--teal);}
  .filter-chip.active{background:var(--teal); color:#fff; border-color:var(--teal);}

  .field{margin-bottom:12px;}
  .field label{display:block; font-size:13px; font-weight:700; margin-bottom:5px; color:var(--ink);}
  .field label .opt{color:var(--muted); font-weight:400; font-size:11.5px;}
  input[type=text], input[type=number], input[type=tel], input[type=email], select, textarea{width:100%; border:1.5px solid var(--line); border-radius:11px; padding:10px 13px; font-family:inherit; font-size:14px; outline:0; background:var(--card); color:var(--ink); transition:all .18s ease; box-shadow:var(--shadow-sm);}
  input:hover, select:hover, textarea:hover{border-color:#c3d4da;}
  input:focus, select:focus, textarea:focus{border-color:var(--teal); box-shadow:0 0 0 4px rgba(13,122,110,.14);}
  input::placeholder, textarea::placeholder{color:#9aa7b4; opacity:1;}
  input[type=checkbox], input[type=radio]{accent-color:var(--teal); width:16px; height:16px; cursor:pointer;}
  textarea{resize:vertical; min-height:70px; direction:ltr; text-align:left; font-family:Consolas,monospace; font-size:13px;}
  .paste-hint{font-size:12px; color:var(--muted); background:var(--blue-soft); border-radius:10px; padding:8px 12px; margin-bottom:8px;}
  .steps{display:flex; gap:6px; margin-bottom:16px;}
  .step{flex:1; height:5px; border-radius:99px; background:var(--line);}
  .step.done{background:var(--teal);}
  .step.now{background:var(--gold);}
  .warn-box{background:var(--bad-soft); border-right:4px solid var(--bad); border-radius:10px; padding:10px 14px; font-size:12.5px; margin:10px 0;}
  .note{background:var(--teal-soft); border-right:4px solid var(--teal); border-radius:10px; padding:10px 14px; font-size:12.5px; margin:10px 0;}

  .result-box{border:1.5px solid var(--teal); border-radius:14px; padding:16px; margin:10px 0; background:var(--card);}
  .result-line{display:flex; justify-content:space-between; padding:8px 4px; border-bottom:1px dashed var(--line); font-size:13.5px; gap:8px;}
  .result-line .v{font-weight:800;}
  .low{color:#b45309;} .high{color:var(--bad);} .norm{color:#15803d;}
  .paywall{border:2px dashed var(--gold); border-radius:16px; padding:20px; text-align:center; background:linear-gradient(180deg,#fffdf5,#fdf6e3); margin:14px 0;}
  .paywall .big{font-size:22px;}
  .paywall h4{color:var(--gold); font-size:16px; margin-bottom:6px;}
  .paywall ul{list-style:none; display:inline-block; text-align:right; margin:10px auto; font-size:13px;}
  .paywall ul li{padding:3px 0;}
  .price{font-size:25px; font-weight:900; color:var(--gold);}
  .price small{font-size:13px; font-weight:400; color:var(--muted);}

  .timeline{position:relative; padding-right:20px;}
  .timeline::before{content:""; position:absolute; right:6px; top:4px; bottom:4px; width:2px; background:var(--line);}
  .tl-item{position:relative; margin-bottom:14px;}
  .tl-item::before{content:""; position:absolute; right:-20px; top:8px; width:12px; height:12px; border-radius:50%; background:var(--teal); border:2.5px solid #fff; box-shadow:0 0 0 2px var(--teal);}
  .tl-item.paid::before{background:var(--gold); box-shadow:0 0 0 2px var(--gold);}
  .tl-card{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px 14px;}

  .profile-chip{display:flex; align-items:center; gap:10px; border:1.5px solid var(--line); border-radius:14px; padding:11px; cursor:pointer; background:var(--card); transition:.15s;}
  .profile-chip:hover{border-color:var(--teal);}
  .profile-chip.active{border-color:var(--teal); background:var(--teal-soft);}
  .profile-chip .ico{width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; background:var(--teal-soft); flex:0 0 auto;}
  .profile-chip b{font-size:13px; display:block;}

  table{width:100%; border-collapse:collapse; font-size:12.5px;}
  th,td{border-bottom:1px solid var(--line); padding:8px; text-align:right;}
  th{color:var(--muted); font-size:11.5px; font-weight:700;}
  .txn-ok{color:#15803d; font-weight:800;}

  
  /* ---------- Welcome & motivation ---------- */
  .modal.welcome{background:linear-gradient(160deg,#0f766e 0%,#115e59 55%,#0b4f4a 100%); color:#fff; border:1px solid rgba(255,255,255,.15);}
  .modal.welcome h3{color:#fff;}
  .modal.welcome p{color:rgba(255,255,255,.85);}
  .welcome-badge{font-size:54px; line-height:1; margin-bottom:10px; animation:bounce 1.4s infinite;}
  @keyframes bounce{0%,100%{transform:translateY(0);}50%{transform:translateY(-8px);}}
  .welcome-points{display:flex; flex-direction:column; gap:7px; margin:4px 0 16px; text-align:right;}
  .welcome-points div{background:rgba(255,255,255,.12); border-radius:10px; padding:8px 12px; font-size:13px;}
  .motivation-bar{display:none; border-radius:16px; padding:14px 16px; margin-bottom:14px; background:linear-gradient(120deg,var(--teal-soft),var(--gold-soft)); border:1px solid var(--teal);}
  .motivation-bar.show{display:block; animation:pop .3s;}
/* ---------- Modals ---------- */
  .modal-close{position:absolute; top:10px; left:10px; width:32px; height:32px; border-radius:50%; border:1px solid var(--line); background:var(--card); color:var(--muted); font-size:15px; font-weight:800; cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:5;}
  .modal-close:hover{background:var(--none-soft); color:var(--bad); border-color:var(--bad);}
  .modal{position:relative;}
  .modal-bg{position:fixed; inset:0; background:rgba(15,40,36,.55); display:none; align-items:center; justify-content:center; z-index:100; padding:16px; overflow-y:auto;}
  .modal-bg.show{display:flex;}
  /* مودال خطای ورود و یادآوری باید بالای همه پنجره‌ها (از جمله مودال ورود) دیده شوند */
  #authErrModal{z-index:300;}
  #avayeRemindModal{z-index:250;}
  /* هایلایت کادرهای ناقص/اشتباه (نام کاربری، رمز عبور و…) */
  .field-error{border-color:#e74c3c !important; box-shadow:0 0 0 3px rgba(231,76,60,.18) !important; animation:avayeShake .4s;}
  @keyframes avayeShake{0%,100%{transform:translateX(0);}20%{transform:translateX(-6px);}40%{transform:translateX(6px);}60%{transform:translateX(-4px);}80%{transform:translateX(4px);}}
  .modal{background:var(--card); border-radius:18px; color:var(--ink); padding:24px; max-width:460px; width:100%; text-align:center; animation:pop .25s; margin:auto; box-shadow:0 24px 60px rgba(15,40,36,.28); border:1px solid rgba(13,122,110,.12);}
  @keyframes pop{from{transform:scale(.92); opacity:0;} to{transform:none; opacity:1;}}
  .modal .icon{font-size:42px; margin-bottom:8px;}
  .modal h3{font-size:17px; margin-bottom:6px; font-weight:800;}
  .modal p{font-size:13.5px; color:var(--muted); margin-bottom:14px; line-height:1.9;}
  .otp-inputs{display:flex; gap:8px; justify-content:center; margin:12px 0;}
  .otp-inputs input{width:46px; height:52px; text-align:center; font-size:21px; font-weight:800; border:1.5px solid var(--line); border-radius:12px; outline:0;}
  .otp-inputs input:focus{border-color:var(--teal); box-shadow:0 0 0 3px rgba(13,122,110,.12);}
  @media(max-width:420px){.otp-inputs input{width:40px; height:46px; font-size:18px;}}

  /* ---------- Auth methods ---------- */
  .auth-methods{display:flex; gap:6px; flex-wrap:wrap; justify-content:center; margin-bottom:14px;}
  .am{border:1.5px solid var(--line); background:var(--card); color:var(--ink); border-radius:999px; padding:6px 13px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; color:var(--ink); transition:.15s;}
  .am:hover{border-color:var(--teal);}
  .am.active{background:var(--teal); border-color:var(--teal); color:#fff;}
  .auth-hint{font-size:11.5px; color:var(--muted); background:var(--blue-soft); border-radius:10px; padding:8px 12px; margin:10px 0;}

  /* ---------- Captcha (modern slider) ---------- */
  .cap-wrap{margin:10px 0 14px;}
  .cap-track{position:relative; height:52px; background:var(--none-soft); border:1.5px solid var(--line); border-radius:999px; overflow:hidden; direction:ltr; user-select:none; touch-action:none;}
  .cap-fill{position:absolute; inset:0; width:0; background:linear-gradient(90deg,var(--ok),#4ade80); transition:width .1s;}
  .cap-text{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:12.5px; color:var(--muted); font-weight:700; z-index:1; pointer-events:none;}
  .cap-thumb{position:absolute; top:3px; left:3px; width:46px; height:46px; border-radius:50%; background:#fff; border:1.5px solid var(--line); box-shadow:0 2px 8px rgba(0,0,0,.15); display:flex; align-items:center; justify-content:center; cursor:grab; z-index:2; font-size:15px; color:var(--muted);}
  .cap-thumb.drag{cursor:grabbing;}
  .cap-ok .cap-fill{width:100% !important;}
  .cap-ok .cap-thumb{left:calc(100% - 49px); background:var(--ok); color:#fff; border-color:var(--ok);}
  .cap-ok .cap-text{color:#15803d;}
  .cap-note{font-size:10.5px; color:var(--muted); margin-top:6px;}

  /* ---------- Jigsaw puzzle captcha ---------- */
  .pz-wrap{margin:12px 0;}
  .pz-stage{position:relative; width:100%; max-width:340px; height:160px; margin:0 auto; border-radius:12px; overflow:hidden; border:1.5px solid var(--line); background-color:var(--none-soft); direction:ltr; background-size:340px 160px;}
  .pz-piece{position:absolute; border-radius:8px; cursor:grab; touch-action:none; z-index:5; border:3px solid #0d7a6e; box-shadow:0 8px 20px rgba(0,0,0,.45), 0 0 0 3px rgba(13,122,110,.3); transition:box-shadow .15s; filter:brightness(1.1) saturate(1.2);}
  .pz-piece:active{cursor:grabbing;}
  .pz-piece .drag-badge{position:absolute; top:-22px; left:50%; transform:translateX(-50%); background:var(--teal); color:#fff; border-radius:999px; font-size:10.5px; font-weight:800; padding:2px 10px; white-space:nowrap; box-shadow:0 2px 6px rgba(0,0,0,.25); animation:bob 1.1s infinite;}
  .pz-piece .drag-badge::after{content:"▼"; display:block; text-align:center; font-size:9px; line-height:1;}
  @keyframes bob{0%,100%{transform:translateX(-50%) translateY(0);}50%{transform:translateX(-50%) translateY(-4px);}}
  .pz-hole{position:absolute; border-radius:8px; border:2.5px dashed #fff; box-shadow:inset 0 0 0 999px rgba(255,255,255,.5), 0 0 0 2px var(--teal); z-index:2; pointer-events:none; animation:holePulse 1.5s infinite;}
  @keyframes holePulse{0%,100%{opacity:1;}50%{opacity:.5;}}
  .pz-piece.ok{border-color:var(--ok); box-shadow:0 0 0 4px var(--ok);}
  .pz-bar{display:flex; align-items:center; justify-content:space-between; gap:10px; max-width:340px; margin:8px auto 0; flex-wrap:wrap;}
  .pz-status{font-size:12px; color:var(--muted); font-weight:700;}
  .pz-status.ok{color:#15803d;}
  @media(max-width:420px){.pz-stage{max-width:300px;}}

  /* ---------- Related carousel ---------- */
  .rel-block{margin-top:18px;}
  .rel-head{display:flex; align-items:center; gap:10px; margin-bottom:8px; flex-wrap:wrap;}
  .rel-head b{font-size:14px; color:var(--teal-dark);}
  .rel-head .more{margin-right:auto;}
  .caro{position:relative; height:232px; direction:ltr; overflow:hidden;}
  .caro-card{position:absolute; top:4px; left:50%; width:178px; height:214px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:12px; cursor:pointer; transition:transform .35s, opacity .35s, filter .35s; box-shadow:0 4px 12px rgba(0,0,0,.07);}
  .caro-card .cc-ico{width:38px; height:38px; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:19px;}
  .caro-card b{font-size:12.5px; display:block; line-height:1.6; height:40px; overflow:hidden; margin-top:6px;}
  .caro-card .cc-meta{font-size:11px; color:var(--muted); margin-top:4px;}
  .caro-card .cc-tags{margin-top:6px;}
  .caro-card .cc-price{color:var(--gold); font-weight:800; font-size:11.5px; margin-top:4px;}
  .caro-card:hover{border-color:var(--teal);}
  .caro-arrow{position:absolute; top:50%; transform:translateY(-50%); width:34px; height:34px; border-radius:50%; background:var(--card); border:1px solid var(--line); box-shadow:0 2px 8px rgba(0,0,0,.12); cursor:pointer; z-index:30; font-size:15px; display:flex; align-items:center; justify-content:center; color:var(--teal-dark);}
  .caro-arrow.prev{left:6px;}
  .caro-arrow.next{right:6px;}
  @media(max-width:600px){.caro{height:196px;} .caro-card{width:138px; height:180px; padding:10px;} .caro-card b{height:32px; font-size:11.5px;} .caro-card .cc-ico{width:32px;height:32px;font-size:16px;}}

  /* ---------- Quiz ---------- */
  .quiz-progress{display:flex; align-items:center; gap:10px; margin-bottom:14px;}
  .quiz-bar{flex:1; height:8px; border-radius:99px; background:var(--line); overflow:hidden;}
  .quiz-bar i{display:block; height:100%; background:linear-gradient(90deg,var(--teal),#2bb8a9); border-radius:99px; transition:width .3s;}
  .quiz-count{font-size:12px; color:var(--muted); font-weight:700; white-space:nowrap;}
  .quiz-q{font-size:15.5px; font-weight:800; color:var(--ink); margin-bottom:14px; line-height:1.7;}
  .opt{display:flex; align-items:center; gap:12px; width:100%; text-align:right; background:var(--card); color:var(--ink); border:1.5px solid var(--line); border-radius:14px; padding:12px 14px; margin-bottom:8px; cursor:pointer; font-family:inherit; font-size:13.5px; color:var(--ink); transition:.15s;}
  .opt:hover{border-color:var(--teal); background:var(--teal-soft);}
  .opt.sel{border-color:var(--teal); background:var(--teal-soft); box-shadow:0 0 0 3px rgba(13,122,110,.1);}
  .opt .dot{width:19px; height:19px; border-radius:50%; border:2px solid var(--line); flex:0 0 auto; display:flex; align-items:center; justify-content:center; font-size:10px; color:#fff;}
  .opt.sel .dot{background:var(--teal); border-color:var(--teal);}
  .opt.sel .dot::after{content:"✓";}
  .score-big{font-size:42px; font-weight:900; line-height:1.2;}
  .score-label{font-size:14px; font-weight:800;}

  /* ---------- Article ---------- */
  .article-body{font-size:14.5px; line-height:2.1;}
  .article-body p{margin:12px 0;}
  .article-body h4{color:var(--teal-dark); margin-top:18px;}
  .article-meta{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:8px 0; padding-bottom:12px; border-bottom:1px solid var(--line);}
  .breadcrumb{font-size:12px; color:var(--muted); margin-bottom:10px;}
  .breadcrumb b{color:var(--teal-dark);}
  .shortcode-note{background:#10241f; color:#9fe8d8; direction:ltr; text-align:left; font-family:Consolas,monospace; font-size:12px; border-radius:10px; padding:8px 12px; margin:10px 0; display:block;}
  .mini-tool{border:2px dashed var(--teal); border-radius:16px; padding:16px; background:var(--teal-soft); margin:18px 0;}
  .mini-tool h4{color:var(--teal-dark); margin-bottom:10px; display:flex; align-items:center; gap:8px;}
  .mini-tool .row{display:flex; gap:10px; flex-wrap:wrap;}
  .mini-tool .field{flex:1; min-width:120px;}

  /* ---------- Body map ---------- */
  .bodymap-wrap{display:grid; grid-template-columns:240px 1fr; gap:16px; align-items:start;}
  @media(max-width:860px){.bodymap-wrap{grid-template-columns:1fr;}}
  .body-figure{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:12px 8px; text-align:center; position:relative;}
  .body-figure svg{width:100%; max-width:230px; height:auto;}
  .organ{cursor:pointer; transition:filter .18s; transform-box:fill-box; transform-origin:center;}
  .organ:hover{filter:brightness(1.15) drop-shadow(0 0 4px rgba(13,122,110,.35));}
  .organ.warn-anim{animation:pulse 2.2s infinite;}
  @keyframes pulse{0%,100%{filter:drop-shadow(0 0 0 rgba(245,158,11,0));} 50%{filter:drop-shadow(0 0 7px rgba(245,158,11,.8));}}
  .organ.bad-anim{animation:pulseRed 2.2s infinite;}
  @keyframes pulseRed{0%,100%{filter:drop-shadow(0 0 0 rgba(239,68,68,0));} 50%{filter:drop-shadow(0 0 8px rgba(239,68,68,.85));}}
  .legend{display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:8px; font-size:11px;}
  .legend span{display:inline-flex; align-items:center; gap:5px; color:var(--muted);}
  .legend i{width:12px; height:12px; border-radius:4px; display:inline-block;}
  .organ-details{display:flex; flex-direction:column; gap:6px;}
  .organ-row{display:flex; align-items:center; gap:8px; border:1px solid var(--line); border-radius:12px; padding:7px 10px; background:var(--card); cursor:pointer; transition:.15s; font-size:12.5px;}
  .organ-row:hover{border-color:var(--teal);}
  .organ-row .dot{width:10px; height:10px; border-radius:50%; flex:0 0 auto;}
  .organ-row .nm{font-weight:800; min-width:90px;}
  .organ-row .src{font-size:10.5px; color:var(--muted); margin-right:auto; white-space:nowrap;}

  .month-chip{border:1.5px solid var(--line); background:var(--card); color:var(--ink); border-radius:999px; padding:5px 13px; font-size:12px; font-weight:700; cursor:pointer; transition:.15s; font-family:inherit;}
  .month-chip.active{background:var(--teal); color:#fff; border-color:var(--teal);}
  .chart-box{border:1px solid var(--line); border-radius:14px; padding:12px; background:var(--card);}
  .chart-box h4{font-size:13px; margin-bottom:8px; color:var(--teal-dark);}
  .chart-box svg{width:100%; height:auto;}
  .summary-card{border:1px solid var(--line); border-radius:12px; padding:10px 12px; text-align:center; background:var(--card);}
  .summary-card b{font-size:16px; display:block;}
  .summary-card span{font-size:11px; color:var(--muted);}
  .pulse-heart{position:absolute; top:8px; left:14px; font-size:15px; animation:hb 1.4s infinite;}
  @keyframes hb{0%,100%{transform:scale(1);} 30%{transform:scale(1.25);} 50%{transform:scale(1);}}
  .demo-banner{background:var(--gold-soft); border:1px solid var(--gold); color:#6b5208; font-size:12px; border-radius:12px; padding:8px 14px; margin-bottom:14px; display:flex; gap:8px; align-items:center; flex-wrap:wrap;}
  .demo-banner .ok-tag{background:var(--ok-soft); color:#15803d; border-radius:999px; padding:1px 10px; font-size:11px; font-weight:800;}
  .empty{text-align:center; color:var(--muted); padding:30px 10px; font-size:13px;}
  .toast{position:fixed; bottom:22px; right:50%; transform:translateX(50%); background:#10241f; color:#d9f5ef; padding:12px 22px; border-radius:12px; font-size:13.5px; display:none; z-index:200; box-shadow:0 10px 30px rgba(0,0,0,.25); max-width:90vw;}
  .toast.show{display:block; animation:pop .25s;}
  /* ===== AUTHORITATIVE: منوها و آیکون‌ها فقط بعد از ورود (این قوانین آخرین‌اند و برنده می‌شوند) ===== */
  body:not(.logged-in) .icon-menu,
  body:not(.logged-in) .rsidebar,
  body:not(.logged-in) .search-mini,
  body:not(.logged-in) .role-switch { display:none !important; }
  body:not(.logged-in) .page-top{ height:24px; }
  body.logged-in .icon-menu{ display:flex !important; }
  body.logged-in .rsidebar{ display:block !important; }
  body.logged-in .page-top{ height:30px; }
  body.auth-mode .icon-menu,
  body.auth-mode .rsidebar,
  body.auth-mode .search-mini,
  body.auth-mode .role-switch { display:none !important; }
  body.auth-mode .page-top{ height:24px !important; }
  body.auth-mode .layout{ padding-top:6px; }
  .only-admin{ display:none !important; }
  body.admin .only-admin{ display:block !important; }
  .only-owner{ display:none !important; }
  body.owner .only-owner{ display:block !important; }
  body:not(.logged-in) .only-logged{ display:none !important; }


/* ============================================================
   دارک مود سراسری — روی کل صفحه (بدنه/هدر/فوتر قالب جوملا)
   ============================================================ */
html[data-theme="dark"] body {
	background: #0b1220 !important;
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .site-grid,
html[data-theme="dark"] .grid-child,
html[data-theme="dark"] .container-top,
html[data-theme="dark"] .container-bottom,
html[data-theme="dark"] .container-component,
html[data-theme="dark"] .container-sidebar-left,
html[data-theme="dark"] .container-sidebar-right,
html[data-theme="dark"] .container-banner {
	background: #0b1220 !important;
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .container-header,
html[data-theme="dark"] .grid-child.container-header,
html[data-theme="dark"] .site-grid .container-header {
	background: #0f172a !important;
	color: #e2e8f0 !important;
	border-bottom: 1px solid #1e293b;
}
html[data-theme="dark"] .navbar-brand,
html[data-theme="dark"] .site-title,
html[data-theme="dark"] .container-header a,
html[data-theme="dark"] .mod-menu a,
html[data-theme="dark"] .mod-menu .nav-item a,
html[data-theme="dark"] .nav-item a {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .mod-menu .nav-menu a:hover,
html[data-theme="dark"] .navbar a:hover {
	color: #5eead4 !important;
}
html[data-theme="dark"] .mod-menu li,
html[data-theme="dark"] .nav-menu li {
	background: transparent !important;
}
html[data-theme="dark"] .container-footer,
html[data-theme="dark"] .grid-child.container-footer {
	background: #0f172a !important;
	color: #94a3b8 !important;
}
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .nav-child,
html[data-theme="dark"] ul.nav-child {
	background: #0f172a !important;
}
html[data-theme="dark"] .dropdown-menu a {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .com_content .article-list,
html[data-theme="dark"] .blog-item,
html[data-theme="dark"] .com_content .card,
html[data-theme="dark"] .page-header {
	background: transparent !important;
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .moduletable,
html[data-theme="dark"] .sidebar-right .moduletable,
html[data-theme="dark"] .sidebar-right .card {
	background: transparent !important;
	color: #e2e8f0 !important;
}

/* ============================================================
   دارک مود سراسری v2 — پوشش کامل منوها/زیرمنوها/هدر/فوتر با #0b1220
   ============================================================ */
html[data-theme="dark"] {
	--body-bg: #0b1220;
	--text: #e2e8f0;
}
html[data-theme="dark"] body,
html[data-theme="dark"] .site,
html[data-theme="dark"] .site-grid,
html[data-theme="dark"] .grid-child,
html[data-theme="dark"] .container-top,
html[data-theme="dark"] .container-bottom,
html[data-theme="dark"] .container-component,
html[data-theme="dark"] .container-sidebar-left,
html[data-theme="dark"] .container-sidebar-right,
html[data-theme="dark"] .container-banner,
html[data-theme="dark"] .container-nav,
html[data-theme="dark"] .container-header,
html[data-theme="dark"] .grid-child.container-header,
html[data-theme="dark"] .container-footer,
html[data-theme="dark"] .grid-child.container-footer {
	background: #0b1220 !important;
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .site-grid > * {
	background: #0b1220 !important;
}

/* منوهای اصلی و ماژول‌های منو */
html[data-theme="dark"] .mod-menu,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] nav.navigation,
html[data-theme="dark"] ul.nav-menu,
html[data-theme="dark"] ul.nav,
html[data-theme="dark"] .nav-menu,
html[data-theme="dark"] .navbar-nav,
html[data-theme="dark"] .moduletable .mod-menu,
html[data-theme="dark"] .moduletable ul.nav-menu {
	background: #0b1220 !important;
}
html[data-theme="dark"] .mod-menu li,
html[data-theme="dark"] .nav-menu li,
html[data-theme="dark"] ul.nav-menu li,
html[data-theme="dark"] .navbar li,
html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .navbar .nav-item {
	background: transparent !important;
}
html[data-theme="dark"] .mod-menu a,
html[data-theme="dark"] .nav-menu a,
html[data-theme="dark"] ul.nav-menu a,
html[data-theme="dark"] .navbar a,
html[data-theme="dark"] .navbar-brand,
html[data-theme="dark"] .site-title,
html[data-theme="dark"] .container-header a,
html[data-theme="dark"] a.nav-link,
html[data-theme="dark"] .nav-link {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .mod-menu a:hover,
html[data-theme="dark"] .nav-menu a:hover,
html[data-theme="dark"] .navbar a:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] a.nav-link:hover {
	color: #5eead4 !important;
	background: rgba(255, 255, 255, 0.06) !important;
}
html[data-theme="dark"] .mod-menu .active > a,
html[data-theme="dark"] .nav-menu .active > a,
html[data-theme="dark"] .nav-item.active > a,
html[data-theme="dark"] li.active > a {
	color: #5eead4 !important;
	font-weight: 700;
}

/* زیرمنوها (dropdown) */
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] ul.nav-child,
html[data-theme="dark"] .nav-child,
html[data-theme="dark"] .navbar .dropdown-menu,
html[data-theme="dark"] .mod-menu ul.nav-child,
html[data-theme="dark"] li ul.nav-child {
	background: #0b1220 !important;
	border: 1px solid #1e293b !important;
}
html[data-theme="dark"] .dropdown-menu a,
html[data-theme="dark"] .nav-child a,
html[data-theme="dark"] ul.nav-child a {
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .dropdown-menu a:hover,
html[data-theme="dark"] .nav-child a:hover,
html[data-theme="dark"] ul.nav-child a:hover {
	background: rgba(255, 255, 255, 0.08) !important;
	color: #5eead4 !important;
}

/* محتوا و ماژول‌ها */
html[data-theme="dark"] .moduletable,
html[data-theme="dark"] .sidebar-right .moduletable,
html[data-theme="dark"] .sidebar-right .card,
html[data-theme="dark"] .sidebar-left .moduletable,
html[data-theme="dark"] .sidebar-left .card,
html[data-theme="dark"] .com_content .article-list,
html[data-theme="dark"] .blog-item,
html[data-theme="dark"] .com_content .card,
html[data-theme="dark"] .page-header,
html[data-theme="dark"] .mod-articles-category,
html[data-theme="dark"] .mod-articles-news,
html[data-theme="dark"] .mod-login,
html[data-theme="dark"] .mod-footer,
html[data-theme="dark"] .mod-custom {
	background: transparent !important;
	color: #e2e8f0 !important;
}
html[data-theme="dark"] .moduletable h3,
html[data-theme="dark"] .moduletable h4,
html[data-theme="dark"] .module-title,
html[data-theme="dark"] .card-header,
html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] h3, html[data-theme="dark"] h4,
html[data-theme="dark"] h5, html[data-theme="dark"] h6 {
	color: #f1f5f9 !important;
}
html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] span:not(.icon),
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] .muted,
html[data-theme="dark"] small {
	color: #cbd5e1 !important;
}
html[data-theme="dark"] a {
	color: #5eead4 !important;
}
html[data-theme="dark"] a:hover {
	color: #99f6e4 !important;
}
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
	background: #0f172a !important;
	color: #e2e8f0 !important;
	border-color: #1e293b !important;
}
html[data-theme="dark"] .btn {
	background: #1e293b !important;
	color: #e2e8f0 !important;
	border-color: #334155 !important;
}
html[data-theme="dark"] .btn-primary {
	background: #0f766e !important;
	color: #fff !important;
}
html[data-theme="dark"] .btn:hover {
	filter: brightness(1.15);
}
html[data-theme="dark"] hr {
	border-color: #1e293b !important;
}
html[data-theme="dark"] .container-footer p,
html[data-theme="dark"] .container-footer a,
html[data-theme="dark"] .footer a {
	color: #94a3b8 !important;
}

/* ============================================================
   رفع تداخل مودال‌های ماکاپ با Bootstrap قالب جوملا (cassiopeia)
   قالب جوملا .modal را display:none و position:fixed می‌کند →
   محتوای مودال‌های ماکاپ مخفی می‌شد. این override آن را برمی‌گرداند.
   ============================================================ */
.modal-bg {
	z-index: 2000 !important;
}
.modal-bg .modal {
	display: block !important;
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	width: auto !important;
	max-width: 480px !important;
	height: auto !important;
	z-index: auto !important;
	overflow: visible !important;
	outline: none !important;
	margin: 0 auto !important;
}
.modal-bg .modal .modal-close,
.modal-bg .modal-close {
	z-index: 2001 !important;
}
/* جلوگیری از نمایش مودال‌های بسته */
.modal-bg:not(.show) {
	display: none !important;
}
.modal-bg.show {
	display: flex !important;
}

  /* ===== بهبودهای ظاهری ۱.۰.۴۷: اسکرول‌بار، انتخاب متن، جدول‌ها ===== */
  ::-webkit-scrollbar{width:10px; height:10px;}
  ::-webkit-scrollbar-track{background:var(--bg);}
  ::-webkit-scrollbar-thumb{background:#b9c9ce; border-radius:99px; border:2px solid var(--bg);}
  ::-webkit-scrollbar-thumb:hover{background:var(--teal);}
  *{scrollbar-width:thin; scrollbar-color:#b9c9ce transparent;}
  ::selection{background:rgba(13,122,110,.22); color:var(--ink);}

  table{width:100%; border-collapse:collapse; font-size:13px;}
  table th{text-align:right; font-weight:800; color:var(--teal-dark); border-bottom:2px solid var(--teal-soft); padding:9px 10px; background:var(--soft);}
  table td{padding:9px 10px; border-bottom:1px solid var(--line); vertical-align:middle;}
  table tr:hover td{background:var(--soft);}
  table tr:last-child td{border-bottom:0;}

  .filter-chip{transition:all .16s ease;}
  .filter-chip:hover{transform:translateY(-1px); box-shadow:0 3px 8px rgba(13,122,110,.14);}
  .filter-chip.active{box-shadow:0 4px 12px rgba(13,122,110,.3);}

  .stat, .rside-item, .am, .role-btn{transition:all .16s ease;}
  .stat:hover{box-shadow:var(--shadow-md); border-color:var(--teal);}

  .note, .warn-box{border-radius:12px; line-height:1.9;}
  .result-box{border-radius:14px; line-height:1.9; box-shadow:var(--shadow-sm);}

  .empty{color:var(--muted); padding:34px 12px; font-size:13.5px; line-height:2;}
  .muted{color:var(--muted);}
  .small{font-size:12.5px; line-height:1.8;}


/* ============================================================
   ریسپانسیو — اصلاحات تکمیلی (نسخه 1.0.62)
   نکته: این بلوک عمداً در انتهای فایل است تا بر قوانین قبلی
   (ازجمله body.logged-in .rsidebar با !important) غلبه کند.
   ============================================================ */
@media (max-width: 960px) {
  /* سایدبار (پنل کناری) در موبایل/تبلت مخفی می‌شود — منوی بالایی جایش را می‌گیرد */
  body.logged-in .rsidebar,
  .rsidebar,
  .sidebar { display: none !important; }
  /* فاصلهٔ گروه‌های منوی بالایی در موبایل معقول شود (قبلاً 2cm بود) */
  .icon-menu { gap: 10px; padding: 6px 8px 8px; }
  /* جلوگیری از اسکرول افقی کل صفحه در موبایل */
  html, body { overflow-x: hidden; }
  .layout { padding: 10px 12px 50px; gap: 12px; }
  .content { min-width: 0; }
}

@media (max-width: 560px) {
  /* ستون‌های فرم‌ها در موبایل تک‌ستونه می‌شوند */
  .grid2 { grid-template-columns: 1fr; }
  .layout { padding: 8px 10px 46px; }
  .card { padding: 13px 12px; }
  .modal { padding: 18px 14px; max-width: 100%; }
  /* جلوگیری از بیرون‌زدن متن از کادرها */
  .content .card, .content .result-box, .content .note, .content .warn-box,
  .content .tool-card, .content .stat, .content .summary-card,
  .content .tl-card, .content .profile-chip, .content .paywall,
  .content .sugg-card, .content .mini-tool {
    overflow-wrap: break-word; word-break: break-word; min-width: 0;
  }
  .content input, .content select, .content textarea { max-width: 100%; }
  /* جدول‌ها در موبایل با اسکرول افقی */
  .content table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .content th, .content td { white-space: nowrap; }
  /* تاریخ شمسی (سال/ماه/روز) در عرض کم می‌شکند */
  .date-jalali { flex-wrap: wrap; }
  .search-mini input { width: 76px; }
  .otp-inputs { gap: 6px; }
  .otp-inputs input { width: 42px; height: 48px; font-size: 19px; }
  .breadcrumb { flex-wrap: wrap; font-size: 11.5px; line-height: 1.9; }
}

@media (max-width: 420px) {
  .role-btn { padding: 6px 11px; font-size: 12px; }
  .im-item { padding: 7px 9px; min-width: 54px; }
  .im-item .im-ico { font-size: 17px; }
  .im-item .im-txt { font-size: 9.5px; }
  .modal { padding: 16px 12px; }
  .otp-inputs input { width: 38px; height: 46px; font-size: 18px; }
  .pz-stage { max-width: 300px; }
  .theme-btn, .avatar { width: 34px; height: 34px; font-size: 15px; }
  .stat { padding: 11px; }
  .tool-card { padding: 11px; }
}
