/* ============================================================
   ui.css — تم «پزشکی مدرن» (Medical Modern) — رنگ‌بندی هم‌خوان با لوگو (سرمه‌ای / آبی) — نسخه UI 1.1
   سامانه کنترل کیفی ارکان کیفیت گستر البرز
   ------------------------------------------------------------
   قوانین:
   1) فقط ظاهر اینجاست؛ هیچ منطق/JS در این فایل نیست.
   2) نام کلاس‌ها، idها و .hidden را عوض نکنید (JS به آن‌ها وابسته است).
   3) رنگ‌ها از توکن‌های بالای فایل کنترل می‌شوند (تیره = :root، روشن = body.light-theme؛ رنگ‌ها: سرمه‌ای، آبی، آبی آسمانی).
   4) نام‌های قدیمی --navy / --blue-1 / --gray / --ink برای استایل‌های inline نگه داشته شده‌اند
      و در هر تم رنگ متن مناسب همان تم را دارند.
   نسخه قبلی: ui-classic.css (برای بازگشت)
   ============================================================ */

@property --spin { syntax: '<angle>'; inherits: true; initial-value: 0deg; }

/* ---------- توکن‌ها: تم تیره (پیش‌فرض) ---------- */
:root{
  --font: 'Vazirmatn', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r-sm: 12px; --r-md: 16px; --r-lg: 20px;

  --bg-solid: #081026;
  --bg-grad: radial-gradient(ellipse at top, #12306e 0%, #0b1a3d 45%, #060d24 100%);
  --surface: rgba(14, 30, 66, .76);
  --surface-solid: #0e1e42;
  --surface-2: rgba(255,255,255,.05);
  --surface-3: rgba(35, 137, 220, .12);
  --drawer-bg: #0b1836;
  --border: rgba(140, 180, 230, .18);
  --border-strong: rgba(140, 180, 230, .32);
  --shadow-card: 0 1px 0 rgba(255,255,255,.05) inset, 0 10px 30px rgba(0,0,0,.35);

  --text-main: #e8eefb;
  --text-on-bg: #c9d6f0;
  --heading: #f3f7ff;
  --soft: #a1abc0;

  --accent: #6fb8f0;
  --accent-2: #2389dc;
  --accent-strong: #1f4e9f;
  --accent-glow: rgba(35, 137, 220, .45);
  --ring: rgba(35, 137, 220, .30);

  --header-bg: linear-gradient(135deg, #1d3f86 0%, #1f4e9f 55%, #2389dc 100%);

  --btn-bg: linear-gradient(135deg, rgba(31,78,159,.78), rgba(35,137,220,.42));
  --btn-color: #f3f9ff;
  --btn-border: rgba(111, 184, 240, .50);
  --btn-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 6px 18px rgba(0,0,0,.30), 0 0 0 rgba(35,137,220,0);
  --btn-shadow-hover: 0 1px 0 rgba(255,255,255,.22) inset, 0 10px 24px rgba(0,0,0,.35), 0 0 22px rgba(35,137,220,.45);
  --btn-shadow-press: 0 1px 0 rgba(255,255,255,.10) inset, 0 2px 6px rgba(0,0,0,.30);
  --btn2-bg: rgba(255,255,255,.06);
  --btn2-color: #9ccaf5;
  --btn2-border: rgba(111,184,240,.38);
  --btn2-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 4px 12px rgba(0,0,0,.25);
  --danger-bg: rgba(248,113,113,.10);
  --danger-border: rgba(248,113,113,.42);

  --input-bg: rgba(255,255,255,.05);
  --input-focus-bg: rgba(255,255,255,.08);
  --input-disabled-bg: rgba(255,255,255,.03);

  --ok: #4ade80;   --ok-bg: rgba(74,222,128,.14);   --ok-bd: rgba(74,222,128,.42);   --ok-glow: rgba(74,222,128,.36);
  --warn: #fbbf24; --warn-bg: rgba(251,191,36,.14); --warn-bd: rgba(251,191,36,.42);  --warn-glow: rgba(251,191,36,.34);
  --err: #f87171;  --err-bg: rgba(248,113,113,.14); --err-bd: rgba(248,113,113,.44);  --err-glow: rgba(248,113,113,.38);

  --th-bg: #1b3a7a;
  --row-alt: rgba(255,255,255,.025);
  --row-hover: rgba(35,137,220,.09);

  --cta1: linear-gradient(145deg, rgba(29,63,134,.92), rgba(31,78,159,.80));
  --cta2: linear-gradient(145deg, rgba(16,66,113,.92), rgba(23,110,163,.82));
  --cta-green: linear-gradient(135deg, rgba(31,78,159,.85), rgba(35,137,220,.55));

  /* نام‌های قدیمی (برای inline styleها) */
  --navy: var(--heading);
  --blue-1: var(--accent);
  --blue-2: var(--accent-2);
  --gray: var(--soft);
  --ink: var(--text-main);
  --paper: var(--surface-solid);
  --radius: var(--r-lg);
  --blue-glow: var(--accent-glow);
  --card-bg: var(--surface);
  --card-border: var(--border);
  --input-border: var(--border-strong);
}

/* ---------- توکن‌ها: تم روشن ---------- */
body.light-theme{
  --bg-solid: #f4f7fd;
  --bg-grad: linear-gradient(160deg, #ffffff 0%, #f4f7fd 45%, #e3ecf8 100%);
  --surface: rgba(255,255,255,.88);
  --surface-solid: #ffffff;
  --surface-2: #f5f8fd;
  --surface-3: rgba(31,78,159,.07);
  --drawer-bg: #ffffff;
  --border: rgba(29,63,134,.14);
  --border-strong: rgba(29,63,134,.22);
  --shadow-card: 0 1px 0 rgba(255,255,255,.9) inset, 0 8px 26px rgba(29,63,134,.10);

  --text-main: #1c2230;
  --text-on-bg: #34405c;
  --heading: #1d3f86;
  --soft: #6d6e71;

  --accent: #1f4e9f;
  --accent-2: #2389dc;
  --accent-strong: #1f4e9f;
  --accent-glow: rgba(31,78,159,.35);
  --ring: rgba(35,137,220,.28);

  --header-bg: linear-gradient(135deg, #1d3f86 0%, #1f4e9f 55%, #2389dc 100%);

  --btn-bg: linear-gradient(135deg, rgba(29,63,134,.96), rgba(31,78,159,.90));
  --btn-color: #ffffff;
  --btn-border: rgba(255,255,255,.55);
  --btn-shadow: 0 1px 0 rgba(255,255,255,.30) inset, 0 6px 16px rgba(29,63,134,.30), 0 2px 4px rgba(29,63,134,.12);
  --btn-shadow-hover: 0 1px 0 rgba(255,255,255,.35) inset, 0 12px 26px rgba(29,63,134,.36), 0 0 20px rgba(35,137,220,.45);
  --btn-shadow-press: 0 1px 0 rgba(255,255,255,.2) inset, 0 2px 6px rgba(29,63,134,.28);
  --btn2-bg: rgba(255,255,255,.72);
  --btn2-color: #1f4e9f;
  --btn2-border: rgba(31,78,159,.42);
  --btn2-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 4px 12px rgba(29,63,134,.10);
  --danger-bg: rgba(255,255,255,.75);
  --danger-border: rgba(179,55,44,.38);

  --input-bg: #f8fafc;
  --input-focus-bg: #ffffff;
  --input-disabled-bg: #eceff4;

  --ok: #1c7a53;   --ok-bg: #e7f5ee;   --ok-bd: #bfe4d2;  --ok-glow: rgba(28,122,83,.30);
  --warn: #8a6508; --warn-bg: #fdf3d9; --warn-bd: #ecd79a; --warn-glow: rgba(180,130,12,.28);
  --err: #b3372c;  --err-bg: #fbeae8;  --err-bd: #f0c6c0;  --err-glow: rgba(179,55,44,.28);

  --th-bg: #1d3f86;
  --row-alt: rgba(29,63,134,.035);
  --row-hover: rgba(35,137,220,.10);

  --cta1: linear-gradient(145deg, #1d3f86, #1f4e9f);
  --cta2: linear-gradient(145deg, #104271, #176ea3);
  --cta-green: linear-gradient(135deg, #1f4e9f, #2389dc);
}

/* ---------- پایه ---------- */
*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body{ margin: 0; padding: 0; }
html, body, button, .btn, .qf-btn, .loc-chip, .tab-btn, input, select, textarea, a, .select-pill-input, .reset-pill-btn, .drawer-nav-item, .drawer-btn-icon, .link-btn, .btn-3d, .btn-3d-danger, .btn-3d-secondary, .cta-btn-card {
  touch-action: manipulation;
}
body{
  font-family: var(--font);
  line-height: 1.8;
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  position: relative; overflow-x: hidden;
  transition: color .3s ease;
}
/* هاله‌های نوری شناور سه‌بعدی در کل سایت (Global Ambient Glows) */
body::before{
  content: "";
  position: fixed;
  top: -160px; right: -120px;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(35, 137, 220, 0.22) 0%, rgba(31, 78, 159, 0.05) 55%, transparent 75%);
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  animation: globalAmbientGlow 18s ease-in-out infinite alternate;
}
body::after{
  content: "";
  position: fixed;
  bottom: -140px; left: -100px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.18) 0%, rgba(35, 137, 220, 0.03) 55%, transparent 75%);
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  z-index: 0;
  animation: globalAmbientGlow 22s ease-in-out infinite alternate-reverse;
}
@keyframes globalAmbientGlow{
  0%{ transform: translate(0, 0) scale(1); opacity: 0.7; }
  50%{ transform: translate(40px, 30px) scale(1.15); opacity: 0.95; }
  100%{ transform: translate(-30px, 25px) scale(0.9); opacity: 0.7; }
}

#starfield{ position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .45; }
body.light-theme #starfield{ display: none; }
.hidden{ display: none !important; }
::selection{ background: var(--accent); color: #fff; }

/* ---------- هدر + موتیف ECG ---------- */
header{
  width: 100%;
  background: radial-gradient(circle at 85% 0%, rgba(255,255,255,.16), transparent 55%), var(--header-bg);
  padding: 28px 20px 56px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  position: relative; overflow: hidden; z-index: 1;
}
/* نوار ECG: خط کم‌رنگ در حال حرکت + «سر ردیاب» درخشان که از چپ به راست می‌رود */
header::before, header::after{
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; pointer-events: none;
  background-repeat: repeat-x; background-position: left bottom;
}
header::before{
  opacity: .30;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='56' viewBox='0 0 300 56'%3E%3Cpath d='M0 34H20Q28 25 36 34H52L58 40L66 3L74 50L80 34H96Q112 18 128 34H300' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  animation: ecgSlide 3.6s linear infinite;
}
header::after{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='56' viewBox='0 0 300 56'%3E%3Cpath d='M0 34H20Q28 25 36 34H52L58 40L66 3L74 50L80 34H96Q112 18 128 34H300' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%, transparent 100%);
  -webkit-mask-size: 38% 100%; mask-size: 38% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: 140% 0; mask-position: 140% 0;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.95)) drop-shadow(0 0 12px rgba(255,255,255,.5));
  animation: ecgSlide 3.6s linear infinite, ecgSweep 3.6s linear infinite;
}
@keyframes ecgSlide{ to{ background-position-x: 300px; } }
@keyframes ecgSweep{
  from{ -webkit-mask-position: -45% 0; mask-position: -45% 0; }
  to{ -webkit-mask-position: 145% 0; mask-position: 145% 0; }
}
header img{ width: 108px; height: 108px; object-fit: contain; background: #fff; border-radius: 50%; padding: 10px; box-shadow: 0 8px 26px rgba(0,0,0,.30), 0 0 0 4px rgba(255,255,255,.18); position: relative; z-index: 1; }
header h1{ color: #fff; font-size: 1.15rem; font-weight: 800; margin: 14px 0 3px; position: relative; z-index: 1; }
header p{ color: #d9f5f1; font-size: .84rem; margin: 0; position: relative; z-index: 1; }
header.banner-header{ padding: 0; background: var(--header-bg); border-radius: 0; }
header.banner-header::before, header.banner-header::after{ display: none; }
header.banner-header img.brand-banner{ width: 100%; height: auto; max-height: min(55vh, 560px); object-fit: cover; object-position: center; display: block; border-radius: 0; background: none; padding: 0; box-shadow: none; }
header.banner-header p{ padding: 12px 16px 18px; color: #d9f5f1; font-size: .9rem; text-align: center; }
@media (max-width:480px){ header.banner-header img.brand-banner{ max-height: 36vh; } }

/* ---------- انیمیشن جابه‌جایی صفحه‌ها (fade + slide ملایم، راست‌به‌چپ) ---------- */
#loginScreen:not(.hidden), #sessionScreen:not(.hidden), #appScreen:not(.hidden),
#homePage:not(.hidden), #generalPage:not(.hidden), #labPage:not(.hidden), #socketPage:not(.hidden), #labCertPage:not(.hidden){
  animation: pageIn .26s ease-out backwards;
}
@keyframes pageIn{ from{ opacity: 0; transform: translateX(-18px); } to{ opacity: 1; transform: none; } }
#editScreen:not(.hidden), #adminScreen:not(.hidden), #analyticsScreen:not(.hidden), #confirmationScreen:not(.hidden){
  animation: screenUp .28s ease-out backwards;
}
@keyframes screenUp{ from{ opacity: 0; transform: translateY(28px); } to{ opacity: 1; transform: none; } }
#scannerModal:not(.hidden), #signatureModal:not(.hidden){ animation: fadeIn .2s ease-out backwards; }
#scannerModal:not(.hidden) .scanner-box, #signatureModal:not(.hidden) .sig-modal-box{ animation: modalPop .26s var(--ease) backwards; }
@keyframes fadeIn{ from{ opacity: 0; } to{ opacity: 1; } }
@keyframes modalPop{ from{ opacity: 0; transform: translateY(14px) scale(.96); } to{ opacity: 1; transform: none; } }
.combobox-dropdown:not(.hidden), .drawer-submenu:not(.hidden){ animation: dropIn .18s ease-out backwards; transform-origin: top center; }
@keyframes dropIn{ from{ opacity: 0; transform: translateY(-6px) scaleY(.96); } to{ opacity: 1; transform: none; } }
.status.ok, .status.err{ animation: fadeIn .22s ease-out backwards; }

/* ---------- دکمه‌های شیشه‌ای ۳ بعدی (پایه در کل سایت) ---------- */
button{
  width: 100%; margin-top: 6px; padding: 13px 18px;
  font-family: inherit; font-size: 0.98rem; font-weight: 700; line-height: 1.8;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #1f4e9f 0%, #2389dc 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: var(--r-md);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 0 #123270,
              0 8px 20px rgba(35, 137, 220, 0.38),
              inset 0 1px 1px rgba(255, 255, 255, 0.55);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease-out, box-shadow .18s ease, filter .18s ease;
  user-select: none;
}
@media (hover:hover){
  :where(button:hover:not(:disabled)){
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #123270,
                0 12px 24px rgba(35, 137, 220, 0.48),
                inset 0 1px 1px rgba(255, 255, 255, 0.7);
    filter: brightness(1.06);
  }
}
:where(button:active:not(:disabled)),
.btn:active:not(:disabled),
.btn-3d:active:not(:disabled),
.btn-3d-danger:active:not(:disabled),
.btn-3d-secondary:active:not(:disabled),
.qf-btn:active, .loc-chip:active, .tab-btn:active {
  transform: translateY(2px) scale(0.97) !important;
  box-shadow: 0 1px 0 #123270,
              0 3px 8px rgba(0, 0, 0, 0.3),
              inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition-duration: .04s !important;
}
:where(button:focus-visible){ outline: none; box-shadow: 0 0 0 3px var(--bg-solid), 0 0 0 5px var(--accent); }
button:disabled{ opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; filter: grayscale(0.5); }
button.secondary{
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(35, 137, 220, 0.14);
  color: var(--text-main);
  border: 1px solid rgba(140, 180, 230, 0.28);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 3px 0 rgba(10, 25, 55, 0.8),
              0 6px 16px rgba(0, 0, 0, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
@media (hover:hover){
  button.secondary:hover:not(:disabled){
    transform: translateY(-2px);
    background: rgba(35, 137, 220, 0.22);
    border-color: rgba(140, 180, 230, 0.45);
    box-shadow: 0 5px 0 rgba(10, 25, 55, 0.8),
                0 10px 20px rgba(0, 0, 0, 0.32),
                inset 0 1px 1px rgba(255, 255, 255, 0.4);
  }
}
button.secondary:active:not(:disabled){
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(10, 25, 55, 0.8), 0 3px 6px rgba(0, 0, 0, 0.25);
}
button.ghost{ background: transparent; color: var(--soft); border-color: var(--border-strong); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
button.small{ padding: 8px 14px; font-size: .82rem; border-radius: 10px; box-shadow: 0 3px 0 #123270, 0 6px 14px rgba(35, 137, 220, 0.3); }
button.danger{
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #c53030 0%, #e53e3e 50%, #f56565 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 4px 0 #7b1d1d,
              0 8px 20px rgba(229, 62, 62, 0.4),
              inset 0 1px 1px rgba(255, 255, 255, 0.55);
}
@media (hover:hover){
  button.danger:hover:not(:disabled){
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #7b1d1d,
                0 12px 24px rgba(229, 62, 62, 0.5),
                inset 0 1px 1px rgba(255, 255, 255, 0.7);
    filter: brightness(1.08);
  }
}
button.danger:active:not(:disabled){
  transform: translateY(3px);
  box-shadow: 0 1px 0 #7b1d1d, 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
.btn-row{ display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.btn-row button{ margin-top: 0; flex: 1; min-width: 120px; }
/* دکمه ثبت دستگاه = CTA اصلی */
#submitBtn, #labSubmitBtn{ padding: 16px; font-size: 1.08rem; font-weight: 800; letter-spacing: .2px; border-color: var(--btn-border); box-shadow: 0 5px 0 #123270, 0 10px 24px rgba(35,137,220,0.45), 0 0 28px var(--accent-glow); }
#submitBtn::before, #labSubmitBtn::before{ content: "✚"; margin-inline-end: 8px; font-weight: 900; }
#submitBtn:disabled::before, #labSubmitBtn:disabled::before{ content: ""; margin: 0; }

/* ---------- کارت‌های شیشه‌ای ۳ بعدی در کل سایت (3D Glassmorphic Cards) ---------- */
.card{
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%),
              var(--surface);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--border);
  border-top: 1.5px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1px solid rgba(10, 20, 45, 0.6);
  border-radius: var(--r-lg);
  padding: 24px 20px; margin-bottom: 22px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42),
              0 1px 0 rgba(255, 255, 255, 0.15) inset,
              0 -2px 6px rgba(0, 0, 0, 0.25) inset,
              0 0 24px rgba(35, 137, 220, 0.08);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
  transform-style: preserve-3d;
}
@media (hover: hover) {
  .card:hover{
    transform: translateY(-3px) perspective(1000px) rotateX(0.8deg);
    border-color: rgba(111, 184, 240, 0.45);
    border-top-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.52),
                0 1px 0 rgba(255, 255, 255, 0.3) inset,
                0 -2px 8px rgba(0, 0, 0, 0.3) inset,
                0 0 32px rgba(35, 137, 220, 0.2);
  }
}
body.light-theme .card{
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 248, 253, 0.88) 100%);
  border: 1px solid rgba(29, 63, 134, 0.16);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(29, 63, 134, 0.22);
  box-shadow: 0 14px 34px rgba(29, 63, 134, 0.12),
              0 1px 0 rgba(255, 255, 255, 0.9) inset,
              0 0 20px rgba(35, 137, 220, 0.06);
}
@media (hover: hover) {
  body.light-theme .card:hover{
    border-color: rgba(35, 137, 220, 0.4);
    box-shadow: 0 20px 42px rgba(29, 63, 134, 0.18),
                0 1px 0 #fff inset,
                0 0 26px rgba(35, 137, 220, 0.14);
  }
}
.card:focus-within{ z-index: 5; }
.card h3{ line-height: 1.8; }
.badge{ display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700; border: 1px solid var(--border); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.badge.edit{ background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); box-shadow: 0 0 12px var(--warn-glow); }
.badge.admin{ background: var(--ok-bg); color: var(--ok); border-color: var(--ok-bd); box-shadow: 0 0 12px var(--ok-glow); }
.status{ margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); font-size: .88rem; line-height: 1.8; display: none; text-align: center; }
.status.ok{ display: block; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-bd); }
.status.err{ display: block; background: var(--err-bg); color: var(--err); border: 1px solid var(--err-bd); }
small.hint{ display: block; color: var(--soft); font-size: .76rem; margin-top: 6px; }

/* ---------- چیدمان ---------- */
main{ width: 100%; max-width: 560px; padding: 16px 18px 60px; position: relative; z-index: 1; }
.layout-wrap{ width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: stretch; position: relative; z-index: 1; }
#notesPanel{ margin: 0 18px 18px; display: flex; flex-direction: column; gap: 18px; }
#notesPanel .card{ margin-bottom: 0; }
@media (min-width:900px){
  .layout-wrap{ max-width: 920px; flex-direction: row; align-items: flex-start; justify-content: center; gap: 20px; }
  .layout-wrap main{ max-width: 580px; padding: 16px 0 60px; }
  .layout-wrap #notesPanel{ flex: 0 0 320px; max-width: 320px; margin: 16px 0 0; position: sticky; top: 20px; }
}
#loginScreen, #sessionScreen{ width: 100%; max-width: 360px; padding: 40px 18px; position: relative; z-index: 1; }
#loginScreen{ max-width: 100%; padding: 0 0 40px; }
#loginScreen .login-card-wrap{ width: 100%; max-width: 380px; margin: 0 auto; padding: 0 16px; }
#loginScreen .login-card-wrap .card{ margin-top: 20px; }
#loginScreen .card, #sessionScreen .card{ margin-top: 20px; }

/* ---------- پیام‌های ضروری صفحه لاگین (رفرش و خروج) ---------- */
.login-notices-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.login-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 0.79rem;
  line-height: 1.6;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  user-select: text;
}
.login-notice-box .lnb-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.login-notice-box .lnb-text {
  flex: 1;
}

/* پیام اول: رفرش صفحه */
.login-notice-refresh {
  background: linear-gradient(135deg, rgba(35, 137, 220, 0.18) 0%, rgba(31, 78, 159, 0.12) 100%);
  border: 1.2px solid rgba(111, 184, 240, 0.45);
  border-top: 1.5px solid rgba(140, 200, 255, 0.6);
  color: #dbeafe;
}
.login-notice-refresh strong {
  color: #93c5fd;
  font-weight: 800;
}
.login-refresh-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(35, 137, 220, 0.4), rgba(31, 78, 159, 0.6));
  border: 1px solid rgba(111, 184, 240, 0.6);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}
.login-refresh-action-btn:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #93c5fd;
  box-shadow: 0 0 14px rgba(35, 137, 220, 0.5);
  transform: translateY(-1px);
}
.login-refresh-action-btn:active {
  transform: translateY(0);
}

/* پیام دوم: خروج در پایان ساعت کاری */
.login-notice-logout {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18) 0%, rgba(217, 119, 6, 0.1) 100%);
  border: 1.2px solid rgba(245, 158, 11, 0.45);
  border-top: 1.5px solid rgba(253, 230, 138, 0.6);
  color: #fef3c7;
}
.login-notice-logout strong {
  color: #fde68a;
  font-weight: 800;
}

/* سازگاری با تم روشن */
body.light-theme .login-notice-refresh {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1e3a8a;
}
body.light-theme .login-notice-refresh strong {
  color: #1d4ed8;
}
body.light-theme .login-refresh-action-btn {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}
body.light-theme .login-notice-logout {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
  color: #78350f;
}
body.light-theme .login-notice-logout strong {
  color: #92400e;
}
#sessionScreen header{ border-radius: var(--r-lg); }
footer{ color: var(--text-on-bg); opacity: .7; font-size: .74rem; padding: 24px 20px; text-align: center; position: relative; z-index: 1; }

/* ---------- نوار زمینه و منو (3D Glassmorphic Context Bar) ---------- */
.context-bar{
  width: 100%; max-width: 560px; margin: 14px 18px 0; padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(14, 30, 66, 0.68);
  border: 1px solid rgba(140, 180, 230, 0.22);
  border-top: 1.5px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1px solid rgba(10, 20, 45, 0.6);
  border-radius: var(--r-md);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center;
  color: var(--text-on-bg); font-size: .82rem; position: relative; z-index: 1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35),
              0 1px 0 rgba(255, 255, 255, 0.18) inset,
              0 0 20px rgba(35, 137, 220, 0.08);
}
.context-bar .ctx-actions{ display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.context-bar button{
  width: auto; padding: 7px 16px; font-size: .76rem; font-weight: 700; margin: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(35, 137, 220, 0.16);
  color: var(--text-main);
  border: 1px solid rgba(140, 180, 230, 0.28);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 3px 0 rgba(10, 25, 55, 0.8),
              0 6px 14px rgba(0, 0, 0, 0.2),
              inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition: all .15s ease-out;
}
.context-bar button:hover:not(:disabled){
  transform: translateY(-2px);
  background: rgba(35, 137, 220, 0.24);
  box-shadow: 0 5px 0 rgba(10, 25, 55, 0.8), 0 8px 18px rgba(0, 0, 0, 0.28);
}
.context-bar button:active:not(:disabled){
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(10, 25, 55, 0.8), 0 3px 6px rgba(0, 0, 0, 0.2);
}
#hamburgerBtn{
  position: fixed; top: 18px; left: 18px; z-index: 99; width: 48px; height: 48px; padding: 0; margin: 0;
  border-radius: 16px; font-size: 1.45rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  background: var(--header-bg); color: #fff; border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.32), 0 0 18px var(--accent-glow);
}
#musicToggle{
  position: fixed; bottom: 20px; left: 20px; width: 52px; height: 52px; padding: 0; margin: 0; border-radius: 50%;
  font-size: 1.3rem; display: flex; align-items: center; justify-content: center; z-index: 5;
  background: var(--header-bg); color: #fff; border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 16px var(--accent-glow);
}

/* ---------- صفحه اصلی (3D Glassmorphic Hero & Buttons) ---------- */
.home-hero-card{
  position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(14, 30, 66, 0.72);
  border: 1px solid rgba(140, 180, 230, 0.25);
  border-top: 1.5px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(10, 20, 45, 0.65);
  border-radius: 26px;
  padding: 30px 22px 24px; margin-bottom: 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45),
              0 1px 0 rgba(255, 255, 255, 0.22) inset,
              0 -2px 6px rgba(0, 0, 0, 0.28) inset,
              0 0 32px rgba(35, 137, 220, 0.12);
  -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%);
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}
@media (hover: hover) {
  .home-hero-card:hover{
    transform: translateY(-4px) perspective(1000px) rotateX(1deg);
    border-color: rgba(111, 184, 240, 0.45);
    box-shadow: 0 26px 56px rgba(0, 0, 0, 0.52),
                0 1px 0 rgba(255, 255, 255, 0.35) inset,
                0 0 40px rgba(35, 137, 220, 0.22);
  }
}
.home-hero-card::before{
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), rgba(255, 255, 255, 0.8), var(--accent), transparent);
  opacity: .95;
}
.orbit-container{ position: relative; width: 175px; height: 175px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; }
.orbit-ring{ position: absolute; inset: 4px; border-radius: 50%; border: 2px dashed var(--accent-glow); animation: rotateOrbit 26s linear infinite, spinVar 26s linear infinite; pointer-events: none; }
@keyframes rotateOrbit{ from{ transform: rotate(0deg); } to{ transform: rotate(360deg); } }
@keyframes spinVar{ from{ --spin: 0deg; } to{ --spin: 360deg; } }
.orbit-item{
  position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem; line-height: 1;
  background: var(--surface-solid); border: 1.5px solid var(--accent); border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,.22), 0 0 10px var(--accent-glow);
  transform: rotate(var(--a, 0deg)) translateY(-81px) rotate(calc(var(--a, 0deg) * -1 - var(--spin)));
  animation: iconPulse 4s ease-in-out infinite alternate;
}
@keyframes iconPulse{ 0%{ opacity: .55; scale: .88; } 100%{ opacity: 1; scale: 1.1; } }
.orbit-pos-1{ --a: 0deg; } .orbit-pos-2{ --a: 60deg; } .orbit-pos-3{ --a: 120deg; }
.orbit-pos-4{ --a: 180deg; } .orbit-pos-5{ --a: 240deg; } .orbit-pos-6{ --a: 300deg; }
.home-avatar-img{ width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center; border: 3px solid var(--surface-solid); box-shadow: 0 0 0 3px var(--accent), 0 0 24px var(--accent-glow), 0 6px 18px rgba(0,0,0,.30); background: var(--surface-3); z-index: 2; position: relative; }
.home-user-name{ font-size: 1.25rem; font-weight: 900; color: var(--heading); margin-bottom: 4px; line-height: 1.6; }
.home-user-job{ font-size: .92rem; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.home-user-role{ font-size: .7rem; font-weight: 700; color: var(--soft); letter-spacing: .5px; text-transform: uppercase; }
.live-status-pill{
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; margin: 14px 0 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-bd);
  box-shadow: 0 0 14px var(--ok-glow); transition: all .25s ease;
}
.live-status-pill.offline{ background: var(--err-bg); color: var(--err); border-color: var(--err-bd); box-shadow: 0 0 14px var(--err-glow); }
.live-dot{ width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-glow); animation: livePulse 1.8s infinite; }
.live-status-pill.offline .live-dot{ background: var(--err); box-shadow: 0 0 0 3px var(--err-glow); animation: none; }
@keyframes livePulse{ 0%{ transform: scale(.92); opacity: .8; } 50%{ transform: scale(1.15); opacity: 1; } 100%{ transform: scale(.92); opacity: .8; } }
.home-meta-box{ display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--border-strong); font-size: .82rem; color: var(--text-main); }
.home-meta-tag{ background: var(--surface-3); border: 1px solid var(--border); padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.cta-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width:480px){ .cta-grid{ grid-template-columns: 1fr; } }
.cta-btn-card{
  width: 100%; margin: 0; padding: 22px 18px; min-height: 114px; text-align: right;
  display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #1f4e9f 0%, #2389dc 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: 1.5px solid rgba(255, 255, 255, 0.65);
  border-bottom: 2px solid rgba(0, 0, 0, 0.4);
  border-radius: var(--r-lg);
  box-shadow: 0 5px 0 #123270,
              0 12px 28px rgba(35, 137, 220, 0.42),
              inset 0 1px 1px rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform .15s ease-out, box-shadow .18s ease, filter .18s ease;
  user-select: none;
}
@media (hover: hover) {
  .cta-btn-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #123270,
                0 16px 36px rgba(35, 137, 220, 0.52),
                inset 0 1px 1px rgba(255, 255, 255, 0.8);
    filter: brightness(1.06);
  }
}
.cta-btn-card:active{
  transform: translateY(2px) scale(0.97) !important;
  box-shadow: 0 2px 0 #123270,
              0 6px 14px rgba(0, 0, 0, 0.3),
              inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition-duration: .04s !important;
}
.cta-btn-card.lab{
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #6d28d9 0%, #8b5cf6 50%, #a855f7 100%);
  box-shadow: 0 5px 0 #4c1d95,
              0 12px 28px rgba(139, 92, 246, 0.42),
              inset 0 1px 1px rgba(255, 255, 255, 0.6);
}
@media (hover: hover) {
  .cta-btn-card.lab:hover{
    box-shadow: 0 8px 0 #4c1d95,
                0 16px 36px rgba(139, 92, 246, 0.52),
                inset 0 1px 1px rgba(255, 255, 255, 0.8);
  }
}
.cta-btn-card.lab:active{
  box-shadow: 0 2px 0 #4c1d95,
              0 6px 14px rgba(0, 0, 0, 0.3);
}
.cta-btn-card.cert{
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #0d9488 0%, #06b6d4 50%, #0284c7 100%);
  box-shadow: 0 5px 0 #0f766e,
              0 12px 28px rgba(6, 182, 212, 0.42),
              inset 0 1px 1px rgba(255, 255, 255, 0.6);
}
@media (hover: hover) {
  .cta-btn-card.cert:hover{
    box-shadow: 0 8px 0 #0f766e,
                0 16px 36px rgba(6, 182, 212, 0.52),
                inset 0 1px 1px rgba(255, 255, 255, 0.8);
  }
}
.cta-btn-card.cert:active{
  box-shadow: 0 2px 0 #0f766e,
              0 6px 14px rgba(0, 0, 0, 0.3);
}
.cta-btn-card .cta-icon{ display:flex; align-items:center; justify-content:center; min-height:54px; margin-bottom:8px; line-height:1.3; font-size:1.85rem; filter:drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.cta-3d-img{ width:52px; height:52px; object-fit:contain; filter:drop-shadow(0 6px 14px rgba(0,0,0,0.35)); transition:transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease; user-select:none; pointer-events:none; }
.cta-btn-card:hover .cta-3d-img{ transform:scale(1.12) translateY(-3px); filter:drop-shadow(0 10px 22px rgba(0,0,0,0.48)); }
.btn-3d-icon-sm{ width:26px; height:26px; object-fit:contain; vertical-align:middle; filter:drop-shadow(0 2px 5px rgba(0,0,0,0.3)); user-select:none; margin-left:6px; }
.btn-3d-icon-xs{ width:18px; height:18px; object-fit:contain; vertical-align:middle; filter:drop-shadow(0 1px 3px rgba(0,0,0,0.25)); user-select:none; margin-left:5px; }
.ui-icon-svg{ width:15px; height:15px; display:inline-block; vertical-align:-2px; margin-left:4px; flex-shrink:0; pointer-events:none; }
.voice-mini-btn .ui-icon-svg{ width:14px; height:14px; margin-left:0; vertical-align:middle; }
.scan-trigger .ui-icon-svg{ width:14px; height:14px; vertical-align:-2px; }
.cta-btn-card .cta-title{ font-size: 1.08rem; font-weight: 800; line-height: 1.5; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.cta-btn-card .cta-sub{ font-size: .74rem; color: #e1f7f4; margin-top: 4px; opacity: .95; line-height: 1.6; }
.cta-download-btn{
  width: 100%; margin: 0 0 18px; padding: 16px 20px; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 800; font-size: .98rem; color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: 1.5px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid rgba(0, 0, 0, 0.35);
  border-radius: var(--r-md);
  box-shadow: 0 5px 0 #047857,
              0 12px 26px rgba(5, 150, 105, 0.42),
              inset 0 1px 1px rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: transform .15s ease-out, box-shadow .18s ease, filter .18s ease;
  user-select: none;
}
.cta-download-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #047857,
              0 16px 32px rgba(5, 150, 105, 0.52),
              inset 0 1px 1px rgba(255, 255, 255, 0.75);
  filter: brightness(1.06);
}
.cta-download-btn:active{
  transform: translateY(3px);
  box-shadow: 0 1px 0 #047857, 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ---------- فیلدها و فرم‌های شیشه‌ای ۳ بعدی (3D Glass Inputs) ---------- */
.field{ margin-bottom: 18px; }
.field label{ display: block; font-size: .86rem; font-weight: 700; color: var(--heading); margin-bottom: 6px; line-height: 1.8; }
.field input, .field select, .field textarea, #backupEmailRows input{
  width: 100%; padding: 12px 14px; font-family: inherit; font-size: .95rem; line-height: 1.8;
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%),
              rgba(11, 24, 54, 0.65);
  border: 1.5px solid rgba(140, 180, 230, 0.22);
  border-top: 1.5px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1.5px solid rgba(10, 20, 45, 0.6);
  border-radius: var(--r-md);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28) inset, 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .15s ease;
}
.field textarea{ min-height: 120px; padding: 14px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, #backupEmailRows input::placeholder{ color: var(--soft); opacity: .75; }
.field input:focus, .field select:focus, .field textarea:focus, #backupEmailRows input:focus{
  outline: none;
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(14, 30, 68, 0.88);
  box-shadow: 0 0 0 4px var(--ring), 0 0 18px rgba(35, 137, 220, 0.28);
}
.field input:disabled, .field select:disabled{ background: var(--input-disabled-bg); color: var(--soft); box-shadow: none; }
select option{ background: var(--surface-solid); color: var(--text-main); }
body.light-theme .field input, body.light-theme .field select, body.light-theme .field textarea, body.light-theme #backupEmailRows input{
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 248, 253, 0.9) 100%);
  border: 1.5px solid rgba(29, 63, 134, 0.2);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-bottom: 1.5px solid rgba(29, 63, 134, 0.28);
  box-shadow: 0 2px 6px rgba(29, 63, 134, 0.08) inset;
}
.input-action-row{ display: flex; gap: 8px; align-items: center; }
.input-action-row input{ flex: 1; min-width: 0; }
.mini-action-btn{
  width: auto; margin: 0; padding: 10px 13px; border-radius: var(--r-sm); font-size: .78rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  background: var(--btn2-bg); color: var(--btn2-color); border: 1.5px solid var(--btn2-border); box-shadow: none;
  cursor: pointer; transition: all .2s ease;
}
.voice-mini-btn{
  width: auto; margin: 0; padding: 8px 11px; border-radius: var(--r-sm); font-size: .78rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  background: var(--btn2-bg); color: var(--btn2-color); border: 1.5px solid var(--btn2-border); box-shadow: none;
  cursor: pointer; transition: all .2s ease; user-select: none;
}
.voice-mini-btn:hover{
  border-color: var(--blue-2);
  transform: translateY(-1px);
}
.voice-mini-btn.recording, .voice-record-btn.recording{
  background: var(--err-bg) !important;
  color: var(--err) !important;
  border-color: var(--err-bd) !important;
  box-shadow: 0 0 16px var(--err-glow);
  animation: pulseMic 1s infinite alternate;
}
.voice-lang-badge{
  display: inline-block;
  padding: 1px 5px;
  font-size: .66rem;
  font-weight: 800;
  font-family: monospace, sans-serif;
  border-radius: 5px;
  letter-spacing: .5px;
  line-height: 1.3;
  cursor: pointer;
  transition: all .2s ease;
}
.voice-lang-badge.lang-en{
  background: rgba(37, 99, 235, 0.15);
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.35);
}
.voice-lang-badge.lang-fa{
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
[data-theme="dark"] .voice-lang-badge.lang-en{
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.45);
}
[data-theme="dark"] .voice-lang-badge.lang-fa{
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
}
.voice-lang-badge:hover{
  transform: scale(1.08);
  filter: brightness(1.15);
}
.unit-input-wrap{ position: relative; display: flex; align-items: center; width: 100%; }
.unit-input-wrap input{ padding-left: 48px !important; }
.unit-tag{ position: absolute; left: 12px; color: var(--soft); font-size: .75rem; font-weight: 700; pointer-events: none; direction: ltr; }
.voice-record-btn{
  width: auto; margin: 0 0 8px auto; padding: 6px 14px; border-radius: 12px; font-size: .75rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--btn2-bg); color: var(--btn2-color); border: 1px solid var(--btn2-border); box-shadow: none;
}
@keyframes pulseMic{ from{ transform: scale(1); } to{ transform: scale(1.05); } }
.link-btn{ width: auto; margin: 6px 0 0; padding: 0; background: none; border: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--soft); font-size: .74rem; text-decoration: underline; cursor: pointer; }
@media (hover:hover){ .link-btn:hover:not(:disabled){ transform: none; box-shadow: none; color: var(--accent); } }

/* ---------- انیمیشن پرتو چرخان دور کادرهای لاگین به‌صورت کاملاً جداگانه (Separate Rotating Border Beam) ---------- */
.spin-box-wrap {
  position: relative;
  display: block;
  border-radius: 12px;
  padding: 2.5px;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
  border: 1.5px solid rgba(140, 180, 230, 0.22);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.spin-box-wrap > .spin-border-beam {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.spin-box-wrap input {
  position: relative;
  z-index: 2;
  width: 100% !important;
  display: block;
  margin: 0 !important;
  border: none !important;
  outline: none !important;
  border-radius: 9px !important;
  background: #0c1b3c !important;
  color: var(--text-main);
  padding: 12px 14px;
}

body.light-theme .spin-box-wrap input {
  background: #ffffff !important;
  color: #1c2230 !important;
}

/* حالت موفقیت: چرخش پرتو نوری سبز دور هر کادر به صورت کاملاً مستقل و مجزا */
.spin-box-wrap.auth-success {
  border-color: rgba(52, 211, 153, 0.6) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
}

.spin-box-wrap.auth-success > .spin-border-beam {
  opacity: 1;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 240deg, #10b981 300deg, #34d399 335deg, #a7f3d0 360deg);
  animation: rotateRayEach 1.25s linear infinite;
}

/* حالت خطا: چرخش پرتو نوری قرمز دور هر کادر به صورت کاملاً مستقل و مجزا با لرزش فریم */
.spin-box-wrap.auth-error {
  border-color: rgba(239, 68, 68, 0.6) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.45);
  animation: authShake 0.42s cubic-bezier(.36,.07,.19,.97) both;
}

.spin-box-wrap.auth-error > .spin-border-beam {
  opacity: 1;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 240deg, #ef4444 300deg, #f87171 335deg, #fca5a5 360deg);
  animation: rotateRayEach 1.05s linear infinite;
}

@keyframes rotateRayEach {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes authShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* دکمه‌های وضعیت (قبول / محدود / مردود) — فقط استایل label */
.result-group{ display: flex; gap: 8px; }
.result-chip{
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  padding: 12px 6px; border-radius: var(--r-md); font-size: .88rem; font-weight: 700; line-height: 1.8;
  color: var(--soft); cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  background: var(--btn2-bg); border: 1.5px solid var(--border-strong);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: var(--btn2-shadow);
  transition: transform .16s var(--ease), box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.result-chip input{ position: absolute; opacity: 0; width: 0; height: 0; }
.result-chip span::before{ margin-inline-end: 6px; }
.result-chip.pass span::before{ content: "✅"; }
.result-chip.limited span::before{ content: "⚠️"; }
.result-chip.rejected span::before{ content: "❌"; }
@media (hover:hover){
  .result-chip.pass:hover{ border-color: var(--ok-bd); box-shadow: 0 0 14px var(--ok-glow); transform: translateY(-2px); }
  .result-chip.limited:hover{ border-color: var(--warn-bd); box-shadow: 0 0 14px var(--warn-glow); transform: translateY(-2px); }
  .result-chip.rejected:hover{ border-color: var(--err-bd); box-shadow: 0 0 14px var(--err-glow); transform: translateY(-2px); }
}
.result-chip:active{ transform: translateY(1px) scale(.96); transition-duration: .06s; }
.result-chip:has(input:focus-visible){ box-shadow: 0 0 0 3px var(--bg-solid), 0 0 0 5px var(--accent); }
.result-chip.pass:has(input:checked){ background: var(--ok-bg); border-color: var(--ok); color: var(--ok); font-weight: 800; box-shadow: 0 0 0 1px var(--ok) inset, 0 0 22px var(--ok-glow); }
.result-chip.limited:has(input:checked){ background: var(--warn-bg); border-color: var(--warn); color: var(--warn); font-weight: 800; box-shadow: 0 0 0 1px var(--warn) inset, 0 0 22px var(--warn-glow); }
.result-chip.rejected:has(input:checked){ background: var(--err-bg); border-color: var(--err); color: var(--err); font-weight: 800; box-shadow: 0 0 0 1px var(--err) inset, 0 0 22px var(--err-glow); }
.result-chip input:checked + span{ display: inline-block; animation: chipPop .26s cubic-bezier(.34,1.56,.64,1); }
@keyframes chipPop{ 0%{ transform: scale(.88); } 60%{ transform: scale(1.12); } 100%{ transform: scale(1); } }

/* چیپ‌های انتخاب کلاس هود آزمایشگاهی (کلاس I، کلاس II، کلاس III) */
.hood-class-group { margin-top: 4px; }
.hood-class-chip span::before { content: "🛡️"; margin-inline-end: 6px; }
.hood-class-chip:has(input:checked) {
  background: rgba(35, 137, 220, 0.22);
  border-color: var(--accent);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--accent) inset, 0 0 18px rgba(35, 137, 220, 0.45);
}
@media (hover:hover) {
  .hood-class-chip:hover {
    border-color: rgba(111, 184, 240, 0.6);
    box-shadow: 0 0 14px rgba(35, 137, 220, 0.28);
    transform: translateY(-2px);
  }
}

/* ---------- کمبوباکس، چیپ‌ها، فیلترها ---------- */
.combobox-wrap{ position: relative; width: 100%; }
.combobox-arrow{ position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--soft); font-size: .7rem; }
.combobox-dropdown{
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 230px; overflow-y: auto; padding: 6px;
  background: var(--surface-solid); border: 1.5px solid var(--accent); border-radius: var(--r-md);
  box-shadow: 0 16px 40px rgba(0,0,0,.30), 0 0 0 4px var(--ring); z-index: 120;
}
.combobox-item{ padding: 9px 12px; font-size: .88rem; line-height: 1.8; cursor: pointer; color: var(--text-main); border-radius: 10px; transition: background .12s ease, color .12s ease; }
.combobox-item:hover{ background: var(--surface-3); color: var(--accent); font-weight: 600; }
.combobox-item.custom-opt{ background: var(--warn-bg); color: var(--warn); font-weight: 700; margin-top: 4px; border: 1px dashed var(--warn-bd); }
.chips-wrap{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.loc-chip{
  width: auto; margin: 0; padding: 4px 13px; font-size: .75rem; font-weight: 600; line-height: 1.8;
  background: var(--surface-3); color: var(--accent); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: none;
  transition: transform .16s var(--ease), background .2s ease, border-color .2s ease, color .2s ease;
}
@media (hover:hover){ .loc-chip:hover:not(:disabled){ transform: translateY(-1px); background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 14px var(--accent-glow); } }

/* ---------- فیلتر جدول اجمالی (ساده و سبک مثل قدیم، بدون افکت سنگین) ---------- */
.qf-bar{
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  padding: 0;
  background: transparent;
  border: none;
}
.qf-btn{
  flex: 1;
  min-width: 90px;
  width: auto;
  margin: 0;
  padding: 8px 6px;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-main);
  cursor: pointer;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background .12s ease, border-color .12s ease;
}
body.light-theme .qf-btn{
  background: #ffffff;
  color: var(--navy);
  border: 1px solid #d7dce5;
}
.qf-btn.active{
  background: var(--accent-strong) !important;
  color: #fff !important;
  border-color: var(--accent-strong) !important;
}
body.light-theme .qf-btn.active{
  background: var(--navy) !important;
  color: #fff !important;
  border-color: var(--navy) !important;
}
.qf-btn.warn.active{
  background: var(--err) !important;
  color: #fff !important;
  border-color: var(--err) !important;
}
.qf-btn.ok.active{
  background: var(--ok) !important;
  color: #fff !important;
  border-color: var(--ok) !important;
}

/* ---------- ثبات و پایداری کارت‌ها و جداول (ساده، فلت، بدون چرخش و بلور سنگین) ---------- */
.card:has(.table-wrap),
.card:has(#tableWrap),
.card:has(#labTableWrap),
.card:has(#adminOfflineQueueTable),
.card:has(#labCertTableWrap),
.card.card-table {
  transform: none !important;
  perspective: none !important;
  transform-style: flat !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: none !important;
}
.card:has(.table-wrap):hover,
.card:has(#tableWrap):hover,
.card:has(#labTableWrap):hover,
.card:has(#adminOfflineQueueTable):hover,
.card:has(#labCertTableWrap):hover,
.card.card-table:hover {
  transform: none !important;
}

/* ---------- جدول نتایج (ساده و بدون انیمیشن مثل نسخه قدیم) ---------- */
.table-wrap{
  overflow-x: auto;
  overflow-y: auto;
  max-height: 480px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  position: relative;
  z-index: 1;
}
body.light-theme .table-wrap{
  background: #ffffff;
  border: 1px solid #e1e5ec;
}

table{
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
  line-height: 1.8;
  white-space: nowrap;
}
#resultTable, #labResultTable{
  min-width: 920px;
}
th, td{
  padding: 8px 9px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
body.light-theme th, body.light-theme td{
  border-bottom: 1px solid #e9ecf2;
}
th{
  background: var(--th-bg);
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody tr:nth-child(even){
  background: var(--row-alt);
}
tbody tr{
  transition: none; /* حذف هرگونه ترنزیشن سنگین */
}
tbody tr:hover{
  background: var(--row-hover) !important;
}

/* حذف کامل انیمیشن ردیف‌ها جهت سبکی فوق‌العاده */
#resultTable tbody tr,
#labResultTable tbody tr{
  animation: none !important;
}

/* رنگ وضعیت — خوانا و تمیز بدون glow و text-shadow سنگین */
#resultTable td[style*="1c7a53"]{
  background: var(--ok-bg) !important;
  color: var(--ok) !important;
  font-weight: 700;
  text-shadow: none !important;
}
#resultTable td[style*="8a6508"]{
  background: var(--warn-bg) !important;
  color: var(--warn) !important;
  font-weight: 700;
  text-shadow: none !important;
}
#resultTable td[style*="b3372c"]{
  background: var(--err-bg) !important;
  color: var(--err) !important;
  font-weight: 700;
  text-shadow: none !important;
}

/* دکمه‌های عملیات سطر (ساده، سبک، ابعاد متناسب) */
td.row-actions{ white-space: nowrap; }
td.row-actions button{
  width: auto;
  margin: 0 2px;
  padding: 4px 9px;
  font-size: .68rem;
  border-radius: 7px;
  line-height: 1.2;
  box-shadow: none !important;
  transform: none !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
td.row-actions .row-edit{ background: var(--btn2-bg); color: var(--btn2-color); border: 1px solid var(--btn2-border); }
td.row-actions .row-del{ background: var(--danger-bg); color: var(--err); border: 1px solid var(--danger-border); }
td.row-actions .row-cert{ background: var(--btn2-bg); color: var(--btn2-color); border: 1px solid var(--btn2-border); }
body.light-theme td.row-actions .row-edit{ background: #fff; color: var(--navy); border: 1px solid #c9d6ef; }
body.light-theme td.row-actions .row-del{ background: #fff; color: var(--err); border: 1px solid #f0c6c0; }
body.light-theme td.row-actions .row-cert{ background: #fff; color: var(--navy); border: 1px solid #c9d6ef; }

td.row-actions .row-edit::before{ content: "✏️ "; }
td.row-actions .row-del::before{ content: "🗑 "; }
td.row-actions .row-cert::before{ content: "🧾 "; }

@media (hover:hover){
  td.row-actions .row-edit:hover:not(:disabled){ background: var(--surface-3); transform: none; box-shadow: none; }
  td.row-actions .row-del:hover:not(:disabled){ background: var(--err-bg); transform: none; box-shadow: none; }
  td.row-actions .row-cert:hover:not(:disabled){ background: var(--surface-3); transform: none; box-shadow: none; }
  body.light-theme td.row-actions .row-edit:hover:not(:disabled){ background: #eef3fc; }
  body.light-theme td.row-actions .row-del:hover:not(:disabled){ background: #fbeae8; }
  body.light-theme td.row-actions .row-cert:hover:not(:disabled){ background: #eef3fc; }
}

/* جدول اختصاصی صدور گواهی تکمیلی آزمایشگاهی */
#labCertTableWrap{
  max-height: 620px; overflow-y: auto; overflow-x: auto;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--surface); margin-top: 8px;
}
#labCertTable{
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: .84rem; text-align: start; min-width: 820px;
}
#labCertTable thead th{
  position: sticky; top: 0; z-index: 2;
  background: var(--surface-2); color: var(--heading);
  padding: 10px 12px; font-weight: 700; border-bottom: 2px solid var(--border-strong);
  white-space: nowrap;
}
#labCertTable tbody tr{
  transition: background .15s ease;
}
#labCertTable tbody tr:hover{
  background: var(--surface-3);
}
#labCertTable tbody td{
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* موبایل و دسکتاپ: جدول با اسکرول افقی + دکمه کارت دستگاه */
.device-card-btn, .risk-class-btn{
  background: rgba(37,99,235,.15); border: 1px solid rgba(37,99,235,.45);
  color: var(--text-main, #e8eefb); border-radius: 8px; padding: 4px 12px;
  font-size: .75rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
  display: inline-flex; align-items: center; gap: 4px;
}
body.light-theme .device-card-btn, body.light-theme .risk-class-btn{
  color: #1f4e9f;
  background: rgba(31,78,159,.08);
  border-color: rgba(31,78,159,.35);
}
.device-card-btn:hover, .risk-class-btn:hover{
  background: rgba(37,99,235,.25); border-color: rgba(37,99,235,.65);
  transform: translateY(-1px);
}
.device-card-btn:active, .risk-class-btn:active{ transform: scale(.96); }

@media (max-width:640px){
  #tableWrap{ max-height: 72vh; overflow-x: auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  /* حذف blur سنگین روی موبایل */
  .card{ backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  /* نمایش کامل تمامی ستون‌ها بدون خلاصه‌سازی درست مانند نسخه 1.4.1 با اسکرول افقی */
  #resultTable, #labResultTable{ min-width: 920px !important; width: 100%; white-space: nowrap !important; }
  #resultTable th, #resultTable td{ white-space: nowrap !important; font-size: .75rem; padding: 8px 9px; }
  .device-card-btn, .risk-class-btn{
    background: rgba(37,99,235,.15); border: 1px solid rgba(37,99,235,.45);
    color: var(--text-main); border-radius: 8px; padding: 4px 10px;
    font-size: .72rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  }
  .device-card-btn:active, .risk-class-btn:active{ transform: scale(.96); }
}


/* ---------- منوی کشویی ---------- */
.drawer-backdrop{ position: fixed; inset: 0; background: rgba(4,12,24,.62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); z-index: 998; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.drawer-backdrop.active{ opacity: 1; pointer-events: auto; }
.side-drawer{
  position: fixed; top: 0; left: 0; bottom: 0; width: 340px; max-width: 88vw; z-index: 999;
  display: flex; flex-direction: column; overflow-y: auto; direction: rtl; text-align: right;
  background: var(--drawer-bg); color: var(--text-main); border-inline-end: 1px solid var(--border);
  box-shadow: 10px 0 40px rgba(0,0,0,.40);
  transform: translateX(-100%); transition: transform .28s var(--ease);
}
.side-drawer.open{ transform: translateX(0); }
.drawer-header{ background: var(--header-bg); padding: 18px; display: flex; align-items: center; justify-content: space-between; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.drawer-brand{ display: flex; align-items: center; gap: 12px; }
.drawer-brand img{ width: 42px; height: 42px; border-radius: 50%; background: #fff; padding: 3px; object-fit: contain; }
.drawer-brand .db-title{ font-size: .9rem; font-weight: 700; color: #fff; line-height: 1.6; }
.drawer-brand .db-sub{ font-size: .7rem; color: #d9f5f1; opacity: .9; }
.drawer-header-actions{ display: flex; align-items: center; gap: 8px; }
.drawer-btn-icon{
  width: 36px; height: 36px; padding: 0; margin: 0; border-radius: 12px; font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.3); box-shadow: none;
}
@media (hover:hover){ .drawer-btn-icon:hover:not(:disabled){ background: rgba(255,255,255,.28); box-shadow: none; } }
.drawer-user-hero{ position: relative; margin: 14px 14px 6px; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-lg); }
.avatar-wrap{ position: relative; width: 84px; height: 84px; margin-bottom: 12px; }
.avatar-img{ width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: center; display: block; border: 3px solid var(--surface-solid); box-shadow: 0 0 0 2px var(--accent), 0 4px 16px rgba(0,0,0,.25); background: var(--surface-3); }
.avatar-edit-badge{ position: absolute; bottom: 0; right: -2px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; cursor: pointer; background: var(--accent-strong); color: #fff; border: 2px solid var(--surface-solid); box-shadow: 0 2px 8px rgba(0,0,0,.30); }
.avatar-delete-badge{ position: absolute; bottom: 0; left: -2px; width: 28px; height: 28px; padding: 0; margin: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; background: var(--surface-solid); color: var(--err); border: 2px solid var(--surface-solid); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.duh-name-fa{ font-size: .95rem; font-weight: 800; color: var(--heading); margin-bottom: 2px; }
.duh-name-en{ font-size: .76rem; color: var(--soft); direction: ltr; margin-bottom: 6px; }
.duh-role-badge{ display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 14px; border-radius: 999px; background: var(--surface-3); color: var(--accent); border: 1px solid var(--border-strong); }
.duh-meta{ width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-strong); display: flex; flex-direction: column; gap: 4px; font-size: .73rem; color: var(--text-main); }
.drawer-nav{ padding: 8px 12px 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.drawer-section-title{ font-size: .7rem; font-weight: 700; color: var(--soft); text-transform: uppercase; margin: 12px 8px 4px; letter-spacing: .5px; }
.drawer-nav-item{
  width: 100%; margin: 0; padding: 11px 14px; display: flex; align-items: center; gap: 12px; text-align: right;
  font-weight: 500; color: var(--text-main); background: transparent; border: 1px solid transparent; border-radius: var(--r-md);
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.drawer-nav-item:hover{ background: var(--surface-3); color: var(--accent); border-color: var(--border); transform: none; box-shadow: none; }
.drawer-nav-item.active{ background: var(--surface-3); color: var(--accent); font-weight: 700; border-color: var(--accent); box-shadow: 0 0 16px var(--ring); }
.dni-icon{ font-size: 1.35rem; flex: 0 0 28px; text-align: center; }
.dni-text{ display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dni-title{ font-size: .88rem; font-weight: 700; line-height: 1.7; }
.dni-desc{ font-size: .71rem; color: var(--soft); font-weight: 400; line-height: 1.6; }
.drawer-nav-item.danger{ color: var(--err); margin-top: 4px; background: transparent; }
.drawer-nav-item.danger:hover{ background: var(--err-bg); border-color: var(--err-bd); color: var(--err); }
.drawer-submenu{ padding: 6px 10px 10px; background: var(--surface-3); border-radius: var(--r-md); margin: 2px 4px 6px; border: 1px dashed var(--border-strong); }
.drawer-submenu-search{ width: 100%; padding: 8px 12px; margin-bottom: 8px; font-family: inherit; font-size: .78rem; line-height: 1.8; color: var(--text-main); background: var(--input-bg); border: 1px solid var(--border-strong); border-radius: 12px; }
.drawer-submenu-search:focus{ outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.drawer-submenu-list{ display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow-y: auto; }
.drawer-sub-item{ width: 100%; margin: 0; padding: 6px 10px; text-align: right; font-size: .8rem; font-weight: 600; color: var(--text-main); background: transparent; border: none; border-radius: 10px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.drawer-sub-item:hover{ background: var(--surface-3); color: var(--accent); padding-right: 14px; transform: none; box-shadow: none; }

/* ---------- صفحه‌های تمام‌صفحه ---------- */
.full-screen{ position: fixed; inset: 0; z-index: 10; background: var(--bg-grad); overflow-y: auto; }
.full-screen .fs-header{ width: 100%; padding: 20px 18px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--header-bg); position: sticky; top: 0; z-index: 3; }
.full-screen .fs-header h2{ margin: 0; font-size: 1.05rem; line-height: 1.7; }
.full-screen .fs-header button{ width: auto; margin: 0; padding: 8px 16px; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.4); box-shadow: none; }
.full-screen main{ padding-top: 18px; }

/* ---------- مودال‌ها (3D Glassmorphic Modals) ---------- */
#scannerModal{
  position: fixed; inset: 0; z-index: 99999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(4,10,24,.88);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  overflow-y: auto;
}
.scanner-box, .sig-modal-box{
  width: 100%; max-width: 440px; margin: auto; padding: 22px; text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%),
              #0c1b3c;
  color: var(--text-main);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  border-top: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.6), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  position: relative;
}
.scanner-close-x{
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff;
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 1.1rem; line-height: 1; cursor: pointer; transition: all .16s ease;
  user-select: none; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.scanner-close-x:hover{
  background: rgba(239,68,68,.35); border-color: rgba(239,68,68,.65); transform: scale(1.08);
}
#scannerReader{ width: 100%; min-height: 250px; max-height: 380px; border-radius: var(--r-md); overflow: hidden; background: #000; }
#scannerReader video{ width: 100% !important; height: auto !important; max-height: 380px; object-fit: cover; border-radius: var(--r-md); }
#signatureModal{ position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,10,24,.82); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); }
#sigCanvas{ width: 100%; height: 180px; display: block; background: #ffffff; border: 2px dashed var(--accent); border-radius: var(--r-md); cursor: crosshair; touch-action: none; }
.undo-toast{
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 99999; max-width: 90vw;
  display: flex; align-items: center; gap: 14px; padding: 12px 18px; font-size: .85rem; line-height: 1.7; color: #fff;
  background: rgba(10,22,40,.92); border: 1px solid rgba(111,184,240,.50); border-radius: var(--r-md);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 20px rgba(35,137,220,.30); animation: toastIn .25s ease-out;
}
@keyframes toastIn{ from{ bottom: 6px; opacity: 0; } to{ bottom: 24px; opacity: 1; } }
.undo-toast button{ width: auto; margin: 0; padding: 6px 16px; font-size: .78rem; font-weight: 800; color: #08142e; background: linear-gradient(135deg, #6fb8f0, #9bdcf7); border: none; border-radius: 12px; box-shadow: 0 0 14px rgba(35,137,220,.55); }

/* ---------- یادداشت‌ها، شمارنده‌ها، تسک‌ها، پرسنل ---------- */
.note-item{ padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .83rem; line-height: 1.8; }
.note-item:last-child{ border-bottom: none; }
.note-item.pinned{ background: var(--warn-bg); border: 1px solid var(--warn-bd); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 8px; }
.note-pin-btn{ width: auto; margin: 0; padding: 2px 8px; font-size: .75rem; line-height: 1.8; background: transparent; color: var(--soft); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.note-pin-btn.active{ background: var(--warn-bg); border-color: var(--warn); color: var(--warn); box-shadow: 0 0 10px var(--warn-glow); }
.note-check{
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0 0 0 6px; vertical-align: middle; cursor: pointer;
  display: inline-grid; place-content: center; background: var(--input-bg); border: 1.5px solid var(--border-strong); border-radius: 7px;
  transition: background .18s ease, border-color .18s ease, transform .16s var(--ease);
}
.note-check::after{ content: ""; width: 10px; height: 6px; margin-top: -2px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); transition: transform .2s cubic-bezier(.34,1.56,.64,1); }
.note-check:checked{ background: var(--accent-strong); border-color: var(--accent); }
.note-check:checked::after{ transform: rotate(-45deg) scale(1); }
.note-check:active{ transform: scale(.88); }
.note-check:focus-visible{ outline: none; box-shadow: 0 0 0 3px var(--ring); }
.counter-row, .personnel-row{ display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--border); font-size: .85rem; line-height: 1.8; }
.counter-row:last-child, .personnel-row:last-child{ border-bottom: none; }
.counter-row .c-count{ background: var(--accent-strong); color: #fff; font-weight: 700; font-size: .78rem; padding: 0 12px; border-radius: 999px; box-shadow: 0 0 10px var(--accent-glow); }
.counter-total{ display: flex; justify-content: space-between; font-weight: 700; color: var(--heading); padding: 10px 2px 4px; border-top: 2px solid var(--accent); margin-top: 6px; font-size: .88rem; }
.personnel-row .p-count{ background: var(--surface-3); color: var(--accent); border: 1px solid var(--border-strong); font-weight: 700; font-size: .72rem; padding: 0 10px; border-radius: 999px; }
.task-item{ padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .83rem; line-height: 1.8; }
.task-item:last-child{ border-bottom: none; }
.task-head{ display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task-title{ font-weight: 700; color: var(--heading); }
.task-date{ color: var(--accent); font-size: .78rem; font-weight: 600; }
.task-meta{ color: var(--soft); font-size: .7rem; margin-top: 2px; }

/* ---------- ادمین ---------- */
.user-row{ display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: .88rem; line-height: 1.8; gap: 8px; }
.user-row:last-child{ border-bottom: none; }
.status-dot{ display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 7px; vertical-align: middle; background: var(--soft); opacity: .6; }
.status-dot.online{ background: var(--ok); opacity: 1; box-shadow: 0 0 0 3px var(--ok-glow); }
#userList span[style*="1c7a53"]{ color: var(--ok) !important; }
.login-log-row{ display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--border); font-size: .82rem; line-height: 1.8; }
.login-log-row:last-child{ border-bottom: none; }
.login-log-row .ll-event{ flex: 0 0 auto; font-size: .68rem; font-weight: 700; padding: 0 10px; border-radius: 999px; border: 1px solid transparent; }
.login-log-row .ll-in{ background: var(--ok-bg); color: var(--ok); border-color: var(--ok-bd); }
.login-log-row .ll-out{ background: var(--err-bg); color: var(--err); border-color: var(--err-bd); }
.login-log-row .ll-name{ flex: 1; color: var(--text-main); }
.login-log-row .ll-time{ flex: 0 0 auto; color: var(--soft); font-size: .75rem; direction: ltr; }
#smtpInfo{ background: var(--surface-2) !important; color: var(--text-main); border: 1px solid var(--border); }
#labIdPreview{ background: var(--surface-3) !important; border-color: var(--border-strong) !important; color: var(--heading) !important; }

/* ---------- آمار (3D Glassmorphic Analytics & KPI) ---------- */
.kpi-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi-card{
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(14, 30, 66, 0.65);
  border: 1px solid rgba(140, 180, 230, 0.22);
  border-top: 1.5px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(10, 20, 45, 0.6);
  border-radius: var(--r-md);
  padding: 16px 14px; text-align: center;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform .25s var(--ease), box-shadow .25s ease, border-color .25s ease;
}
@media (hover:hover){
  .kpi-card:hover{
    transform: translateY(-3px);
    border-color: rgba(111, 184, 240, 0.45);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42), 0 0 20px rgba(35, 137, 220, 0.2);
  }
}
.kpi-val{ font-size: 1.6rem; font-weight: 800; color: var(--heading); line-height: 1.5; }
.kpi-label{ font-size: .75rem; color: var(--soft); font-weight: 600; }
#kpiPass{ color: var(--ok) !important; } #kpiLimited{ color: var(--warn) !important; } #kpiRejected{ color: var(--err) !important; }
.bar-chart-row{ margin-bottom: 12px; }
.bar-chart-head{ display: flex; justify-content: space-between; font-size: .78rem; margin-bottom: 4px; }
.bar-chart-track{ height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar-chart-fill{ height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); transition: width .5s var(--ease); }

/* ---------- فرم تاییدیه (برگه کاغذی؛ همیشه روشن) ---------- */
.conf-sheet{
  --navy: #1d3f86; --gray: #6d6e71; --ink: #1c2230; --blue-1: #1f4e9f; --text-main: #1c2230;
  --input-bg: #f8fafc; --input-border: #cfd8e5; --heading: #1d3f86; --soft: #6d6e71;
  background: #ffffff; color: #1c2230; border-radius: var(--r-lg); padding: 24px; margin-bottom: 24px; box-shadow: 0 10px 34px rgba(0,0,0,.28);
}
.conf-header-grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid #1d3f86; }
.conf-header-item{ display: flex; flex-direction: column; gap: 4px; font-size: .84rem; }
.conf-header-item span.lbl{ color: #6d6e71; font-size: .74rem; font-weight: 600; }
.conf-header-item input{ padding: 8px 10px; border: 1.5px solid #cfd8e5; border-radius: 12px; font-family: inherit; font-size: .88rem; color: #1c2230; background: #f8fafc; }
.conf-header-item input:focus{ outline: none; border-color: #2389dc; box-shadow: 0 0 0 4px rgba(35,137,220,.25); }
.conf-header-item .auto-val{ font-weight: 800; color: #1d3f86; padding: 8px 0; font-size: .92rem; }
.conf-table-container{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
@media (max-width:820px){ .conf-table-container{ grid-template-columns: 1fr; } }
.conf-subtable{ width: 100%; border-collapse: collapse; font-size: .78rem; }
.conf-subtable th, .conf-subtable td{ border: 1px solid #d3dbe8; padding: 6px; text-align: center; color: #1c2230; }
.conf-subtable th{ background: #1d3f86; color: #fff; font-weight: 700; font-size: .75rem; position: static; }
.conf-subtable tr:nth-child(even){ background: #f6f8fc; }
.conf-subtable tr:hover{ background: #eaf1fb; }
.conf-subtable td.dev-name{ text-align: right; font-weight: 600; padding-right: 8px; }
.conf-decl-input{ width: 58px; text-align: center; padding: 4px 2px; border: 1px solid #b7c5dc; border-radius: 8px; font-family: inherit; font-weight: 700; font-size: .85rem; color: #1c2230; background: #fff; }
.conf-decl-input:focus{ outline: none; border-color: #2389dc; box-shadow: 0 0 0 3px rgba(35,137,220,.25); }
.conf-done-val{ font-weight: 800; color: #1f4e9f; display: inline-block; min-width: 24px; }
.conf-footer-box{ margin-top: 20px; padding: 16px; background: #f8fafc; border: 1.5px dashed #b7c5dc; border-radius: var(--r-md); font-size: .82rem; line-height: 2; color: #2c3e50; text-align: justify; }
.conf-sig-section{ display: flex; justify-content: space-between; align-items: flex-end; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e1e8f2; flex-wrap: wrap; gap: 16px; }
.conf-sig-card{ min-width: 240px; text-align: center; padding: 12px; border: 1px solid #d5dfef; border-radius: var(--r-md); background: #f8fafc; }
.conf-sig-img{ max-width: 200px; max-height: 85px; object-fit: contain; display: block; margin: 6px auto; }
.conf-del-btn{ background:none; border:none; color:#ef4444; font-size:.75rem; padding:2px 6px; cursor:pointer; border-radius:4px; line-height:1; opacity:.4; transition:all .15s; margin-right:4px; }
.conf-del-btn:hover{ opacity:1; background:#fee2e2; }
@media print{ .conf-del-btn{ display:none !important; } }

/* ---------- افکت ستاره‌ای دنبال‌کننده موس/لمس (JS در ui-fx.js فقط عنصر می‌سازد) ---------- */
.fx-star{
  position: fixed; z-index: 99998; pointer-events: none;
  width: var(--s, 10px); height: var(--s, 10px);
  margin: calc(var(--s, 10px) / -2) 0 0 calc(var(--s, 10px) / -2);
  background: radial-gradient(circle, #ffffff 0%, var(--accent) 62%);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: fxStar var(--d, 700ms) ease-out forwards;
}
@keyframes fxStar{
  0%{ opacity: 1; transform: translate(0, 0) rotate(0deg) scale(.3); }
  22%{ opacity: 1; transform: translate(calc(var(--dx) * .2), calc(var(--dy) * .2)) rotate(calc(var(--r) * .3)) scale(1.15); }
  100%{ opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.2); }
}

/* ---------- ایموجی‌های چندتایی پس‌زمینه دکمه‌های وضعیت ---------- */
.result-chip{ overflow: hidden; isolation: isolate; }
.result-chip > span{ position: relative; z-index: 1; }
.result-chip::after{
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center; text-align: center;
  white-space: pre; font-size: .95rem; line-height: 1.35; letter-spacing: 7px;
  opacity: .16; filter: saturate(.9);
  transition: opacity .25s ease, transform .35s var(--ease);
}
.result-chip.pass::after{ content: "✅ 💚 ✔️\A 🟢 ✅ 💚"; }
.result-chip.limited::after{ content: "⚠️ 🟡 ⚡\A ⏳ ⚠️ 🟡"; }
.result-chip.rejected::after{ content: "❌ 🔴 ⛔\A 🚫 ❌ 🔴"; }
.result-chip:has(input:checked)::after{ opacity: .42; animation: emojiFloat 3.2s ease-in-out infinite alternate; }
@keyframes emojiFloat{ from{ transform: translateY(-2px) scale(1); } to{ transform: translateY(2px) scale(1.06); } }
@media (hover:hover){ .result-chip:hover::after{ opacity: .3; } }

/* ============================================================
   استایل‌های مدرن، سه‌بعدی و شیشه‌ای پنل مدیریت (Admin 3D Glassmorphic UI)
   ============================================================ */

#adminScreen {
  position: relative;
  background: radial-gradient(circle at 15% 15%, rgba(35, 137, 220, 0.18) 0%, transparent 45%),
              radial-gradient(circle at 85% 65%, rgba(111, 66, 193, 0.16) 0%, transparent 50%),
              radial-gradient(circle at 50% 90%, rgba(31, 78, 159, 0.22) 0%, transparent 60%),
              var(--bg-solid);
  overflow-x: hidden;
  perspective: 1200px;
}

#adminScreen::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(35, 137, 220, 0.25) 0%, rgba(31, 78, 159, 0.05) 60%, transparent 80%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: adminAmbientGlow 14s ease-in-out infinite alternate;
}

#adminScreen::after {
  content: "";
  position: absolute;
  bottom: 50px;
  left: -80px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.22) 0%, rgba(35, 137, 220, 0.04) 60%, transparent 80%);
  border-radius: 50%;
  filter: blur(75px);
  pointer-events: none;
  z-index: 0;
  animation: adminAmbientGlow 18s ease-in-out infinite alternate-reverse;
}

@keyframes adminAmbientGlow {
  0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  50% { transform: translate(30px, 40px) scale(1.12); opacity: 0.95; }
  100% { transform: translate(-20px, 20px) scale(0.92); opacity: 0.75; }
}

#adminScreen > * {
  position: relative;
  z-index: 1;
}

/* کارت‌های شیشه‌ای ۳ بعدی پنل ادمین */
.admin-card-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%),
              rgba(14, 30, 66, 0.65) !important;
  backdrop-filter: blur(24px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
  border: 1px solid rgba(140, 180, 230, 0.22) !important;
  border-top: 1.5px solid rgba(255, 255, 255, 0.42) !important;
  border-bottom: 1px solid rgba(10, 20, 45, 0.6) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42),
              0 1px 0 rgba(255, 255, 255, 0.15) inset,
              0 -2px 6px rgba(0, 0, 0, 0.25) inset,
              0 0 24px rgba(35, 137, 220, 0.08) !important;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease !important;
  transform-style: preserve-3d;
  margin-bottom: 22px;
}

.admin-card-glass:hover {
  transform: translateY(-4px) perspective(1000px) rotateX(1deg);
  border-color: rgba(111, 184, 240, 0.45) !important;
  border-top-color: rgba(255, 255, 255, 0.65) !important;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.52),
              0 1px 0 rgba(255, 255, 255, 0.3) inset,
              0 -2px 8px rgba(0, 0, 0, 0.3) inset,
              0 0 35px rgba(35, 137, 220, 0.22) !important;
}

/* سربرگ کارت‌های شیشه‌ای */
.admin-glass-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(140, 180, 230, 0.18);
  flex-wrap: wrap;
}

.admin-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(35, 137, 220, 0.35), rgba(31, 78, 159, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 1.35rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.admin-card-title {
  margin: 0;
  color: var(--heading) !important;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.admin-card-subtitle {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--soft);
  line-height: 1.5;
}

/* دکمه‌های سه‌بعدی و با عمق فیزیکی (3D Buttons) */
.btn-3d {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #1f4e9f 0%, #2389dc 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 0 #123270,
              0 8px 20px rgba(35, 137, 220, 0.38),
              inset 0 1px 1px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.15s ease-out;
  user-select: none;
}

@media (hover: hover) {
  .btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #123270,
                0 12px 24px rgba(35, 137, 220, 0.48),
                inset 0 1px 1px rgba(255, 255, 255, 0.7);
    filter: brightness(1.06);
  }
}

.btn-3d:active {
  transform: translateY(2px) scale(0.97) !important;
  box-shadow: 0 1px 0 #123270,
              0 4px 10px rgba(0, 0, 0, 0.3),
              inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition-duration: .04s !important;
}

.btn-3d.small {
  padding: 6px 14px;
  font-size: 0.78rem;
  border-radius: 9px;
  box-shadow: 0 3px 0 #123270, 0 6px 14px rgba(35, 137, 220, 0.3);
}

.btn-3d.small:active {
  transform: translateY(1px) scale(0.97) !important;
  box-shadow: 0 1px 0 #123270, 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* دکمه خطر سه‌بعدی قرمز */
.btn-3d-danger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 45%),
              linear-gradient(135deg, #c53030 0%, #e53e3e 50%, #f56565 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 4px 0 #7b1d1d,
              0 8px 20px rgba(229, 62, 62, 0.4),
              inset 0 1px 1px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.15s ease-out;
  user-select: none;
}

@media (hover: hover) {
  .btn-3d-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #7b1d1d,
                0 12px 24px rgba(229, 62, 62, 0.5),
                inset 0 1px 1px rgba(255, 255, 255, 0.7);
    filter: brightness(1.08);
  }
}

.btn-3d-danger:active:not(:disabled) {
  transform: translateY(2px) scale(0.97) !important;
  box-shadow: 0 1px 0 #7b1d1d,
              0 4px 10px rgba(0, 0, 0, 0.3),
              inset 0 1px 2px rgba(0, 0, 0, 0.3);
  transition-duration: .04s !important;
}

.btn-3d-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: grayscale(0.5);
}

.btn-3d-danger.small {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 9px;
  box-shadow: 0 3px 0 #7b1d1d, 0 5px 12px rgba(229, 62, 62, 0.35);
}

/* دکمه ثانویه سه‌بعدی شیشه‌ای */
.btn-3d-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(35, 137, 220, 0.12);
  border: 1px solid rgba(140, 180, 230, 0.28);
  border-bottom: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 3px 0 rgba(10, 25, 55, 0.8),
              0 6px 16px rgba(0, 0, 0, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.15s ease-out;
}

@media (hover: hover) {
  .btn-3d-secondary:hover {
    transform: translateY(-2px);
    background: rgba(35, 137, 220, 0.22);
    border-color: rgba(140, 180, 230, 0.45);
    box-shadow: 0 5px 0 rgba(10, 25, 55, 0.8),
                0 10px 20px rgba(0, 0, 0, 0.32),
                inset 0 1px 1px rgba(255, 255, 255, 0.35);
  }
}
              inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.btn-3d-secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(10, 25, 55, 0.8),
              0 3px 6px rgba(0, 0, 0, 0.25);
}

.btn-3d-secondary.small {
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 9px;
}

/* نوار ابزار جستجو و عملیات گروهی حذف اجمالی */
.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.bulk-search-box {
  flex: 1;
  min-width: 220px;
}

.bulk-search-box input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(140, 180, 230, 0.25);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.bulk-search-box input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35, 137, 220, 0.25);
}

.bulk-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bulk-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(140, 180, 230, 0.18);
  cursor: pointer;
  user-select: none;
}

.bulk-select-all-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-2);
  cursor: pointer;
}

/* لیست کارت‌های اجمالی بیمارستان‌ها */
.hospital-bulk-list-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px;
  margin-top: 8px;
}

.hospital-summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%),
              rgba(11, 24, 54, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(140, 180, 230, 0.16);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.25s var(--ease);
}

.hospital-summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(111, 184, 240, 0.38);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 16px rgba(35, 137, 220, 0.12);
}

.hospital-summary-card.selected {
  border-color: rgba(248, 113, 113, 0.55);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
              rgba(20, 28, 56, 0.7);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.25);
}

.hosp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hosp-card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hosp-card-checkbox {
  width: 19px;
  height: 19px;
  accent-color: #ef4444;
  cursor: pointer;
}

.hosp-card-name {
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--heading);
  letter-spacing: -0.2px;
}

.hosp-card-date-badge {
  font-size: 0.72rem;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hosp-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hosp-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.hosp-stat-pill.total {
  background: rgba(35, 137, 220, 0.18);
  color: #8ed0ff;
  border: 1px solid rgba(35, 137, 220, 0.35);
}

.hosp-stat-pill.pass {
  background: rgba(74, 222, 128, 0.14);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.32);
}

.hosp-stat-pill.limited {
  background: rgba(251, 191, 36, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.32);
}

.hosp-stat-pill.rejected {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.hosp-stat-pill.variety {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.32);
}

.admin-empty-state {
  text-align: center;
  padding: 30px 14px;
  color: var(--soft);
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px dashed rgba(140, 180, 230, 0.2);
}

/* مودال تایید امنیتی کلمه عبور با افکت شیشه‌ای و سه‌بعدی */
.modal-overlay-glass {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 24, 0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box-3d {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%),
              #0c1b3c;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6),
              0 0 40px rgba(220, 38, 38, 0.22),
              inset 0 1px 1px rgba(255, 255, 255, 0.45),
              inset 0 -2px 6px rgba(0, 0, 0, 0.4);
  animation: modalPopUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

@keyframes modalPopUp {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-3d-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(140, 180, 230, 0.18);
}

.modal-security-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  animation: shieldPulse 2.4s ease-in-out infinite;
}

@keyframes shieldPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 8px 24px rgba(220, 38, 38, 0.6); }
}

.modal-3d-header h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1.08rem;
  font-weight: 800;
}

.modal-3d-header p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--soft);
  line-height: 1.5;
}

.delete-warning-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.delete-warning-banner p {
  margin: 0 0 6px;
  color: #fca5a5;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.6;
}

.delete-warning-banner small {
  color: #fca5a5;
  opacity: 0.85;
  font-size: 0.74rem;
  line-height: 1.5;
  display: block;
}

.modal-3d-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(140, 180, 230, 0.16);
  flex-wrap: wrap;
}
/* ---------- نوار فیلترهای یکپارچه و شیک جدول اجمالی (کنار هم در یک ردیف) ---------- */
.table-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.table-filter-toolbar .qf-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.filter-toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  opacity: 0.8;
}
.table-select-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.select-pill-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}
.select-pill-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.select-pill-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
}
.select-pill-input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  padding: 2px 0;
  min-width: 120px;
}
.select-pill-input option {
  background: var(--surface-solid);
  color: var(--text-main);
}
.reset-pill-btn {
  width: auto;
  margin: 0;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 12px;
  background: rgba(179, 55, 44, 0.1);
  color: #b3372c;
  border: 1px solid rgba(179, 55, 44, 0.3);
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.reset-pill-btn:hover {
  background: rgba(179, 55, 44, 0.2);
  color: #d32f2f;
  transform: translateY(-1px);
}
@media (max-width: 860px) {
  .filter-toolbar-divider {
    display: none;
  }
  .table-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }
  .table-filter-toolbar .qf-bar {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .table-filter-toolbar .qf-bar button {
    flex: 1;
    min-width: 80px;
    padding: 6px 6px;
    font-size: 0.78rem;
  }
  .table-select-filters {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .select-pill-wrap {
    flex: 1 1 calc(50% - 6px);
    min-width: 125px;
    padding: 5px 8px;
  }
  .select-pill-label {
    font-size: 0.76rem;
  }
  .select-pill-input {
    font-size: 0.8rem;
    min-width: 70px;
  }
  .reset-pill-btn {
    flex: 1 1 100%;
    text-align: center;
    padding: 7px 12px;
  }
}

/* ---------- نماد قلب نئونی سفید، توخالی و ضربان‌دار هدر سایت ---------- */
.header-neon-heart {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  user-select: none;
  pointer-events: auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: neonHeartCardGlow 2.4s ease-in-out infinite;
}
@media (hover: hover) {
  .header-neon-heart:hover {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38), 0 0 24px rgba(255, 255, 255, 0.55);
  }
}
.neon-heart-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  -webkit-transform-origin: 50% 50%;
  /* انیمیشن زنده و بسیار مشخص ضربان قلب (Lub-Dub) با شتاب سخت‌افزاری ۱۰۰٪ نیتیو */
  animation: neonHeartPulse 1.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite !important;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.neon-heart-svg {
  width: 54px;
  height: 54px;
  display: block;
  fill: none !important; /* کاملاً تو خالی */
  stroke: #ffffff;
  /* هاله درخشان نئونی سفید دقیقاً مثل نوار ECG بالای سایت */
  filter: drop-shadow(0 0 2px #ffffff) drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 14px rgba(255, 255, 255, 0.9));
  -webkit-filter: drop-shadow(0 0 2px #ffffff) drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 14px rgba(255, 255, 255, 0.9));
}
.neon-heart-svg path,
.neon-heart-svg ellipse {
  fill: none !important;
}
.neon-ecg-trace {
  stroke-dasharray: 60;
  stroke-dashoffset: 0;
  animation: neonEcgFlow 2.2s linear infinite;
}
.neon-ecg-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.neon-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  animation: neonDotPulse 1.2s infinite;
}
.neon-bpm-text {
  font-family: monospace, system-ui;
  font-size: 0.64rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

/* انیمیشن ضربان زنده قلب انسان (Lub-Dub) — ۱۰۰٪ سخت‌افزاری و روان */
@keyframes neonHeartPulse {
  0% {
    transform: scale(1) translateZ(0);
    -webkit-transform: scale(1) translateZ(0);
  }
  14% {
    /* انقباض دهلیزی / بطنی اول: جهش واضح ۱.۲۴ برابر */
    transform: scale(1.24) translateZ(0);
    -webkit-transform: scale(1.24) translateZ(0);
  }
  26% {
    /* بازگشت ملایم */
    transform: scale(0.96) translateZ(0);
    -webkit-transform: scale(0.96) translateZ(0);
  }
  38% {
    /* ضربه دوم (Lub-Dub): جهش ۱.۱۸ برابر */
    transform: scale(1.18) translateZ(0);
    -webkit-transform: scale(1.18) translateZ(0);
  }
  50% {
    transform: scale(1) translateZ(0);
    -webkit-transform: scale(1) translateZ(0);
  }
  100% {
    transform: scale(1) translateZ(0);
    -webkit-transform: scale(1) translateZ(0);
  }
}

@-webkit-keyframes neonHeartPulse {
  0% { -webkit-transform: scale(1) translateZ(0); }
  14% { -webkit-transform: scale(1.24) translateZ(0); }
  26% { -webkit-transform: scale(0.96) translateZ(0); }
  38% { -webkit-transform: scale(1.18) translateZ(0); }
  50% { -webkit-transform: scale(1) translateZ(0); }
  100% { -webkit-transform: scale(1) translateZ(0); }
}

@keyframes neonHeartCardGlow {
  0%, 100% {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28), 0 0 10px rgba(255, 255, 255, 0.2);
  }
  14%, 38% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.36), 0 0 24px rgba(255, 255, 255, 0.65);
  }
}

@keyframes neonDotPulse {
  0%, 100% {
    transform: scale(0.85);
    opacity: 0.5;
  }
  14%, 38% {
    transform: scale(1.45);
    opacity: 1;
    box-shadow: 0 0 14px #ffffff, 0 0 20px rgba(255, 255, 255, 0.95);
  }
  50% {
    transform: scale(0.95);
    opacity: 0.6;
  }
}

@keyframes neonEcgFlow {
  0% { stroke-dashoffset: 60; opacity: 0.7; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -60; opacity: 0.7; }
}

@media (max-width: 480px) {
  .header-neon-heart {
    top: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 14px;
  }
  .neon-heart-svg {
    width: 42px;
    height: 42px;
  }
  .neon-bpm-text {
    font-size: 0.58rem;
  }
}

/* ============================================================
   بج صف آفلاین بالای صفحه و مودال تفصیلی دستگاه‌های در انتظار
   ============================================================ */

/* استایل دکمه بج زرد رنگ در نوار بالای سایت */
.queue-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #854d0e;
  border: 1px solid #fcd34d;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  vertical-align: middle;
}
.queue-badge-btn:hover {
  transform: translateY(-1px) scale(1.02);
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  color: #713f12;
}
.queue-badge-btn:active {
  transform: translateY(0) scale(0.98);
}
.queue-badge-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d97706;
  box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7);
  animation: qbPulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
  flex-shrink: 0;
}
@keyframes qbPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(217, 119, 6, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}
.queue-badge-view-hint {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.9;
  margin-right: 2px;
  padding: 1px 6px;
  background: rgba(180, 83, 9, 0.12);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* مودال تمام‌صفحه / شیشه‌ای نمایش جزئیات صف برای همه کاربران */
.user-queue-modal-box {
  max-width: 960px !important;
  width: 95% !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
}
.queue-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.queue-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.queue-header-icon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}
.queue-modal-title {
  margin: 0;
  color: var(--heading);
  font-size: 1.15rem;
  font-weight: 800;
}
.queue-modal-subtitle {
  margin: 3px 0 0;
  color: var(--soft);
  font-size: 0.78rem;
  line-height: 1.4;
}
.modal-close-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--soft);
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close-icon-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* بنر توضیحات صف */
.queue-info-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #fde68a;
  font-size: 0.8rem;
  line-height: 1.6;
}
.queue-info-banner .qib-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.queue-info-banner .qib-text strong {
  display: block;
  color: #fef3c7;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

/* نوار ابزار عملیات صف */
.queue-action-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.qat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.queue-flush-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #fff !important;
  border: none !important;
  padding: 7px 16px !important;
  border-radius: 10px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}
.queue-flush-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  transform: translateY(-1px);
}
.queue-status-msg {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--soft);
}

/* بدنه اسکرول‌خور محتوای صف */
.user-queue-content-wrap {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 52vh;
  padding-inline-end: 4px;
  margin-bottom: 8px;
}
.user-queue-content-wrap::-webkit-scrollbar {
  width: 6px;
}
.user-queue-content-wrap::-webkit-scrollbar-thumb {
  background: rgba(140, 180, 230, 0.25);
  border-radius: 4px;
}

/* حالت خالی صف */
.queue-empty-state {
  text-align: center;
  padding: 32px 16px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 14px;
  margin: 8px 0;
}

/* جدول دسکتاپ صف */
.user-queue-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.user-queue-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
}
.user-queue-table th {
  background: rgba(14, 30, 66, 0.85);
  color: var(--heading);
  padding: 10px 8px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-strong);
  text-align: right;
}
.user-queue-table th.center, .user-queue-table td.center {
  text-align: center;
}
.user-queue-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  vertical-align: middle;
}
.user-queue-table tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* بج‌ها و تگ‌های اطلاعات دستگاه */
.uq-cert-badge {
  display: inline-block;
  font-family: monospace;
  direction: ltr;
  text-align: left;
  background: rgba(35, 137, 220, 0.15);
  border: 1px solid rgba(111, 184, 240, 0.35);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
}
.uq-location-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-main);
  font-weight: 600;
}
.uq-status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}
.uq-status-pass {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.uq-status-limited {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
  border: 1px solid rgba(234, 179, 8, 0.35);
}
.uq-status-rejected {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.uq-action-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.28);
}
.uq-delete-btn {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.uq-delete-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #ef4444;
}

/* نمای کارت‌های موبایل برای تفکیک فوق‌العاده */
.user-queue-cards-wrap {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.uq-mobile-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}
.uq-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.uq-card-title {
  font-weight: 700;
  color: var(--heading);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.uq-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 0.78rem;
}
.uq-card-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.uq-card-label {
  color: var(--soft);
  font-size: 0.7rem;
}
.uq-card-value {
  color: var(--text-main);
  font-weight: 600;
}
.uq-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

@media (max-width: 768px) {
  /* بهینه‌سازی مودال صف آفلاین برای موبایل */
  .user-queue-modal-box {
    width: 98% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    padding: 14px 12px !important;
    border-radius: 16px !important;
  }
  .queue-modal-header {
    padding-bottom: 8px !important;
    margin-bottom: 8px !important;
  }
  .queue-modal-title {
    font-size: 1.15rem !important;
  }
  .queue-modal-subtitle {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
  }
  .queue-info-banner {
    padding: 8px 10px !important;
    margin-bottom: 10px !important;
    font-size: 0.85rem !important;
  }
  .queue-action-toolbar {
    margin-bottom: 10px !important;
  }
  .user-queue-content-wrap {
    max-height: 65vh !important;
    padding-inline-end: 2px !important;
  }
  .user-queue-table-wrap {
    display: none !important;
  }
  .user-queue-cards-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .uq-mobile-card {
    padding: 14px 14px !important;
    border-radius: 14px !important;
    background: var(--surface-2) !important;
    border: 1.5px solid var(--border) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
  }
  .uq-card-head {
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
  }
  .uq-card-title {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: var(--heading) !important;
  }
  .uq-card-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    font-size: 0.92rem !important;
  }
  .uq-card-item {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  }
  .uq-card-label {
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    color: var(--soft) !important;
    min-width: 100px !important;
  }
  .uq-card-value {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    text-align: left !important;
    direction: ltr !important;
  }
  .uq-cert-badge {
    font-size: 1.05rem !important;
    padding: 4px 10px !important;
    font-weight: 800 !important;
    border-radius: 8px !important;
  }
  .uq-status-pill {
    font-size: 0.88rem !important;
    padding: 4px 12px !important;
    font-weight: 800 !important;
    border-radius: 999px !important;
  }
  .uq-card-foot {
    margin-top: 10px !important;
    padding-top: 10px !important;
    font-size: 0.85rem !important;
  }
  .uq-delete-btn {
    min-height: 38px !important;
    padding: 6px 14px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
  }

  /* بهینه‌سازی مودال نمایش جزئیات دستگاه در موبایل */
  #deviceDetailModal .modal-box-3d {
    width: 96% !important;
    max-width: 100% !important;
    padding: 16px 14px !important;
    border-radius: 16px !important;
  }
  #deviceDetailTitle {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
  }
  #deviceDetailSub {
    font-size: 0.92rem !important;
  }
  #deviceDetailBody > div {
    font-size: 0.95rem !important;
    padding: 9px 4px !important;
  }
  #deviceDetailBody span {
    font-size: 0.95rem !important;
  }
  #deviceDetailBody bdi {
    font-size: 1.05rem !important;
  }
  .modal-3d-actions button {
    min-height: 42px !important;
    font-size: 0.92rem !important;
    padding: 8px 16px !important;
  }
}


/* بخش موارد رد شده توسط سرور */
.queue-dropped-section {
  margin-top: 16px;
  border-top: 1px dashed rgba(239, 68, 68, 0.35);
  padding-top: 12px;
}
.qds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.qds-title {
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 700;
}
.qds-clear-btn {
  background: none;
  border: none;
  color: #f87171;
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- چاپ (فرم تاییدیه) ---------- */
@media print{
  body{ background: #fff !important; color: #000 !important; }
  #starfield, #musicToggle, #hamburgerBtn, .context-bar, #sessionScreen, #appScreen,
  #editScreen, #adminScreen, #analyticsScreen, #scannerModal, #undoToast, .drawer-backdrop,
  .side-drawer, .fs-header, .conf-actions-bar, #signatureModal, #userQueueModal, #deviceDetailModal, #socketChecklistModal, footer, .fx-star{ display: none !important; }
  #confirmationScreen{ position: static !important; background: #fff !important; overflow: visible !important; animation: none !important; }
  .conf-sheet{ box-shadow: none !important; border: none !important; padding: 0 !important; width: 100% !important; }
  .conf-decl-input{ border: none !important; background: transparent !important; font-size: 10pt !important; }
  .conf-header-item input{ border: none !important; background: transparent !important; font-weight: bold !important; }
  .conf-table-container{ display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .conf-subtable th{ background: #222 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .conf-subtable td, .conf-subtable th{ padding: 4px 3px !important; font-size: 8pt !important; border: 1px solid #777 !important; }
  .conf-footer-box{ font-size: 8.5pt !important; line-height: 1.6 !important; border: 1px solid #888 !important; }
}

/* ---------- چک‌لیست پریز برق ---------- */
.socket-modal-box {
  background: var(--surface-1);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(14, 165, 233, 0.15);
  border-radius: 16px;
  padding: 22px 24px;
}
.socket-status-btn {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  color: var(--soft);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.socket-status-btn:hover {
  border-color: var(--primary);
  color: var(--heading);
  transform: translateY(-1px);
}
.socket-status-btn[data-status="PASSED"].active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}
.socket-status-btn[data-status="LIMITED"].active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}
.socket-status-btn[data-status="REJECTED"].active {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}
.socket-live-preview {
  transition: all 0.2s ease;
}

/* ---------- بج‌های سوابق ممیزی (Audit Log) ---------- */
.audit-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}
.audit-badge-del {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.audit-badge-restore {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.audit-badge-edit {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.audit-badge-socket {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.audit-badge-add {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.audit-badge-conf {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.audit-badge-other {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* چیپ‌های شناسه‌های مستثنی پریز برق */
.socket-exclude-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  font-family: monospace;
  transition: all 0.2s ease;
}
.socket-exclude-badge:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}
.del-exclude-chip-btn {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  border-radius: 50%;
  transition: transform 0.15s ease, color 0.15s ease;
}
.del-exclude-chip-btn:hover {
  color: #dc2626;
  transform: scale(1.25);
}

/* ---------- اسکنر هوشمند کلمات و برچسب (نسخه 1.5.1) ---------- */
.scanner-ocr-box {
  max-width: 460px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(16, 32, 68, 0.96) 0%, rgba(8, 18, 38, 0.98) 100%);
  border: 1.5px solid rgba(111, 184, 240, 0.45);
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 30px rgba(35, 137, 220, 0.25);
}
.scanner-target-badge {
  background: rgba(35, 137, 220, 0.22);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.4);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: -0.2px;
}
.scanner-live-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #34d399;
  font-size: 0.76rem;
  font-weight: 600;
}
.scanner-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulseScanDot 1.4s infinite ease-in-out;
}
@keyframes pulseScanDot {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}
.scanner-viewport-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 2px solid rgba(111, 184, 240, 0.35);
  box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
  background: #000;
}
.scanner-laser-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #38bdf8, #818cf8, transparent);
  box-shadow: 0 0 12px #38bdf8, 0 0 20px #818cf8;
  animation: laserScanMove 2.2s infinite ease-in-out;
  pointer-events: none;
  z-index: 10;
}
@keyframes laserScanMove {
  0% { top: 4%; opacity: 0.3; }
  50% { top: 92%; opacity: 1; }
  100% { top: 4%; opacity: 0.3; }
}
.scanner-detected-panel {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(4, 10, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-md);
  text-align: right;
}
.scanner-detected-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.79rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 8px;
}
.scanner-count-badge {
  background: rgba(147, 197, 253, 0.2);
  color: #bfdbfe;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  border: 1px solid rgba(147, 197, 253, 0.3);
}
.scanner-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 140px;
  overflow-y: auto;
  padding: 2px;
}
.ocr-detected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: linear-gradient(135deg, rgba(30, 58, 102, 0.85), rgba(15, 23, 42, 0.95));
  border: 1.2px solid rgba(147, 197, 253, 0.45);
  color: #f8fafc;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.ocr-detected-chip:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(30, 64, 175, 0.95));
  border-color: #60a5fa;
  transform: translateY(-1.5px) scale(1.02);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.45);
}
.ocr-detected-chip.priority-chip {
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}
.ocr-detected-chip.priority-chip:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  border-color: #fde68a;
}
.ocr-chip-type {
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.14);
  color: #cbd5e1;
}
.ocr-chip-text {
  font-family: inherit;
  direction: ltr;
  unicode-bidi: isolate;
  font-weight: 700;
}
.scanner-empty-tip {
  font-size: 0.77rem;
  color: #94a3b8;
  line-height: 1.6;
  text-align: center;
  padding: 8px;
}
.scanner-manual-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.scanner-manual-row input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: var(--r-sm);
  outline: none;
  direction: ltr;
}
.scanner-manual-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(35, 137, 220, 0.4);
}

/* ============================================================
   نوار آخرین تجهیزات و آیدی‌های ثبت‌شده در چک‌لیست آزمایشگاهی
   ============================================================ */
.lab-recent-bar-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lab-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.lab-recent-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lab-recent-icon {
  font-size: 1.15rem;
}

.lab-recent-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

.lab-latest-id-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(35, 137, 220, 0.12);
  border: 1px solid var(--border-strong);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.lab-latest-id-label {
  color: var(--soft);
  font-size: 0.76rem;
}

.lab-latest-id-val {
  font-family: monospace;
  font-weight: 800;
  color: var(--accent);
  direction: ltr;
  unicode-bidi: isolate;
  padding: 1px 4px;
}

.lab-recent-cards-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.lab-recent-cards-track::-webkit-scrollbar {
  height: 6px;
}

.lab-recent-cards-track::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.lab-recent-cards-track::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.lab-recent-item-card {
  flex: 0 0 auto;
  min-width: 170px;
  max-width: 220px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  user-select: none;
}

.lab-recent-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(35, 137, 220, 0.25);
  background: rgba(35, 137, 220, 0.08);
}

.lab-recent-item-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lab-recent-item-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-recent-item-id {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  font-family: monospace;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(35, 137, 220, 0.12);
  border: 1px solid rgba(111, 184, 240, 0.28);
  padding: 2px 6px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lab-recent-card-btn {
  width: 100%;
  font-size: 0.76rem;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--btn2-bg);
  color: var(--btn2-color);
  border: 1px solid var(--btn2-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 600;
  transition: all 0.16s ease;
}

.lab-recent-card-btn:hover {
  background: var(--accent-2);
  color: #fff;
  border-color: var(--accent);
}

.lab-recent-empty {
  font-size: 0.82rem;
  color: var(--soft);
  padding: 10px 4px;
  width: 100%;
  text-align: center;
}



