/* ===== Yektanet Performance Review - YEKTANET Design System v2 ===== */
/* Font: Vazirmatn loaded via vazirmatn-font-face.css (local, no external internet) */

/* ── Alpine.js cloak — hide elements until Alpine initializes ── */
[x-cloak] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* لوگوی برند: نسخهٔ روشن / تیره با data-theme روی <html> */
.yektanet-brand-logo .yektanet-brand-logo--dark {
  display: none;
}
[data-theme="dark"] .yektanet-brand-logo .yektanet-brand-logo--light {
  display: none;
}
[data-theme="dark"] .yektanet-brand-logo .yektanet-brand-logo--dark {
  display: block;
}

:root {
  --gold: #fed813;
  --gold-light: #fff8d4;
  --gold-dark: #d4b410;
  /* ── Gold Scale ──────────────────────────────────── */
  --gold-50:         #fffef0;
  --gold-100:        #fff8d4;
  --gold-200:        #fef0a8;
  --gold-300:        #fde571;
  --gold-400:        #fed813;
  --gold-500:        #ebc700;
  --gold-600:        #d4b410;
  --gold-700:        #a88a0a;
  --gold-800:        #7a6408;
  --gold-900:        #4d3f05;
  /* ── Brand ─────────────────────────────────────── */
  --brand-gold:         #fed813;
  --brand-gold-hover:   #e5c411;
  --brand-purple:       #7c3aed;
  --brand-purple-dark:  #5b21b6;
  --brand-purple-light: #ede9fe;
  --brand-bg:           #f5f3ff;
  /* ── Semantic: Success ───────────────────────────── */
  --success-50:      #ecfdf5;
  --success-100:     #d1fae5;
  --success-500:     #10b981;
  --success-600:     #059669;
  --success-700:     #047857;
  /* ── Semantic: Warning ───────────────────────────── */
  --warning-50:      #fffbeb;
  --warning-100:     #fef3c7;
  --warning-500:     #f59e0b;
  --warning-600:     #d97706;
  --warning-700:     #b45309;
  /* ── Semantic: Error ─────────────────────────────── */
  --error-50:        #fef2f2;
  --error-100:       #fee2e2;
  --error-500:       #ef4444;
  --error-600:       #dc2626;
  --error-700:       #b91c1c;
  /* ── Semantic: Info ──────────────────────────────── */
  --info-50:         #eff6ff;
  --info-100:        #dbeafe;
  --info-500:        #3b82f6;
  --info-600:        #2563eb;
  --info-700:        #1d4ed8;
  --saffron: #f3c42e;
  --jet: #323232;
  --silver: #f2f2f2;
  --smoke: #f2f2f2;
  --keppel: #2fbea8;
  --aquamarine: #3de19c;
  --honey: #ffb113;
  --pink: #fd6f95;
  --blue: #17b1fd;
  --blueberry: #797efe;
  --slate-blue: #8763f8;
  --lavender: #b68cf8;
  --bg-main: #f5f6fa;
  --bg-card: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-light: #eef2f7;
  --border-medium: #e5e7eb;
  --shadow-sm: 0 1px 6px rgba(17, 24, 39, 0.05);
  --shadow-md: 0 6px 18px rgba(17, 24, 39, 0.07);
  --shadow-lg: 0 12px 30px rgba(17, 24, 39, 0.09);
  --shadow-gold: 0 4px 16px rgba(254, 216, 19, 0.3);
  --radius-sm: 0.5rem;
  --radius-md: 0.85rem;
  --radius-lg: 1.1rem;
  --radius-xl: 1.5rem;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  /* ── Animation Durations ─────────────────────────── */
  --duration-instant:  80ms;
  --duration-fast:    150ms;
  --duration-normal:  200ms;
  --duration-slow:    350ms;
  --duration-slower:  500ms;

  /* Application shell (aligned with HR-style proportions: 64 / 240 / 72) */
  --shell-header-h: 64px;
  --shell-sidebar-w: 240px;
  --shell-sidebar-w-collapsed: 72px;
  --shell-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  /* نصف عرض سایدبار برای فرمول‌های تمام‌عرض داخل main (مثلاً sticky footer) */
  --shell-sidebar-half: 120px;

  /* ── Semantic Surface & Text (for React + Django consistency) ── */
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f9fafb;
  --bg-surface-tertiary: #f3f4f6;
  --bg-surface-hover: #f9fafb;
  --bg-surface-active: #f3f4f6;
  --bg-surface-disabled: #f9fafb;
  --bg-overlay: rgba(17, 24, 39, 0.55);

  --text-heading: #111827;
  --text-body: #374151;
  --text-muted-foreground: #6b7280;
  --text-placeholder: #9ca3af;
  --text-disabled: #d1d5db;
  --text-inverse: #ffffff;
  --text-link: #3b82f6;
  --text-link-hover: #2563eb;

  --border-default: #e5e7eb;
  --border-subtle: #f3f4f6;
  --border-strong: #d1d5db;
  --border-focus: var(--gold);
  --border-error: var(--error-500);

  --bg-input: #ffffff;
  --bg-input-disabled: #f9fafb;

  /* Status backgrounds */
  --bg-success-subtle: #ecfdf5;
  --bg-warning-subtle: #fffbeb;
  --bg-error-subtle: #fef2f2;
  --bg-info-subtle: #eff6ff;
  --bg-gold-subtle: var(--gold-100);
  --bg-purple-subtle: #ede9fe;

  --text-success: #065f46;
  --text-warning: #92400e;
  --text-error: #991b1b;
  --text-info: #1e40af;
  --text-gold: #92400e;
  --text-purple: #6d28d9;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: none; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 216, 19, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(254, 216, 19, 0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 0.5rem;
}

.skeleton-text { height: 1rem; width: 60%; }
.skeleton-text-sm { height: 0.75rem; width: 40%; }
.skeleton-circle { width: 3rem; height: 3rem; border-radius: 50%; }
.skeleton-card { height: 5rem; width: 100%; border-radius: 1rem; }
.skeleton-kpi { height: 6rem; border-radius: 1rem; }
.skeleton-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
  border-radius: inherit;
  z-index: 5;
}

.animate-fade-in { animation: fadeIn 0.4s ease-out both; }
.animate-slide-right { animation: slideInRight 0.4s ease-out both; }
@keyframes drawerSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.animate-slide-in-right { animation: drawerSlideIn 0.3s ease-out both; }
.animate-slide-up { animation: slideInUp 0.4s ease-out both; }
.animate-scale-in { animation: scaleIn 0.3s ease-out both; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.1s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.2s; }
.delay-5 { animation-delay: 0.25s; }
.delay-6 { animation-delay: 0.3s; }

/* ── Staggered children animation ── */
.stagger-children > * {
  animation: fadeIn 0.4s ease-out both;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.03s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.06s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.09s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.12s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.18s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.21s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.24s; }
.stagger-children > *:nth-child(9) { animation-delay: 0.27s; }
.stagger-children > *:nth-child(10) { animation-delay: 0.3s; }

/* ── Smooth hover lift ── */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Card interactive states ── */
.card-interactive {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  cursor: pointer;
}
.card-interactive:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-200);
}
.card-interactive:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ── Counter animation ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.animate-count { animation: countUp 0.5s ease-out both; }

/* ── Slide-in from bottom ── */
@keyframes slideInBottom {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.animate-slide-bottom { animation: slideInBottom 0.5s ease-out both; }

/* ── Glow pulse for active/important items ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(254, 216, 19, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(254, 216, 19, 0); }
}
.animate-glow { animation: glowPulse 2s ease-in-out infinite; }

/* ── Page transition ── */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.animate-page-enter { animation: pageEnter 0.35s ease-out both; }

/* Scroll anchoring: reduce micro-jumps when layout height changes (e.g. rich text mount) */
.main-content,
.animate-page-enter {
  overflow-anchor: none;
}

/* ── Smooth stat numbers ── */
.stat-value {
  transition: color var(--transition-normal);
}

/* ===== SKIP LINK (A11y) ===== */
.skip-link {
  position: absolute;
  top: -100px;
  right: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--jet);
  font-weight: 700;
  border-radius: var(--radius-md);
  text-decoration: none;
  z-index: 9999;
  transition: top var(--transition-fast);
  box-shadow: var(--shadow-md);
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--jet);
  outline-offset: 2px;
}

/* ===== BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { direction: rtl; font-family: 'Vazirmatn', sans-serif; scroll-behavior: smooth; }
/* اسکرول آرام کل صفحه + scrollIntoView({smooth}) کنار هم = احساس «دو تکه بودن» و لگ؛ روی فرم بلند اسنپ‌شات فقط منطقی smooth از JS استفاده می‌شود. */
html:has(.snapshot-page-wrapper) {
  scroll-behavior: auto;
  /*
   * فقط scroll-padding هم‌ترازی scrollIntoView را با نوارٔ ثابت بالا ست می‌کند.
   * scroll-margin هم‌قد روی هر سکشن = جمعٔ مضاعف و فاصلهٔ زیاد بین هدر و کارت؛ margin سکشن‌ها ۰ است.
   */
  --snapshot-header-gap: 6px;
  --snapshot-scroll-padding-top: calc(
    var(--shell-header-h, 64px) + env(safe-area-inset-top, 0px) + var(--snapshot-header-gap)
  );
  --snapshot-footer-clearance: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  scroll-padding-top: var(--snapshot-scroll-padding-top);
  scroll-padding-bottom: var(--snapshot-footer-clearance);
}
body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--gold-light);
  color: var(--jet);
}

/* ریشهٔ shell با Alpine — پر کردن ارتفاع ویوپورت بدون اتکا به کلاس Tailwind پراکنده در قالب */
.app-shell-root {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ===== LAYOUT — app shell (collapsible sidebar, HR-style 64 / 240 / 72) ===== */
.header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--shell-header-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-medium);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  transition: right var(--shell-transition), box-shadow var(--transition-normal);
}

/* سوئیچر نقش: تاریخ | [وسط: segmented] | زنگ + کاربر */
.header--role-centered {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}
.header--role-centered .header__start {
  justify-self: start;
  min-width: 0;
}
.header--role-centered .header__center {
  display: none;
  justify-content: center;
  min-width: 0;
}
@media (min-width: 768px) {
  .header--role-centered .header__center {
    display: flex;
  }
}
.header__center--stacked {
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
/* داشبوردهایی که فیلتر دورهٔ درون‌صفحه دارند — سوییچر هدر مخفی */
html.page-hide-header-cycle-switcher .header .cycle-switcher,
body.page-hide-header-cycle-switcher .header .cycle-switcher {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html.page-hide-header-cycle-switcher .header__center.header__center--stacked,
body.page-hide-header-cycle-switcher .header__center.header__center--stacked {
  flex-direction: row;
  gap: 0;
}
.header--role-centered .header__end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
@media (min-width: 640px) {
  .header--role-centered .header__end {
    gap: 0.75rem;
  }
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  width: var(--shell-sidebar-w);
  background: var(--bg-card);
  border-left: 1px solid var(--border-medium);
  box-shadow: -2px 0 12px rgba(15, 23, 42, 0.04);
  /* overflow: دکمهٔ FAB با left منفی خارج از جعبهٔ سایدبار است؛ هر hidden/auto روی محورها آن را می‌بُرد */
  overflow: visible;
  z-index: 42;
  transition: width var(--shell-transition), transform var(--shell-transition);
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  flex-shrink: 0;
  height: var(--shell-header-h);
  display: flex;
  align-items: center;
  padding-inline: 1rem;
  border-bottom: 1px solid rgba(231, 235, 242, 0.95);
}

[data-theme="dark"] .sidebar-brand {
  border-bottom-color: rgba(51, 65, 85, 0.65);
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
  padding: 0.25rem 0;
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  outline: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.sidebar-brand-link:hover {
  background: rgba(246, 248, 251, 0.95);
}

.sidebar-brand-link:focus-visible {
  box-shadow: 0 0 0 2px var(--gold-400), 0 0 0 4px rgba(254, 216, 19, 0.25);
}

[data-theme="dark"] .sidebar-brand-link:hover {
  background: rgba(31, 41, 55, 0.75);
}

.sidebar-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: start;
  min-width: 0;
}

.sidebar-brand-title {
  font-size: 1.125rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-brand-sub {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--text-muted);
}

.sidebar .sidebar-nav-inner {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none; /* prevent scroll jump when active menu item gets aria-current */
  padding: 0.05rem 1rem 1rem;
}

.sidebar .sidebar-cycle-footer {
  flex-shrink: 0;
  margin-top: auto; /* همیشه پایین سایدبار */
  border-top: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem; /* compact, hamtraz با ارتفاع submit-bar */
  background: transparent;
}

.sidebar-collapse-fab {
  position: absolute;
  top: 5rem;
  left: -0.75rem;
  /* بالاتر از محتوای main و هدر برای کلیک و نقش‌پردازی آیکن */
  z-index: 80;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(229, 231, 235, 1);
  background: #fff;
  color: #9ca3af;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
}

/* جابه‌جایی آیکن با کلاس body (بدون x-show تا قبل/بعد Alpine هم درست بماند) */
.sidebar-fab-chev {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.sidebar-fab-chev--collapsed {
  display: none !important;
}
body.layout-sidebar-collapsed .sidebar-fab-chev--expanded {
  display: none !important;
}
body.layout-sidebar-collapsed .sidebar-fab-chev--collapsed {
  display: flex !important;
}

.sidebar-collapse-fab .icon,
.sidebar-collapse-fab svg.icon {
  display: block;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  color: inherit;
  opacity: 1;
  vertical-align: middle;
}

.sidebar-collapse-fab:hover {
  color: #111827;
  border-color: #fed813;
  background: #fed813;
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.12), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  transform: scale(1.1);
}

.sidebar-collapse-fab:focus-visible {
  outline: 2px solid #fed813;
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  body.layout-sidebar-collapsed {
    --shell-sidebar-half: 36px;
  }
  .header {
    right: var(--shell-sidebar-w);
    left: 0;
  }
  body.layout-sidebar-collapsed .header {
    right: var(--shell-sidebar-w-collapsed);
  }
  .sidebar-collapse-fab {
    display: inline-flex;
  }
  body.layout-sidebar-collapsed .sidebar {
    width: var(--shell-sidebar-w-collapsed);
  }
}

[data-theme="dark"] .header {
  background: var(--bg-card);
  border-bottom-color: var(--border-default);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .sidebar {
  border-left-color: var(--border-default);
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .sidebar-collapse-fab {
  background: rgb(31, 41, 55);
  border-color: rgb(75, 85, 99);
  color: rgb(156, 163, 175);
}

[data-theme="dark"] .sidebar-collapse-fab:hover {
  color: #111827;
  border-color: #fed813;
  background: #fed813;
}

/* ویجت دوره/فاز — پایین سایدبار (عملکرد شخصی و سایر نقش‌ها) */
.sidebar-cycle-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sidebar-cycle-progress-track {
  margin-top: 0.45rem;
  height: 0.3rem;
  border-radius: 9999px;
  background: #e8eaed;
  overflow: hidden;
  direction: rtl;
}

.sidebar-cycle-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: #fed813;
  transition: width 0.35s ease;
  max-width: 100%;
}

[data-theme="dark"] .sidebar-cycle-card {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border-default);
  box-shadow: none;
}

[data-theme="dark"] .sidebar-cycle-progress-track {
  background: rgba(232, 234, 237, 0.18);
}

[data-theme="dark"] .sidebar-cycle-progress-fill {
  background: #f3c42e;
}

.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 39; }
.main-content {
  position: relative;
  z-index: 0;
  margin-right: var(--shell-sidebar-w);
  min-height: 100vh;
  padding: calc(var(--shell-header-h) + 1rem) 1.5rem 1.5rem;
  transition: margin-right var(--shell-transition);
}

/* داشبورد کارمند/مدیر: فاصلهٔ کمتر تا هیرو و بین بلوک‌ها (خاکستری بین هدر و ویجت‌ها کمتر دیده شود) */
.main-content.main-content--dash-tight {
  padding-top: calc(var(--shell-header-h) + 0.75rem);
  padding-bottom: 1.75rem;
}

.main-content.main-content--dash-tight .page-shell {
  gap: 0.85rem;
}

.main-content.main-content--dash-tight .dashboard-hero {
  padding: 1.65rem 2rem;
}

@media (min-width: 1024px) {
  body.layout-sidebar-collapsed .main-content {
    margin-right: var(--shell-sidebar-w-collapsed);
  }
}

/* ── Tablet (768–1023px): icon rail همیشه نمایان ── */
@media (min-width: 768px) and (max-width: 1023px) {
  .header {
    right: var(--shell-sidebar-w-collapsed);
    left: 0;
  }
  .sidebar {
    width: var(--shell-sidebar-w-collapsed);
    transform: none !important;
  }
  .main-content {
    margin-right: var(--shell-sidebar-w-collapsed);
  }
  /* FAB و همبرگر نیازی ندارند روی تبلت */
  .sidebar-collapse-fab { display: none; }
  /* همان استایل‌های collapsed دسکتاپ، بدون وابستگی به body class */
  .sidebar .sidebar-nav-inner { padding-left: 0.35rem; padding-right: 0.35rem; }
  .sidebar-group-label {
    font-size: 0; letter-spacing: 0;
    padding: 0.4rem 0.25rem 0.2rem;
    margin-top: 0.15rem; overflow: hidden;
  }
  .sidebar-group-label::after {
    content: ""; display: block;
    width: 1.75rem; height: 3px; margin: 0 auto;
    border-radius: 999px; background: var(--border-medium);
  }
  .sidebar-group-toggle { justify-content: center; padding: 0.35rem 0.25rem; gap: 0; }
  .sidebar-group-toggle > span:first-child { display: none; }
  .menu-item { justify-content: center; padding: 0.55rem 0.35rem; gap: 0; }
  .menu-item > span:not(.menu-icon):not(.sidebar-badge) { display: none !important; }
  .menu-item .sidebar-badge {
    position: absolute; top: 0.15rem; left: 0.15rem;
    min-width: 1rem; height: 1rem; font-size: 0.6rem;
    padding: 0 3px; z-index: 2;
  }
  .sidebar-cycle-footer { padding: 0.45rem 0.35rem 0.55rem; }
  .sidebar-cycle-card { padding: 0.45rem 0.35rem 0.4rem; }
  .sidebar-cycle-card .sidebar-cycle-phase-subtitle,
  .sidebar-cycle-card .sidebar-cycle-card-title { display: none; }
  .sidebar-cycle-progress-track { margin-top: 0; }
  ._sidebar-role-context { display: none; }
  .sidebar-brand { padding-inline: 0.35rem; }
  .sidebar-brand-link { justify-content: center; flex: none; width: 100%; }
  .sidebar-brand-text { display: none !important; }
  .sidebar-brand-logo-img { height: 2rem; max-height: 2rem; }
}

/* ── Mobile (<768px): سایدبار overlay + bottom nav ── */
@media (max-width: 767px) {
  .header {
    right: 0 !important;
    left: 0;
  }
  .sidebar {
    width: var(--shell-sidebar-w);
    transform: translateX(100%);
  }
  .sidebar.open {
    transform: translateX(0);
    z-index: 70;
  }
  .sidebar-overlay.open {
    display: block;
    z-index: 65;
  }
  .main-content {
    margin-right: 0;
    transition: none;
    padding-bottom: calc(var(--bottom-nav-h) + 0.75rem);
  }
  /* FAB جمع/باز روی موبایل بی‌معنی‌ است — مخفی */
  .sidebar-collapse-fab { display: none !important; }
}

/* ── Bottom Navigation Bar (mobile only) ── */
:root { --bottom-nav-h: 60px; }

.bottom-nav { display: none; }

@media (max-width: 767px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--bg-card);
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 60;
    align-items: stretch;
  }
  .bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 500;
    transition: color 0.15s, background-color 0.15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }
  /* reset برای وقتی bottom-nav__item روی button استفاده می‌شود */
  button.bottom-nav__item {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    outline: none;
  }
  .bottom-nav__item:active { opacity: 0.65; }
  .bottom-nav__item--active { color: var(--gold-dark, #d4b410); }
  [data-theme="dark"] .bottom-nav__item--active { color: var(--gold, #fed813); }
  .bottom-nav__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .bottom-nav__badge {
    position: absolute; top: -4px; right: -6px;
    background: #ef4444; color: #fff;
    font-size: 0.55rem; font-weight: 700;
    min-width: 1rem; height: 1rem;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px; line-height: 1;
  }
  .bottom-nav__label { font-size: 0.625rem; line-height: 1; }
}

[data-theme="dark"] .bottom-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35);
}

/* Dev Panel FAB — گوشهٔ پایین راست (بالای bottom-nav در موبایل) */
.dev-panel-fab {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.dev-panel-anchor {
  position: fixed;
  z-index: 55;
  bottom: 16px;
  inset-inline-start: 16px;
  inset-inline-end: auto;
}

/* Sheet positioning in CSS — do not rely on Tailwind bottom-* (admin-built may omit unused scales). */
.dev-panel-anchor .dev-panel-sheet {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: auto;
  bottom: calc(100% + 0.5rem);
  width: 380px;
  max-width: calc(100vw - 2rem);
}

@media (max-width: 767px) {
  .dev-panel-anchor {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }
  .dev-panel-anchor .dev-panel-sheet {
    width: min(380px, calc(100vw - 2rem));
  }
}

body.mobile-menu-open {
  overflow: hidden;
}

body.mobile-menu-open .mobile-menu-icon--open {
  display: none !important;
}

body.mobile-menu-open .mobile-menu-icon--close {
  display: inline-flex !important;
}

/* دسکتاپ جمع‌شده: نوار آیکن + تولتیپ بومی */
@media (min-width: 1024px) {
  body.layout-sidebar-collapsed .sidebar .sidebar-nav-inner {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
  }
  body.layout-sidebar-collapsed .sidebar-group-label {
    font-size: 0;
    letter-spacing: 0;
    padding: 0.4rem 0.25rem 0.2rem;
    margin-top: 0.15rem;
    text-align: center;
    overflow: hidden;
  }
  body.layout-sidebar-collapsed .sidebar-group-label::after {
    content: "";
    display: block;
    width: 1.75rem;
    height: 3px;
    margin: 0 auto;
    border-radius: 999px;
    background: var(--border-medium);
  }
  body.layout-sidebar-collapsed .sidebar-group-toggle {
    justify-content: center;
    padding: 0.35rem 0.25rem;
    gap: 0;
  }
  body.layout-sidebar-collapsed .sidebar-group-toggle > span:first-child {
    display: none;
  }
  body.layout-sidebar-collapsed .sidebar-group-toggle svg {
    margin: 0 auto;
  }
  body.layout-sidebar-collapsed .menu-item {
    justify-content: center;
    padding: 0.55rem 0.35rem;
    gap: 0;
  }
  body.layout-sidebar-collapsed .menu-item > span:not(.menu-icon):not(.sidebar-badge) {
    display: none !important;
  }
  body.layout-sidebar-collapsed .menu-item .sidebar-badge {
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    min-width: 1rem;
    height: 1rem;
    font-size: 0.6rem;
    padding: 0 3px;
    z-index: 2;
  }
  body.layout-sidebar-collapsed .sidebar-cycle-footer {
    padding: 0.45rem 0.35rem 0.55rem;
  }
  body.layout-sidebar-collapsed .sidebar-cycle-card {
    padding: 0.45rem 0.35rem 0.4rem;
  }
  body.layout-sidebar-collapsed .sidebar-cycle-card .sidebar-cycle-phase-subtitle,
  body.layout-sidebar-collapsed .sidebar-cycle-card .sidebar-cycle-card-title {
    display: none;
  }
  body.layout-sidebar-collapsed .sidebar-cycle-progress-track {
    margin-top: 0;
  }
  body.layout-sidebar-collapsed ._sidebar-role-context {
    display: none;
  }
  body.layout-sidebar-collapsed .sidebar-brand {
    padding-inline: 0.35rem;
  }
  body.layout-sidebar-collapsed .sidebar-brand-link {
    justify-content: center;
    flex: none;
    width: 100%;
  }
  body.layout-sidebar-collapsed .sidebar-brand-text {
    display: none !important;
  }
  body.layout-sidebar-collapsed .sidebar-brand-logo-img {
    height: 2rem;
    max-height: 2rem;
  }
}

/* ── Header/Sidebar stability ─────────────────────── */
/* contain روی .sidebar باعث می‌شد دکمهٔ مطلق روی لبه و آیکن‌هایش در بعضی مرورگرها بریده یا غیرقابل‌کلیک شوند */
.header,
.sidebar {
  animation: none !important;
  will-change: auto;
}
.header {
  contain: layout style;
}

@media (prefers-reduced-motion: reduce) {
  .header,
  .sidebar,
  .main-content,
  .sidebar-collapse-fab {
    transition-duration: 0.01ms !important;
  }
}

.page-shell {
  max-width: 72rem;       /* 1152px — default for most pages */
  margin-inline: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.page-shell--wide {
  max-width: 80rem;      /* 1280px — dashboards, reports */
}
.page-shell--narrow {
  max-width: 48rem;      /* 768px — single forms, detail views */
}
/* Legacy aliases for backward compatibility */
.page-shell.max-w-6xl { max-width: 72rem; }
.page-shell.mx-auto { margin-inline: auto; }
.page-shell.space-y-6 > * + * { margin-top: 1.5rem; }

/* Breadcrumb */
.breadcrumb-nav { padding: 0 0 0.25rem; }
.breadcrumb-list { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; font-size: 0.75rem; }
.breadcrumb-link { display: inline-flex; align-items: center; gap: 0.25rem; color: var(--text-secondary); text-decoration: none; transition: color var(--duration-fast); }
.breadcrumb-link:hover { color: var(--jet); }
.breadcrumb-link svg { opacity: 0.6; }
.breadcrumb-sep { color: #d1d5db; font-size: 0.65rem; user-select: none; }
.breadcrumb-current { color: var(--jet); font-weight: 600; }

/* صفحه دوره‌ها: پس‌زمینه و ظاهر مطابق طراحی React */
body.page-cycles .main-content { background-color: var(--bg-main); }

/* صفحه ایجاد دوره جدید */
body.page-cycle-create .main-content { background-color: var(--bg-main); }

/* ===== CYCLES PAGE LAYOUT (design system only) ===== */
.page-header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.cycles-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 1024px) { .cycles-stats-grid { grid-template-columns: repeat(4, 1fr); } }
.cycles-list-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cycles-list { display: flex; flex-direction: column; gap: 1rem; }
.cycle-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.cycle-card-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); text-decoration: none; display: block; }
.cycle-card-title:hover { color: var(--jet); }
.cycle-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.cycle-meta { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; }
.cycle-badges-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.cycle-companies-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.cycle-companies-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.cycle-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 1rem; border-top: 1px solid var(--border-light); }
.cycles-dropdown-wrap { position: relative; }
/* Allow dropdown to escape card overflow when open */
.card.cycles-dropdown-open { overflow: visible !important; }
.cycles-dropdown-panel { position: absolute; inset-inline-start: 0; top: 100%; margin-top: 0.5rem; width: min(14rem, calc(100vw - 1.5rem)); max-height: min(70vh, 400px); overflow-y: auto; background: var(--bg-card); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border: 1px solid var(--border-light); padding: 0.5rem 0; z-index: 50; }
.cycles-dropdown-section { padding: 0.375rem 0.75rem; font-size: 0.6875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cycles-dropdown-divider { height: 1px; background: var(--border-light); margin: 0.5rem 0; }
.cycles-dropdown-item { width: 100%; text-align: start; border: none; background: transparent; cursor: pointer; }
.cycles-dropdown-item:disabled { cursor: not-allowed; opacity: 0.7; }
.cycles-dropdown-item--warning { color: var(--text-warning, #b45309); }
.cycles-dropdown-item--danger { color: var(--text-error, #991b1b); }
.modal-actions { display: flex; flex-direction: row; gap: 0.75rem; justify-content: flex-start; margin-top: 1.5rem; }
.modal-actions .btn { flex: 1; }
.add-panel-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.4); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: center; padding: 1.5rem; }
.add-panel-backdrop { position: absolute; inset: 0; }
.add-panel-drawer { position: relative; --panel-size: min(26rem, 85vh, 90vw); width: var(--panel-size); height: var(--panel-size); border-radius: var(--radius-lg); background: var(--bg-card); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.add-panel-header { background: linear-gradient(135deg, var(--gold), var(--saffron)); padding: 1.5rem; color: var(--jet); display: flex; flex-direction: column; gap: 0.75rem; }
.add-panel-steps { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }
.add-panel-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.add-panel-footer { padding: 1rem; border-top: 1px solid var(--border-light); background: var(--bg-card); }
.cycles-form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 640px) { .cycles-form-grid-2 { grid-template-columns: 1fr; } }
.company-check-row { display: flex; align-items: center; padding: 0.75rem 1rem; border-radius: var(--radius-md); cursor: pointer; transition: background-color var(--transition-fast), border-color var(--transition-fast); border: 2px solid transparent; background: var(--silver); }
.company-check-row:hover { background: #e5e7eb; }
.company-check-row.selected { border-color: var(--gold); background: var(--gold-light); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-w-0 { min-width: 0; }
.add-panel-step-btn { width: 2.5rem; height: 2.5rem; border-radius: 9999px; border: none; font-weight: 700; font-size: 0.875rem; background: rgba(0,0,0,0.15); color: var(--jet); cursor: pointer; transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast); }
.add-panel-step-btn:hover { background: rgba(0,0,0,0.25); }
.add-panel-step-btn.selected { background: var(--jet); color: #fff; }
.btn.selected { border-color: var(--gold); background: var(--gold-light); color: var(--jet); }

/* ===== TYPOGRAPHY ===== */
.page-title { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; line-height: 1.3; }
.page-subtitle { font-size: 0.88rem; color: var(--text-secondary); margin-top: 0.3rem; line-height: 1.5; }
.section-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }
.section-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* ===== CARD ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
  overflow: hidden;
}

/* Only interactive cards get hover lift */
a.card:hover,
button.card:hover,
.card[role="button"]:hover,
.card.card--interactive:hover {
  box-shadow: var(--shadow-md);
  border-color: #e2e8f0;
  transform: translateY(-1px);
}

/* All cards still get subtle border change on hover for visual feedback */
.card:hover {
  border-color: #e2e8f0;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 3px;
  background: transparent;
  transition: background var(--transition-normal);
}

.card-gold::before { background: linear-gradient(90deg, var(--gold), var(--saffron)); }
/* خلاصه تیم / جاهایی که نوار طلایی بالای کارت فقط فضا می‌گیرد */
.card-gold.card-gold--flat::before { display: none; }
.card-success::before { background: linear-gradient(90deg, #10b981, #34d399); }
.card-warning::before { background: linear-gradient(90deg, var(--honey), #fcd34d); }
.card-danger::before { background: linear-gradient(90deg, var(--pink), #fb7185); }
.card-info::before { background: linear-gradient(90deg, var(--blue), #60a5fa); }
/* داشبورد — کارت مراحل ارزیابی: نوار بالا هم‌رنگ برند (نه آبی info) */
.stepper-card.card-info::before {
  background: linear-gradient(90deg, var(--gold), var(--saffron));
}

/* کارت مراحل: ستون تمام‌قد تا فوتر «به‌روزرسانی…» به پایین بچسبد */
article.stepper-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

article.stepper-card > .stepper {
  flex: 1 1 auto;
  min-height: 0;
}

/* دسکتاپ: فاصلهٔ عمودی بیشتر بین مراحل تا با تقویم هم‌قد، پایین کارت خالی نماند؛
   padding داخل آیتم تا خط connector قطع نشود (نه gap بین flex-item) */
@media (min-width: 1024px) {
  article.stepper-card .stepper__item {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  article.stepper-card .stepper__item:not(:last-child) {
    padding-bottom: calc(0.75rem + clamp(0.75rem, 3.5vh, 2rem));
  }
}

.card-highlight { border-top: 4px solid var(--gold); }

/* نوار طلایی بالا: border-color عمومی .card (hover / dark) نباید آن را به خاکستری ببرد */
.card.card-highlight,
.card.card-highlight:hover {
  border-top-color: var(--gold);
}

.card-alert { border-right: 4px solid #ef4444; }
.card-tall { padding-top: 1.375rem; padding-bottom: 1.375rem; }

/* HRBP teams: کل کارت قابل تمرکز؛ دکمه‌ها و لینت‌های اقدام با z-index بالاتر */
.hrbp-team-card {
  position: relative;
}
a.hrbp-team-card__hit {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  text-decoration: none;
  background: transparent;
}
.hrbp-team-card:hover a.hrbp-team-card__hit {
  /* همرنگ با .card--interactive */
  box-shadow: none;
  transform: none;
}
.hrbp-team-card:has(a.hrbp-team-card__hit):hover {
  box-shadow: var(--shadow-md);
  border-color: #e2e8f0;
  transform: translateY(-1px);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

/* کارت کاملاً لینت‌دار (لینک) — استفادهٔ عمومی */
a.card--clickable {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
a.card--clickable:hover {
  box-shadow: var(--shadow-md);
  border-color: #e2e8f0;
  transform: translateY(-1px);
}

/* Cards animate transform on hover */
a.card,
button.card,
.card[role="button"],
.card.card--interactive {
  will-change: transform;
}

/* Stat/KPI cards animate transform on hover */
.stat-card,
.kpi-card {
  will-change: transform;
}

/* Progress bars animate width */
.progress-fill,
.stepper__progress-fill {
  will-change: width;
}

/* KPI ring animates stroke */
.kpi-ring-fill {
  will-change: stroke-dasharray;
}

/* ===== MANAGER ZONE (Dashboard) ===== */
.manager-zone {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--border-medium);
}

.manager-zone__header {
  margin-bottom: 1rem;
}

.manager-zone__badge {
  background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
  color: var(--text-gold);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.manager-zone__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

/* ===== DASHBOARD STAGGERED ANIMATIONS ===== */
@keyframes fade-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.dashboard-stagger > * {
  opacity: 0;
  animation: fade-slide-in 0.5s ease forwards;
}

.dashboard-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.dashboard-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.dashboard-stagger > *:nth-child(3) { animation-delay: 0.15s; }
.dashboard-stagger > *:nth-child(4) { animation-delay: 0.2s; }
.dashboard-stagger > *:nth-child(5) { animation-delay: 0.25s; }
.dashboard-stagger > *:nth-child(6) { animation-delay: 0.3s; }
.dashboard-stagger > *:nth-child(7) { animation-delay: 0.35s; }
.dashboard-stagger > *:nth-child(8) { animation-delay: 0.4s; }
.dashboard-stagger > *:nth-child(9) { animation-delay: 0.45s; }
.dashboard-stagger > *:nth-child(n+10) { animation-delay: 0.5s; }

/* ===== STAT CARD ===== */
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow var(--transition-normal),
              transform var(--transition-normal),
              border-color var(--transition-normal);
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon { transition: transform var(--transition-fast); }
a.stat-card:hover .stat-icon { transform: scale(1.05); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.03em; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* Admin dashboard KPIs: vertical stack like departmental dashboard (senior/dashboard) */
.stat-card.stat-card--stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 0;
  width: 100%;
  padding: 1.25rem 1rem 1.35rem;
  min-height: auto;
  box-sizing: border-box;
}
a.stat-card.stat-card--stacked {
  display: flex;
  cursor: pointer;
}

/* StatCard variants (cycles page design) */
.stat-card-success {
  background: linear-gradient(to bottom right, #ecfdf5, #d1fae5);
  border-color: #a7f3d0;
}
.stat-card-success .stat-icon { background: #a7f3d0; color: #059669; }
.stat-card-warning {
  background: linear-gradient(to bottom right, #fffbeb, #fef3c7);
  border-color: #fde68a;
}
.stat-card-warning .stat-icon { background: #fde68a; color: #d97706; }
.stat-card-info {
  background: linear-gradient(to bottom right, #eff6ff, #dbeafe);
  border-color: #93c5fd;
}
.stat-card-info .stat-icon { background: #93c5fd; color: #2563eb; }

/* ===== URGENT / ACTIVITY ===== */
.urgent-card {
  border-radius: var(--radius-md);
  border: 1px solid;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast),
              background-color var(--transition-fast);
}

.urgent-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.urgent-card-link { text-decoration: none; color: inherit; cursor: pointer; }

.urgent-card-danger { background: #fff5f5; border-color: #fecaca; border-right: 4px solid #ef4444; }
.urgent-card-warning { background: #fffaf0; border-color: #fde68a; border-right: 4px solid #f59e0b; }

.urgent-minimal-list { display: flex; flex-direction: column; gap: 0.55rem; }

.urgent-minimal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eceff4;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.7rem 0.8rem;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.urgent-minimal-item:hover {
  border-color: #d9e1eb;
  background: #fbfcff;
  transform: translateY(-1px);
}

.urgent-minimal-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--honey);
  flex-shrink: 0;
}

.urgent-card-arrow {
  color: #9ca3af;
  font-size: 1rem;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.urgent-card-link:hover .urgent-card-arrow {
  color: #374151;
  transform: translateX(-2px);
}

.activity-card-link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.activity-row { padding-bottom: 0.15rem; }

/* ===== PHASE CALENDAR ===== */
.phase-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

.phase-chip {
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  border: 1px solid transparent;
}

.phase-chip--with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem 0.22rem 0.45rem;
}

.phase-chip__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.95;
}

.phase-chip__icon svg {
  display: block;
}

.phase-chip__label {
  line-height: 1.2;
}

/*
 * افسانه و سلول تقویم — یک منبع رنگ (چیپ ═ روز)
 * پالت یکتانت: Gold #fed813، Saffron، Jet، Smoke + Honey، Keppel، French Pink، Blue Jeans، Blueberry
 */
.phase-chip-prep,
.phase-day-prep {
  background: var(--smoke, #f2f2f2);
  color: var(--jet, #323232);
  border-color: #cfcfcf;
}

.phase-chip-self,
.phase-day-self {
  background: rgba(254, 216, 19, 0.34);
  color: var(--jet, #323232);
  border-color: #d4b106;
}

.phase-chip-feedback,
.phase-day-feedback {
  background: rgba(255, 177, 19, 0.28);
  color: var(--jet, #323232);
  border-color: #ffb113;
}

.phase-chip-manager,
.phase-day-manager {
  background: rgba(47, 190, 168, 0.24);
  color: #164a42;
  border-color: #2fbea8;
}

.phase-chip-committee,
.phase-day-committee {
  background: rgba(253, 111, 149, 0.22);
  color: #5c1f36;
  border-color: #fd6f95;
}

.phase-chip-meeting,
.phase-day-meeting {
  background: rgba(23, 177, 253, 0.2);
  color: #0c4a6e;
  border-color: #17b1fd;
}

.phase-chip-final,
.phase-day-final {
  background: rgba(121, 126, 254, 0.22);
  color: #2e2a6d;
  border-color: #797efe;
}

.phase-chip-off,
.phase-day-off {
  background: #e8e8e8;
  color: #4b5563;
  border-color: #d4d4d4;
}

.phase-chip-final {
  font-weight: 800;
}

.phase-chip-today {
  background: rgba(254, 216, 19, 0.42);
  color: var(--jet, #323232);
  border-color: #fed813;
  box-shadow: 0 0 0 1px rgba(254, 216, 19, 0.32);
  font-weight: 800;
}

/* لینک تک‌چیپی «فاز روز انتخاب‌شده» در تقویم داشبورد — کل چیپ کلیک‌پذیر */
a.calendar-selected-day-phase-link.phase-chip {
  padding: 0.42rem 0.65rem 0.42rem 0.85rem;
  cursor: pointer;
  transition: transform var(--transition-fast, 0.15s ease), box-shadow var(--transition-fast, 0.15s ease),
    filter var(--transition-fast, 0.15s ease);
}

a.calendar-selected-day-phase-link.phase-chip:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.08);
}

[data-theme="dark"] a.calendar-selected-day-phase-link.phase-chip:hover {
  filter: brightness(1.08);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

a.calendar-selected-day-phase-link.phase-chip:focus-visible {
  outline: 2px solid var(--gold, #fed813);
  outline-offset: 3px;
}

.phase-calendar {
  border: 1px solid #eceff4;
  border-radius: 12px;
  padding: 0.6rem;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.phase-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}

.phase-weekday {
  text-align: center;
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 700;
  padding: 0.25rem 0;
}

.phase-days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

.phase-day {
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  height: 34px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.phase-day:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* ── Tooltip فاز تقویم — pill shape با فلش ── */
#phase-day-tooltip {
  position: fixed;
  z-index: 9999;
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  pointer-events: none;
  direction: rtl;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  opacity: 0;
  transition: opacity 0.15s ease;
  /* JS top/left = مرکز بالای element؛ transform: مرکز پایین tooltip روی آن نقطه */
  transform: translateX(-50%) translateY(-100%);
}
#phase-day-tooltip::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #0f172a;
}
#phase-day-tooltip.visible {
  opacity: 1;
}
[data-theme="dark"] #phase-day-tooltip {
  background: #1e293b;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
[data-theme="dark"] #phase-day-tooltip::after {
  border-top-color: #1e293b;
}

.phase-day.is-selected {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.12);
}

@keyframes today-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.6); }
}

.phase-day.is-today {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.35);
  animation: today-pulse 2.2s ease-in-out infinite;
}

.phase-day.is-today.is-selected {
  border-color: #111827;
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.15);
  animation: today-pulse 2.2s ease-in-out infinite;
}

.phase-day.is-past {
  opacity: 0.55;
}

@media (max-width: 640px) {
  .phase-day {
    height: 28px;
    font-size: 0.7rem;
  }
  .phase-calendar {
    padding: 0.5rem;
  }
}

/* ===== SECTION SURFACE ===== */
.section-surface {
  background: #ffffff;
  border: 1px solid #edf1f6;
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.section-surface + .section-surface { margin-top: 0.75rem; }

[data-theme="dark"] .section-surface {
  background: var(--bg-card);
  border-color: var(--border-default);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast),
              opacity var(--transition-fast);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  line-height: 1.5;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn:active:not(:disabled) { transform: scale(0.97); }

/* Double class beats [type=submit] when both load unlayered from different files */
.btn.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--saffron));
  color: var(--jet);
  box-shadow: var(--shadow-gold);
}

.btn.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 24px rgba(254, 216, 19, 0.45);
  transform: translateY(-1px);
}

/* صندوق ورودی بازخورد همکار — دکمه‌های «پاسخ دادن» / «رد درخواست» */
.btn.btn-feedback-reply {
  background: #fed813;
  color: #1f2937;
  border: none;
  border-radius: 0.75rem;
  padding: 0.625rem 1.35rem;
  font-weight: 700;
  box-shadow: none;
}

.btn.btn-feedback-reply:hover:not(:disabled) {
  background: #f3c42e;
  box-shadow: 0 4px 14px rgba(254, 216, 19, 0.35);
}

[data-theme="dark"] .btn.btn-feedback-reply {
  background: #fed813;
  color: #111827;
}

[data-theme="dark"] .btn.btn-feedback-reply:hover:not(:disabled) {
  background: #f3c42e;
}

.btn.btn-feedback-decline {
  background: #fff0f3;
  color: #e11d48;
  border: none;
  border-radius: 0.75rem;
  padding: 0.625rem 1.35rem;
  font-weight: 700;
  box-shadow: none;
}

.btn.btn-feedback-decline:hover:not(:disabled) {
  background: #ffe4e9;
  color: #be123c;
}

[data-theme="dark"] .btn.btn-feedback-decline {
  background: rgba(225, 29, 72, 0.14);
  color: #fb7185;
}

[data-theme="dark"] .btn.btn-feedback-decline:hover:not(:disabled) {
  background: rgba(225, 29, 72, 0.22);
  color: #fda4af;
}

.btn-secondary, .btn-outline {
  background: var(--bg-card);
  border: 2px solid var(--border-medium);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled), .btn-outline:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--gold-light);
  color: var(--jet);
}

.btn-sm { padding: 0.375rem 1rem; font-size: 0.8125rem; }

.btn-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.btn-danger:hover:not(:disabled) { background: #fecaca; }
[data-theme="dark"] .btn-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
[data-theme="dark"] .btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.22); }

.btn-danger-solid { background: #dc2626; color: #ffffff; border: 1px solid #dc2626; }
.btn-danger-solid:hover:not(:disabled) { background: #b91c1c; border-color: #b91c1c; }
[data-theme="dark"] .btn-danger-solid { background: #ef4444; border-color: #ef4444; }
[data-theme="dark"] .btn-danger-solid:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; }

.btn-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.btn-success:hover:not(:disabled) { background: #bbf7d0; }
[data-theme="dark"] .btn-success { background: rgba(34, 197, 94, 0.15); color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
[data-theme="dark"] .btn-success:hover:not(:disabled) { background: rgba(34, 197, 94, 0.22); }

.btn-success-solid { background: #16a34a; color: #ffffff; border: 1px solid #16a34a; }
.btn-success-solid:hover:not(:disabled) { background: #15803d; border-color: #15803d; }
[data-theme="dark"] .btn-success-solid { background: #22c55e; border-color: #22c55e; }
[data-theme="dark"] .btn-success-solid:hover:not(:disabled) { background: #16a34a; border-color: #16a34a; }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-surface-hover, #f3f4f6); color: var(--text-primary); }
[data-theme="dark"] .btn-ghost:hover:not(:disabled) { background: var(--bg-surface-active); }

/* ===== INPUTS ===== */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: 'Vazirmatn', sans-serif;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
  outline: none;
  color: var(--text-primary);
  direction: rtl;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(254, 216, 19, 0.15);
  background: var(--bg-input, #fffef8);
}
[data-theme="dark"] .input:focus { background: var(--bg-input); }

/* Accessibility: visible focus for keyboard users */
.btn:focus-visible,
.input:focus-visible,
.menu-item:focus-visible,
.filter-tab:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.input::placeholder { color: var(--text-muted); }
textarea.input { min-height: 80px; resize: vertical; }
select.input { appearance: auto; }

textarea.font-vazir,
input.font-vazir,
select.font-vazir {
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text-body, #374151); }
.form-hint { font-size: 0.75rem; color: var(--text-muted); }

.textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: 'Vazirmatn', sans-serif;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              background-color var(--transition-fast);
  outline: none;
  min-height: 140px;
  resize: vertical;
  line-height: 1.7;
  color: var(--text-primary);
  direction: rtl;
}

.textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(254, 216, 19, 0.15);
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15px;
  white-space: nowrap;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gold { background: var(--gold-light); color: #92400e; border: 1px solid var(--gold); }
.badge-gray { background: #f3f4f6; color: #4b5563; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
/* اقدام ثانویهٔ فعال — حاشیهٔ آبی، پس‌زمینهٔ شفاف */
.badge-outline-blue {
  background: transparent;
  border: 1.5px solid #2563eb;
  color: #2563eb;
}

/* اقدام اصلی داشبورد — حاشیهٔ طلایی یکتانت */
.badge-outline-gold {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--jet);
}

/* ===== PROGRESS RING ===== */
.progress-ring {
  position: relative;
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.progress-ring svg { transform: rotate(0deg); }
.progress-ring-text {
  position: absolute;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--jet);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 6px;
  background-color: #eef2f7;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, var(--gold), var(--saffron));
}

.progress-fill-success { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-fill-warning { background: linear-gradient(90deg, var(--honey), #fcd34d); }
.progress-fill-danger { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ===== TABLE ===== */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive .table {
  min-width: 640px;
}
.table {
  width: 100%;
  font-size: 0.875rem;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead { background: #f8fafc; position: sticky; top: 0; z-index: 1; }

.table th {
  padding: 0.8rem 1rem;
  text-align: right;
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.3px;
  border-bottom: 2px solid var(--border-light);
}

.table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr { transition: background-color var(--transition-fast); }
.table tbody tr:hover { background: #fefce8; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:focus-within { background: #fffbeb; }

/* Table actions: subtle spacing for inline forms */
.table .inline-form { display: inline-flex; align-items: center; gap: 0.35rem; }

/* List tables (HRBP committees, manager team, etc.): keep avatars sized after BFCache/VT glitches */
.table-responsive .table td .avatar {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  max-width: 2rem;
  max-height: 2rem;
  view-transition-name: none;
}
.table-responsive .table td .avatar img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  view-transition-name: none;
}

/* ===== ROLE TAB ===== */
.role-tab {
  padding: 0.5rem 0.81rem; /* ~20% narrower than original (1rem → 0.81rem) */
  border-radius: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background-color var(--duration-normal),
              color var(--duration-normal),
              border-color var(--duration-normal),
              box-shadow var(--duration-normal),
              transform var(--duration-normal);
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  white-space: nowrap;
  position: relative;
}

.role-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border-color: rgba(200, 200, 200, 0.5);
}

.role-tab.active {
  background: linear-gradient(135deg, #fff8d6, var(--gold));
  color: var(--jet);
  border-color: #eab308;
  box-shadow: 0 4px 12px rgba(254, 216, 19, 0.3);
  transform: translateY(-1px);
}

.role-tab.active:hover {
  box-shadow: 0 6px 16px rgba(254, 216, 19, 0.4);
}

/* Header: role switcher — هم‌تراز fake-date-btn؛ compact = آیکون + نام نقش + فلش */
.header button.role-switcher-trigger {
  appearance: none;
  cursor: pointer;
  font: inherit;
  text-align: inherit;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  box-shadow: none;
  transform: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}
.header button.role-switcher-trigger.role-switcher-trigger--compact {
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
}
.header button.role-switcher-trigger .role-switcher-trigger__label {
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: min(32vw, 9rem);
  overflow: hidden;
  text-overflow: ellipsis;
}
.header button.role-switcher-trigger:hover {
  border-color: #d1d5db;
  background: #eef2f7;
}
.header button.role-switcher-trigger:focus-visible {
  outline: 2px solid rgba(254, 216, 19, 0.55);
  outline-offset: 2px;
}
.header button.role-switcher-trigger.role-switcher-trigger--open {
  border-color: #d1d5db;
  background: #eef2f7;
}

[data-theme="dark"] .header button.role-switcher-trigger {
  background: var(--bg-surface-secondary);
  border-color: var(--border-default);
  color: var(--text-body);
}
[data-theme="dark"] .header button.role-switcher-trigger:hover,
[data-theme="dark"] .header button.role-switcher-trigger.role-switcher-trigger--open {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-strong);
}

/* زیر همان دکمه، هم‌تراز لبهٔ انتهایی (کنار آواتار در RTL)؛ بالای زنگ اعلان */
.role-switcher-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  inset-inline-start: auto;
  width: max(12rem, 100%);
  max-width: min(20rem, calc(100vw - 1.5rem));
  background: var(--bg-card, #ffffff);
  border-radius: 0.75rem;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 12px 28px -8px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-medium, #e5e7eb);
  z-index: 119;
  overflow: visible;
  padding: 0.4rem 0;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
[data-theme="dark"] .role-switcher-dropdown-panel {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.35),
    0 16px 40px -12px rgba(0, 0, 0, 0.55);
}

.role-switcher-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  margin-inline: 0.35rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.35;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.role-switcher-menu-item--current {
  background: rgba(254, 216, 19, 0.14);
  color: var(--text-primary);
  font-weight: 600;
  cursor: default;
}
.role-switcher-menu-item--link {
  color: var(--text-secondary);
  text-decoration: none;
}
.role-switcher-menu-item--link:hover {
  background: #f3f4f6;
  color: var(--text-primary);
}
[data-theme="dark"] .role-switcher-menu-item--link:hover {
  background: rgba(55, 65, 81, 0.72);
  color: var(--text-body);
}
[data-theme="dark"] .role-switcher-menu-item--current {
  background: rgba(252, 211, 77, 0.12);
  color: var(--text-body);
}

/* نقش‌ها در هدر: ردیف فشرده + دکمهٔ تعویض حالت */
.role-switcher-layout-toggle {
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--border-medium, #e5e7eb);
  background: var(--bg-surface-secondary, #f3f4f6);
  color: var(--text-secondary, #6b7280);
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.role-switcher-layout-toggle:hover {
  background: var(--bg-surface-tertiary, #eef2f7);
  border-color: var(--border-strong, #d1d5db);
  color: var(--text-primary, #374151);
}
.role-switcher-layout-toggle:focus-visible {
  outline: 2px solid rgba(254, 216, 19, 0.55);
  outline-offset: 2px;
}
[data-theme="dark"] .role-switcher-layout-toggle {
  background: var(--bg-surface-secondary);
  border-color: var(--border-default);
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .role-switcher-layout-toggle:hover {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-strong);
  color: var(--text-body);
}

/* ── Role Switcher: Segmented Control (iOS-style) ── */
.role-switcher-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: min(72vw, 38rem);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: #f3f4f6;
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.role-switcher-inline::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) {
  .role-switcher-inline {
    max-width: min(60vw, 48rem);
  }
}

/* chip: شفاف داخل container؛ نقش فعال pill سفید */
.role-switcher-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 1;
  min-width: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  background: transparent;
  color: #6b7280;
  white-space: nowrap;
  max-width: 11rem;
  transition: background-color 0.18s ease, color 0.15s ease, box-shadow 0.18s ease;
}
.role-switcher-chip .icon,
.role-switcher-chip svg {
  color: inherit;
  transition: transform 0.18s ease;
}
.role-switcher-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* نقش فعال: pill سفید روی track (segmented control) */
.role-switcher-chip--current {
  background: #ffffff;
  border-color: transparent;
  color: #1f2937;
  cursor: default;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08),
              0 1px 3px rgba(15, 23, 42, 0.06);
  transform: translateZ(0);
}
.role-switcher-chip--current .role-switcher-chip__label {
  font-weight: 700;
}
.role-switcher-chip--current .icon,
.role-switcher-chip--current svg {
  color: inherit;
}

.role-switcher-chip--link {
  text-decoration: none;
  color: #6b7280;
}
.role-switcher-chip--link:hover {
  background: transparent;
  color: #374151;
}
.role-switcher-chip--link:active {
  transform: none;
}

/* dark mode */
[data-theme="dark"] .role-switcher-inline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .role-switcher-chip {
  background: transparent;
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .role-switcher-chip--current {
  background: var(--bg-card, #1e293b);
  color: var(--text-heading);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35),
              0 1px 3px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .role-switcher-chip--current .role-switcher-chip__label {
  font-weight: 700;
}
[data-theme="dark"] .role-switcher-chip--current .icon,
[data-theme="dark"] .role-switcher-chip--current svg {
  color: inherit;
}
[data-theme="dark"] .role-switcher-chip--link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-heading);
}

/* ── Cycle Switcher: dropdown (long Persian cycle names) ── */
.cycle-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: min(52vw, 14rem);
  padding: 0.35rem 0.65rem 0.35rem 0.55rem;
  border-radius: 0.65rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.cycle-switcher__trigger:hover {
  border-color: #d1d5db;
  background: #fafafa;
}
.cycle-switcher__trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.55);
}
.cycle-switcher__trigger-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: start;
}
.cycle-switcher__trigger--minimal {
  gap: 0.2rem;
  max-width: none;
  padding: 0.4rem 0.45rem;
  border-radius: 0.5rem;
}
.cycle-switcher__trigger--minimal:hover {
  border-color: rgba(254, 216, 19, 0.45);
  background: rgba(254, 216, 19, 0.08);
}
.cycle-switcher__panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 130;
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.35rem;
  border-radius: 0.85rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}
.cycle-switcher__panel-title {
  margin: 0;
  padding: 0.45rem 0.65rem 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #9ca3af;
  text-transform: none;
}
.cycle-switcher__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}
.cycle-switcher__item-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: start;
}
.cycle-switcher__item-short {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1f2937;
}
.cycle-switcher__item-full {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.45;
  color: #6b7280;
  word-break: break-word;
}
.cycle-switcher__item--current {
  background: rgba(254, 216, 19, 0.14);
  cursor: default;
}
.cycle-switcher__item--current .cycle-switcher__item-short {
  color: #92400e;
}
.cycle-switcher__item--link:hover {
  background: #f3f4f6;
}
.cycle-switcher__item--link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(254, 216, 19, 0.55);
}
[data-theme="dark"] .cycle-switcher__trigger {
  background: var(--bg-card, #1e293b);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-body);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .cycle-switcher__trigger:hover {
  background: var(--bg-surface-tertiary, #273548);
  border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .cycle-switcher__panel {
  background: var(--bg-card, #1e293b);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .cycle-switcher__panel-title {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .cycle-switcher__item-short {
  color: var(--text-heading);
}
[data-theme="dark"] .cycle-switcher__item-full {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .cycle-switcher__item--current {
  background: rgba(254, 216, 19, 0.12);
}
[data-theme="dark"] .cycle-switcher__item--current .cycle-switcher__item-short {
  color: #fed813;
}
[data-theme="dark"] .cycle-switcher__item--link:hover {
  background: rgba(255, 255, 255, 0.06);
}

@media (prefers-reduced-motion: reduce) {
  .cycle-switcher__trigger,
  .cycle-switcher__item {
    transition: none;
  }
}

/* ===== Filter listbox (in-page filters — admin InlineListbox parity) ===== */
.filter-listbox__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  height: 2.25rem;
  padding-inline: 0.75rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-default, #e5e7eb);
  background: var(--bg-surface-secondary, #f9fafb);
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.filter-listbox__trigger:hover:not(:disabled) {
  border-color: var(--keppel, #2fbea8);
}
.filter-listbox__trigger:focus-visible {
  outline: none;
  border-color: var(--keppel, #2fbea8);
  box-shadow: 0 0 0 3px rgba(47, 190, 168, 0.2);
}
.filter-listbox__trigger--filled {
  border-color: rgba(47, 190, 168, 0.45);
  background: rgba(47, 190, 168, 0.08);
  color: var(--text-heading, #1f2937);
  font-weight: 500;
}
.filter-listbox__trigger--open {
  border-color: var(--keppel, #2fbea8);
  box-shadow: 0 0 0 3px rgba(47, 190, 168, 0.2);
}
.filter-listbox__trigger-label {
  min-width: 0;
  flex: 1;
  text-align: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-listbox__chevron {
  flex-shrink: 0;
  color: #9ca3af;
  transition: transform 0.2s ease, color 0.15s ease;
}
.filter-listbox__chevron--open {
  transform: rotate(180deg);
  color: var(--keppel, #2fbea8);
}
.filter-listbox__panel {
  position: fixed;
  z-index: 200;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .filter-listbox__trigger {
  border-color: #475569;
  background: rgba(30, 41, 59, 0.6);
  color: #94a3b8;
}
[data-theme="dark"] .filter-listbox__trigger--filled {
  color: #f3f4f6;
}
[data-theme="dark"] .filter-listbox__panel {
  border-color: #475569;
  background: #1e293b;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.filter-listbox__list {
  max-height: min(20rem, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: 0.375rem;
}
.filter-listbox__option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  font-size: 13px;
  line-height: 1.45;
  text-align: start;
  color: var(--text-heading, #1f2937);
  transition: background-color 0.15s ease;
}
.filter-listbox__option:hover {
  background: var(--bg-surface-secondary, #f9fafb);
}
.filter-listbox__option--selected {
  background: rgba(47, 190, 168, 0.12);
  font-weight: 500;
}
[data-theme="dark"] .filter-listbox__option {
  color: #f3f4f6;
}
[data-theme="dark"] .filter-listbox__option:hover {
  background: rgba(255, 255, 255, 0.06);
}
.filter-listbox__radio {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
[data-theme="dark"] .filter-listbox__radio {
  border-color: #64748b;
}
.filter-listbox__radio--on {
  border-color: var(--keppel, #2fbea8);
  background: var(--keppel, #2fbea8);
  color: #fff;
}
.filter-listbox--w-period {
  width: 10.5rem;
  max-width: 11rem;
}
.filter-listbox--w-grid {
  width: 100%;
  min-width: 6.5rem;
  max-width: 9.5rem;
}
.tp-grid-listbox {
  position: relative;
}
/* اسکوپ / ابهام — رنگ برچسب مطابق پروتوتایپ (کم/کوچک سبز، متوسط کهربایی، زیاد/پیچیده قرمز) */
.tp-grid-listbox--tone-low .filter-listbox__trigger--filled {
  border-color: rgba(16, 185, 129, 0.45);
  background: #d1fae5;
  color: #047857;
}
.tp-grid-listbox--tone-low .filter-listbox__trigger--filled .filter-listbox__chevron {
  color: #059669;
}
.tp-grid-listbox--tone-low .filter-listbox__trigger--open {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}
.tp-grid-listbox--tone-mid .filter-listbox__trigger--filled {
  border-color: rgba(245, 158, 11, 0.5);
  background: #fef3c7;
  color: #b45309;
}
.tp-grid-listbox--tone-mid .filter-listbox__trigger--filled .filter-listbox__chevron {
  color: #d97706;
}
.tp-grid-listbox--tone-mid .filter-listbox__trigger--open {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}
.tp-grid-listbox--tone-high .filter-listbox__trigger--filled {
  border-color: rgba(244, 63, 94, 0.45);
  background: #ffe4e6;
  color: #be123c;
}
.tp-grid-listbox--tone-high .filter-listbox__trigger--filled .filter-listbox__chevron {
  color: #e11d48;
}
.tp-grid-listbox--tone-high .filter-listbox__trigger--open {
  border-color: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.22);
}
[data-theme="dark"] .tp-grid-listbox--tone-low .filter-listbox__trigger--filled {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}
[data-theme="dark"] .tp-grid-listbox--tone-mid .filter-listbox__trigger--filled {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
}
[data-theme="dark"] .tp-grid-listbox--tone-high .filter-listbox__trigger--filled {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}
.tp-editor-grid__cell--listbox {
  align-items: center;
  justify-content: stretch;
  padding: 0.25rem 0.375rem;
}
.filter-listbox__panel--grid {
  z-index: 300;
}
button.filter-listbox__option {
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: "Vazirmatn", sans-serif;
}

/* ===== MENU ===== */
.sidebar-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.55rem 1rem 0.2rem;
  margin-top: 0.18rem;
  user-select: none;
}
.sidebar-group-label:first-child { margin-top: 0; padding-top: 0.5rem; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  font-weight: 500;
  min-height: 44px;
  overflow: hidden;
  line-height: 1.2;
}

.menu-item:hover { background: #f3f4f6; color: var(--text-primary); }
.menu-item:active { background: #eceff3; transform: none; }

.menu-item.active {
  background: linear-gradient(270deg, #fff7d1 0%, #fffdf0 100%);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(254, 216, 19, 0.12);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  right: 0 !important;
  left: auto !important;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 4px;
  border-radius: 999px 0 0 999px; /* rounded toward content in RTL */
  background: var(--gold);
  z-index: 1;
}

/* ===== SVG ICON SYSTEM ===== */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.menu-icon .icon,
.menu-item .icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.menu-item:hover .icon {
  color: var(--text-primary);
}

.menu-item.active .icon {
  color: var(--gold-600);
}

[data-theme="dark"] .menu-item.active .icon {
  color: var(--gold);
}

[data-theme="dark"] .menu-item .icon {
  color: var(--text-secondary);
}

[data-theme="dark"] .menu-item:hover .icon {
  color: var(--text-primary);
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-2xl { width: 48px; height: 48px; }

.kpi-card__icon .icon {
  width: 24px;
  height: 24px;
}

.empty-state-icon .icon {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
}

.urgent-section-title__icon .icon {
  width: 20px;
  height: 20px;
}

.sidebar-group-label .icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* ── Sidebar group toggle button ── */
.sidebar-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.4rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: color 0.15s, background-color 0.15s;
  user-select: none;
  border: none;
  background: none;
}

.sidebar-group-toggle:hover {
  color: #6b7280;
  background-color: #f9fafb;
}

/* ── Sidebar menu icon ── */
.menu-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}
.menu-item > span:not(.menu-icon):not(.sidebar-badge) { display: inline-flex; align-items: center; }

/* ── Sidebar badge ── */
.sidebar-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== ALERTS ===== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 0.875rem;
  line-height: 1.6;
}

.alert-warning { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.alert-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.alert-success { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.alert-info { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }

/* ===== CUSTOM SCROLLBAR ===== */
.custom-scrollbar::-webkit-scrollbar { width: 5px; height: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Thin scrollbar for horizontal scroll areas (tabs, etc) */
.scrollbar-thin { scrollbar-width: thin; scrollbar-color: #d1d5db transparent; }
.scrollbar-thin::-webkit-scrollbar { height: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 999px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Hide scrollbar but keep overflow scroll (progress pills) */
.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ===== RICH EDITOR ===== */
.toolbar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: background-color var(--transition-fast),
              color var(--transition-fast);
}

.toolbar-btn:hover { background: #e5e7eb; }
.toolbar-btn.active { background: var(--gold); color: var(--jet); font-weight: 600; }

.rich-editor {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #f9fafb;
  border-bottom: 1px solid var(--border-medium);
}

.rich-editor-content {
  padding: 1rem;
  min-height: 150px;
  outline: none;
  line-height: 1.8;
}

.rich-editor-content:empty::before { content: attr(data-placeholder); color: var(--text-muted); }

/* ===== MODAL & NOTIF ===== */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  inset-inline-start: auto;
  width: min(360px, calc(100vw - 1.5rem));
  max-width: 360px;
  background: var(--bg-card, #ffffff);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  border: 1px solid var(--border-medium, #e5e7eb);
  z-index: 50;
  overflow: hidden;
  color: var(--text-primary);
}
[data-theme="dark"] .notif-dropdown {
  box-shadow: 0 20px 40px -5px rgba(0,0,0,0.6);
}
.notif-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-default, #e5e7eb);
}
.notif-dropdown__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading, #111827);
}
.notif-dropdown__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.notif-dropdown__link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-gold, #92400e);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}
.notif-dropdown__link:hover {
  color: var(--gold-700, #b45309);
}
[data-theme="dark"] .notif-dropdown__header {
  border-bottom-color: var(--border-medium, #374151);
}
[data-theme="dark"] .notif-dropdown__title {
  color: var(--text-heading, #f9fafb);
}
[data-theme="dark"] .notif-dropdown__link {
  color: var(--gold-300, #fcd34d);
}
[data-theme="dark"] .notif-dropdown__link:hover {
  color: var(--gold-200, #fde68a);
}
/* موبایل: زنگ در header__end (سمت چپ در RTL) — دراپ‌داون absolute به راست overflow می‌کند */
@media (max-width: 767px) {
  .header .notif-dropdown {
    position: fixed;
    top: calc(var(--shell-header-h) + 0.35rem);
    inset-inline-start: 0.75rem;
    inset-inline-end: 0.75rem;
    width: auto;
    max-width: none;
    z-index: 80;
  }
  /* موبایل: پنل کاربران آنلاین — همان الگوی اعلان‌ها */
  .header .presence-panel-dropdown {
    position: fixed;
    top: calc(var(--shell-header-h) + 0.35rem);
    inset-inline-start: 0.75rem;
    inset-inline-end: 0.75rem;
    width: auto;
    max-width: none;
    z-index: 80;
  }
}

/* Notification list items (dropdown + full page) */
.notif-list {
  margin: 0;
  padding: 0;
}
.notif-list__empty {
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
}
.notif-item {
  display: block;
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle, #f3f4f6);
  transition: background-color 0.15s ease;
  color: inherit;
  text-decoration: none;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background-color: var(--bg-surface-hover, #f9fafb);
}
.notif-item--unread {
  border-inline-start: 3px solid var(--gold, #fed813);
  padding-inline-start: calc(1rem - 3px);
  background-color: rgba(254, 216, 19, 0.08);
}
.notif-item--unread:hover {
  background-color: rgba(254, 216, 19, 0.14);
}
.notif-item__inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.notif-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
}
.notif-item__icon--warning {
  background: var(--bg-warning-subtle, #fffbeb);
  color: #d97706;
}
.notif-item__icon--success {
  background: var(--bg-success-subtle, #ecfdf5);
  color: #059669;
}
.notif-item__icon--action {
  background: var(--bg-info-subtle, #eff6ff);
  color: #2563eb;
}
.notif-item__icon--info {
  background: var(--bg-surface-hover, #f3f4f6);
  color: var(--text-muted, #6b7280);
}
.notif-item__body {
  flex: 1;
  min-width: 0;
}
.notif-item__title {
  font-size: 0.875rem;
  line-height: 1.45;
}
.notif-item__title strong {
  font-weight: 700;
}
.notif-item--unread .notif-item__title {
  font-weight: 600;
  color: var(--text-heading, #111827);
}
.notif-item:not(.notif-item--unread) .notif-item__title {
  font-weight: 400;
  color: var(--text-body, #4b5563);
}
.notif-item__time {
  font-size: 0.75rem;
  color: var(--text-muted, #9ca3af);
  margin-top: 0.25rem;
}
.notif-item__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.notif-item__action-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-gold, #92400e);
  background: var(--bg-gold-subtle, #fef9c3);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm, 0.375rem);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.notif-item__action-link:hover {
  background: var(--gold-200, #fde047);
  color: var(--gold-900, #713f12);
}
.notif-item__mark-read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: none;
  background: none;
  color: var(--text-muted, #9ca3af);
  cursor: pointer;
  border-radius: var(--radius-sm, 0.375rem);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.notif-item__mark-read:hover {
  color: var(--text-body, #4b5563);
  background: var(--bg-surface-hover, #f3f4f6);
}
[data-theme="dark"] .notif-item {
  border-bottom-color: var(--border-medium, #374151);
}
[data-theme="dark"] .notif-item:hover {
  background-color: var(--bg-surface-hover);
}
[data-theme="dark"] .notif-item--unread {
  border-inline-start-color: var(--gold, #fed813);
  background-color: rgba(254, 216, 19, 0.1);
}
[data-theme="dark"] .notif-item--unread:hover {
  background-color: rgba(254, 216, 19, 0.16);
}
[data-theme="dark"] .notif-item--unread .notif-item__title {
  color: var(--text-heading, #f9fafb);
}
[data-theme="dark"] .notif-item:not(.notif-item--unread) .notif-item__title {
  color: var(--text-body, #d1d5db);
}
[data-theme="dark"] .notif-item__icon--warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
[data-theme="dark"] .notif-item__icon--success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
[data-theme="dark"] .notif-item__icon--action {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
[data-theme="dark"] .notif-item__icon--info {
  background: rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}
[data-theme="dark"] .notif-item__action-link {
  background: rgba(254, 216, 19, 0.12);
  color: var(--gold-200, #fde68a);
}
[data-theme="dark"] .notif-item__action-link:hover {
  background: rgba(254, 216, 19, 0.22);
  color: #fffbeb;
}

/* ═══════════════════════════════════════════════════════════════
   CONFIRM MODAL — Modern design system (shared across all modals)
   ═══════════════════════════════════════════════════════════════ */

body.confirm-modal-open {
  overflow: hidden !important;
}

/* Global confirm modal (#confirm-modal-root):
   Only enable pointer-events when IT is actually open (has .is-open class).
   This prevents it from blocking other modals. */
#confirm-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

#confirm-modal-root.is-open {
  pointer-events: auto !important;
}

/* Page-level modals (feedback confirm, cancel, etc.):
   These use .confirm-modal-root class but are NOT #confirm-modal-root.
   They should be interactive when body.confirm-modal-open or body.page-modal-open is set. */
.confirm-modal-root:not(#confirm-modal-root) {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

body.confirm-modal-open .confirm-modal-root:not(#confirm-modal-root),
body.page-modal-open .confirm-modal-root:not(#confirm-modal-root) {
  pointer-events: auto !important;
}

body.page-modal-open {
  overflow: hidden !important;
}

/* Page modal fallbacks — ensure backdrop and positioning work when Tailwind
   classes may not be generated for teleported content */
[data-page-modal] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
}
/* Alpine transition گاه pointer-events را روی والد می‌گذارد؛ لایهٔ تیره و ناحیهٔ خالی باید کلیک بگیرند */
body.page-modal-open [data-page-modal] {
  pointer-events: auto !important;
}
[data-page-modal-backdrop] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto !important;
}
/* وسط‌چین فقط داخل ناحیهٔ main (کنار سایدبار راست در RTL)؛ inset:0 اینلاین را نادیده می‌گرفت */
[data-page-modal-center] {
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  /* کلیک روی حاشیه به بک‌دراپ برسد */
  pointer-events: none !important;
}
@media (min-width: 1024px) {
  [data-page-modal-center] {
    right: var(--shell-sidebar-w) !important;
  }
  body.layout-sidebar-collapsed [data-page-modal-center] {
    right: var(--shell-sidebar-w-collapsed) !important;
  }
}
[data-page-modal-box] {
  position: relative !important;
  z-index: 3 !important;
  pointer-events: auto !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-body);
  border-radius: 1rem !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
}

/* Fallback for page-level modals using Tailwind (feedback, manager feedback):
   Ensures backdrop and positioning work if Tailwind Play CDN misses teleported content. */
.fixed.inset-0.bg-black\/50,
.fixed.inset-0[class*="bg-black"] {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.confirm-modal-layer {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto !important;
}

.confirm-modal-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 28rem;
  z-index: 1;
}

.confirm-modal-box {
  width: 100%;
  background: var(--bg-card);
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.04);
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border-light);
  animation: confirmModalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes confirmModalSlideIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-modal-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.confirm-modal-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.confirm-modal-icon--warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  border: 1px solid #fde68a;
}

.confirm-modal-icon--danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border: 1px solid #fecaca;
}

.confirm-modal-icon--info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  border: 1px solid #93c5fd;
}

.confirm-modal-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.confirm-modal-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  text-align: center;
  margin: 0 0 1.5rem;
  max-height: 12rem;
  overflow-y: auto;
}

#confirm-modal-root .confirm-modal-wrapper:has(.confirm-modal-box--with-reminder-email) {
  max-width: min(96vw, 36rem);
}

#confirm-modal-root .confirm-modal-wrapper:has(.confirm-modal-box--with-required-reason) {
  max-width: min(96vw, 32rem);
}

.confirm-modal-required-reason {
  margin-block-end: 1.25rem;
  text-align: start;
}

.confirm-modal-required-reason-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.confirm-modal-required-reason-textarea {
  width: 100%;
  min-height: 5.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.65;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-primary);
  resize: vertical;
}

.confirm-modal-required-reason-textarea:focus {
  outline: none;
  border-color: var(--gold, #fed813);
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.35);
}

.confirm-modal-required-reason-error {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
}

[data-theme="dark"] .confirm-modal-required-reason-error {
  color: #f87171;
}

.confirm-modal-reminder-email {
  margin-block-end: 1.25rem;
  text-align: start;
}

.confirm-modal-reminder-email-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.confirm-modal-reminder-email-subject {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0 0 0.85rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background: var(--bg-muted, #f4f4f5);
  border: 1px solid var(--border-light);
}

.confirm-modal-reminder-email-textarea {
  width: 100%;
  min-height: 7rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.65;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-primary);
  resize: vertical;
}

.confirm-modal-reminder-email-textarea:focus {
  outline: none;
  border-color: var(--gold, #fed813);
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.35);
}

[data-theme="dark"] .confirm-modal-reminder-email-subject {
  background: rgba(255, 255, 255, 0.06);
}

.confirm-modal-actions {
  display: flex;
  flex-direction: row-reverse;
  gap: 0.75rem;
  justify-content: flex-start;
}

.confirm-modal-btn-confirm {
  flex: 1;
  min-height: 44px;
}

.confirm-modal-btn-cancel {
  flex: 1;
  min-height: 44px;
}

@media (max-width: 480px) {
  .confirm-modal-box {
    padding: 1.5rem 1.25rem;
  }
  .confirm-modal-actions {
    flex-direction: column-reverse;
  }
}

/* Dark mode */
[data-theme="dark"] .confirm-modal-box {
  background: var(--bg-card);
  border-color: var(--border-medium);
}

[data-theme="dark"] .confirm-modal-backdrop {
  background: rgba(0, 0, 0, 0.7);
}

/* ===== STATUS ===== */
.status-done { color: #10b981; }
.status-progress { color: #f59e0b; }
.status-pending { color: #6b7280; }
.status-locked { color: #9ca3af; }

/* ===== AVATAR ===== */
.avatar {
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--jet);
  background: var(--gold);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-sm-plus { width: 2.4rem; height: 2.4rem; font-size: 0.8125rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; font-size: 0.875rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.25rem; }
.avatar-xl { width: 5rem; height: 5rem; font-size: 1.875rem; }

/* Extra sizes used in tables / tight layouts */
.avatar-2xs { width: 1.25rem; height: 1.25rem; font-size: 0.5rem; }
.avatar-xs { width: 1.75rem; height: 1.75rem; font-size: 0.625rem; }
.avatar-9 { width: 2.25rem; height: 2.25rem; font-size: 0.8125rem; }
.avatar-11 { width: 2.75rem; height: 2.75rem; font-size: 0.9375rem; }
.avatar-12 { width: 3rem; height: 3rem; font-size: 1rem; }
.avatar-16 { width: 4rem; height: 4rem; font-size: 1.375rem; }
.avatar-20 { width: 5rem; height: 5rem; font-size: 1.75rem; }

/* Responsive header (w-16 → md:w-20) */
.avatar-profile-hero {
  width: 4rem;
  height: 4rem;
  font-size: 1.375rem;
}
@media (min-width: 768px) {
  .avatar-profile-hero {
    width: 5rem;
    height: 5rem;
    font-size: 1.875rem;
  }
}

/* HR-Core–style hash gradients (no-photo fallback) */
.avatar-rose { background: linear-gradient(135deg, #fb7185, #f43f5e); color: #fff; }
.avatar-amber { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #fff; }
.avatar-emerald { background: linear-gradient(135deg, #34d399, #10b981); color: #fff; }
.avatar-blue { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; }
.avatar-purple { background: linear-gradient(135deg, #a78bfa, #8b5cf6); color: #fff; }
.avatar-pink { background: linear-gradient(135deg, #f472b6, #ec4899); color: #fff; }
.avatar-cyan { background: linear-gradient(135deg, #22d3ee, #06b6d4); color: #fff; }
.avatar-teal { background: linear-gradient(135deg, #2dd4bf, #14b8a6); color: #fff; }
.avatar-muted { background: linear-gradient(135deg, #9ca3af, #6b7280); color: #fff; }

.avatar.avatar-shape-xl { border-radius: 0.75rem; }
.avatar.avatar-shape-2xl { border-radius: 1rem; }

/* Profile header — allow avatar HR hint tooltip to extend outside card */
.card.card--profile-header {
  overflow: visible;
}

/* Manager pending feedback — message preview hover tooltip */
.card.card--feedback-preview-list {
  overflow: visible;
}

.feedback-request-preview {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.feedback-request-preview:hover,
.feedback-request-preview:focus-within {
  z-index: var(--z-toast, 400);
}

.feedback-request-preview-trigger {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.375;
  color: var(--text-body, #374151);
  cursor: help;
  border-radius: 0.5rem;
  border: 1px solid var(--border-default, #e5e7eb);
  background: color-mix(in srgb, var(--bg-surface-secondary, #f3f4f6) 80%, transparent);
  padding: 0.375rem 0.625rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.feedback-request-preview:hover .feedback-request-preview-trigger,
.feedback-request-preview:focus-within .feedback-request-preview-trigger {
  border-color: rgba(245, 158, 11, 0.55);
  background: var(--bg-surface-secondary, #f3f4f6);
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.18);
}

.feedback-request-preview-trigger:focus-visible {
  outline: 2px solid #fed813;
  outline-offset: 2px;
}

.feedback-request-preview-panel {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: calc(var(--z-toast, 400) + 1);
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(18rem, 60vh);
  overflow-y: auto;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-default, #e5e7eb);
  background: var(--bg-surface, #fff);
  color: var(--text-body, #374151);
  text-align: right;
  box-shadow: 0 12px 40px -8px rgba(15, 23, 42, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}

.feedback-request-preview-panel::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  height: 10px;
  pointer-events: auto;
}

.feedback-request-preview:hover .feedback-request-preview-panel,
.feedback-request-preview:focus-within .feedback-request-preview-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.feedback-request-preview-arrow {
  position: absolute;
  bottom: 100%;
  inset-inline-start: 1rem;
  z-index: 2;
  width: 0;
  height: 0;
  border-inline: 8px solid transparent;
  border-bottom: 8px solid var(--border-default, #e5e7eb);
  margin-bottom: -1px;
  pointer-events: none;
}

.feedback-request-preview-arrow::after {
  content: "";
  position: absolute;
  inset-inline-start: -7px;
  top: 1px;
  border-inline: 7px solid transparent;
  border-bottom: 7px solid var(--bg-surface, #fff);
}

.feedback-request-preview-topic {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.5rem;
}

.feedback-request-preview-label {
  margin: 0 0 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
}

.feedback-request-preview-label--questions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-heading, #111827);
  margin-bottom: 0.5rem;
}

.feedback-request-preview-body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.625;
  white-space: pre-wrap;
}

.feedback-request-preview-questions--bordered {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-default, #e5e7eb);
}

.feedback-request-preview-qlist {
  margin: 0;
  padding-inline-end: 1rem;
  font-size: 0.75rem;
  line-height: 1.625;
  list-style: decimal;
}

.feedback-request-preview-qlist li + li {
  margin-top: 0.375rem;
}

[data-theme="dark"] .feedback-request-preview-trigger {
  color: var(--text-body, #e5e7eb);
  border-color: var(--border-default, #334155);
  background: color-mix(in srgb, var(--bg-surface-secondary, #1e293b) 80%, transparent);
}

[data-theme="dark"] .feedback-request-preview:hover .feedback-request-preview-trigger,
[data-theme="dark"] .feedback-request-preview:focus-within .feedback-request-preview-trigger {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.12);
}

[data-theme="dark"] .feedback-request-preview-panel {
  background: var(--bg-surface, #1e293b);
  color: var(--text-body, #e5e7eb);
  border-color: var(--border-default, #334155);
  box-shadow: 0 16px 48px -6px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .feedback-request-preview-arrow::after {
  border-bottom-color: var(--bg-surface, #1e293b);
}

[data-theme="dark"] .feedback-request-preview-topic {
  color: #fcd34d;
}

/* Profile page — HR Core photo edit hint */
.profile-avatar-hr-edit {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.profile-avatar-hr-edit-link {
  position: relative;
  display: inline-block;
  border-radius: 1rem;
  text-decoration: none;
  color: inherit;
}
.profile-avatar-hr-edit-link:focus-visible {
  outline: 2px solid #fed813;
  outline-offset: 3px;
}
.profile-avatar-hr-edit-photo {
  box-shadow: 0 0 0 4px #fff, 0 4px 14px -2px rgba(15, 23, 42, 0.18);
}
html[data-theme="dark"] .profile-avatar-hr-edit-photo {
  box-shadow: 0 0 0 4px #1e293b, 0 4px 14px -2px rgba(0, 0, 0, 0.45);
}
.profile-avatar-hr-edit-camera {
  position: absolute;
  bottom: -0.125rem;
  inset-inline-start: -0.125rem;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #fff;
  color: #374151;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  pointer-events: none;
}
html[data-theme="dark"] .profile-avatar-hr-edit-camera {
  background: #f9fafb;
  color: #1f2937;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.profile-avatar-hr-hint-float {
  position: fixed;
  z-index: 10050;
  width: min(18rem, 78vw);
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: right;
  pointer-events: auto;
  background: var(--bg-card, #fff);
  color: var(--text-primary, #111827);
  border: 1px solid var(--border-light, #e5e7eb);
  box-shadow: 0 12px 40px -8px rgba(15, 23, 42, 0.22);
}
.profile-avatar-hr-hint-float[hidden] {
  display: none !important;
}
html[data-theme="dark"] .profile-avatar-hr-hint-float {
  background: var(--bg-card, #1e293b);
  color: var(--text-primary, #f1f5f9);
  border-color: var(--border-light, #334155);
  box-shadow: 0 16px 48px -6px rgba(0, 0, 0, 0.55);
}

/* ===== STICKY FOOTER / SAVE ===== */
.sticky-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  padding: 0.5rem 1.25rem;
  border-top: 1px solid rgba(254, 216, 19, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1rem -1.5rem -1rem -1.5rem;
  box-shadow: 0 -1px 4px rgba(17, 24, 39, 0.04);
  border-radius: 0;
}

@media (min-width: 1024px) {
  .sticky-footer {
    margin-left: calc(-50vw + 50% + var(--shell-sidebar-half));
    margin-right: calc(-50vw + 50% + var(--shell-sidebar-half));
    padding-left: calc(50vw - 50% - var(--shell-sidebar-half));
    padding-right: calc(50vw - 50% - var(--shell-sidebar-half));
  }
}

/* Snapshot sticky footer — fixed to viewport bottom, full-width within main-content */
.snapshot-sticky-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(17, 24, 39, 0.08);
  padding: 0.75rem 1.5rem;
  height: 3.75rem;
}
@media (min-width: 1024px) {
  .snapshot-sticky-footer {
    right: var(--shell-sidebar-w);
    padding-left: 2rem;
    padding-right: 2rem;
  }
  body.layout-sidebar-collapsed .snapshot-sticky-footer {
    right: var(--shell-sidebar-w-collapsed);
  }
}
[data-theme="dark"] .snapshot-sticky-footer {
  background: rgba(30, 41, 59, 0.97);
  border-top-color: #334155;
}

/* انتقال فوکوس / scrollIntoView در اسنپ‌شات — جلوگیری از رفتن کارت زیر هدرٔ ثابت و زیر نوارٔ ثابتٔ پایین */
.snapshot-page-wrapper #snapshot-dynamic-form .section-field,
.snapshot-page-wrapper #snapshot-committee-extended-root .section-field,
.snapshot-page-wrapper #self-eval-sections > .section-field,
.snapshot-page-wrapper #snapshot-sections > .section-field {
  scroll-margin-top: 0;
  scroll-margin-bottom: var(--snapshot-footer-clearance);
}

/* Self-eval submit bar — invalid Tailwind opacities (e.g. /96) are not emitted; keep dark shell consistent */
[data-theme="dark"] #self-eval-submit-bar {
  background: rgba(30, 41, 59, 0.94);
  border-color: #334155;
}

/* Self-eval submit bar — fixed to viewport bottom, full width of main column (sidebar inset on lg+) */
form#self-eval-form.self-eval-form--fixed-footer {
  padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

#self-eval-submit-bar.self-eval-submit-bar--fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(17, 24, 39, 0.08);
  padding: 0.75rem 1.5rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 1024px) {
  #self-eval-submit-bar.self-eval-submit-bar--fixed {
    right: var(--shell-sidebar-w);
  }

  body.layout-sidebar-collapsed #self-eval-submit-bar.self-eval-submit-bar--fixed {
    right: var(--shell-sidebar-w-collapsed);
  }
}

[data-theme="dark"] #self-eval-submit-bar.self-eval-submit-bar--fixed {
  background: rgba(30, 41, 59, 0.97);
  border-top-color: #334155;
}

/* Snapshot page wrapper — spacing, footer clearance */
.snapshot-page-wrapper {
  padding-bottom: var(
    --snapshot-footer-clearance,
    calc(5.25rem + env(safe-area-inset-bottom, 0px))
  ) !important;
  gap: 0 !important;
}
.snapshot-page-wrapper #self-eval-sections {
  margin-top: 0.25rem !important;
}
.snapshot-page-wrapper #self-eval-sections > * + * {
  margin-top: 0.625rem !important;
}
.snapshot-page-wrapper #self-eval-sections > .section-field {
  padding: 1.25rem !important;
}
.snapshot-page-wrapper #snapshot-sections > * + * {
  margin-top: 0.875rem !important;
}

/* Full-width progress bar under snapshot header */
.snapshot-full-progress {
  height: 6px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 0.5rem;
  position: relative;
}
.snapshot-full-progress .snapshot-full-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fde68a, #f59e0b, #d97706);
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.snapshot-full-progress .snapshot-full-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  animation: progressShimmer 2s ease-in-out infinite;
}
@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.snapshot-full-progress-fill[style*="width: 100%"]::after,
.snapshot-full-progress-fill[style*="width:100%"]::after {
  animation: none;
}

.save-indicator { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--text-secondary); }
.save-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; transition: background 0.3s; }
.save-dot.saved { background: #10b981; animation: pulse 2s infinite; }
.save-dot.unsaved { background: #9ca3af; }
.save-dot.saving { background: var(--gold); animation: pulse 0.5s infinite; }
.save-dot.error { background: #ef4444; }

/* Autosave htmx states */
.htmx-request #save-status .save-dot { background: var(--gold) !important; animation: pulse 0.5s infinite; }
.htmx-request #save-status .text-xs { color: var(--gold-dark) !important; }
.htmx-request #save-status .text-xs::after { content: ' در حال ذخیره...'; }

/* Toast slide-up animation (ParticipantsPage) */
@keyframes toastSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.toast-slide-up {
  animation: toastSlideUp 0.3s ease-out;
}

/* Row highlight fade (newly added participants) */
@keyframes fadeHighlight {
  0% { background-color: rgb(220 252 231); }
  100% { background-color: transparent; }
}
.animate-fade-highlight {
  animation: fadeHighlight 3s ease-out forwards;
}

/* Save toast slide-up animation */
@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(1rem); }
  10% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-0.5rem); pointer-events: none; }
}

/* Self-eval footer (React reference style) */
.self-eval-footer {
  position: sticky;
  bottom: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  border-top: 2px solid var(--gold);
}

/* Self-eval hero — progress bar + role badge */
.self-eval-hero__role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}
.self-eval-hero__role-badge--manager {
  background: var(--bg-gold-subtle, #fef9c3);
  color: var(--text-gold, #92400e);
  border-color: rgba(254, 216, 19, 0.45);
}
.self-eval-hero__role-badge--senior {
  background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
  color: #78350f;
  border-color: rgba(217, 119, 6, 0.35);
}
.self-eval-hero__role-badge--ic {
  background: var(--bg-surface-hover, #f3f4f6);
  color: var(--text-body, #4b5563);
  border-color: var(--border-subtle, #f3f4f6);
}
.self-eval-hero__progress-bar-wrapper {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle, #f3f4f6);
}
.self-eval-hero__progress-label {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-muted, #6b7280);
}
.self-eval-hero__progress-pct-text {
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--text-heading, #111827);
}
.self-eval-hero__progress-success-icon {
  display: inline-flex;
  color: #059669;
}
.self-eval-hero__bar-track {
  width: 100%;
  height: 0.5rem;
  background: var(--border-default, #e5e7eb);
  border-radius: 9999px;
  overflow: hidden;
}
.self-eval-hero__bar-fill {
  height: 100%;
  background: var(--gold, #fed813);
  border-radius: 9999px;
  transition: width 0.4s ease;
}
.self-eval-hero__progress-hint {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  margin-top: 0.375rem;
  margin-bottom: 0;
}
/* Success state (≥75%) */
.self-eval-hero__progress-bar-wrapper--success .self-eval-hero__bar-fill {
  background: #059669;
}
.self-eval-hero__progress-bar-wrapper--success .self-eval-hero__progress-pct-text {
  color: #047857;
}
.self-eval-hero__progress-bar-wrapper--success .self-eval-hero__progress-hint {
  color: #047857;
}
/* Dark mode */
[data-theme="dark"] .self-eval-hero__progress-bar-wrapper {
  border-top-color: var(--border-medium, #374151);
}
[data-theme="dark"] .self-eval-hero__progress-label {
  color: #9ca3af;
}
[data-theme="dark"] .self-eval-hero__progress-pct-text {
  color: var(--text-heading, #f9fafb);
}
[data-theme="dark"] .self-eval-hero__bar-track {
  background: #374151;
}
[data-theme="dark"] .self-eval-hero__bar-fill {
  background: var(--gold, #fed813);
}
[data-theme="dark"] .self-eval-hero__progress-hint {
  color: #9ca3af;
}
[data-theme="dark"] .self-eval-hero__progress-bar-wrapper--success .self-eval-hero__bar-fill {
  background: #34d399;
}
[data-theme="dark"] .self-eval-hero__progress-bar-wrapper--success .self-eval-hero__progress-pct-text {
  color: #6ee7b7;
}
[data-theme="dark"] .self-eval-hero__progress-bar-wrapper--success .self-eval-hero__progress-hint {
  color: #6ee7b7;
}
[data-theme="dark"] .self-eval-hero__progress-bar-wrapper--success .self-eval-hero__progress-success-icon {
  color: #34d399;
}
[data-theme="dark"] .self-eval-hero__role-badge--manager {
  background: rgba(254, 216, 19, 0.12);
  color: #fde68a;
  border-color: rgba(254, 216, 19, 0.35);
}
[data-theme="dark"] .self-eval-hero__role-badge--senior {
  background: rgba(254, 216, 19, 0.18);
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.4);
}
[data-theme="dark"] .self-eval-hero__role-badge--ic {
  background: rgba(255, 255, 255, 0.06);
  color: #d1d5db;
  border-color: var(--border-medium, #374151);
}

/* Section hidden by form condition (depends-on) */
.section-field.section-conditionally-hidden {
  display: none;
}

/* Section dim on focus (other sections fade when one is active) */
.section-field.section-dimmed {
  opacity: 0.45;
  transform: scale(0.995);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
}

/* Auto-scroll highlight pulse when navigating to next question */
@keyframes sectionHighlightPulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(254, 216, 19, 0),
      inset 0 0 0 0 rgba(254, 216, 19, 0);
  }
  40% {
    box-shadow:
      0 0 0 0 rgba(254, 216, 19, 0),
      inset 0 0 0 3px rgba(254, 216, 19, 0.55);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(254, 216, 19, 0),
      inset 0 0 0 0 rgba(254, 216, 19, 0);
  }
}
.section-field.section-highlight-pulse {
  animation: sectionHighlightPulse 1.2s ease-out;
}

/* Custom radio button styling — snapshot + formbuilder */
.radio-option {
  position: relative;
  user-select: none;
  transition: all var(--duration-fast) ease;
}

/* Outer ring always visible (native input is sr-only) — improves affordance on gray rows */
.radio-option .radio-custom {
  flex-shrink: 0;
  box-sizing: border-box;
}

html:not([data-theme="dark"]) .radio-option:not(.radio-option--selected) .radio-custom {
  border-color: #6b7280;
  background-color: #ffffff;
}

.radio-option--selected .radio-custom {
  border-color: #d97706;
  background: #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.radio-option--selected .radio-dot {
  transform: scale(1) !important;
  background: #ffffff !important;
}
.radio-option--selected .radio-check {
  opacity: 1 !important;
}

/* Light theme — row interaction (do not unscope: breaks dark mode text contrast) */
html:not([data-theme="dark"]) .radio-option:hover:not(:has(input:disabled)) {
  background: #fafafa !important;
  border-color: #d1d5db !important;
}
.radio-option:active:not(:has(input:disabled)) {
  transform: scale(0.985);
}
.radio-option:focus-within {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
  border-color: #fbbf24 !important;
}
.radio-option--selected {
  background: #fefce8 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15), inset 0 0 0 1px rgba(245, 158, 11, 0.1);
}
html:not([data-theme="dark"]) .radio-option--selected:hover {
  background: #fef9c3 !important;
  border-color: #f59e0b !important;
}

/* Likert / single-choice — dark mode (formbuilder + snapshot) */
[data-theme="dark"] .radio-option:not(.radio-option--selected) {
  background: var(--bg-surface-secondary) !important;
  border-color: var(--border-default) !important;
}
[data-theme="dark"] .radio-option:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background: var(--bg-surface-tertiary) !important;
  border-color: var(--border-strong) !important;
}
[data-theme="dark"] .radio-option--selected {
  background: var(--bg-warning-subtle) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(251, 191, 36, 0.2);
}
[data-theme="dark"] .radio-option--selected:hover {
  background: rgba(120, 53, 15, 0.55) !important;
  border-color: rgba(253, 224, 71, 0.45) !important;
}
[data-theme="dark"] .radio-option:not(.radio-option--selected) .radio-custom {
  border-color: #94a3b8;
  background-color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(148, 163, 184, 0.22);
}
[data-theme="dark"] .radio-option--selected .radio-custom {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .radio-option--selected .radio-dot {
  background: #fffbeb !important;
}
[data-theme="dark"] .radio-option:focus-within {
  outline-color: rgba(251, 191, 36, 0.5);
}
[data-theme="dark"] .radio-option .text-sm {
  color: var(--text-body);
}
[data-theme="dark"] .radio-option--selected .text-sm {
  color: var(--text-heading);
}

/* Snapshot Likert: JS resets rows to Tailwind bg-white — use dark surfaces */
[data-theme="dark"] .radio-option.bg-white {
  background: var(--bg-surface-secondary) !important;
  border-color: var(--border-default) !important;
}

/* اسنپ‌شات فرم‌ساز: تیک در دایره مثل تصمیم کمیته (.committee-choice-option__check) */
.snapshot-page-wrapper .radio-option .radio-custom.radio-custom--committee {
  width: 1.375rem;
  height: 1.375rem;
  min-width: 1.375rem;
  min-height: 1.375rem;
  border-radius: 9999px;
  border: 2px solid #d1d5db !important;
  background-color: #ffffff !important;
  box-shadow: none !important;
  color: transparent;
}
.snapshot-page-wrapper .radio-option .radio-custom__committee-tick {
  opacity: 0;
  transform: scale(0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.snapshot-page-wrapper .radio-option--selected .radio-custom__committee-tick {
  opacity: 1;
  transform: scale(1);
}
.snapshot-page-wrapper .radio-option--selected .radio-custom.radio-custom--committee {
  border-color: #16a34a !important;
  background: #22c55e !important;
  box-shadow: none !important;
  color: #ffffff;
}
[data-theme="dark"] .snapshot-page-wrapper .radio-option:not(.radio-option--selected) .radio-custom.radio-custom--committee {
  border-color: #4b5563 !important;
  background-color: #0f172a !important;
}
[data-theme="dark"] .snapshot-page-wrapper .radio-option--selected .radio-custom.radio-custom--committee {
  border-color: #4ade80 !important;
  background: #22c55e !important;
  color: #ffffff;
}

/* همهٔ ردیف‌های رادیویی انتخاب‌شده در اسنپ‌شات: نوار دور سبز (فرم‌ساز + بلوک کمیتهٔ توسعه‌یافته) */
html:not([data-theme="dark"]) .snapshot-page-wrapper #snapshot-dynamic-form .radio-options-group .radio-option--selected {
  background: #f0fdf4 !important;
  border-color: #22c55e !important;
  box-shadow:
    0 2px 8px rgba(34, 197, 94, 0.12),
    inset 0 0 0 1px rgba(34, 197, 94, 0.07);
}
html:not([data-theme="dark"]) .snapshot-page-wrapper #snapshot-dynamic-form .radio-options-group .radio-option--selected:hover {
  background: #dcfce7 !important;
  border-color: #16a34a !important;
}
html:not([data-theme="dark"]) .snapshot-page-wrapper #snapshot-dynamic-form .radio-options-group .radio-option.radio-option--selected:focus-within {
  border-color: #16a34a !important;
  outline-color: rgba(34, 197, 94, 0.45);
}
[data-theme="dark"] .snapshot-page-wrapper #snapshot-dynamic-form .radio-options-group .radio-option--selected {
  background: rgba(34, 197, 94, 0.12) !important;
  border-color: rgba(74, 222, 128, 0.45) !important;
  box-shadow:
    0 2px 14px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(74, 222, 128, 0.14);
}
[data-theme="dark"] .snapshot-page-wrapper #snapshot-dynamic-form .radio-options-group .radio-option--selected:hover {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: rgba(74, 222, 128, 0.58) !important;
}
[data-theme="dark"] .snapshot-page-wrapper #snapshot-dynamic-form .radio-options-group .radio-option.radio-option--selected:focus-within {
  border-color: rgba(74, 222, 128, 0.58) !important;
  outline-color: rgba(34, 197, 94, 0.4);
}

/* Manager feedback — Likert spectrum (overrides generic .radio-option !important rules) */
.radio-options-group.mgr-likert-scale .mgr-likert-card {
  box-shadow: none;
}
.radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree .mgr-likert-check {
  color: rgb(220 38 38);
}
.radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree .mgr-likert-check {
  color: rgb(234 88 12);
}
.radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral .mgr-likert-check {
  color: rgb(202 138 4);
}
.radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree .mgr-likert-check {
  color: rgb(22 163 74);
}
.radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree .mgr-likert-check {
  color: rgb(22 101 52);
}
.radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient .mgr-likert-check {
  color: rgb(100 116 139);
}
.radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other .mgr-likert-check {
  color: rgb(71 85 105);
}

.radio-options-group.mgr-likert-scale .mgr-likert-card.radio-option--selected .mgr-likert-card__label {
  font-weight: 600;
}

html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree:not(.radio-option--selected) {
  background-color: #ffffff !important;
  border-color: #ef4444 !important;
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  transform: translateX(-2px);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree.radio-option--selected {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.18), inset 0 0 0 1px rgba(239, 68, 68, 0.12);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: #fee2e2 !important;
  border-color: #ef4444 !important;
  transform: translateX(-2px);
}

html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree:not(.radio-option--selected) {
  background-color: #ffffff !important;
  border-color: #f97316 !important;
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: #fff7ed !important;
  border-color: #f97316 !important;
  transform: translateX(-2px);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree.radio-option--selected {
  background-color: #fff7ed !important;
  border-color: #f97316 !important;
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.18), inset 0 0 0 1px rgba(249, 115, 22, 0.12);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: #ffedd5 !important;
  border-color: #f97316 !important;
  transform: translateX(-2px);
}

html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral:not(.radio-option--selected) {
  background-color: #ffffff !important;
  border-color: #eab308 !important;
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: #fefce8 !important;
  border-color: #eab308 !important;
  transform: translateX(-2px);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral.radio-option--selected {
  background-color: #fefce8 !important;
  border-color: #eab308 !important;
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.2), inset 0 0 0 1px rgba(234, 179, 8, 0.12);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: #fef9c3 !important;
  border-color: #eab308 !important;
  transform: translateX(-2px);
}

html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree:not(.radio-option--selected) {
  background-color: #ffffff !important;
  border-color: #22c55e !important;
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: #f0fdf4 !important;
  border-color: #22c55e !important;
  transform: translateX(-2px);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree.radio-option--selected {
  background-color: #f0fdf4 !important;
  border-color: #22c55e !important;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.18), inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: #dcfce7 !important;
  border-color: #22c55e !important;
  transform: translateX(-2px);
}

html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree:not(.radio-option--selected) {
  background-color: #ffffff !important;
  border-color: #16a34a !important;
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: #dcfce7 !important;
  border-color: #16a34a !important;
  transform: translateX(-2px);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree.radio-option--selected {
  background-color: #dcfce7 !important;
  border-color: #16a34a !important;
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.2), inset 0 0 0 1px rgba(22, 163, 74, 0.12);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: #bbf7d0 !important;
  border-color: #16a34a !important;
  transform: translateX(-2px);
}

html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other:not(.radio-option--selected) {
  background-color: #f9fafb !important;
  border-color: #cbd5e1 !important;
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  transform: translateX(-2px);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other.radio-option--selected {
  background-color: #e2e8f0 !important;
  border-color: #64748b !important;
  box-shadow: 0 2px 10px rgba(100, 116, 139, 0.15), inset 0 0 0 1px rgba(100, 116, 139, 0.12);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: #cbd5e1 !important;
  border-color: #64748b !important;
  transform: translateX(-2px);
}

html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient:not(.radio-option--selected) {
  background-color: #f3f4f6 !important;
  border-color: #e5e7eb !important;
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: #e5e7eb !important;
  border-color: #d1d5db !important;
  transform: translateX(-2px);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient.radio-option--selected {
  background-color: #e5e7eb !important;
  border-color: #9ca3af !important;
  box-shadow: 0 2px 10px rgba(107, 114, 128, 0.12), inset 0 0 0 1px rgba(107, 114, 128, 0.1);
}
html:not([data-theme="dark"]) .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: #d1d5db !important;
  border-color: #9ca3af !important;
  transform: translateX(-2px);
}

.radio-options-group.mgr-likert-scale .mgr-likert-card:focus-within {
  outline: 2px solid rgba(251, 191, 36, 0.55);
  outline-offset: 2px;
}

.radio-options-group.mgr-likert-scale .mgr-likert-card:active:not(:has(input:disabled)) {
  transform: translateX(-1px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree:not(.radio-option--selected) {
  background-color: rgba(30, 10, 10, 0.55) !important;
  border-color: rgba(248, 113, 113, 0.55) !important;
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: rgba(127, 29, 29, 0.45) !important;
  border-color: rgba(252, 165, 165, 0.65) !important;
  transform: translateX(-2px);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree.radio-option--selected {
  background-color: rgba(127, 29, 29, 0.55) !important;
  border-color: rgba(252, 165, 165, 0.75) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(252, 165, 165, 0.15);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-disagree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: rgba(153, 27, 27, 0.55) !important;
  border-color: rgba(254, 202, 202, 0.8) !important;
  transform: translateX(-2px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree:not(.radio-option--selected) {
  background-color: rgba(40, 20, 8, 0.45) !important;
  border-color: rgba(251, 146, 60, 0.55) !important;
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: rgba(124, 45, 18, 0.45) !important;
  border-color: rgba(253, 186, 116, 0.65) !important;
  transform: translateX(-2px);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree.radio-option--selected {
  background-color: rgba(124, 45, 18, 0.55) !important;
  border-color: rgba(253, 186, 116, 0.75) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(253, 186, 116, 0.12);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--disagree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: rgba(154, 52, 18, 0.55) !important;
  border-color: rgba(253, 186, 116, 0.85) !important;
  transform: translateX(-2px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral:not(.radio-option--selected) {
  background-color: rgba(45, 40, 8, 0.45) !important;
  border-color: rgba(250, 204, 21, 0.45) !important;
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: rgba(113, 63, 18, 0.4) !important;
  border-color: rgba(253, 224, 71, 0.55) !important;
  transform: translateX(-2px);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral.radio-option--selected {
  background-color: rgba(113, 63, 18, 0.5) !important;
  border-color: rgba(253, 224, 71, 0.65) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(253, 224, 71, 0.12);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--neutral.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: rgba(120, 53, 15, 0.55) !important;
  border-color: rgba(253, 224, 71, 0.8) !important;
  transform: translateX(-2px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree:not(.radio-option--selected) {
  background-color: rgba(6, 40, 20, 0.45) !important;
  border-color: rgba(74, 222, 128, 0.45) !important;
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: rgba(20, 83, 45, 0.45) !important;
  border-color: rgba(134, 239, 172, 0.55) !important;
  transform: translateX(-2px);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree.radio-option--selected {
  background-color: rgba(20, 83, 45, 0.55) !important;
  border-color: rgba(134, 239, 172, 0.65) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(134, 239, 172, 0.12);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--agree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: rgba(22, 101, 52, 0.58) !important;
  border-color: rgba(187, 247, 208, 0.75) !important;
  transform: translateX(-2px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree:not(.radio-option--selected) {
  background-color: rgba(6, 45, 22, 0.5) !important;
  border-color: rgba(34, 197, 94, 0.55) !important;
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: rgba(22, 101, 52, 0.5) !important;
  border-color: rgba(74, 222, 128, 0.65) !important;
  transform: translateX(-2px);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree.radio-option--selected {
  background-color: rgba(22, 101, 52, 0.58) !important;
  border-color: rgba(74, 222, 128, 0.75) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(74, 222, 128, 0.15);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--strong-agree.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: rgba(21, 128, 61, 0.62) !important;
  border-color: rgba(134, 239, 172, 0.85) !important;
  transform: translateX(-2px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other:not(.radio-option--selected) {
  background-color: var(--bg-surface-secondary) !important;
  border-color: var(--border-default) !important;
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: var(--bg-surface-tertiary) !important;
  border-color: var(--border-strong) !important;
  transform: translateX(-2px);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other.radio-option--selected {
  background-color: rgba(51, 65, 85, 0.55) !important;
  border-color: rgba(148, 163, 184, 0.55) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--other.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: rgba(71, 85, 105, 0.58) !important;
  border-color: rgba(203, 213, 225, 0.55) !important;
  transform: translateX(-2px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient:not(.radio-option--selected) {
  background-color: rgba(15, 23, 42, 0.55) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient:not(.radio-option--selected):hover:not(:has(input:disabled)) {
  background-color: rgba(30, 41, 59, 0.65) !important;
  border-color: rgba(148, 163, 184, 0.5) !important;
  transform: translateX(-2px);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient.radio-option--selected {
  background-color: rgba(30, 41, 59, 0.75) !important;
  border-color: rgba(148, 163, 184, 0.55) !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}
[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.mgr-likert-tier--insufficient.radio-option--selected:hover:not(:has(input:disabled)) {
  background-color: rgba(51, 65, 85, 0.78) !important;
  border-color: rgba(203, 213, 225, 0.45) !important;
  transform: translateX(-2px);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card:focus-within {
  outline-color: rgba(251, 191, 36, 0.45);
}

[data-theme="dark"] .radio-options-group.mgr-likert-scale .mgr-likert-card.radio-option--selected .mgr-likert-card__label {
  color: var(--text-heading);
}

/* Multi-select choice rows (formbuilder) */
.checkbox-option {
  position: relative;
  user-select: none;
  border-width: 2px;
  border-style: solid;
  transition: background-color var(--duration-fast), border-color var(--duration-fast);
}
.checkbox-option--checked {
  background: #fefce8 !important;
  border-color: #f59e0b !important;
}
html:not([data-theme="dark"]) .checkbox-option:not(.checkbox-option--checked):hover:not(:has(input:disabled)) {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
}
[data-theme="dark"] .checkbox-option:not(.checkbox-option--checked) {
  background: var(--bg-surface-secondary) !important;
  border-color: var(--border-default) !important;
}
[data-theme="dark"] .checkbox-option:not(.checkbox-option--checked):hover:not(:has(input:disabled)) {
  background: var(--bg-surface-tertiary) !important;
  border-color: var(--border-strong) !important;
}
[data-theme="dark"] .checkbox-option--checked {
  background: var(--bg-warning-subtle) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.18);
}
[data-theme="dark"] .checkbox-option .text-sm {
  color: var(--text-body);
}
[data-theme="dark"] .checkbox-option--checked .text-sm {
  color: var(--text-heading);
}

/* Section answered state — green accent */
.section-field.snapshot-answered {
  border-right-color: #10b981 !important;
}
.section-field.snapshot-answered .snapshot-q-number {
  background: #d1fae5 !important;
  color: #059669 !important;
}
.section-field.snapshot-answered .snapshot-q-number::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(16, 185, 129, 0.1);
}

/* Snapshot read-only panel (manager profile / committee) */
.snapshot-readonly-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.snapshot-readonly-row {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.snapshot-readonly-row--empty {
  opacity: 0.72;
}
.snapshot-readonly-row--empty .snapshot-readonly-num {
  opacity: 0.85;
}
.snapshot-readonly-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.625rem;
  align-items: start;
}
.snapshot-readonly-label {
  grid-column: 2;
  grid-row: 1;
}
.snapshot-readonly-label--solo {
  grid-column: 1 / -1;
}
.snapshot-readonly-answer {
  grid-column: 2;
  grid-row: 2;
}
.snapshot-readonly-answer--solo {
  grid-column: 1 / -1;
  grid-row: 2;
}
.snapshot-readonly-num {
  grid-column: 1;
  grid-row: 1;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}
.snapshot-readonly-num--form {
  background: linear-gradient(135deg, #fed813, #f3c42e);
  color: #323232;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.snapshot-readonly-num--impact {
  background: linear-gradient(135deg, #fed813, #f3c42e);
  color: #323232;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.snapshot-readonly-num--potential {
  background: linear-gradient(135deg, #2fbea8, #0d9488);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
[data-theme="dark"] .snapshot-readonly-num--form,
[data-theme="dark"] .snapshot-readonly-num--impact {
  background: linear-gradient(135deg, #ca8a04, #a16207);
  color: #fef9c3;
}
[data-theme="dark"] .snapshot-readonly-num--potential {
  background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #ecfdf5;
}
.snapshot-readonly-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  border-width: 1.5px;
  border-style: solid;
}
/* پالت هم‌تراز getColorForIndex فرم کمیته */
.snapshot-readonly-badge--spectrum-high {
  background: rgba(47, 190, 168, 0.14);
  border-color: rgba(47, 190, 168, 0.55);
  color: #0d9488;
}
.snapshot-readonly-badge--spectrum-mid-high {
  background: rgba(86, 189, 170, 0.14);
  border-color: rgba(86, 189, 170, 0.55);
  color: #0f766e;
}
.snapshot-readonly-badge--spectrum-mid {
  background: rgba(236, 196, 74, 0.18);
  border-color: rgba(236, 196, 74, 0.65);
  color: #a16207;
}
.snapshot-readonly-badge--spectrum-low {
  background: rgba(253, 111, 149, 0.12);
  border-color: rgba(253, 111, 149, 0.55);
  color: #be123c;
}
.snapshot-readonly-badge--spectrum-lowest {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.6);
  color: #9f1239;
}
.snapshot-readonly-badge--spectrum-empty {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
[data-theme="dark"] .snapshot-readonly-badge--spectrum-high {
  background: rgba(47, 190, 168, 0.22);
  border-color: rgba(94, 234, 212, 0.45);
  color: #5eead4;
}
[data-theme="dark"] .snapshot-readonly-badge--spectrum-mid-high {
  background: rgba(86, 189, 170, 0.2);
  border-color: rgba(86, 189, 170, 0.45);
  color: #99f6e4;
}
[data-theme="dark"] .snapshot-readonly-badge--spectrum-mid {
  background: rgba(236, 196, 74, 0.18);
  border-color: rgba(250, 204, 21, 0.45);
  color: #fde68a;
}
[data-theme="dark"] .snapshot-readonly-badge--spectrum-low {
  background: rgba(253, 111, 149, 0.18);
  border-color: rgba(251, 113, 133, 0.45);
  color: #fda4af;
}
[data-theme="dark"] .snapshot-readonly-badge--spectrum-lowest {
  background: rgba(244, 63, 94, 0.2);
  border-color: rgba(244, 63, 94, 0.5);
  color: #fecdd3;
}
[data-theme="dark"] .snapshot-readonly-badge--spectrum-empty {
  background: rgba(51, 65, 85, 0.35);
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}
/* legacy aliases (backward compat) */
.snapshot-readonly-badge--negative { background: rgba(253, 111, 149, 0.12); border-color: rgba(253, 111, 149, 0.55); color: #be123c; }
.snapshot-readonly-badge--soft-negative { background: rgba(236, 196, 74, 0.18); border-color: rgba(236, 196, 74, 0.65); color: #a16207; }
.snapshot-readonly-badge--neutral { background: rgba(236, 196, 74, 0.18); border-color: rgba(236, 196, 74, 0.65); color: #a16207; }
.snapshot-readonly-badge--positive { background: rgba(86, 189, 170, 0.14); border-color: rgba(86, 189, 170, 0.55); color: #0f766e; }
.snapshot-readonly-badge--strong-positive { background: rgba(47, 190, 168, 0.14); border-color: rgba(47, 190, 168, 0.55); color: #0d9488; }
.snapshot-readonly-badge--no-info { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }

.snapshot-readonly-level-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.45;
  background: linear-gradient(135deg, rgba(254, 216, 19, 0.22), rgba(243, 196, 46, 0.16));
  border: 1px solid rgba(254, 216, 19, 0.55);
  color: #854d0e;
}
[data-theme="dark"] .snapshot-readonly-level-chip {
  background: linear-gradient(135deg, rgba(202, 138, 4, 0.28), rgba(161, 98, 7, 0.22));
  border-color: rgba(250, 204, 21, 0.45);
  color: #fde68a;
}

/* Answer completion indicator for section */
@keyframes answerSuccessBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.93); }
  100% { transform: scale(1); }
}
.section-field.answer-just-completed {
  border-right-color: #10b981 !important;
}
.section-field.answer-just-completed .snapshot-q-number {
  animation: answerSuccessBounce 0.5s ease-out;
}

/* Snapshot-specific progress bar (legacy) */
.snapshot-progress-bar {
  height: 4px;
  background: #f3f4f6;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 1rem;
}
.snapshot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #facc15, #f59e0b);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* Snapshot question number badge */
.snapshot-q-number {
  position: relative;
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 900;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

/* شمارهٔ سؤال اسنپ‌شات: پیش‌فرض کهربایی؛ پس از پاسخ سبز (--answered از تمپلیت یا JS) */
.snapshot-page-wrapper #self-eval-sections .fb-field-num.snapshot-field-num,
.snapshot-page-wrapper #snapshot-committee-extended-root .snapshot-q-number.snapshot-field-num,
.snapshot-page-wrapper #snapshot-committee-extended-root .fb-field-num.snapshot-field-num {
  background-color: #fef3c7;
  color: #d97706;
}
[data-theme="dark"] .snapshot-page-wrapper #self-eval-sections .fb-field-num.snapshot-field-num,
[data-theme="dark"] .snapshot-page-wrapper #snapshot-committee-extended-root .snapshot-q-number.snapshot-field-num,
[data-theme="dark"] .snapshot-page-wrapper #snapshot-committee-extended-root .fb-field-num.snapshot-field-num {
  background-color: rgba(180, 83, 9, 0.22);
  color: #fde68a;
}
.snapshot-page-wrapper #self-eval-sections .fb-field-num.snapshot-field-num.snapshot-field-num--answered,
.snapshot-page-wrapper #snapshot-committee-extended-root .snapshot-q-number.snapshot-field-num.snapshot-field-num--answered,
.snapshot-page-wrapper #snapshot-committee-extended-root .fb-field-num.snapshot-field-num.snapshot-field-num--answered {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}
[data-theme="dark"] .snapshot-page-wrapper #self-eval-sections .fb-field-num.snapshot-field-num.snapshot-field-num--answered,
[data-theme="dark"] .snapshot-page-wrapper #snapshot-committee-extended-root .snapshot-q-number.snapshot-field-num.snapshot-field-num--answered,
[data-theme="dark"] .snapshot-page-wrapper #snapshot-committee-extended-root .fb-field-num.snapshot-field-num.snapshot-field-num--answered {
  background-color: rgba(20, 83, 45, 0.38) !important;
  color: #bbf7d0 !important;
}

/* Snapshot header card */
.snapshot-header-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}
[data-theme="dark"] .snapshot-header-card {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.2) 0%, rgba(146, 64, 14, 0.15) 100%);
  border-color: rgba(217, 119, 6, 0.3);
}

/* Snapshot guide banner */
.snapshot-guide-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  transition: all var(--duration-normal) ease;
}
.snapshot-guide-banner:hover {
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}
[data-theme="dark"] .snapshot-guide-banner {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.15) 0%, rgba(29, 78, 216, 0.1) 100%);
  border-color: rgba(96, 165, 250, 0.3);
}

/* Custom select pickers (snapshot level + team sort toolbar) */
.snap-proposed-picker__native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.snap-proposed-picker__trigger {
  cursor: pointer;
  background-color: var(--bg-input, #fff);
}
.snap-proposed-picker__trigger:hover:not(:disabled) {
  border-color: var(--border-strong, #d1d5db);
}
.snap-proposed-picker__trigger--open {
  border-color: #fed813;
  box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.22);
}
.snap-proposed-picker__trigger--filled:not(.snap-proposed-picker__trigger--open) {
  border-color: rgba(16, 185, 129, 0.45);
}
/* Toolbar reuse (team sort): neutral border — green «filled» is for snapshot form fields only */
.snap-proposed-picker--toolbar .snap-proposed-picker__trigger--filled:not(.snap-proposed-picker__trigger--open) {
  border-color: var(--border-default, #e5e7eb);
}
[data-theme="dark"] .snap-proposed-picker--toolbar .snap-proposed-picker__trigger--filled:not(.snap-proposed-picker__trigger--open) {
  border-color: var(--border-default, #334155);
}
/* Team toolbar view toggle — match .input / .btn-secondary border weight + 38px height */
.team-view-mode-toggle {
  box-sizing: border-box;
  height: 38px;
  padding: 2px;
  border: 1.5px solid var(--border-medium);
  background: var(--bg-card);
}
.team-view-mode-toggle__btn {
  width: 31px;
  height: 31px;
  flex-shrink: 0;
}
[data-theme="dark"] .snap-proposed-picker__trigger {
  background-color: var(--bg-input, #1e293b);
}
[data-theme="dark"] .snap-proposed-picker__trigger--open {
  box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.14);
}
.snap-proposed-picker__option:hover {
  background-color: var(--bg-surface-secondary, #f9fafb);
}
.snap-proposed-picker__option--selected {
  background-color: rgba(254, 216, 19, 0.12);
}
[data-theme="dark"] .snap-proposed-picker__option:hover {
  background-color: rgba(51, 65, 85, 0.55);
}
[data-theme="dark"] .snap-proposed-picker__option--selected {
  background-color: rgba(254, 216, 19, 0.1);
}
.snap-proposed-picker__group-label {
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border-subtle, #e5e7eb);
  margin-bottom: 0.125rem;
}
[data-theme="dark"] .snap-proposed-picker__group-label {
  border-bottom-color: rgba(71, 85, 105, 0.65);
}
.snap-proposed-picker__check {
  border-color: var(--border-medium, #d1d5db);
  background-color: transparent;
  color: transparent;
}
[data-theme="dark"] .snap-proposed-picker__check {
  border-color: rgba(100, 116, 139, 0.85);
}
.snap-proposed-picker__option--selected .snap-proposed-picker__check {
  border-color: rgb(16 185 129);
  background-color: rgb(16 185 129);
  color: #fff;
}
.snap-proposed-picker--toolbar .snap-proposed-picker__option--selected .snap-proposed-picker__check {
  border-color: #323232;
  background-color: #fed813;
  color: #323232;
}
[data-theme="dark"] .snap-proposed-picker--toolbar .snap-proposed-picker__option--selected .snap-proposed-picker__check {
  border-color: #e6c30f;
  background-color: #e6c30f;
  color: #323232;
}
.snap-proposed-picker--toolbar .snap-proposed-picker__panel {
  min-width: 16.25rem;
}

/* HRBP committee review — badges اثرگذاری (هم‌تراز پالت کمیته + طلایی برای استثنایی) */
.dhabi-review-badge,
.committee-impact-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 100%;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  border-width: 1px;
  border-style: solid;
  white-space: nowrap;
}
.dhabi-review-badge__dot,
.committee-impact-badge__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  flex-shrink: 0;
  background-color: currentColor;
}
.dhabi-review-badge--exceptional,
.committee-impact-badge--exceptional {
  background: rgba(254, 216, 19, 0.2);
  border-color: rgba(243, 196, 46, 0.65);
  color: #323232;
}
.dhabi-review-badge--strong,
.committee-impact-badge--strong {
  background: rgba(47, 190, 168, 0.14);
  border-color: rgba(47, 190, 168, 0.55);
  color: #0d9488;
}
.dhabi-review-badge--mid,
.committee-impact-badge--mid {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(220, 38, 38, 0.45);
  color: #b91c1c;
}
.dhabi-review-badge--low,
.committee-impact-badge--low {
  background: rgba(253, 111, 149, 0.12);
  border-color: rgba(253, 111, 149, 0.55);
  color: #be123c;
}
.dhabi-review-badge--empty,
.committee-impact-badge--empty {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
[data-theme="dark"] .dhabi-review-badge--exceptional,
[data-theme="dark"] .committee-impact-badge--exceptional {
  background: rgba(254, 216, 19, 0.16);
  border-color: rgba(254, 216, 19, 0.45);
  color: #fbbf24;
}
[data-theme="dark"] .dhabi-review-badge--strong,
[data-theme="dark"] .committee-impact-badge--strong {
  background: rgba(47, 190, 168, 0.22);
  border-color: rgba(94, 234, 212, 0.45);
  color: #5eead4;
}
[data-theme="dark"] .dhabi-review-badge--mid,
[data-theme="dark"] .committee-impact-badge--mid {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}
[data-theme="dark"] .dhabi-review-badge--low,
[data-theme="dark"] .committee-impact-badge--low {
  background: rgba(253, 111, 149, 0.18);
  border-color: rgba(253, 111, 149, 0.45);
  color: #fda4af;
}
[data-theme="dark"] .dhabi-review-badge--empty,
[data-theme="dark"] .committee-impact-badge--empty {
  background: rgba(30, 41, 59, 0.5);
  border-color: #334155;
  color: #94a3b8;
}

/* HRBP Dubai review — sortable table headers */
.table th.text-center .dhabi-review-sort-link {
  justify-content: center;
  width: 100%;
}

.dhabi-review-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  padding: 0.25rem 0.375rem;
  margin: -0.25rem -0.375rem;
  border-radius: 0.5rem;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.35;
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.dhabi-review-sort-link__label {
  color: inherit;
}
.dhabi-review-sort-link:hover {
  color: var(--text-heading, #323232);
  background-color: rgba(254, 216, 19, 0.08);
}
.dhabi-review-sort-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.55);
}
.dhabi-review-sort-link--active {
  color: var(--text-heading, #323232);
}
.dhabi-review-sort-link--active .dhabi-review-sort-link__label {
  font-weight: 700;
}
.dhabi-review-sort-link--active .dhabi-review-sort-link__dir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.25rem;
  background-color: rgba(254, 216, 19, 0.22);
  color: var(--text-heading, #323232);
  flex-shrink: 0;
}
[data-theme="dark"] .dhabi-review-sort-link:hover {
  color: var(--text-heading, #ededed);
  background-color: rgba(254, 216, 19, 0.1);
}
[data-theme="dark"] .dhabi-review-sort-link--active {
  color: var(--text-heading, #ededed);
}
[data-theme="dark"] .dhabi-review-sort-link--active .dhabi-review-sort-link__dir {
  background-color: rgba(230, 195, 15, 0.2);
  color: #ededed;
}
.dhabi-review-sort-link__hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #9ca3af);
  opacity: 0.55;
  flex-shrink: 0;
  transition: opacity 150ms ease, color 150ms ease;
}
[data-theme="dark"] .dhabi-review-sort-link__hint {
  color: var(--text-muted, #737373);
  opacity: 0.7;
}
.dhabi-review-sort-link:hover .dhabi-review-sort-link__hint {
  opacity: 0.85;
  color: var(--text-secondary, #6b7280);
}

/* HRBP committee review — full-width balanced table */
.committee-review-results-card {
  /* overflow-hidden on .card breaks position:sticky on thead during page scroll */
  overflow: visible;
}
.committee-review-table-wrap.table-responsive .committee-review-table {
  min-width: 100%;
}
.committee-review-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 0;
}
.committee-review-table-wrap .committee-review-table {
  table-layout: fixed;
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.committee-review-table th,
.committee-review-table td {
  padding: 0.5rem 0.625rem;
  vertical-align: middle;
}
.committee-review-table thead th {
  position: sticky;
  top: var(--shell-header-h, 64px);
  z-index: 2;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  background: #f8fafc;
  border-bottom: 2px solid var(--border-light, #e5e7eb);
  box-shadow: 0 1px 0 #f8fafc;
}
[data-theme="dark"] .committee-review-table thead th {
  background: rgb(30, 41, 59);
  border-bottom-color: #334155;
  box-shadow: 0 1px 0 rgb(30, 41, 59);
}
[dir="rtl"] .card--flush .committee-review-table thead th:last-child {
  border-top-left-radius: var(--radius-lg);
}
[dir="rtl"] .card--flush .committee-review-table tbody tr:last-child td:last-child {
  border-bottom-left-radius: var(--radius-lg);
}
[dir="rtl"] .committee-review-table thead th:first-child,
[dir="rtl"] .committee-review-table tbody td:first-child {
  padding-inline-start: 0.75rem;
}
.committee-review-th-compact .dhabi-review-sort-link__label {
  letter-spacing: -0.01em;
}
/* all % — must sum to 100% (no rem col; rem caused left-edge dead gap in RTL) */
.committee-review-col-name { width: 15%; }
.committee-review-col-level { width: 11%; }
.committee-review-col-prior { width: 13%; }
.committee-review-col-value { width: 12%; }
.committee-review-col-impact { width: 7%; }
.committee-review-col-promotion { width: 7%; }
.committee-review-col-status { width: 7%; }
.committee-review-col-file { width: 4%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-name { width: 14%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-level { width: 10%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-dhabi { width: 7%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-prior { width: 12%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-value { width: 11%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-impact { width: 6%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-promotion { width: 6%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-status { width: 6%; }
.committee-review-table-wrap--with-dhabi .committee-review-col-file { width: 4%; }
.committee-review-cell-name .committee-review-name-text {
  line-height: 1.35;
  word-break: break-word;
}
.committee-review-level-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  line-height: 1.3;
  text-align: center;
}
.committee-review-level-stack__main {
  font-size: 0.75rem;
  font-weight: 600;
  word-break: break-word;
}
.committee-review-level-stack__sub {
  font-size: 0.6875rem;
  color: var(--text-muted, #6b7280);
  word-break: break-word;
}
.committee-review-cell-value {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary, #4b5563);
}
.committee-review-cell-value--potential {
  text-align: center;
  vertical-align: middle;
}
.committee-potential-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0.2rem 0.45rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  border: 1px solid transparent;
}
.committee-potential-badge--compact {
  width: 100%;
}
.committee-potential-badge__label {
  min-width: 0;
  word-break: break-word;
}
.committee-potential-badge--compact .committee-potential-badge__label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.committee-potential-badge--pot-1 {
  background: rgba(47, 190, 168, 0.18);
  border-color: rgba(47, 190, 168, 0.45);
  color: #0d9488;
}
.committee-potential-badge--pot-2 {
  background: rgba(254, 216, 19, 0.22);
  border-color: rgba(243, 196, 46, 0.55);
  color: #a16207;
}
.committee-potential-badge--pot-3 {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.4);
  color: #c2410c;
}
.committee-potential-badge--pot-4 {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: #be123c;
}
.committee-potential-badge--empty {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}
[data-theme="dark"] .committee-potential-badge--pot-1 {
  background: rgba(47, 190, 168, 0.22);
  border-color: rgba(94, 234, 212, 0.4);
  color: #5eead4;
}
[data-theme="dark"] .committee-potential-badge--pot-2 {
  background: rgba(254, 216, 19, 0.16);
  border-color: rgba(254, 216, 19, 0.42);
  color: #fbbf24;
}
[data-theme="dark"] .committee-potential-badge--pot-3 {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(251, 146, 60, 0.42);
  color: #fb923c;
}
[data-theme="dark"] .committee-potential-badge--pot-4 {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(253, 111, 149, 0.42);
  color: #fda4af;
}
[data-theme="dark"] .committee-potential-badge--empty {
  background: rgba(30, 41, 59, 0.5);
  border-color: #334155;
  color: #94a3b8;
}
.committee-review-cell-status {
  text-align: center;
}
.committee-review-th-file,
.committee-review-cell-file {
  padding-block: 0.5rem !important;
  padding-inline: 0 !important;
  text-align: center !important;
}
[dir="rtl"] .committee-review-th-file,
[dir="rtl"] .committee-review-cell-file {
  padding-inline-end: 0 !important;
  padding-inline-start: 0 !important;
}
.committee-review-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto;
  border-radius: 0.5rem;
  color: var(--text-muted, #9ca3af);
  text-decoration: none;
  vertical-align: middle;
}
.committee-review-file-icon--action {
  color: #92400e;
  transition: background-color 0.18s ease, color 0.18s ease;
}
.committee-review-file-icon--action:hover {
  background: rgba(254, 216, 19, 0.14);
  color: #78350f;
}
[data-theme="dark"] .committee-review-file-icon {
  color: #94a3b8;
}
[data-theme="dark"] .committee-review-file-icon--action {
  color: #fbbf24;
}
[data-theme="dark"] .committee-review-file-icon--action:hover {
  background: rgba(217, 119, 6, 0.18);
  color: #fde68a;
}
.committee-review-table .committee-impact-badge--compact {
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  gap: 0.3rem;
  max-width: 100%;
  white-space: nowrap;
}
.committee-promotion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
}
.committee-promotion-badge--compact {
  padding: 0.2rem 0.45rem;
  font-size: 0.625rem;
  white-space: normal;
  text-wrap: balance;
}
.committee-promotion-badge--success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.2);
}
.committee-promotion-badge--neutral {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.15);
}
.committee-promotion-badge--danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.45);
}
.committee-promotion-badge--muted {
  background: transparent;
  color: #94a3b8;
  font-weight: 500;
}
[data-theme="dark"] .committee-promotion-badge--success {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.28);
}
[data-theme="dark"] .committee-promotion-badge--neutral {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}
[data-theme="dark"] .committee-promotion-badge--danger {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.4);
}
[data-theme="dark"] .committee-promotion-badge--muted {
  color: #64748b;
}
.committee-review-table .committee-review-prior-dropdown__trigger {
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  min-height: 1.75rem;
}
@media (min-width: 1024px) {
  .committee-review-table-wrap {
    overflow-x: visible;
  }
  .committee-review-table-wrap .table-responsive .committee-review-table,
  .committee-review-table-wrap .committee-review-table {
    min-width: 0;
  }
}
@media (max-width: 1023px) {
  .committee-review-table-wrap .committee-review-table {
    min-width: 56rem;
  }
}

/* HRBP committee review — unified filter + search toolbar */
.committee-review-toolbar {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
[data-theme="dark"] .committee-review-toolbar {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.committee-review-toolbar__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem 0.75rem;
  padding: 0.625rem 0.875rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%);
  border-bottom: 1px solid var(--border-default, #e5e7eb);
}
/* جستجو اول در DOM → سمت راست در RTL */
.committee-review-toolbar__search {
  order: 1;
}
.committee-review-toolbar__divider {
  order: 2;
}
.committee-review-toolbar__filters {
  order: 3;
}
[data-theme="dark"] .committee-review-toolbar__bar {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.35) 100%);
  border-bottom-color: #334155;
}
.committee-review-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 14rem;
  min-width: 0;
}
.committee-review-toolbar__filters-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted, #6b7280);
}
.committee-review-toolbar__filters-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: rgba(254, 216, 19, 0.18);
  color: #92400e;
}
[data-theme="dark"] .committee-review-toolbar__filters-icon {
  background: rgba(254, 216, 19, 0.12);
  color: #fbbf24;
}
.committee-review-toolbar__divider {
  width: 1px;
  align-self: stretch;
  min-height: 2rem;
  background: var(--border-default, #e5e7eb);
  flex-shrink: 0;
  display: none;
}
.committee-review-toolbar__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}
.committee-review-search-field {
  position: relative;
  flex: 1;
  min-width: 0;
}
.committee-review-search-field__icon {
  pointer-events: none;
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: flex;
  align-items: center;
  padding-inline-start: 0.625rem;
  color: var(--text-muted, #9ca3af);
}
.committee-review-search-field__input {
  width: 100%;
  padding: 0.45rem 2rem 0.45rem 2rem;
  padding-inline-start: 2rem;
  padding-inline-end: 2rem;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.35;
  direction: rtl;
  text-align: start;
  border-radius: 999px;
  border: 1.5px solid var(--border-medium, #d1d5db);
  background: var(--bg-card, #fff);
  color: var(--text-primary, #1f2937);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}
.committee-review-search-field__input::placeholder {
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text-muted, #9ca3af);
}
.committee-review-search-field__input:hover {
  border-color: #fcd34d;
}
.committee-review-search-field__input:focus {
  outline: none;
  border-color: #f3c42e;
  box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.22);
}
[data-theme="dark"] .committee-review-search-field__input {
  background: rgba(15, 23, 42, 0.55);
  border-color: #475569;
  color: #f3f4f6;
}
.committee-review-search-field__clear {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  display: flex;
  align-items: center;
  padding-inline-end: 0.5rem;
  color: var(--text-muted, #9ca3af);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.committee-review-search-field__clear:hover {
  color: var(--text-heading, #111827);
}
.committee-review-search-loading {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 2rem;
  display: none;
  align-items: center;
  color: var(--text-muted, #9ca3af);
  pointer-events: none;
}
.committee-review-search-loading.htmx-request {
  display: flex;
}
.committee-review-search-field__clear:not(.hidden) ~ .committee-review-search-loading {
  inset-inline-end: 2.5rem;
}
.committee-review-search-meta {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  white-space: nowrap;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}
@media (min-width: 768px) {
  .committee-review-toolbar__bar {
    flex-wrap: nowrap;
    padding: 0.5rem 1rem;
  }
  .committee-review-toolbar__divider {
    display: block;
  }
  .committee-review-toolbar__search {
    width: auto;
    min-width: 13.5rem;
    max-width: 17rem;
  }
}
@media (min-width: 1280px) {
  .committee-review-toolbar__search {
    min-width: 15rem;
    max-width: 19rem;
  }
}
.committee-review-level-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.375rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.125rem;
  scroll-padding-inline: 0.5rem;
  flex: 1;
  min-width: 0;
}
.committee-review-level-filters::-webkit-scrollbar {
  height: 4px;
}
.committee-review-level-filters::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}
.filter-pill.filter-pill--committee-level {
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  gap: 0.375rem;
  border-radius: 999px;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow 0.2s ease,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.filter-pill.filter-pill--committee-level:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.filter-pill.filter-pill--committee-level.active {
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.35);
}
.filter-pill.filter-pill--committee-level .filter-pill__label {
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filter-pill.filter-pill--technical .filter-pill__label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.filter-pill.filter-pill--missing {
  border-style: dashed;
  color: var(--text-muted);
}
.filter-pill.filter-pill--missing.active {
  border-style: solid;
}
.filter-pill.filter-pill--committee-notice {
  flex-shrink: 0;
  padding: 0.3rem 0.7rem;
  gap: 0.375rem;
  border-radius: 999px;
  border-color: rgba(234, 88, 12, 0.28);
  color: #c2410c;
  background: rgba(255, 247, 237, 0.92);
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow 0.2s ease,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.filter-pill.filter-pill--committee-notice:hover {
  transform: translateY(-1px);
  border-color: rgba(234, 88, 12, 0.45);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.12);
}
.filter-pill.filter-pill--committee-notice.active {
  border-color: rgba(234, 88, 12, 0.55);
  background: rgba(254, 215, 170, 0.95);
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.28);
}
[data-theme="dark"] .filter-pill.filter-pill--committee-notice {
  color: #fdba74;
  border-color: rgba(251, 146, 60, 0.28);
  background: rgba(124, 45, 18, 0.35);
}
[data-theme="dark"] .filter-pill.filter-pill--committee-notice.active {
  background: rgba(154, 52, 18, 0.55);
  box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.22);
}
.committee-review-toolbar__filters-icon--notice {
  background: rgba(251, 146, 60, 0.18);
  color: #c2410c;
}
[data-theme="dark"] .committee-review-toolbar__filters-icon--notice {
  background: rgba(251, 146, 60, 0.14);
  color: #fdba74;
}
.committee-review-toolbar__notice-filter {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  order: 4;
}
.committee-review-toolbar__divider--notice {
  order: 4;
  display: block;
}
.committee-review-notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 999px;
  color: #c2410c;
  background: rgba(254, 215, 170, 0.9);
  border: 1px solid rgba(251, 146, 60, 0.45);
}
[data-theme="dark"] .committee-review-notice-badge {
  color: #fdba74;
  background: rgba(124, 45, 18, 0.55);
  border-color: rgba(251, 146, 60, 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .filter-pill.filter-pill--committee-notice {
    transition: none;
  }
  .filter-pill.filter-pill--committee-notice:hover {
    transform: none;
    box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .filter-pill.filter-pill--committee-level {
    transition: none;
  }
  .filter-pill.filter-pill--committee-level:hover {
    transform: none;
    box-shadow: none;
  }
}

/* HRBP committee review — inline prior baseline picker */
.committee-review-prior-cell {
  vertical-align: middle;
  min-width: 0;
  max-width: none;
  overflow: hidden;
}
.committee-review-prior-cell--impact {
  min-width: 0;
}
.committee-review-prior-dropdown {
  position: relative;
  width: 100%;
}
.committee-review-prior-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  width: 100%;
  padding: 0.375rem 0.5rem;
  border-radius: 0.625rem;
  border: 1px dashed #d1d5db;
  background: rgba(248, 250, 252, 0.9);
  color: #4b5563;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger {
  border-color: #475569;
  background: rgba(30, 41, 59, 0.55);
  color: #cbd5e1;
}
.committee-review-prior-dropdown__trigger:hover:not(:disabled) {
  border-color: #fcd34d;
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.16);
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger:hover:not(:disabled) {
  border-color: rgba(252, 211, 77, 0.45);
  background: rgba(217, 119, 6, 0.12);
}
.committee-review-prior-dropdown__trigger--filled {
  border-style: solid;
  border-color: #e5e7eb;
  background: #fff;
  color: #1f2937;
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger--filled {
  border-color: #374151;
  background: rgba(15, 23, 42, 0.65);
  color: #f3f4f6;
}
.committee-review-prior-dropdown__trigger--pot-1 {
  border-color: rgba(47, 190, 168, 0.55);
  background: rgba(47, 190, 168, 0.12);
  color: #0d9488;
}
.committee-review-prior-dropdown__trigger--pot-2 {
  border-color: rgba(243, 196, 46, 0.55);
  background: rgba(254, 216, 19, 0.14);
  color: #a16207;
}
.committee-review-prior-dropdown__trigger--pot-3 {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.1);
  color: #c2410c;
}
.committee-review-prior-dropdown__trigger--pot-4 {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.1);
  color: #be123c;
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger--pot-1 {
  border-color: rgba(94, 234, 212, 0.45);
  background: rgba(47, 190, 168, 0.18);
  color: #5eead4;
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger--pot-2 {
  border-color: rgba(254, 216, 19, 0.42);
  background: rgba(254, 216, 19, 0.12);
  color: #fbbf24;
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger--pot-3 {
  border-color: rgba(251, 146, 60, 0.42);
  background: rgba(249, 115, 22, 0.14);
  color: #fb923c;
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger--pot-4 {
  border-color: rgba(253, 111, 149, 0.42);
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
}
.committee-review-prior-dropdown__trigger:disabled {
  opacity: 0.65;
  cursor: wait;
}
.committee-review-prior-dropdown__trigger-main {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  flex: 1;
}
.committee-review-prior-dropdown__trigger-icon {
  display: inline-flex;
  color: #d97706;
}
[data-theme="dark"] .committee-review-prior-dropdown__trigger-icon {
  color: #fbbf24;
}
.committee-review-prior-dropdown__trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.committee-review-prior-dropdown__chevron {
  display: inline-flex;
  color: var(--text-muted, #9ca3af);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.committee-review-prior-dropdown__chevron--open {
  transform: rotate(180deg);
}
.committee-review-prior-dropdown__panel {
  border-radius: 0.875rem;
  border: 1px solid var(--border-default, #e5e7eb);
  background: var(--bg-surface, #fff);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 0.625rem;
}
[data-theme="dark"] .committee-review-prior-dropdown__panel {
  background: var(--bg-surface, #1e293b);
  border-color: #334155;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.committee-review-prior-dropdown__panel-head {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-default, #f3f4f6);
}
[data-theme="dark"] .committee-review-prior-dropdown__panel-head {
  border-bottom-color: #334155;
}
.committee-review-prior-dropdown__panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-heading, #111827);
  margin: 0;
}
.committee-review-prior-dropdown__panel-hint {
  font-size: 0.625rem;
  line-height: 1.45;
  color: var(--text-muted, #9ca3af);
  margin: 0.125rem 0 0;
}
.committee-review-prior-editor__fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.committee-review-prior-editor__pills {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.committee-review-prior-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.5rem;
  border-radius: 0.625rem;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
[data-theme="dark"] .committee-review-prior-pill {
  border-color: #374151;
  background: rgba(15, 23, 42, 0.55);
  color: #e5e7eb;
}
.committee-review-prior-pill:hover:not(:disabled) {
  border-color: #fcd34d;
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.18);
  transform: translateY(-1px);
}
[data-theme="dark"] .committee-review-prior-pill:hover:not(:disabled) {
  border-color: rgba(252, 211, 77, 0.45);
  background: rgba(217, 119, 6, 0.1);
}
.committee-review-prior-pill:disabled {
  opacity: 0.65;
  cursor: wait;
}
.committee-review-prior-pill__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
  background: #f3f4f6;
  color: #6b7280;
}
.committee-review-prior-pill--pot-1 .committee-review-prior-pill__badge {
  background: rgba(47, 190, 168, 0.18);
  color: #0d9488;
}
.committee-review-prior-pill--pot-2 .committee-review-prior-pill__badge {
  background: rgba(254, 216, 19, 0.22);
  color: #a16207;
}
.committee-review-prior-pill--pot-3 .committee-review-prior-pill__badge {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
}
.committee-review-prior-pill--pot-4 .committee-review-prior-pill__badge {
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}
.committee-review-prior-pill--impact-exceptional .committee-review-prior-pill__badge {
  background: rgba(254, 216, 19, 0.25);
  color: #854d0e;
}
.committee-review-prior-pill--impact-strong .committee-review-prior-pill__badge {
  background: rgba(47, 190, 168, 0.18);
  color: #0d9488;
}
.committee-review-prior-pill--impact-mid .committee-review-prior-pill__badge {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}
.committee-review-prior-pill--impact-low .committee-review-prior-pill__badge {
  background: rgba(253, 111, 149, 0.14);
  color: #be123c;
}
.committee-review-prior-pill--selected {
  border-color: #f3c42e;
  box-shadow: 0 0 0 2px rgba(243, 196, 46, 0.28);
  background: rgba(254, 216, 19, 0.08);
}
.committee-review-prior-pill__label {
  flex: 1;
  min-width: 0;
}
.committee-review-prior-pill__spinner {
  flex-shrink: 0;
  color: var(--text-muted, #9ca3af);
}
.committee-review-prior-readonly {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}
.committee-review-prior-readonly__text {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-heading, #1f2937);
}
[data-theme="dark"] .committee-review-prior-readonly__text {
  color: #f3f4f6;
}
@media (prefers-reduced-motion: reduce) {
  .committee-review-prior-pill,
  .committee-review-prior-dropdown__trigger,
  .committee-review-prior-dropdown__chevron {
    transition: none;
  }
  .committee-review-prior-pill:hover:not(:disabled) {
    transform: none;
  }
  .committee-review-prior-dropdown__chevron--open {
    transform: none;
  }
}

/* Snapshot footer status pill */
.snapshot-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.snapshot-status-pill--draft {
  background: #fef3c7;
  color: #92400e;
}
.snapshot-status-pill--new {
  background: #f3f4f6;
  color: #6b7280;
}

/* Quill editor active state */
.quill-click-edit.quill-active {
  border-color: #fed813 !important;
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.2), 0 6px 18px rgba(17, 24, 39, 0.07);
}

/* Rich Text Editor - New Design */
.rich-text-container {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  transition: border-color var(--duration-normal), box-shadow var(--duration-normal);
}

.rich-text-container:hover {
  border-color: #fcd34d;
  box-shadow: 0 4px 12px rgba(254, 216, 19, 0.15);
}

.rich-text-container.rich-text-active {
  border-color: #fed813;
  box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.2), 0 6px 20px rgba(17, 24, 39, 0.08);
}

.rich-text-toolbar {
  background: linear-gradient(180deg, #fafbfc 0%, #f3f4f6 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
}

.rich-text-toolbar .toolbar-sep {
  width: 1px;
  height: 20px;
  background: #d1d5db;
  margin: 0 4px;
  flex-shrink: 0;
}

.rich-text-toolbar .toolbar-sep.flex-1 {
  width: auto;
  height: auto;
  background: none;
}

.rich-text-toolbar .toolbar-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: #4b5563;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
  padding: 0;
}

.rich-text-toolbar .toolbar-btn:hover {
  background: #fff;
  border-color: #d1d5db;
  color: #111827;
}

.rich-text-toolbar .toolbar-btn.active {
  background: #fed813;
  border-color: #eab308;
  color: #1f2937;
  font-weight: 600;
}

.rich-text-toolbar .toolbar-btn svg {
  pointer-events: none;
}

.quill-editor-area {
  min-height: 200px;
  background: #fff;
  cursor: text;
  transition: background 0.2s ease;
}

.quill-editor-area:focus-within {
  background: #fffef5;
}

.rich-text-container .quill-editor {
  min-height: 180px;
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
  color: #1f2937;
  outline: none;
}

.rich-text-container .quill-editor:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}

.rich-text-container .quill-editor p {
  margin-bottom: 0.5em;
}

.rich-text-container .quill-editor ul,
.rich-text-container .quill-editor ol {
  padding-right: 1.5em;
  margin-bottom: 0.5em;
}

/* Fix RTL ordered list: number overlapping with first word */
.rich-text-container .ql-editor ol li.ql-direction-rtl::before,
.rich-text-container .quill-editor ol li.ql-direction-rtl::before {
  width: 2em;
  min-width: 2em;
  margin-left: 0.5em;
  margin-right: -1.5em;
}
.rich-text-container .ql-editor ol li.ql-direction-rtl,
.rich-text-container .quill-editor ol li.ql-direction-rtl {
  padding-right: 2em;
}
.rich-text-container .ql-editor ol,
.rich-text-container .quill-editor ol {
  padding-left: 0;
  padding-right: 0;
}

.rich-text-container .quill-editor a {
  color: #2563eb;
  text-decoration: underline;
}

.rich-text-container .quill-editor img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

/* Hide default Quill toolbar when using custom toolbar */
.rich-text-container .ql-toolbar {
  display: none !important;
}

.rich-text-container .ql-container {
  border: none !important;
  font-family: 'Vazirmatn', sans-serif;
}

.rich-text-container .ql-editor {
  padding: 0;
  min-height: 180px;
}

.rich-text-container .ql-editor.ql-blank::before {
  font-style: normal;
  color: #9ca3af;
  right: 0;
  left: auto;
}

/* RTL defaults for Quill */
.rich-text-container .ql-editor {
  direction: rtl;
  text-align: right;
}

.rich-text-container .ql-editor .ql-direction-rtl {
  text-align: right;
}

/* Fullscreen Mode */
.rich-text-fullscreen {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  max-width: none !important;
  box-shadow: none !important;
  background: #fafafa !important;
  overflow: hidden !important;
}

.rich-text-fullscreen .rich-text-toolbar {
  padding: 10px 32px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.rich-text-fullscreen .quill-editor-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0 !important;
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 32px 80px;
  background: #fff;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

.rich-text-fullscreen .quill-editor-area .quill-editor,
.rich-text-fullscreen .quill-editor-area .ql-editor {
  min-height: 100% !important;
  font-size: 16px;
  line-height: 2.1;
}

.rich-text-fullscreen .toolbar-btn-fullscreen {
  display: none;
}

/* Exit fullscreen button */
.fs-exit-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-family: 'Vazirmatn', sans-serif;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background-color var(--duration-fast), transform var(--duration-fast);
}

.fs-exit-btn:hover {
  background: #374151;
  transform: scale(1.05);
}

.fs-exit-btn svg {
  pointer-events: none;
}

.fs-exit-btn.hidden {
  display: none !important;
}

/* When in native fullscreen, position exit btn absolutely inside the container */
.rich-text-fullscreen .fs-exit-btn {
  position: absolute;
  display: flex !important;
}

body.rich-text-fs-active {
  overflow: hidden !important;
}

/* ===== LOGIN ===== */
.login-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  padding: 1rem;
}

.login-box {
  background: white;
  border-radius: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.03);
  width: 100%; max-width: 420px;
  padding: 2.5rem;
  animation: scaleIn 0.35s ease-out;
}

.login-logo {
  width: 56px; height: 56px;
  border-radius: 0.75rem;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
}
.login-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  min-height: 16rem;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.empty-state--compact {
  padding: 2rem 1.5rem;
  min-height: 10rem;
}

.empty-state--warning {
  border-color: var(--warning-500);
  background: var(--bg-warning-subtle);
}

.empty-state--info {
  border-color: var(--info-500);
  background: var(--bg-info-subtle);
}

.empty-state-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--bg-surface-tertiary);
}

.empty-state-icon-wrapper--warning {
  background: rgba(245, 158, 11, 0.15);
}

.empty-state-icon-wrapper--info {
  background: rgba(59, 130, 246, 0.15);
}

.empty-state-svg-icon {
  color: var(--text-muted);
  width: 40px;
  height: 40px;
}

.empty-state--warning .empty-state-svg-icon {
  color: var(--warning-500);
}

.empty-state--info .empty-state-svg-icon {
  color: var(--info-500);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  line-height: 1;
}

.empty-state-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  color: var(--text-muted-foreground);
  max-width: 28rem;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.empty-state-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

[data-theme="dark"] .empty-state {
  background: var(--bg-card);
  border-color: var(--border-medium);
}

[data-theme="dark"] .empty-state--warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .empty-state--info {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .empty-state-icon-wrapper {
  background: var(--bg-surface-tertiary);
}

[data-theme="dark"] .empty-state-icon-wrapper--warning {
  background: rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .empty-state-icon-wrapper--info {
  background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .empty-state-svg-icon {
  color: var(--text-muted-foreground);
}

[data-theme="dark"] .empty-state--warning .empty-state-svg-icon {
  color: var(--warning-500);
}

[data-theme="dark"] .empty-state--info .empty-state-svg-icon {
  color: var(--info-500);
}

/* ===== SEMANTIC UTILITY CLASSES ===== */
/* These map to CSS variables so they auto-switch in dark mode */

/* Surfaces */
.bg-surface          { background-color: var(--bg-surface); }
.bg-surface-secondary { background-color: var(--bg-surface-secondary); }
.bg-surface-tertiary { background-color: var(--bg-surface-tertiary); }
.bg-surface-hover    { background-color: var(--bg-surface-hover); }

/* Text */
.text-heading        { color: var(--text-heading); }
.text-body           { color: var(--text-body); }
.text-muted-fg       { color: var(--text-muted-foreground); }
.text-placeholder    { color: var(--text-placeholder); }
.text-disabled       { color: var(--text-disabled); }
.text-inverse        { color: var(--text-inverse); }
.text-link           { color: var(--text-link); }
.text-link:hover     { color: var(--text-link-hover); }

/* Borders */
.border-default      { border-color: var(--border-default); }
.border-subtle       { border-color: var(--border-subtle); }
.border-strong       { border-color: var(--border-strong); }

/* Status text colors (standalone) */
.text-success        { color: var(--text-success); }
.text-warning        { color: var(--text-warning); }
.text-error          { color: var(--text-error); }
.text-info           { color: var(--text-info); }
.text-purple         { color: var(--text-purple); }

/* Status surfaces */
.bg-success-subtle   { background-color: var(--bg-success-subtle); color: var(--text-success); }
.bg-warning-subtle   { background-color: var(--bg-warning-subtle); color: var(--text-warning); }
.bg-error-subtle     { background-color: var(--bg-error-subtle); color: var(--text-error); }
.bg-info-subtle      { background-color: var(--bg-info-subtle); color: var(--text-info); }
.bg-gold-subtle      { background-color: var(--bg-gold-subtle); color: var(--text-gold); }
.bg-purple-subtle    { background-color: var(--bg-purple-subtle); color: var(--text-purple); }

/* Input surfaces */
.bg-input            { background-color: var(--bg-input); }

/* Overlay */
.bg-overlay          { background-color: var(--bg-overlay); }

/* Interactive hover helpers */
.hover\:bg-surface-hover:hover { background-color: var(--bg-surface-hover); }
.hover\:bg-surface-secondary\/80:hover {
  background-color: rgba(249, 250, 251, 0.88);
}
[data-theme="dark"] .hover\:bg-surface-secondary\/80:hover {
  background-color: rgba(51, 65, 85, 0.72);
}
.hover\:bg-surface-active:hover { background-color: var(--bg-surface-active); }
.hover\:text-heading:hover { color: var(--text-heading); }
.hover\:text-link:hover { color: var(--text-link-hover); }

/* Divide colors */
.divide-default > * + * { border-color: var(--border-default); }
.divide-subtle > * + * { border-color: var(--border-subtle); }

/* Focus ring */
.focus-ring:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(254, 216, 19, 0.15);
}

/* ===== FILTER TABS / PILLS ===== */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
  border: 1.5px solid var(--border-medium);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.filter-tab:hover {
  border-color: var(--gold);
  background: var(--gold-light);
  color: var(--jet);
}

.filter-tab.active {
  background: linear-gradient(135deg, var(--gold-light), #fff8d4);
  border-color: var(--gold);
  color: var(--jet);
  box-shadow: 0 2px 8px rgba(254, 216, 19, 0.2);
}

/* ═══════════════════════════════════════════════════
   TABS — Underline style for main page navigation
   ═══════════════════════════════════════════════════ */

.tab-group {
  display: flex;
  gap: 0.25rem;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-item {
  position: relative;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.tab-item:hover {
  color: var(--gold-700);
}

.tab-item.active,
.tab-item[aria-selected="true"] {
  color: var(--gold-700);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* Count badge inside tab */
.tab-item .tab-count {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--gold-100);
  color: var(--gold-800);
  padding: 0.1em 0.5em;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
}

.tab-item.active .tab-count {
  background: var(--gold);
  color: var(--jet);
}

/* Dark mode */
[data-theme="dark"] .tab-group {
  border-bottom-color: var(--border-medium);
}
[data-theme="dark"] .tab-item {
  color: var(--text-secondary);
}
[data-theme="dark"] .tab-item:hover {
  color: var(--gold-300);
}
[data-theme="dark"] .tab-item.active {
  color: var(--gold-300);
  border-bottom-color: var(--gold);
}
[data-theme="dark"] .tab-item .tab-count {
  background: var(--gold-100);
  color: var(--gold-800);
}
[data-theme="dark"] .tab-item.active .tab-count {
  background: var(--gold);
  color: var(--jet);
}


/* ═══════════════════════════════════════════════════
   FILTER PILLS — For status/category filtering
   ═══════════════════════════════════════════════════ */

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-pill {
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  text-decoration: none;
  line-height: 1.4;
}

.filter-pill:hover {
  border-color: var(--gold-300);
  background: var(--gold-50);
  color: var(--text-primary);
}

.filter-pill.active,
.filter-pill[aria-selected="true"] {
  background: var(--gold-100);
  border-color: var(--gold);
  color: var(--gold-800);
  font-weight: 600;
}

/* Count badge inside filter pill */
.filter-pill .filter-count {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--border-light);
  color: var(--text-muted);
  padding: 0.1em 0.45em;
  border-radius: 999px;
  min-width: 1.1rem;
  text-align: center;
}

.filter-pill.active .filter-count {
  background: var(--gold);
  color: var(--jet);
}

/* Dark mode */
[data-theme="dark"] .filter-pill {
  background: var(--bg-card);
  border-color: var(--border-medium);
  color: var(--text-secondary);
}
[data-theme="dark"] .filter-pill:hover {
  border-color: var(--gold-300);
  background: var(--gold-50);
}
[data-theme="dark"] .filter-pill.active {
  background: var(--gold-100);
  border-color: var(--gold);
  color: var(--gold-800);
}

.filter-pill.filter-pill--issues {
  border-color: rgba(248, 113, 113, 0.55);
}
.filter-pill.filter-pill--issues:hover {
  background: rgba(254, 226, 226, 0.65);
  border-color: rgba(239, 68, 68, 0.65);
}
.filter-pill.filter-pill--issues.active {
  background: rgba(254, 202, 202, 0.85);
  border-color: rgba(220, 38, 38, 0.75);
  color: var(--error-800, #991b1b);
}
.filter-pill .filter-count.filter-count--issues {
  background: #ef4444;
  color: #fff;
}
[data-theme="dark"] .filter-pill.filter-pill--issues {
  border-color: rgba(248, 113, 113, 0.35);
}
[data-theme="dark"] .filter-pill.filter-pill--issues:hover {
  background: rgba(127, 29, 29, 0.25);
}
[data-theme="dark"] .filter-pill.filter-pill--issues.active {
  background: rgba(127, 29, 29, 0.45);
  color: #fecaca;
}

.team-list-loading-toast.htmx-request {
  display: flex !important;
  align-items: center;
  justify-content: center;
}


/* ═══════════════════════════════════════════════════
   STATUS DOTS — Small colored circles for status
   ═══════════════════════════════════════════════════ */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot--success { background: var(--success-500); }
.status-dot--warning { background: var(--warning-500); }
.status-dot--error   { background: var(--error-500); }
.status-dot--info    { background: var(--info-500); }
.status-dot--gold    { background: var(--gold); }
.status-dot--gray    { background: var(--text-muted); }

.status-dot--pulse {
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.page-header__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

.page-header .page-title {
  margin-bottom: 0.15rem;
}

.page-header .page-subtitle {
  margin-bottom: 0;
}

.page-header h1 { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; }
.page-header p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.35rem; }


/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.section-header__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}


/* ===== CARD MODIFIERS ===== */
.card--compact {
  padding: 1rem;
}

.card--spacious {
  padding: 1.5rem;
}

.card--flush {
  padding: 0;
}

@media (max-width: 640px) {
  .card--compact {
    padding: 0.75rem;
  }
  .card--spacious {
    padding: 1.25rem;
  }
}

/* ===== UTILITIES ===== */
.text-gold { color: var(--gold); }
.bg-gold { background-color: var(--gold); }
.border-gold { border-color: var(--gold); }
.ring-gold:focus { box-shadow: 0 0 0 3px rgba(254,216,19,0.3); }

.self-guide {
  border-right: 3px solid var(--gold);
  background: #fffbeb;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  color: #92400e;
  font-size: 0.8rem;
  line-height: 1.7;
}

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* ===== Fake-Date Test Widget ===== */
.fake-date-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.fake-date-btn--icon-only {
  gap: 0;
  padding: 0.45rem;
  justify-content: center;
  white-space: normal;
}

.fake-date-btn:hover { border-color: #d1d5db; background: #eef2f7; }

.fake-date-btn-active {
  background: rgba(254, 216, 19, 0.12) !important;
  border-color: #fed813 !important;
  color: #78350f !important;
  animation: pulse-gold 2s infinite;
}

.fake-date-badge {
  font-size: 0.6rem;
  font-weight: 800;
  background: #ca8a04;
  color: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.fake-date-dropdown {
  position: absolute;
  top: 110%;
  width: 300px;
  min-width: 260px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  z-index: 200;
}
.fake-date-dropdown--end {
  inset-inline-end: 0;
}
.fake-date-dropdown--start {
  inset-inline-start: 0;
}

/* Jalali date trigger (matches cycle_create) — used by React & Django.
   Scoped to inputs/textareas/selects only — applying width:100% to a sibling
   <button type="button"> with flex-shrink:0 used to consume the entire flex
   row, leaving the actual text input squeezed to 0. */
input.jalali-date-trigger,
textarea.jalali-date-trigger,
select.jalali-date-trigger {
  width: 100%;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  text-align: right;
  font-size: 0.9375rem;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
input.jalali-date-trigger:hover,
textarea.jalali-date-trigger:hover,
select.jalali-date-trigger:hover { border-color: #9ca3af; }
input.jalali-date-trigger:focus,
textarea.jalali-date-trigger:focus,
select.jalali-date-trigger:focus {
  outline: none;
  border: 2px solid #EAB308;
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}
input.jalali-date-trigger.open,
textarea.jalali-date-trigger.open,
select.jalali-date-trigger.open { border-color: #EAB308; }

/* Match fake-date-dropdown appearance — position set by JS when used in forms */
.jalali-date-dropdown {
  width: 300px;
  min-width: 300px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.jalali-date-dropdown .jalali-date-cal {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  min-width: 0;
  overflow: hidden;
}

.jalali-date-dropdown .jalali-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}

.jalali-date-dropdown .jalali-date-header .shamsi-cal-nav {
  flex-shrink: 0;
}

.jalali-date-dropdown .jalali-date-month {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
}

.jalali-date-month--clickable {
  cursor: pointer;
  border: none;
  background: transparent;
  font: inherit;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 100%;
}
.jalali-date-month--clickable:hover {
  background: #fff8d4;
}
.jalali-date-month--clickable:focus {
  outline: 2px solid #EAB308;
  outline-offset: 1px;
}

.jalali-date-trigger[type="text"] {
  cursor: text;
}

/* React admin: فیلد تاریخ ترکیبی — بدون حاشیه داخلی تکراری */
.jalali-date-composite input[type="text"] {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 0 !important;
}

.jalali-date-dropdown .shamsi-cal-grid--months {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.jalali-date-dropdown .shamsi-cal-grid--months .shamsi-cal-day {
  aspect-ratio: auto;
  min-height: 36px;
  font-size: 0.72rem;
  padding: 4px 2px;
  line-height: 1.2;
}

.jalali-date-dropdown .shamsi-cal-grid--years {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.jalali-date-dropdown .shamsi-cal-grid--years .shamsi-cal-day {
  aspect-ratio: auto;
  min-height: 36px;
}

.jalali-date-dropdown .jalali-date-footer {
  padding: 0.75rem 1rem;
  background: #fafafa;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
}

.jalali-date-dropdown .jalali-date-selected-text strong {
  color: #374151;
  font-weight: 600;
}

/* Grid & weekdays: prevent overflow — allow columns to shrink */
.jalali-date-dropdown .shamsi-cal-weekdays {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
}

.jalali-date-dropdown .shamsi-cal-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
}

/* ── Jalali picker: مودال وسط صفحه (teleport به body) ──
   ریشهٔ باگ «یک کلیک باز و بلافصله بسته»: دکمهٔ بازکننده داخل DOM صفحه می‌ماند و
   مودال teleport به body می‌شود؛ اگر اشاره گر به زیر بازگردد (stacking/transitions)
   کلیک بعدی مستقیم روی دکمه می‌نشیند و open = !open دوباره اجرا می‌شود.

   قرارداد عمومی برای مودال‌های تمام‌صفحهٔ teleport‌شدهٔ بعدی همین دو بخش است:
   ۱) کلاس بدنهٔ قفل (اینجا: jalali-picker-modal-open)
   ۲) روت پورتال با کلاس متمایز (.jalali-picker-portal یا مشابه) که از body >
      * pointer-events مستثنی شده است؛ بسته شدن پیش از فاز کلیک با @mousedown.self

   تأیید: confirm-modal/page-modal در این فایل الگوی pointer-events مختص خود را دارند. */
body.jalali-picker-modal-open {
  overflow: hidden !important;
}

/* هر فرزند مستقیم body غیر از پورتال تقویم: غیرفعال اشاره گر تا کلیک دور نریزد. */
body.jalali-picker-modal-open > *:not(.jalali-picker-portal) {
  pointer-events: none !important;
}

body.jalali-picker-modal-open > .jalali-picker-portal,
body.jalali-picker-modal-open > .jalali-picker-portal * {
  pointer-events: auto !important;
}

.jalali-date-dropdown.jalali-date-dropdown--modal {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.jalali-date-dropdown.jalali-date-dropdown--modal .jalali-date-cal {
  padding: 0;
  border-bottom: 1px solid #f3f4f6;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .jalali-date-cal {
  border-bottom-color: #374151;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .jalali-date-month {
  color: #f9fafb;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .jalali-date-footer {
  background: #111827;
  color: #9ca3af;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .jalali-date-selected-text strong {
  color: #e5e7eb;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .shamsi-cal-day {
  background: #374151;
  color: #e5e7eb;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .shamsi-cal-day:hover {
  background: #4b5563;
  border-color: #6b7280;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .shamsi-cal-wd {
  color: #9ca3af;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .shamsi-cal-nav {
  background: #374151;
  border-color: #4b5563;
  color: #e5e7eb;
}

[data-theme="dark"] .jalali-date-dropdown.jalali-date-dropdown--modal .shamsi-cal-nav:hover {
  background: #4b5563;
  border-color: #6b7280;
}

.jalali-date-dropdown .shamsi-cal-wd {
  min-width: 0;
  overflow: hidden;
}

.jalali-date-dropdown .shamsi-cal-day {
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
}

/* Selected day: light yellow bg + distinct yellow border (match fake-date) */
.jalali-date-dropdown .shamsi-cal-day-selected {
  background: var(--gold-light) !important;
  border: 2px solid var(--gold) !important;
  color: var(--jet) !important;
  box-shadow: 0 2px 8px rgba(254, 216, 19, 0.3);
  font-weight: 800;
}

/* Shamsi Calendar */
.shamsi-cal-nav {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  color: #374151;
  display: flex; align-items: center; justify-content: center;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.shamsi-cal-nav:hover { background: #eef2f7; border-color: #d1d5db; }

.shamsi-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.shamsi-cal-wd {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #9ca3af;
  padding: 2px 0;
}

.shamsi-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.shamsi-cal-day {
  width: 100%; aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #f9fafb;
  font-size: 0.76rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}
.shamsi-cal-day:hover { background: #eef2f7; border-color: #d1d5db; }

.shamsi-cal-day-today {
  border-color: var(--gold) !important;
  background: var(--gold-light) !important;
  color: var(--jet) !important;
  font-weight: 800;
}

.shamsi-cal-day-selected {
  background: linear-gradient(135deg, var(--gold), var(--saffron)) !important;
  color: var(--jet) !important;
  border-color: #eab308 !important;
  box-shadow: 0 2px 8px rgba(254, 216, 19, 0.4);
  font-weight: 800;
}

.fake-date-banner {
  /* Minimal: no bg, no border, subtle text */
  padding: 0.25rem 0.5rem;
  font-size: 0.65rem;
  color: #9ca3af;
  text-align: center;
}

/* حالت تاریخ تستی: نوار هدر با ته‌رنگ طلایی (هماهنگ با برند) */
.header:has(.fake-date-btn-active) {
  border-bottom-color: rgba(254, 216, 19, 0.55);
}

/* ===== SETTINGS PAGE ===== */
.settings-tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}
.settings-tab {
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  margin-bottom: -1px;
}
.settings-tab-active {
  color: #92400e;
  font-weight: 600;
  border-bottom: 2px solid var(--gold);
  background: transparent;
}
.settings-tab-inactive {
  color: var(--text-secondary);
}
.settings-tab-inactive:hover {
  color: var(--text-primary);
}

.settings-section-header {
  padding-bottom: 0.5rem;
}

.settings-add-cycle summary {
  outline: none;
}
.settings-add-cycle summary::-webkit-details-marker { display: none; }

.settings-cycles {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.settings-cycle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
}

/* Cycles section — desktop-first */
.cycles-meta { gap: 1rem; }
.cycles-form-grid { grid-template-columns: 1fr 1fr; }
.cycles-fieldset {
  padding: 0;
  border: none;
}
.cycles-fieldset legend {
  padding: 0;
  margin-bottom: 0.5rem;
}

.cycle-edit-panel { min-width: 0; }
.phase-edit-block { min-width: 0; }

@media (max-width: 1024px) {
  .cycles-form-grid { grid-template-columns: 1fr; }
}

.settings-empty-state {
  transition: border-color var(--transition-normal),
              background-color var(--transition-normal);
}

/* ===== Alpine.js ===== */

/* ===== Bell animation ===== */
@keyframes bell-shake {
  0%   { transform: rotate(0); }
  10%  { transform: rotate(14deg); }
  20%  { transform: rotate(-14deg); }
  30%  { transform: rotate(10deg); }
  40%  { transform: rotate(-10deg); }
  50%  { transform: rotate(6deg); }
  60%  { transform: rotate(-4deg); }
  70%  { transform: rotate(2deg); }
  80%  { transform: rotate(-1deg); }
  100% { transform: rotate(0); }
}
.bell-ring {
  display: inline-block;
  animation: bell-shake 0.8s ease-in-out;
  transform-origin: top center;
}

/* Notification bell: grey outline icon (not white) in light & dark */
.notification-bell-btn { color: #6b7280; }
.notification-bell-btn:hover { color: #374151; }
[data-theme="dark"] .notification-bell-btn { color: #9ca3af; }
[data-theme="dark"] .notification-bell-btn:hover { color: #d1d5db; }

/* Notification bell: grey outline in light & dark (never white) */
.header .notification-bell-btn,
.header .notification-bell-btn svg {
  color: #6b7280; /* gray-500 */
}
.header .notification-bell-btn:hover,
.header .notification-bell-btn:hover svg {
  color: #374151; /* gray-700 */
}
[data-theme="dark"] .header .notification-bell-btn,
[data-theme="dark"] .header .notification-bell-btn svg {
  color: #9ca3af; /* gray-400 */
}
[data-theme="dark"] .header .notification-bell-btn:hover,
[data-theme="dark"] .header .notification-bell-btn:hover svg {
  color: #d1d5db; /* gray-300 */
}

/* ── SIDEBAR + HEADER: +10% darker (git revert to undo) ── */
.sidebar .menu-item { color: #4c525f; }
.sidebar .menu-item:hover { color: #111827; }
.sidebar .menu-icon .icon,
.sidebar .menu-item .icon { color: #6e7886; }
.sidebar .menu-item:hover .icon { color: #111827; }
.sidebar .menu-item.active .icon { color: #a08809; }
.sidebar .sidebar-group-label { color: #6e7886; }
.sidebar .sidebar-group-toggle { color: #6e7886; }
.sidebar .sidebar-group-toggle:hover { color: #4c525f; }
.header .notification-bell-btn,
.header .notification-bell-btn svg { color: #4c525f; }
.header .notification-bell-btn:hover,
.header .notification-bell-btn:hover svg { color: #282d38; }
.header .role-tab:not(.active) { color: #4c525f; }
.header .role-tab:hover:not(.active) { color: #111827; }
.header .role-tab .icon,
.header .role-tab svg { color: inherit; }
[data-theme="dark"] .sidebar .menu-item .icon { color: #8a94a3; }
[data-theme="dark"] .sidebar .menu-item:hover .icon { color: #e5e7eb; }
[data-theme="dark"] .header .notification-bell-btn,
[data-theme="dark"] .header .notification-bell-btn svg { color: #a5adb8; }
[data-theme="dark"] .header .notification-bell-btn:hover,
[data-theme="dark"] .header .notification-bell-btn:hover svg { color: #e5e7eb; }

/* ===== HEADER ICON ALIGNMENT FIX ===== */
.header { align-items: center; }

/* تاریخ شمسی در هدر — زمان‌برچسب ثانویه (بدون رقابت با محتوای اصلی / hero) */
.header-jalali-strip {
  margin-inline-start: 0.35rem;
  font-family: Vazirmatn, sans-serif;
}
.header-jalali-strip__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-jalali-strip__calendar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--gold, #fed813);
}
.header-jalali-strip__calendar .icon,
.header-jalali-strip__calendar svg {
  color: inherit;
  stroke-width: 1.75;
}
.header-jalali-strip__weekday {
  font-size: 0.875rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text-heading, #1f2937);
}
.header-jalali-strip__divider {
  flex-shrink: 0;
  width: 1px;
  height: 0.75rem;
  align-self: center;
  background: var(--border-medium);
  opacity: 0.85;
}
.header-jalali-strip__day-month {
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}
[data-theme="dark"] .header-jalali-strip__weekday {
  color: var(--text-heading);
}
[data-theme="dark"] .header-jalali-strip__day-month {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .header-jalali-strip__divider {
  background: var(--border-medium);
  opacity: 1;
}

.header .icon,
.header svg { display: block; vertical-align: middle; }
.notification-bell-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.notification-bell-btn .icon,
.notification-bell-btn svg { display: block; vertical-align: middle; }

/* بج تعداد خوانده‌نشده هدر (زنگ + آیتم منوی «اعلان‌ها») — یک اندازه */
.notification-bell-btn .header-unread-count-badge,
.header .header-unread-count-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 9px;
  line-height: 1;
}
.header button[aria-haspopup] { display: inline-flex; align-items: center; }
.role-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}
.role-tab .icon,
.role-tab svg { display: block; flex-shrink: 0; }
.header [role="menu"] a,
.header [role="menu"] button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header [role="menu"] .icon,
.header [role="menu"] svg { display: block; flex-shrink: 0; }
.header button[aria-controls="sidebar-nav"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.header button[aria-controls="sidebar-nav"] .icon,
.header button[aria-controls="sidebar-nav"] svg { display: block; }
/* Hamburger: only on mobile (<768px); tablet+ uses icon rail — see tablet block ~L716 */
@media (min-width: 768px) {
  .header button[aria-controls="sidebar-nav"] { display: none !important; }
}

/* ===== HTMX ===== */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline-flex; }
.htmx-request.htmx-indicator { display: inline-flex; }

/* ===== FOCUS ===== */
*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .card { padding: 1rem; border-radius: var(--radius-md); }
  .stat-card { padding: 1rem; }
  .stat-value { font-size: 1.35rem; }
  .stat-icon { width: 40px; height: 40px; font-size: 1rem; }
  .page-title { font-size: 1.2rem; }
  .btn { padding: 0.55rem 1rem; font-size: 0.8rem; }
  .table th, .table td { padding: 0.6rem 0.75rem; font-size: 0.8rem; }
}

/* ===== CYCLE CREATE PAGE ===== */
.cycle-create-card { width: 100%; display: block; overflow: visible; direction: rtl; padding: 2rem; }
.cycle-create-header { margin-bottom: 1.5rem; }
.cycle-create-back { display: inline-block; font-size: 0.875rem; color: #6b7280; text-decoration: none; margin-bottom: 0.75rem; transition: color 0.15s; }
.cycle-create-back:hover { color: #323232; }
.cycle-create-title { font-size: 1.5rem; font-weight: 700; color: #323232; margin: 0 0 0.25rem; }
.cycle-create-subtitle { font-size: 0.875rem; color: #6b7280; margin: 0; line-height: 1.5; }
.cycle-create-form { display: flex; flex-direction: column; width: 100%; direction: rtl; }
.cycle-create-body { display: flex; flex-direction: column; gap: 1.5rem; padding-bottom: 1rem; }
.cycle-create-section { display: flex; flex-direction: column; gap: 1rem; }
.cycle-create-divider { height: 1px; background: #e5e7eb; margin: 0.25rem 0; }
.cycle-create-section-label { font-size: 0.875rem; font-weight: 700; color: #374151; }
.cycle-create-alert { padding: 0.75rem 1rem; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 0.5rem; font-size: 0.875rem; }
.cycle-create-field { display: flex; flex-direction: column; gap: 0.375rem; width: 100%; text-align: right; }
.cycle-create-field label { font-size: 0.875rem; font-weight: 500; color: #374151; }
.cycle-create-field .required { color: #dc2626; }
.cycle-create-input { padding: 10px 14px; border: 1px solid #D1D5DB; border-radius: 8px; font-size: 0.9375rem; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; text-align: right; width: 100%; }
.cycle-create-input:focus { outline: none; border: 2px solid #EAB308; box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1); }
.cycle-create-date-wrap { width: 100%; min-width: 0; }
.cycle-create-error { font-size: 0.8125rem; color: #dc2626; }
.cycle-create-hint { font-size: 0.8125rem; color: #6b7280; margin: 0.25rem 0 0; }
.cycle-create-quick { margin-bottom: 0; }
.cycle-create-quick-label { font-size: 0.875rem; font-weight: 500; color: #374151; display: block; margin-bottom: 0.5rem; }
.cycle-create-quick-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cycle-create-quick-btn { padding: 0.5rem 0.875rem; font-size: 0.8125rem; border: 1px solid #E5E7EB; background: #fff; border-radius: 0.5rem; cursor: pointer; transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast); font-family: inherit; }
.cycle-create-quick-btn:hover { border-color: #d1d5db; background: #f9fafb; }
.cycle-create-quick-btn.active, .cycle-create-quick-btn-active { border: 2px solid #EAB308 !important; background: #FEF9C3 !important; font-weight: bold; color: #323232; }
.cycle-create-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .cycle-create-row { grid-template-columns: 1fr; } }
.cycle-create-status { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.cycle-create-radio-custom { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; color: #374151; }
.cycle-create-radio-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.cycle-create-radio-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d1d5db; flex-shrink: 0; transition: border-color var(--duration-fast), background-color var(--duration-fast), box-shadow var(--duration-fast); }
.cycle-create-radio-custom:has(.cycle-create-radio-input:checked) .cycle-create-radio-dot { border-color: #EAB308; background: #EAB308; box-shadow: inset 0 0 0 3px #fff; }
.cycle-create-radio-text { user-select: none; }
.cycle-create-companies-toolbar { margin-bottom: 0.5rem; }
.cycle-create-btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; font-weight: 500; border-radius: 0.375rem; cursor: pointer; border: 1px solid #e5e7eb; background: #f9fafb; color: #374151; font-family: inherit; }
.cycle-create-btn-sm:hover { background: #f3f4f6; }
.cycle-create-companies { display: flex; flex-direction: column; gap: 0.375rem; max-height: 10rem; overflow-y: auto; padding: 0.75rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; background: #fafafa; }
.cycle-create-check-custom { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; color: #374151; }
.cycle-create-check-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.cycle-create-check-box { width: 18px; height: 18px; border: 2px solid #d1d5db; border-radius: 0.375rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: border-color var(--duration-fast), background-color var(--duration-fast), box-shadow var(--duration-fast); background: #fff; }
.cycle-create-check-box::after { content: ''; display: none; width: 5px; height: 9px; border: solid #EAB308; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 2px; }
.cycle-create-check-custom:has(.cycle-create-check-input:checked) .cycle-create-check-box { background: #FEF9C3; border-color: #EAB308; }
.cycle-create-check-custom:has(.cycle-create-check-input:checked) .cycle-create-check-box::after { display: block; }
.cycle-create-footer-sticky { position: sticky; bottom: 0; margin: 0 -2rem -2rem; padding: 1rem 2rem; background: inherit; border-top: 1px solid #f3f4f6; display: flex; justify-content: flex-end; gap: 0.75rem; }
.cycle-create-btn { padding: 0.5rem 1.25rem; font-size: 0.875rem; font-weight: 500; border-radius: 0.5rem; cursor: pointer; transition: background-color var(--duration-fast), color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast), transform var(--duration-fast); font-family: inherit; text-decoration: none; border: none; display: inline-flex; align-items: center; }
.cycle-create-btn-secondary { background: #f3f4f6; color: #374151; }
.cycle-create-btn-secondary:hover { background: #e5e7eb; }
.cycle-create-btn-primary { background: #fed813; color: #323232; }
.cycle-create-btn-primary:hover { background: #f3c42e; }
.cycle-create-success-msg { padding: 0.75rem 1rem; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 0.5rem; margin-bottom: 1rem; }
.cycle-create-success-text { margin: 0; font-size: 0.875rem; font-weight: 500; color: #065f46; }
.cycle-create-section-title { font-size: 1.125rem; font-weight: 700; color: #374151; margin: 0 0 1rem; }
.cycle-create-phases-actions { position: relative; margin-bottom: 1rem; }
.cycle-create-phases-dropdown { position: absolute; top: 100%; right: 0; left: auto; margin-top: 0.25rem; min-width: 200px; padding: 0.5rem 0; background: white; border-radius: var(--radius-lg); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); border: 1px solid #e5e7eb; z-index: 50; }
.cycle-create-phases-list { margin-bottom: 1rem; }
.cycle-create-phase-row { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: #f9fafb; border-radius: 0.5rem; border: 1px solid #f3f4f6; margin-bottom: 0.5rem; }
.cycle-create-phase-num { width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center; background: #fef3c7; color: #92400e; font-weight: 700; font-size: 0.875rem; border-radius: 0.5rem; flex-shrink: 0; }
.cycle-create-phase-name { display: block; font-weight: 500; color: #1f2937; }
.cycle-create-phase-dates { font-size: 0.8125rem; color: #6b7280; }
.cycle-create-phases-empty { padding: 2rem 1rem; text-align: center; background: #f9fafb; border: 2px dashed #e5e7eb; border-radius: 0.5rem; margin-bottom: 1rem; }
.cycle-create-phases-empty-text { font-weight: 500; color: #374151; margin-bottom: 0.25rem; }
.cycle-create-add-phase { border: 2px dashed #e5e7eb; border-radius: 0.5rem; background: #fafafa; overflow: hidden; margin-bottom: 1rem; }
.cycle-create-add-phase-summary { cursor: pointer; list-style: none; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; color: #374151; }
.cycle-create-add-phase-summary::-webkit-details-marker { display: none; }
.cycle-create-add-phase-icon { width: 1.5rem; height: 1.5rem; display: flex; align-items: center; justify-content: center; background: white; border: 1px solid #e5e7eb; border-radius: 0.375rem; color: #d97706; font-weight: 700; }
.cycle-create-add-phase[open] .cycle-create-add-phase-icon { transform: rotate(45deg); }
.cycle-create-add-phase-form { padding: 1rem 1rem 0; }
.cycle-create-link-detail { display: inline-block; font-size: 0.875rem; color: #d97706; text-decoration: none; font-weight: 500; }
.cycle-create-link-detail:hover { color: #b45309; text-decoration: underline; }

/* ═══════════════════════════════════════
   DASHBOARD HERO (Step 1)
   ═══════════════════════════════════════ */

.dashboard-hero {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  border-radius: 1.25rem;
  padding: 2rem 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-hero .hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.dashboard-hero .hero-text {
  flex: 1 1 12rem;
  min-width: 0;
}

.dashboard-hero .hero-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-hero .hero-wave {
  display: inline-block;
  font-size: 1.2em; /* 40% smaller than 2em */
  line-height: 1;
  animation: hero-wave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes hero-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.dashboard-hero .hero-subtitle {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
  line-height: 1.55;
}

.dashboard-hero .hero-subtitle-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}

.dashboard-hero .hero-deadline-text {
  line-height: 1.4;
}

/* نام فاز — متن عادی؛ CTA اصلی فقط دکمهٔ زرد hero-cta */
.dashboard-hero .hero-phase-badge {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-weight: 700;
  border: none;
  color: rgba(255, 255, 255, 0.96);
}

.dashboard-hero .hero-deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #fcd34d;
  font-weight: 600;
}

.dashboard-hero .hero-deadline svg {
  flex-shrink: 0;
}

.dashboard-hero .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: #1e1b4b;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color var(--transition-fast),
              transform var(--transition-fast),
              box-shadow var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(254,216,19,0.35);
}

.dashboard-hero .hero-cta:hover {
  background: #fde047;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254,216,19,0.45);
}

.dashboard-hero .hero-cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.dashboard-hero .hero-manager-insight {
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  margin: 0.65rem 0 0;
  max-width: 40rem;
}

/* ═══════════════════════════════════════
   DASHBOARD KPI CARDS (Step 2)
   ═══════════════════════════════════════ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition-normal),
              transform var(--transition-normal);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
}

.kpi-card--emerald .kpi-card__icon {
  background: #ecfdf5;
  color: #059669;
}

.kpi-card--amber .kpi-card__icon {
  background: #fffbeb;
  color: #d97706;
}

.kpi-card--blue .kpi-card__icon {
  background: #eff6ff;
  color: #2563eb;
}

.kpi-card--purple .kpi-card__icon {
  background: #f5f3ff;
  color: #7c3aed;
}

.kpi-card--slate .kpi-card__icon {
  background: #f1f5f9;
  color: #64748b;
}

.kpi-card--gold .kpi-card__icon {
  background: #fffbeb;
  color: #ca8a04;
}

.kpi-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.kpi-card--link:hover {
  color: inherit;
}

.kpi-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.kpi-card__value {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

/* کارت فاز جاری: متن طولانی — جدا از اعداد بزرگ سایر KPIها */
.kpi-card__value--text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
  max-width: 100%;
  min-height: 2.5em;
}

.kpi-card__value--text--long {
  font-size: 0.9rem;
  line-height: 1.3;
}

.kpi-card__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0;
  line-height: 1.35;
}

.kpi-card__ring {
  margin-inline-start: auto;
  margin-inline-end: 0;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  overflow: hidden;
  align-self: center;
}

.kpi-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.kpi-ring-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 3;
}

.kpi-ring-fill {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dasharray 1s ease-in-out;
}

.kpi-ring-fill--emerald {
  stroke: #059669;
}

.kpi-ring-fill--gold {
  stroke: #eab308;
}

/* ═══════════════════════════════════════
   DASHBOARD URGENT ACTIONS (Step 3)
   ═══════════════════════════════════════ */

.urgent-card-section .urgent-section-header {
  margin-bottom: 1rem;
}

.urgent-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.urgent-section-title__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fef2f2;
  color: #dc2626;
}

.urgent-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.urgent-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: white;
  border: 1px solid #fecaca;
  border-radius: 0.875rem;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast),
              background-color var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.urgent-card:hover {
  border-color: #f87171;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.urgent-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.urgent-card__indicator {
  width: 4px;
  height: 2.5rem;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--saffron) 100%);
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(254, 216, 19, 0.35);
}

.urgent-card--high .urgent-card__indicator,
.urgent-card--medium .urgent-card__indicator,
.urgent-card--normal .urgent-card__indicator,
.urgent-card--low .urgent-card__indicator,
.urgent-card--warning .urgent-card__indicator,
.urgent-card--success .urgent-card__indicator,
.urgent-card--info .urgent-card__indicator {
  background: linear-gradient(180deg, var(--gold) 0%, var(--saffron) 100%);
  box-shadow: 0 0 0 1px rgba(254, 216, 19, 0.35);
}

.urgent-card__body {
  flex: 1;
  min-width: 0;
}

.urgent-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.urgent-card__desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.urgent-card__meta {
  flex-shrink: 0;
}

.urgent-card__arrow {
  color: #9ca3af;
  transition: color var(--transition-fast);
  flex-shrink: 0;
  display: flex;
}

.urgent-card:hover .urgent-card__arrow {
  color: #ef4444;
}

.urgent-card:has(.badge-outline-blue) .urgent-card__arrow {
  color: #2563eb;
}
.urgent-card:has(.badge-outline-blue):hover .urgent-card__arrow {
  color: #1d4ed8;
}

.urgent-card:has(.badge-outline-gold) .urgent-card__arrow {
  color: var(--gold-700);
}
.urgent-card:has(.badge-outline-gold):hover .urgent-card__arrow {
  color: var(--jet);
}

.urgent-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-radius: 1rem;
  border: 1px dashed #86efac;
}

.urgent-empty__illustration {
  display: flex;
  justify-content: center;
}

.urgent-empty__illustration svg {
  max-width: 100px;
  height: auto;
}

.urgent-empty__title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #065f46;
  margin: 1rem 0 0.5rem;
}

.urgent-empty__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ═══════════════════════════════════════
   STEPPER — ACTIVITIES (Step 4)
   ═══════════════════════════════════════ */

.stepper-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stepper-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.stepper-section-title__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* کمرنگ مثل kpi-card__icon — نه گرادیان پررنگ */
  background: rgba(254, 216, 19, 0.14);
  color: #b45309;
  box-shadow: none;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.stepper__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.6rem 0;
  position: relative;
}

/* ردیف متن + دکمهٔ CTA روبه‌روی نود تایم‌لاین (در RTL دکمه سمت چپ کارت) */
.stepper__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex: 1;
  min-width: 0;
}

.stepper__connector {
  position: absolute;
  top: 2.65rem;
  right: 1.1rem;
  width: 2px;
  height: calc(100% - 2.4rem);
  background: #e5e7eb;
}

.stepper__item--done .stepper__connector {
  background: #10b981;
}

.stepper__item--active .stepper__connector {
  background: linear-gradient(to bottom, var(--gold) 50%, #e5e7eb 50%);
}

.stepper__item--active:has(+ .stepper__item--active) .stepper__connector,
.stepper__item--active:has(+ .stepper__item--done) .stepper__connector {
  background: var(--gold);
}

.stepper__circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  transition: background-color var(--transition-normal),
              color var(--transition-normal),
              box-shadow var(--transition-normal);
}

/* Done: HR Import Wizard–style emerald */
.stepper__item--done .stepper__circle {
  background: #10b981;
  color: white;
  box-shadow:
    0 4px 6px -1px rgba(16, 185, 129, 0.28),
    0 2px 4px -2px rgba(16, 185, 129, 0.18);
}

/* Active: gold gradient + ring + ping (matches Import Wizard) */
.stepper__item--active .stepper__circle {
  position: relative;
  isolation: isolate;
  overflow: visible;
  background: linear-gradient(135deg, var(--gold) 0%, var(--saffron) 100%);
  color: var(--jet);
  border: none;
  box-shadow:
    0 10px 15px -3px rgba(234, 179, 8, 0.35),
    0 4px 6px -4px rgba(234, 179, 8, 0.22),
    0 0 0 4px rgba(254, 216, 19, 0.2);
}

.stepper__item--active .stepper__circle > * {
  position: relative;
  z-index: 1;
}

.stepper__item--active .stepper__circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(254, 216, 19, 0.3);
  z-index: 0;
  pointer-events: none;
  animation: stepper-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.stepper__item--locked .stepper__circle {
  background: #f3f4f6;
  color: #9ca3af;
}

.stepper__step-icon {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.stepper__item--locked .stepper__step-icon {
  opacity: 0.92;
}

.stepper__pulse {
  width: 10px;
  height: 10px;
  background: var(--jet);
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .stepper__pulse {
    animation: step-pulse 1.5s ease-in-out infinite;
  }
  .stepper__item--active .stepper__pulse {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stepper__item--active .stepper__circle::before {
    animation: none;
    opacity: 0.45;
    transform: scale(1.2);
  }
}

@keyframes step-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

@keyframes stepper-ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.stepper__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: start;
}

.stepper__action-cell {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .stepper-card .stepper__row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .stepper-card .stepper__action-cell {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

.stepper__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stepper__item--done .stepper__title {
  color: #059669;
}

.stepper__item--locked .stepper__title {
  color: #9ca3af;
}

.stepper__action {
  margin-top: 0;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.stepper__action--primary {
  background: var(--gold);
  color: var(--jet);
}

.stepper__action--primary:hover {
  background: var(--saffron);
  color: var(--jet);
}

.stepper__action--secondary {
  background: #f3f4f6;
  color: #374151;
}

.stepper__action--secondary:hover {
  background: #e5e7eb;
}

.stepper__action:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.stepper-card .stepper-section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stepper-card__sync-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.6875rem;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
}

.stepper__badge-wrap {
  margin-top: 0.2rem;
}

/* Align in-progress pill with PerformanceCycleCard (gold tint + jet text) */
.stepper__badge-wrap .badge.badge-warning {
  background: rgba(254, 216, 19, 0.2);
  color: var(--jet);
  border-color: transparent;
}

/* ── Stepper Inline Progress ── */
.stepper__progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.stepper__progress-bar {
  flex: 1;
  max-width: 120px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.stepper__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--saffron));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stepper__item--done .stepper__progress-fill {
  background: linear-gradient(90deg, #10b981, #047857);
}

.stepper__progress-text {
  font-size: 0.7rem;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
}

/* ===== STEPPER SUB-PROGRESS ===== */
.stepper__sub-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.stepper__sub-bar {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: 2px;
  overflow: hidden;
  max-width: 120px;
}

.stepper__sub-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--saffron));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.stepper__sub-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Stepper Encouragement ── */
.stepper__encouragement {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.3rem;
  padding: 0.35rem 0.65rem;
  background: #fefce8;
  border-radius: 0.5rem;
  border: 1px solid #fef08a;
}

.stepper__encouragement-icon {
  font-size: 1rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.stepper__encouragement-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
  color: #854d0e;
  font-weight: 600;
}

.stepper__encouragement-note {
  font-size: 0.7rem;
  color: #a16207;
  font-weight: 400;
}

/* After Phase 3 — active/clickable */
.stepper__encouragement--active {
  background: #ecfdf5;
  border-color: #86efac;
}

.stepper__encouragement--active .stepper__encouragement-text {
  color: #065f46;
}

.stepper__encouragement-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #059669;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.stepper__encouragement-link:hover {
  color: #047857;
  text-decoration: underline;
}

/* Dark mode */
[data-theme="dark"] .stepper__encouragement {
  background: #422006;
  border-color: #854d0e;
}

[data-theme="dark"] .stepper__encouragement-text {
  color: #fef08a;
}

[data-theme="dark"] .stepper__encouragement-note {
  color: #fbbf24;
}

[data-theme="dark"] .stepper__encouragement--active {
  background: #064e3b;
  border-color: #059669;
}

[data-theme="dark"] .stepper__encouragement--active .stepper__encouragement-text {
  color: #a7f3d0;
}

[data-theme="dark"] .stepper__encouragement-link {
  color: #34d399;
}

[data-theme="dark"] .stepper__progress-bar {
  background: #334155;
}

[data-theme="dark"] .stepper__sub-bar {
  background: var(--border-medium);
}

/* Dashboard hero — tablet & mobile */
@media (max-width: 768px) {
  .dashboard-hero {
    padding: 1.25rem 1rem;
    border-radius: 1rem;
  }
  .dashboard-hero .hero-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: start;
  }
  .dashboard-hero .hero-text {
    flex: 1 1 auto;
    width: 100%;
  }
  .dashboard-hero .hero-title {
    font-size: 1.125rem;
    justify-content: flex-start;
    margin-bottom: 0.625rem;
    line-height: 1.45;
  }
  .dashboard-hero .hero-subtitle {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    font-size: 0.875rem;
  }
  .dashboard-hero .hero-subtitle-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    width: 100%;
  }
  .dashboard-hero .hero-phase-badge {
    display: block;
    width: 100%;
    line-height: 1.45;
    word-break: break-word;
  }
  .dashboard-hero .hero-deadline {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
    line-height: 1.45;
  }
  .dashboard-hero .hero-deadline-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
  }
  .dashboard-hero .hero-cta {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    padding: 0.75rem 1rem;
    min-height: 2.75rem;
  }
}

.dashboard-hero .hero-cta:focus-visible {
  outline: 2px solid rgba(255,255,255,0.9);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-hero .hero-wave {
    animation: none;
  }
}

.dashboard-hero .hero-cta:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  /* Disable decorative/continuous animations */
  .skeleton,
  .dashboard-stagger > *,
  .phase-day.is-today,
  .save-dot.saved,
  .save-dot.saving,
  .htmx-request #save-status .save-dot,
  .fake-date-btn-active,
  .status-dot--pulse,
  .dashboard-hero .hero-wave,
  .login-box,
  .animate-fade-in,
  .animate-slide-right,
  .animate-slide-in-right,
  .animate-slide-up,
  .animate-scale-in,
  .animate-fade-highlight,
  .bell-ring,
  .toast-slide-up,
  .confirm-modal-box {
    animation: none !important;
  }

  /* Keep transitions but make them instant (still shows state change) */
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ── View Transitions API (Chrome 111+, same-origin navigation) ── */
@supports (view-transition-name: page) {
  main#main-content {
    view-transition-name: main-content;
  }
  .header {
    view-transition-name: header;
  }
  .sidebar {
    view-transition-name: sidebar;
  }
  ::view-transition-old(main-content) {
    animation: 120ms cubic-bezier(0.4, 0, 0.2, 1) both page-fade-out;
  }
  ::view-transition-new(main-content) {
    animation: 200ms cubic-bezier(0.4, 0, 0.2, 1) 80ms both page-fade-in;
  }
  ::view-transition-old(header),
  ::view-transition-new(header) {
    animation: none;
    mix-blend-mode: normal;
  }
  ::view-transition-old(sidebar),
  ::view-transition-new(sidebar) {
    animation: none;
    mix-blend-mode: normal;
  }
  @keyframes page-fade-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
  }
  @keyframes page-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* Reduce motion: disable page transitions, keep NProgress faster */
@media (prefers-reduced-motion: reduce) {
  main > .page-shell,
  .animate-page-enter,
  .page-shell:not(.dashboard-stagger) > .card,
  .dashboard-stagger > * {
    animation: none !important;
  }
  ::view-transition-old(main-content),
  ::view-transition-new(main-content) {
    animation-duration: 0ms !important;
  }
  #nprogress .bar {
    transition-duration: 50ms !important;
  }
}

/* ===== DARK MODE ===== */
.theme-toggle .theme-icon-dark { display: none; }
.theme-toggle .theme-icon-light { display: inline-block; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline-block; }

[data-theme="light"] {
  --bg-main: #f5f6fa;
  --bg-card: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-light: #eef2f7;
  --border-medium: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-light: #334155;
    --border-medium: #475569;
  }
}

[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-light: #334155;
  --border-medium: #475569;

  /* ── Gold Scale (dark override) ──────────────────── */
  --gold-50:         rgba(254, 216, 19, 0.08);
  --gold-100:        rgba(254, 216, 19, 0.15);
  --gold-200:        rgba(254, 216, 19, 0.22);
  --gold-700:        #fde571;
  --gold-800:        #fed813;

  /* ── Semantic (dark override) ────────────────────── */
  --success-50:      rgba(16, 185, 129, 0.10);
  --success-100:     rgba(16, 185, 129, 0.15);
  --success-700:     #6ee7b7;
  --warning-50:      rgba(245, 158, 11, 0.10);
  --warning-100:     rgba(245, 158, 11, 0.15);
  --warning-700:     #fcd34d;
  --error-50:        rgba(239, 68, 68, 0.10);
  --error-100:       rgba(239, 68, 68, 0.15);
  --error-700:       #fca5a5;
  --info-50:         rgba(59, 130, 246, 0.10);
  --info-100:        rgba(59, 130, 246, 0.15);
  --info-700:        #93c5fd;

  /* ── Semantic Surface & Text (dark overrides) ── */
  --bg-surface: #1e293b;
  --bg-surface-secondary: #273548;
  --bg-surface-tertiary: #334155;
  --bg-surface-hover: #273548;
  --bg-surface-active: #334155;
  --bg-surface-disabled: #1e293b;
  --bg-overlay: rgba(0, 0, 0, 0.7);

  --text-heading: #f1f5f9;
  --text-body: #e2e8f0;
  --text-muted-foreground: #94a3b8;
  --text-placeholder: #64748b;
  --text-disabled: #475569;
  --text-inverse: #0f172a;
  --text-link: #60a5fa;
  --text-link-hover: #93c5fd;

  --border-default: #334155;
  --border-subtle: #1e293b;
  --border-strong: #475569;
  --border-focus: var(--gold);
  --border-error: #f87171;

  --bg-input: #273548;
  --bg-input-disabled: #1e293b;

  /* Status backgrounds (dark) */
  --bg-success-subtle: #064e3b;
  --bg-warning-subtle: #451a03;
  --bg-error-subtle: #450a0a;
  --bg-info-subtle: #1e3a5f;
  --bg-gold-subtle: #3d3000;
  --bg-purple-subtle: rgba(139, 92, 246, 0.22);

  --text-success: #6ee7b7;
  --text-warning: #fcd34d;
  --text-error: #fca5a5;
  --text-info: #93c5fd;
  --text-gold: #fde571;
  --text-purple: #c4b5fd;
}

[data-theme="dark"] body {
  background-color: var(--bg-main);
  color: var(--text-primary);
}

/* NProgress dark mode */
[data-theme="dark"] #nprogress .bar {
  background: var(--gold, #fed813);
  box-shadow: 0 0 10px rgba(254, 216, 19, 0.3);
}

[data-theme="dark"] .header,
[data-theme="dark"] .sidebar {
  background: var(--bg-card);
  border-color: var(--border-medium);
}

[data-theme="dark"] .card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .stat-card {
  background: var(--bg-card);
  border-color: var(--border-medium);
}

[data-theme="dark"] .main-content {
  background: var(--bg-main);
}

/* ── Committee / تب جمع‌بندی مدیر — سطح دوم داخل کارت (تم‌دار، بدون وابستگی به dark: تیلویند) ── */
.committee-summary-panel {
  border-radius: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface-secondary);
}

[data-theme="dark"] .committee-summary-panel {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-medium);
  box-shadow: none;
}

.committee-summary-title {
  color: var(--text-heading);
}

.committee-summary-panel__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25rem;
  border: 1px solid transparent;
}

/* نسخه روشن: متن تیره روی پس‌زمینه ملایم (کنتراست کافی) */
.committee-summary-panel__badge--success {
  background: #d1fae5;
  color: #047857;
  border-color: rgba(16, 185, 129, 0.35);
}

.committee-summary-panel__badge--draft {
  background: #fef3c7;
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.35);
}

.committee-summary-panel__badge--muted {
  background: var(--bg-surface-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-light);
}

[data-theme="dark"] .committee-summary-panel__badge--success {
  background: rgba(16, 185, 129, 0.22);
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.45);
}

[data-theme="dark"] .committee-summary-panel__badge--draft {
  background: var(--warning-100);
  color: var(--warning-700);
  border-color: rgba(250, 204, 21, 0.4);
}

[data-theme="dark"] .committee-summary-panel__badge--muted {
  background: rgba(30, 41, 59, 0.85);
  color: var(--text-muted-foreground);
  border-color: var(--border-medium);
}

.committee-summary-panel__rich {
  font-size: 0.875rem;
  line-height: 1.75;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  min-height: 2.5rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-body);
}

.committee-summary-panel__rich p {
  margin-bottom: 0.5em;
}

.committee-summary-panel__rich p:last-child {
  margin-bottom: 0;
}

[data-theme="dark"] .committee-summary-panel__rich {
  background: var(--bg-main);
  border-color: var(--border-medium);
  color: var(--text-body);
}

/* محتوای ذخیره‌شدهٔ ریچ‌تکست گاهی رنگ روشن دارد؛ در دارک یکدست به متن تم */
[data-theme="dark"] .committee-summary-panel__rich p,
[data-theme="dark"] .committee-summary-panel__rich li,
[data-theme="dark"] .committee-summary-panel__rich ul,
[data-theme="dark"] .committee-summary-panel__rich ol,
[data-theme="dark"] .committee-summary-panel__rich h1,
[data-theme="dark"] .committee-summary-panel__rich h2,
[data-theme="dark"] .committee-summary-panel__rich h3,
[data-theme="dark"] .committee-summary-panel__rich h4,
[data-theme="dark"] .committee-summary-panel__rich strong,
[data-theme="dark"] .committee-summary-panel__rich em,
[data-theme="dark"] .committee-summary-panel__rich blockquote {
  color: var(--text-body) !important;
}

[data-theme="dark"] .committee-summary-panel__rich a {
  color: var(--text-link) !important;
}

.committee-summary-panel__placeholder {
  color: var(--text-placeholder);
  font-style: italic;
}

.committee-summary-panel__toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-light);
}

@media (min-width: 640px) {
  .committee-summary-panel__toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}

.committee-summary-panel__toolbar-actions {
  flex-shrink: 0;
  order: -1;
}

@media (min-width: 640px) {
  .committee-summary-panel__toolbar-actions {
    order: 0;
  }
}

.committee-summary-panel__toolbar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex: 1;
  min-width: 0;
}

.committee-summary-panel__toolbar-hint {
  margin: 0;
  width: 100%;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .committee-summary-panel__toolbar-hint {
    width: auto;
    flex: 1 1 12rem;
  }
}

[data-theme="dark"] .committee-summary-panel__toolbar {
  border-bottom-color: var(--border-medium);
}

.committee-summary-panel__footnote {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

[data-theme="dark"] .committee-summary-panel__footnote {
  color: var(--text-muted-foreground);
  border-top-color: var(--border-medium);
}

[data-theme="dark"] .committee-summary-panel .rich-text-container {
  border-color: var(--border-medium) !important;
  background: var(--bg-surface) !important;
}

[data-theme="dark"] .committee-summary-panel .tiptap-field-mount {
  background: var(--bg-surface) !important;
}

/* جداکنندهٔ دکمه‌ها از بدنهٔ فرم داخل پنل */
.committee-summary-panel__split {
  border-top: 1px solid var(--border-light);
}

[data-theme="dark"] .committee-summary-panel__split {
  border-top-color: var(--border-medium);
}

/* ── Committee / تب خودارزیابی — پنل محتوا (هم‌تراز committee-summary-panel) ── */
.committee-self-eval-panel {
  position: relative;
}

/* پاسخ‌ها بالا، سایدبار بحث پایین */
.committee-self-eval-panel--with-discussion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.committee-self-eval-panel--with-discussion .committee-self-eval-list {
  order: 1;
}
.committee-self-eval-panel--with-discussion #self-eval-comments-root {
  order: 2;
}

/* ── Committee / تب خودارزیابی — کارت سؤال + پاسخ rich-text (تم‌دار) ── */
.committee-self-eval-list {
  margin-top: 0.25rem;
}

.committee-self-eval-card {
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface-secondary);
  overflow: hidden;
}

[data-theme="dark"] .committee-self-eval-card {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-medium);
}

.committee-self-eval-card__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
}

[data-theme="dark"] .committee-self-eval-card__header {
  background: rgba(15, 23, 42, 0.35);
  border-bottom-color: var(--border-medium);
}

.committee-self-eval-card__index {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--warning-100, #fef9c3);
  color: var(--warning-800, #854d0e);
}

[data-theme="dark"] .committee-self-eval-card__index {
  background: rgba(250, 204, 21, 0.18);
  color: #fde68a;
}

.committee-self-eval-card__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-heading);
}

.committee-self-eval-card__body {
  padding: 0.75rem 1rem 1rem;
}

.committee-self-eval-card__answer-wrap {
  position: relative;
}

.committee-self-eval-card__rich {
  font-size: 0.875rem;
  line-height: 1.8;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-body);
}

.committee-self-eval-card__rich--clamp {
  max-height: 20rem;
  overflow: hidden;
}

[data-theme="dark"] .committee-self-eval-card__rich {
  background: var(--bg-main);
  border-color: var(--border-medium);
  color: var(--text-body);
}

[data-theme="dark"] .committee-self-eval-card__rich p,
[data-theme="dark"] .committee-self-eval-card__rich li,
[data-theme="dark"] .committee-self-eval-card__rich ul,
[data-theme="dark"] .committee-self-eval-card__rich ol,
[data-theme="dark"] .committee-self-eval-card__rich h1,
[data-theme="dark"] .committee-self-eval-card__rich h2,
[data-theme="dark"] .committee-self-eval-card__rich h3,
[data-theme="dark"] .committee-self-eval-card__rich h4,
[data-theme="dark"] .committee-self-eval-card__rich strong,
[data-theme="dark"] .committee-self-eval-card__rich em,
[data-theme="dark"] .committee-self-eval-card__rich blockquote {
  color: inherit;
}

[data-theme="dark"] .committee-self-eval-card__rich a {
  color: #93c5fd;
}

.committee-self-eval-card__fade {
  position: relative;
  height: 4rem;
  margin-top: -4rem;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg-surface-secondary));
}

[data-theme="dark"] .committee-self-eval-card__fade {
  background: linear-gradient(to bottom, transparent, var(--bg-surface-tertiary));
}

.committee-self-eval-card__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.committee-self-eval-card__toggle:hover {
  background: var(--bg-surface-secondary);
  color: var(--text-heading);
  border-color: var(--border-medium);
}

[data-theme="dark"] .committee-self-eval-card__toggle {
  background: rgba(15, 23, 42, 0.5);
  border-color: var(--border-medium);
  color: var(--text-muted-foreground);
}

[data-theme="dark"] .committee-self-eval-card__toggle:hover {
  background: rgba(30, 41, 59, 0.85);
  color: var(--text-heading);
}

.committee-self-eval-empty {
  text-align: center;
  padding: 3rem 1rem;
  border-radius: 0.75rem;
  border: 1px dashed var(--border-light);
  background: var(--bg-surface-secondary);
}

[data-theme="dark"] .committee-self-eval-empty {
  border-color: var(--border-medium);
  background: var(--bg-surface-tertiary);
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}

/* Theme toggle icons: moon = switch to dark, sun = switch to light (20% larger) */
.theme-toggle .theme-icon-dark,
.theme-toggle .theme-icon-light {
  display: inline-block;
  font-size: 1.2em;
}
.theme-toggle .theme-icon-dark { display: none; }
.theme-toggle .theme-icon-light { display: inline-block; }
[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline-block; }

/* ── Theme toggle icon visibility (user menu — no .theme-toggle parent) ── */
.theme-icon-dark {
  display: none;
}
[data-theme="dark"] .theme-icon-light {
  display: none;
}
[data-theme="dark"] .theme-icon-dark {
  display: inline;
}

/* Force light when user chose light (override system dark) */
[data-theme="light"] {
  --bg-main: #f5f6fa;
  --bg-card: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-light: #eef2f7;
  --border-medium: #e5e7eb;
}

/* ===== Mobile: Touch-friendly targets (WCAG 2.1, min 44x44px) ===== */
@media (max-width: 768px) {
  .btn,
  .menu-item,
  button:not(.inline-icon),
  a.role-tab,
  .filter-tab,
  .filter-pill,
  .tab-item,
  .sidebar a {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-sm { min-height: 40px; padding: 0.5rem 1rem; }
  .text-xs { font-size: 13px; }
}

/* ═══════════════════════════════════════════════════
   VIEW TRANSITIONS — navigation: auto (Chrome 126+)
   Progressive enhancement for smooth page navigation.
   ═══════════════════════════════════════════════════ */
@view-transition {
  navigation: auto;
}

/* NOTE: Chart.js colors are set in JavaScript (inline in templates).
   To fully support dark mode for charts, those scripts should read
   CSS custom properties. Example:
   const textColor = getComputedStyle(document.documentElement)
     .getPropertyValue('--text-primary').trim();
   This is a future enhancement. */

/* ── Chart.js Animation Guidelines ───────────────────
   All Chart.js instances should use these animation settings
   for consistency:

   animation: {
     duration: 600,
     easing: 'easeOutQuart',
   },
   transitions: {
     active: {
       animation: { duration: 150 }
     }
   }

   Colors should use the theme palette:
   import { colors } from '../theme'; // React
   // or inline: '#fed813' (gold), '#2fbea8', '#fd6f95', '#17b1fd', etc.
   ─────────────────────────────────────────────────── */

/* ── Chart.js dark mode ──────────────────────────── */
[data-theme="dark"] canvas {
  filter: none; /* don't invert charts */
}

/* ── Badge dark mode ─────────────────────────────── */
[data-theme="dark"] .badge-success {
  background: var(--success-50, #ecfdf5);
  color: var(--success-700, #047857);
}
[data-theme="dark"] .badge-warning {
  background: var(--warning-50, #fffbeb);
  color: var(--warning-700, #b45309);
}
[data-theme="dark"] .badge-error {
  background: var(--error-50, #fef2f2);
  color: var(--error-700, #b91c1c);
}
[data-theme="dark"] .badge-info {
  background: var(--info-50, #eff6ff);
  color: var(--info-700, #1d4ed8);
}
[data-theme="dark"] .badge-gold {
  background: var(--gold-50);
  color: var(--gold-700);
}
[data-theme="dark"] .badge-gray {
  background: rgba(156, 163, 175, 0.15);
  color: #d1d5db;
}
[data-theme="dark"] .badge-outline-blue {
  background: rgba(37, 99, 235, 0.12);
  border-color: #60a5fa;
  color: #93c5fd;
}
[data-theme="dark"] .badge-outline-gold {
  /* CTA واضح روی پس‌زمینه تیره — همان زرد برند با متن تیره */
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  border: 1.5px solid var(--gold-300);
  color: var(--jet);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  font-weight: 800;
}
[data-theme="dark"] .urgent-card:hover .badge-outline-gold {
  filter: brightness(1.06);
  border-color: var(--gold-100);
}
[data-theme="dark"] .badge-purple {
  background: rgba(135, 99, 248, 0.15);
  color: #c4b5fd;
}

/* ── Card colored variants dark mode ───────────── */
[data-theme="dark"] .card-gold    { border-top-color: var(--gold); }
[data-theme="dark"] .card-success { border-top-color: var(--success-500, #10b981); }
[data-theme="dark"] .card-warning { border-top-color: var(--warning-500, #f59e0b); }
[data-theme="dark"] .card-danger  { border-top-color: var(--error-500, #ef4444); }
[data-theme="dark"] .card-info    { border-top-color: var(--info-500, #3b82f6); }
[data-theme="dark"] .stepper-card.card-info { border-top-color: var(--gold); }
[data-theme="dark"] .card.card-highlight,
[data-theme="dark"] .card.card-highlight:hover {
  border-top-color: var(--gold);
}

/* ── Login page dark mode ──────────────────────── */
[data-theme="dark"] .login-container {
  background: var(--bg-main);
}
[data-theme="dark"] body:has(.login-container) {
  background-color: var(--bg-main);
}
[data-theme="dark"] .login-box {
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(148, 163, 184, 0.12);
}
[data-theme="dark"] .login-container label {
  color: var(--text-body);
}
[data-theme="dark"] .login-container .text-gray-500,
[data-theme="dark"] .login-container .text-gray-600 {
  color: var(--text-secondary);
}
[data-theme="dark"] .login-container .text-gray-700,
[data-theme="dark"] .login-container .text-gray-800,
[data-theme="dark"] .login-container .text-gray-900 {
  color: var(--text-primary);
}
[data-theme="dark"] .login-container .border-gray-100 {
  border-color: var(--border-default);
}
[data-theme="dark"] .login-container .input {
  background-color: var(--bg-input);
  border-color: var(--border-default);
  color: var(--text-primary);
}
[data-theme="dark"] .login-container .input::placeholder {
  color: var(--text-muted);
}
[data-theme="dark"] .login-container .input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(254, 216, 19, 0.18);
  background: var(--bg-input);
}
[data-theme="dark"] .login-container .input.border-red-300,
[data-theme="dark"] .login-container .input.bg-red-50 {
  background-color: var(--bg-error-subtle);
  border-color: var(--border-error);
}
[data-theme="dark"] .login-container .text-amber-600 {
  color: var(--warning-700);
}
[data-theme="dark"] .login-container .hover\:text-amber-700:hover {
  color: var(--gold-300, #fde571);
}
[data-theme="dark"] .login-container #login-error {
  background-color: var(--bg-error-subtle);
  border-color: var(--border-error);
  color: var(--text-error);
}
[data-theme="dark"] .login-container #toggle-password {
  color: var(--text-secondary);
}
[data-theme="dark"] .login-container #toggle-password:hover {
  color: var(--text-primary);
}
[data-theme="dark"] .login-container input[type="checkbox"] {
  color-scheme: dark;
}
/* رنگ‌های خطا در فرم‌های auth (reset/confirm) */
[data-theme="dark"] .login-container .bg-red-50 {
  background-color: var(--bg-error-subtle);
}
[data-theme="dark"] .login-container .text-red-700 {
  color: var(--text-error);
}
[data-theme="dark"] .login-container .text-red-600 {
  color: var(--text-error);
}
[data-theme="dark"] .login-container .border-red-200 {
  border-color: var(--border-error);
}
/* رنگ‌های amber (لینک منقضی / اولین ورود) */
[data-theme="dark"] .login-container .bg-amber-50 {
  background-color: var(--bg-warning-subtle);
}
[data-theme="dark"] .login-container .text-amber-900 {
  color: var(--text-warning);
}
[data-theme="dark"] .login-container .border-amber-200 {
  border-color: rgba(245, 158, 11, 0.35);
}
[data-theme="dark"] .login-container .bg-amber-100 {
  background-color: rgba(254, 216, 19, 0.12);
}
[data-theme="dark"] .login-container .text-gray-400 {
  color: var(--text-muted);
}
/* آیکون‌های success در صفحات done/complete */
[data-theme="dark"] .login-container .bg-green-100 {
  background-color: rgba(16, 185, 129, 0.15);
}
[data-theme="dark"] .login-container .text-green-600 {
  color: var(--text-success);
}
/* toggle دکمه‌های رمز عبور در confirm */
[data-theme="dark"] .login-container .toggle-password-btn {
  color: var(--text-secondary);
}
[data-theme="dark"] .login-container .toggle-password-btn:hover {
  color: var(--text-primary);
}

/* ===== FEEDBACK INBOX CARD STATES ===== */
[data-theme="dark"] .border-amber-200 {
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .bg-amber-50\/50 {
  background-color: rgba(245, 158, 11, 0.06);
}

[data-theme="dark"] .border-blue-200 {
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .bg-blue-50\/30 {
  background-color: rgba(59, 130, 246, 0.06);
}

/* Committee decision form: outline icons legible at 20px inside small tiles */
.committee-decision-options .committee-option-icon svg.icon {
  stroke-width: 1.85;
}

/* ═══════════════════════════════════════════════════════════════
   SYSTEMIC DARK MODE OVERRIDES for raw Tailwind utility usage
   These rules kick in only when [data-theme="dark"] is on,
   softening the many template hits of bg-white / text-gray-* /
   bg-gray-* / from-*-50 without explicit dark: variants.
   Scoped to the authenticated app shell to avoid impacting
   login/print/email pages.
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-white,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-white\/60,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-white\/80,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-white\/90 {
  background-color: var(--bg-card);
  color: var(--text-primary);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-gray-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-gray-50\/30,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-gray-50\/50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .hover\:bg-gray-50:hover {
  background-color: var(--bg-surface-secondary);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-gray-100,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .hover\:bg-gray-100:hover {
  background-color: var(--bg-surface-tertiary);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-gray-200 {
  background-color: var(--bg-surface-active);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-gray-900,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-gray-800 {
  color: var(--text-heading);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-gray-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-gray-600 {
  color: var(--text-body);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-gray-500,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-gray-400 {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-gray-300 {
  color: var(--text-placeholder);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-gray-100,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-gray-200 {
  border-color: var(--border-default);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-gray-300 {
  border-color: var(--border-strong);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .divide-gray-100 > * + *,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .divide-gray-200 > * + * {
  border-color: var(--border-default);
}

/* Soft status gradients — dampen in dark mode */
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-yellow-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .via-yellow-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-yellow-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-amber-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-amber-50 {
  --tw-gradient-from: rgba(254, 216, 19, 0.06) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(254, 216, 19, 0.00) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-green-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-green-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-emerald-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-emerald-50 {
  --tw-gradient-from: rgba(16, 185, 129, 0.08) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(16, 185, 129, 0.00) var(--tw-gradient-to-position) !important;
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-blue-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-blue-50 {
  --tw-gradient-from: rgba(59, 130, 246, 0.08) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(59, 130, 246, 0.00) var(--tw-gradient-to-position) !important;
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-purple-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-purple-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-violet-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-violet-50 {
  --tw-gradient-from: rgba(135, 99, 248, 0.08) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(135, 99, 248, 0.00) var(--tw-gradient-to-position) !important;
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-white,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-white,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .via-white {
  --tw-gradient-from: var(--bg-card) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: var(--bg-card) var(--tw-gradient-to-position) !important;
}

/* Soft status backgrounds ("bg-*-50 / bg-*-100") used on callouts */
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-yellow-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-amber-50 { background-color: rgba(254, 216, 19, 0.08); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-yellow-100,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-amber-100 { background-color: rgba(254, 216, 19, 0.15); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-green-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.10); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-green-100,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-emerald-100 { background-color: rgba(16, 185, 129, 0.18); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-blue-50 { background-color: rgba(59, 130, 246, 0.10); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-blue-100 { background-color: rgba(59, 130, 246, 0.18); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-red-50 { background-color: rgba(239, 68, 68, 0.10); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-red-100 { background-color: rgba(239, 68, 68, 0.18); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-purple-50 { background-color: rgba(135, 99, 248, 0.10); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-purple-100 { background-color: rgba(135, 99, 248, 0.18); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-violet-50 { background-color: rgba(139, 92, 246, 0.11); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-violet-100 { background-color: rgba(139, 92, 246, 0.18); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-violet-100 { border-color: rgba(167, 139, 250, 0.32); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-violet-200 { border-color: rgba(167, 139, 250, 0.42); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-violet-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-violet-800 { color: #ddd6fe; }

/* Teleported overlays (e.g. Alpine x-teleport="body") and other .z-modal UI can sit outside
 * .main-content — repeat soft callouts + status text so tinted boxes stay readable in dark mode. */
[data-theme="dark"] .z-modal .bg-yellow-50,
[data-theme="dark"] .z-modal .bg-amber-50 { background-color: rgba(254, 216, 19, 0.08); }
[data-theme="dark"] .z-modal .bg-yellow-100,
[data-theme="dark"] .z-modal .bg-amber-100 { background-color: rgba(254, 216, 19, 0.15); }
[data-theme="dark"] .z-modal .bg-green-50,
[data-theme="dark"] .z-modal .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.10); }
[data-theme="dark"] .z-modal .bg-green-100,
[data-theme="dark"] .z-modal .bg-emerald-100 { background-color: rgba(16, 185, 129, 0.18); }
[data-theme="dark"] .z-modal .bg-blue-50 { background-color: rgba(59, 130, 246, 0.10); }
[data-theme="dark"] .z-modal .bg-blue-100 { background-color: rgba(59, 130, 246, 0.18); }
[data-theme="dark"] .z-modal .bg-red-50 { background-color: rgba(239, 68, 68, 0.10); }
[data-theme="dark"] .z-modal .bg-red-100 { background-color: rgba(239, 68, 68, 0.18); }
[data-theme="dark"] .z-modal .bg-purple-50 { background-color: rgba(135, 99, 248, 0.10); }
[data-theme="dark"] .z-modal .bg-purple-100 { background-color: rgba(135, 99, 248, 0.18); }
[data-theme="dark"] .z-modal .bg-violet-50 { background-color: rgba(139, 92, 246, 0.11); }
[data-theme="dark"] .z-modal .bg-violet-100 { background-color: rgba(139, 92, 246, 0.18); }
[data-theme="dark"] .z-modal .border-violet-100 { border-color: rgba(167, 139, 250, 0.32); }
[data-theme="dark"] .z-modal .border-violet-200 { border-color: rgba(167, 139, 250, 0.42); }
[data-theme="dark"] .z-modal .text-violet-700,
[data-theme="dark"] .z-modal .text-violet-800 { color: #ddd6fe; }
[data-theme="dark"] .z-modal .text-green-700,
[data-theme="dark"] .z-modal .text-green-800,
[data-theme="dark"] .z-modal .text-emerald-700,
[data-theme="dark"] .z-modal .text-emerald-800 { color: #6ee7b7; }
[data-theme="dark"] .z-modal .text-red-700,
[data-theme="dark"] .z-modal .text-red-800 { color: #fca5a5; }
[data-theme="dark"] .z-modal .text-yellow-700,
[data-theme="dark"] .z-modal .text-yellow-800,
[data-theme="dark"] .z-modal .text-amber-600,
[data-theme="dark"] .z-modal .text-amber-700,
[data-theme="dark"] .z-modal .text-amber-800 { color: #fcd34d; }
[data-theme="dark"] .z-modal .text-blue-700,
[data-theme="dark"] .z-modal .text-blue-800 { color: #93c5fd; }

[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-gold-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .via-gold-50,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-gold-50 {
  --tw-gradient-from: rgba(254, 216, 19, 0.14) var(--tw-gradient-from-position) !important;
  --tw-gradient-to: rgba(254, 216, 19, 0.03) var(--tw-gradient-to-position) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-gold-200 {
  border-color: rgba(254, 216, 19, 0.3);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-gold-900\/30 {
  border-color: rgba(254, 216, 19, 0.18);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .dark\:from-gold-900\/10 {
  --tw-gradient-from: rgba(254, 216, 19, 0.07) var(--tw-gradient-from-position) !important;
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .dark\:to-gray-900 {
  --tw-gradient-to: var(--bg-main) var(--tw-gradient-to-position) !important;
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .dark\:border-gold-900\/30 {
  border-color: rgba(254, 216, 19, 0.16);
}

[data-theme="dark"] :is(.main-content, .sidebar, .header) .bg-white\/70 {
  background-color: rgba(30, 41, 59, 0.82);
  color: var(--text-primary);
}

[data-theme="dark"] :is(.main-content, .sidebar, .header) .from-blue-50\/50 {
  --tw-gradient-from: rgba(59, 130, 246, 0.1) var(--tw-gradient-from-position) !important;
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .to-purple-50\/30 {
  --tw-gradient-to: rgba(139, 92, 246, 0.08) var(--tw-gradient-to-position) !important;
}

[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-blue-100 {
  border-color: rgba(96, 165, 250, 0.28);
}
[data-theme="dark"] :is(.main-content, .sidebar, .header) .border-blue-100\/50 {
  border-color: rgba(96, 165, 250, 0.22);
}

/* Status-text colors: brighter in dark for contrast */
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-green-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-green-800,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-emerald-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-emerald-800 { color: #6ee7b7; }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-red-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-red-800 { color: #fca5a5; }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-yellow-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-yellow-800,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-amber-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-amber-800 { color: #fcd34d; }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-blue-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-blue-800 { color: #93c5fd; }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-amber-600 { color: #fcd34d; }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-purple-500 { color: #a78bfa; }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-purple-700,
[data-theme="dark"] :is(.main-content, .sidebar, .header) .text-purple-800 { color: #c4b5fd; }

/* Hero/welcome gradient fall-back */
[data-theme="dark"] :is(.main-content, .sidebar, .header) .shadow-yellow-200 {
  box-shadow: 0 10px 25px -8px rgba(254, 216, 19, 0.25);
}

/* Partial notifications and row hovers */
[data-theme="dark"] :is(.main-content, .sidebar, .header) .hover\:bg-blue-50:hover { background-color: rgba(59, 130, 246, 0.10); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .hover\:bg-white:hover { background-color: var(--bg-card); }
[data-theme="dark"] :is(.main-content, .sidebar, .header) .focus\:ring-gold-200:focus {
  --tw-ring-color: rgba(253, 224, 71, 0.38);
}

/* ── Dark mode: components that use fixed light-theme colors (dashboard + global) ── */
[data-theme="dark"] .dashboard-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 42%, #312e81 100%);
  color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .dashboard-hero .hero-subtitle {
  color: rgba(248, 250, 252, 0.82);
}
[data-theme="dark"] .dashboard-hero .hero-cta {
  color: #0f172a;
  box-shadow: 0 4px 14px rgba(254, 216, 19, 0.2);
}
[data-theme="dark"] .dashboard-hero .hero-manager-insight {
  color: rgba(248, 250, 252, 0.72);
}

[data-theme="dark"] .dashboard-hero .hero-phase-badge {
  background: none;
  border: none;
  color: rgba(248, 250, 252, 0.95);
}

[data-theme="dark"] #sidebar-nav {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, transparent 42%);
}

[data-theme="dark"] section.kpi-grid .kpi-card {
  border-color: var(--border-default);
}

[data-theme="dark"] .kpi-card--emerald .kpi-card__icon {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}
[data-theme="dark"] .kpi-card--amber .kpi-card__icon {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}
[data-theme="dark"] .kpi-card--blue .kpi-card__icon {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}
[data-theme="dark"] .kpi-card--purple .kpi-card__icon {
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
}

[data-theme="dark"] .kpi-card--slate .kpi-card__icon {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

[data-theme="dark"] .kpi-card--gold .kpi-card__icon {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
}

[data-theme="dark"] .kpi-ring-bg {
  stroke: var(--border-strong, #475569);
}

[data-theme="dark"] .urgent-section-title__icon {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

[data-theme="dark"] .urgent-card {
  background: var(--bg-surface-secondary, #273548);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--text-primary);
}
[data-theme="dark"] .urgent-card:hover {
  background: var(--bg-surface-tertiary, #334155);
  border-color: rgba(248, 113, 113, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
[data-theme="dark"] .urgent-card__title {
  color: var(--text-heading);
}
[data-theme="dark"] .urgent-card__desc {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .urgent-card__arrow {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .urgent-card:hover .urgent-card__arrow {
  color: #fca5a5;
}
[data-theme="dark"] .urgent-card:has(.badge-outline-blue) .urgent-card__arrow {
  color: #93c5fd;
}
[data-theme="dark"] .urgent-card:has(.badge-outline-blue):hover .urgent-card__arrow {
  color: #bfdbfe;
}
[data-theme="dark"] .urgent-card:has(.badge-outline-gold) .urgent-card__arrow {
  color: var(--gold-300);
}
[data-theme="dark"] .urgent-card:has(.badge-outline-gold):hover .urgent-card__arrow {
  color: var(--gold-100);
}

[data-theme="dark"] .urgent-empty {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.04) 100%);
  border-color: rgba(52, 211, 153, 0.35);
}
[data-theme="dark"] .urgent-empty__title {
  color: #6ee7b7;
}

[data-theme="dark"] .urgent-card-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(248, 113, 113, 0.45);
}
[data-theme="dark"] .urgent-card-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.45);
}
[data-theme="dark"] .urgent-minimal-item {
  background: var(--bg-card);
  border-color: var(--border-default);
}
[data-theme="dark"] .urgent-minimal-item:hover {
  background: var(--bg-surface-secondary);
  border-color: var(--border-strong);
}

[data-theme="dark"] .menu-item:hover {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
}
[data-theme="dark"] .menu-item:active {
  background: var(--bg-surface-tertiary);
}
[data-theme="dark"] .menu-item.active {
  background: linear-gradient(270deg, rgba(254, 216, 19, 0.16) 0%, rgba(254, 216, 19, 0.05) 100%);
  color: var(--text-heading);
  box-shadow: none;
}
[data-theme="dark"] .sidebar .menu-item {
  color: var(--text-secondary);
}
[data-theme="dark"] .sidebar .menu-item:hover {
  color: var(--text-primary);
}
[data-theme="dark"] .sidebar .menu-item.active {
  color: var(--text-heading);
}
[data-theme="dark"] .sidebar-group-label {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .sidebar .sidebar-cycle-footer {
  border-top-color: var(--border-default);
}

[data-theme="dark"] .role-tab:hover:not(.active) {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  border-color: var(--border-default);
}
[data-theme="dark"] .role-tab.active {
  background: linear-gradient(135deg, rgba(254, 216, 19, 0.88), var(--gold));
  color: #0f172a;
  border-color: rgba(253, 224, 71, 0.65);
  box-shadow: 0 4px 14px rgba(254, 216, 19, 0.18);
}
[data-theme="dark"] .header .role-tab:not(.active) {
  color: var(--text-secondary);
}
[data-theme="dark"] .header .role-tab:hover:not(.active) {
  color: var(--text-primary);
}

[data-theme="dark"] .table tbody tr:hover {
  background: var(--bg-surface-secondary);
}
[data-theme="dark"] .table tbody tr:focus-within {
  background: rgba(254, 216, 19, 0.08);
}

[data-theme="dark"] .table thead {
  background: var(--bg-surface-secondary);
}
[data-theme="dark"] .table th {
  color: var(--text-muted-foreground);
  border-bottom-color: var(--border-default);
}
[data-theme="dark"] .table td {
  border-bottom-color: var(--border-default);
}

[data-theme="dark"] .header [role="tablist"].rounded-xl {
  background-color: var(--bg-surface-tertiary) !important;
  border: 1px solid var(--border-default);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .breadcrumb-link:hover {
  color: var(--text-primary);
}
[data-theme="dark"] .breadcrumb-current {
  color: var(--text-heading);
}

[data-theme="dark"] .stat-card-success {
  background: linear-gradient(to bottom right, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.06));
  border-color: rgba(52, 211, 153, 0.38);
}
[data-theme="dark"] .stat-card-success .stat-icon {
  background: rgba(52, 211, 153, 0.22);
  color: #6ee7b7;
}
[data-theme="dark"] .stat-card-warning {
  background: linear-gradient(to bottom right, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.06));
  border-color: rgba(251, 191, 36, 0.38);
}
[data-theme="dark"] .stat-card-warning .stat-icon {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}
[data-theme="dark"] .stat-card-info {
  background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.14), rgba(59, 130, 246, 0.06));
  border-color: rgba(96, 165, 250, 0.38);
}
[data-theme="dark"] .stat-card-info .stat-icon {
  background: rgba(96, 165, 250, 0.22);
  color: #93c5fd;
}

[data-theme="dark"] .progress-bar {
  background-color: var(--bg-surface-tertiary);
}

/* QA Hub floating trigger — draggable (position via Alpine + localStorage) */
#qa-panel-trigger {
  cursor: grab;
}
#qa-panel-trigger:active {
  cursor: grabbing;
}

/* QA slide-in panel — fixed to viewport, outside .main-content / .header utility remap */
[data-theme="dark"] #qa-panel-trigger {
  background-color: var(--bg-surface-secondary);
  border-color: var(--border-default);
  color: var(--text-body);
  box-shadow: 0 10px 22px -4px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] #qa-panel-trigger:hover {
  background-color: rgba(254, 216, 19, 0.1);
}
[data-theme="dark"] #qa-panel-trigger .text-gray-500 {
  color: var(--text-muted-foreground);
}

[data-theme="dark"] #qa-panel-drawer {
  background-color: var(--bg-card);
  border-color: var(--border-default);
  color: var(--text-primary);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.55);
}

#qa-panel-drawer .qa-feedback-chip-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#qa-panel-drawer .qa-feedback-chip-scroll::-webkit-scrollbar {
  display: none;
}

.qa-thread-list-page .qa-feedback-chip-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.qa-thread-list-page .qa-feedback-chip-scroll::-webkit-scrollbar {
  display: none;
}

[data-theme="dark"] #qa-panel-drawer .border-gray-100,
[data-theme="dark"] #qa-panel-drawer .border-gray-50 {
  border-color: var(--border-default);
}
[data-theme="dark"] #qa-panel-drawer .bg-white {
  background-color: var(--bg-card) !important;
}
[data-theme="dark"] #qa-panel-drawer .bg-gray-50 {
  background-color: var(--bg-surface-secondary) !important;
}
[data-theme="dark"] #qa-panel-drawer .bg-gray-100 {
  background-color: var(--bg-surface-tertiary) !important;
}
[data-theme="dark"] #qa-panel-drawer .text-gray-800 {
  color: var(--text-heading);
}
[data-theme="dark"] #qa-panel-drawer .text-gray-600 {
  color: var(--text-body);
}
[data-theme="dark"] #qa-panel-drawer .text-gray-500,
[data-theme="dark"] #qa-panel-drawer .text-gray-400 {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] #qa-panel-drawer .hover\:bg-gray-200:hover {
  background-color: var(--bg-surface-active);
}
[data-theme="dark"] #qa-panel-drawer .hover\:bg-amber-50\/40:hover {
  background-color: rgba(254, 216, 19, 0.07);
}

/* QA drawer: compact reply editor (minimal TipTap — no toolbar) */
#qa-panel-drawer .qa-panel-reply-rt {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(42vh, 340px);
}
#qa-panel-drawer .qa-panel-reply-rt .tiptap-field-mount.qa-panel-reply-mount {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 14rem;
  overflow-y: auto;
}
#qa-panel-drawer .qa-panel-reply-rt .tiptap-field-editor {
  min-height: 3rem;
  max-height: 14rem;
  overflow-y: auto;
  border-radius: 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
#qa-panel-drawer .qa-panel-reply-rt .tiptap-field-content.tiptap-prosemirror,
#qa-panel-drawer .qa-panel-reply-rt .tiptap-prosemirror.tiptap-field-content {
  min-height: 2.75rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* QA drawer: new-feedback body editor (full toolbar) — no sticky overlap with first line */
#qa-panel-drawer .qa-panel-body-rt {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#qa-panel-drawer .qa-panel-body-rt .tiptap-field-toolbar {
  position: static;
  top: auto;
  z-index: 1;
  flex-shrink: 0;
  border-radius: 0.75rem 0.75rem 0 0;
}
#qa-panel-drawer .qa-panel-body-rt .tiptap-field-mount.qa-panel-body-mount {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
}
#qa-panel-drawer .qa-panel-body-rt .tiptap-field-editor {
  min-height: 9rem;
  max-height: 16rem;
  overflow-y: auto;
  border-radius: 0 0 0.75rem 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
#qa-panel-drawer .qa-panel-body-rt .tiptap-field-content.tiptap-prosemirror,
#qa-panel-drawer .qa-panel-body-rt .tiptap-prosemirror.tiptap-field-content {
  min-height: 7rem;
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.6;
}
#qa-panel-drawer .tiptap-prosemirror .tiptap-section-heading:first-child {
  margin-top: 0;
}

/* QA panel — پیش‌نمایش پیوست تصویر: فیت در عرض ستون، حداکثر ارتفاع محدود */
#qa-panel-drawer .qa-panel-attachment-preview-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  max-height: 220px;
  overflow: hidden;
}
#qa-panel-drawer .qa-panel-attachment-preview-img {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  vertical-align: middle;
  object-fit: contain;
}

/* Fake-date widget (React header) + shared shamsi grid */
[data-theme="dark"] .fake-date-btn {
  background: var(--bg-surface-secondary);
  border-color: var(--border-default);
  color: var(--text-body);
}
[data-theme="dark"] .fake-date-btn:hover {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-strong);
}
[data-theme="dark"] .fake-date-btn-active {
  background: rgba(254, 216, 19, 0.14) !important;
  border-color: rgba(252, 211, 77, 0.65) !important;
  color: #fcd34d !important;
}
[data-theme="dark"] .fake-date-dropdown {
  background: var(--bg-card);
  border-color: var(--border-default);
  box-shadow: 0 20px 40px -6px rgba(0, 0, 0, 0.55);
}
[data-theme="dark"] .fake-date-dropdown .text-amber-600 {
  color: #fcd34d;
}
[data-theme="dark"] .shamsi-cal-nav {
  background: var(--bg-surface-secondary);
  border-color: var(--border-default);
  color: var(--text-body);
}
[data-theme="dark"] .shamsi-cal-nav:hover {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-strong);
}
[data-theme="dark"] .shamsi-cal-wd {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .shamsi-cal-day {
  background: var(--bg-surface-secondary);
  color: var(--text-body);
}
[data-theme="dark"] .shamsi-cal-day:hover {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-strong);
}

/* Phase calendar + legend chips (dashboard sidebar) */
[data-theme="dark"] .phase-calendar {
  border-color: var(--border-default);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-surface-secondary) 100%);
}
[data-theme="dark"] .phase-weekday {
  color: var(--text-muted-foreground);
}
[data-theme="dark"] .phase-day {
  border-color: var(--border-default);
}
[data-theme="dark"] .phase-chip-prep,
[data-theme="dark"] .phase-day-prep {
  background: rgba(254, 216, 19, 0.08);
  color: #e7e5e4;
  border-color: rgba(254, 216, 19, 0.28);
}

[data-theme="dark"] .phase-chip-self,
[data-theme="dark"] .phase-day-self {
  background: rgba(254, 216, 19, 0.16);
  color: #fef08a;
  border-color: rgba(254, 216, 19, 0.48);
}

[data-theme="dark"] .phase-chip-feedback,
[data-theme="dark"] .phase-day-feedback {
  background: rgba(255, 177, 19, 0.14);
  color: #fdba74;
  border-color: rgba(255, 177, 19, 0.45);
}

[data-theme="dark"] .phase-chip-manager,
[data-theme="dark"] .phase-day-manager {
  background: rgba(47, 190, 168, 0.14);
  color: #5eead4;
  border-color: rgba(47, 190, 168, 0.45);
}

[data-theme="dark"] .phase-chip-committee,
[data-theme="dark"] .phase-day-committee {
  background: rgba(253, 111, 149, 0.12);
  color: #fda4af;
  border-color: rgba(253, 111, 149, 0.45);
}

[data-theme="dark"] .phase-chip-meeting,
[data-theme="dark"] .phase-day-meeting {
  background: rgba(23, 177, 253, 0.12);
  color: #7dd3fc;
  border-color: rgba(23, 177, 253, 0.45);
}

[data-theme="dark"] .phase-chip-final,
[data-theme="dark"] .phase-day-final {
  background: rgba(121, 126, 254, 0.14);
  color: #c4b5fd;
  border-color: rgba(121, 126, 254, 0.48);
}

[data-theme="dark"] .phase-chip-off,
[data-theme="dark"] .phase-day-off {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border-color: var(--border-default);
}

[data-theme="dark"] .phase-chip-today {
  background: rgba(254, 216, 19, 0.22);
  color: #fef9c3;
  border-color: #fed813;
  box-shadow: 0 0 0 1px rgba(254, 216, 19, 0.38);
}
[data-theme="dark"] .phase-day.is-selected {
  border-color: #e2e8f0;
  box-shadow: 0 0 0 2px rgba(226, 232, 240, 0.2);
}
[data-theme="dark"] .phase-day.is-today.is-selected {
  border-color: #e2e8f0;
}

/* Stepper actions (dashboard activities) */
[data-theme="dark"] .stepper-card__sync-footer {
  border-top-color: var(--border-default);
  color: var(--text-muted-foreground);
}

[data-theme="dark"] .stepper__action--secondary {
  background: var(--bg-surface-secondary);
  color: var(--text-body);
  border: 1px solid var(--border-default);
}
[data-theme="dark"] .stepper__action--secondary:hover {
  background: var(--bg-surface-tertiary);
  border-color: var(--border-strong);
}
[data-theme="dark"] .stepper__badge-wrap .badge.badge-warning {
  background: rgba(254, 216, 19, 0.18);
  color: var(--gold-200);
  border-color: transparent;
}
[data-theme="dark"] .stepper-section-title__icon {
  background: rgba(254, 216, 19, 0.12);
  color: #fcd34d;
  box-shadow: none;
}
[data-theme="dark"] .stepper__progress-bar {
  background: var(--bg-surface-tertiary);
}
[data-theme="dark"] .stepper__connector {
  background: var(--bg-surface-tertiary);
}
[data-theme="dark"] .stepper__item--done .stepper__connector {
  background: #10b981;
}
[data-theme="dark"] .stepper__item--active .stepper__connector {
  background: linear-gradient(to bottom, var(--gold) 50%, var(--bg-surface-tertiary) 50%);
}
[data-theme="dark"] .stepper__item--active:has(+ .stepper__item--active) .stepper__connector,
[data-theme="dark"] .stepper__item--active:has(+ .stepper__item--done) .stepper__connector {
  background: var(--gold);
}
[data-theme="dark"] .stepper__item--locked .stepper__circle {
  background: var(--bg-surface-secondary);
  color: var(--text-muted-foreground);
  border: 1px solid var(--border-default);
  box-shadow: none;
}
[data-theme="dark"] .stepper__item--active .stepper__circle {
  background: linear-gradient(135deg, var(--gold) 0%, var(--saffron) 100%);
  color: var(--jet);
  border: none;
  box-shadow:
    0 10px 15px -3px rgba(234, 179, 8, 0.22),
    0 4px 6px -4px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(254, 216, 19, 0.14);
}
[data-theme="dark"] .stepper__item--done .stepper__circle {
  background: #10b981;
  box-shadow:
    0 4px 6px -1px rgba(16, 185, 129, 0.35),
    0 0 0 2px rgba(16, 185, 129, 0.2);
}
[data-theme="dark"] .stepper__item--done .stepper__title {
  color: #34d399;
}

/* Team summary card (#manager/team): legend buttons stay compact on mobile (override touch-target block) */
@media (max-width: 768px) {
  #team-summary-card button.team-summary-legend-btn {
    min-height: auto;
    min-width: auto;
  }
}

#team-summary-card [role="progressbar"] > div {
  transition: width 0.65s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* HRBP committees — combobox triggers aligned with .input row */
.hrbp-filter-trigger {
  min-height: 2.375rem;
  background-color: var(--bg-card, #fff);
}
.hrbp-filter-trigger:hover {
  border-color: var(--border-strong, #d1d5db);
}
[data-theme="dark"] .hrbp-filter-trigger {
  background-color: var(--bg-card, #1e293b);
}

/* QA thread list server pages: mutually exclusive desktop table vs mobile cards (breakpoints can tie with custom CSS) */
@media (max-width: 767.98px) {
  .qa-threads-desktop-table {
    display: none !important;
  }
}
@media (min-width: 768px) {
  .qa-threads-mobile-cards {
    display: none !important;
  }
}

/* ===== FormBuilder — Manager feedback QuestionCard-style (scoped) ===== */
.fb-qcard-root {
  --fb-qcard-accent-w: 4px;
}

@keyframes fbQcardFadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fbQcardPulseRing {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.18);
  }
}

@keyframes fbQcardSectionHighlight {
  0% {
    box-shadow:
      0 4px 20px -12px rgba(15, 23, 42, 0.1),
      inset 0 0 0 0 rgba(254, 216, 19, 0);
  }
  16% {
    /* inset زیر overflow:hidden نمایان است؛ هالهٔ بیرونی بریده می‌شد */
    box-shadow:
      0 6px 26px -12px rgba(15, 23, 42, 0.14),
      inset 0 0 0 3px rgba(254, 216, 19, 0.75),
      inset 0 0 20px 0 rgba(254, 216, 19, 0.12);
  }
  48% {
    /* نگه‌داشتن اوج تا کاربر حس کند «این سؤال فعال است» */
    box-shadow:
      0 6px 26px -12px rgba(15, 23, 42, 0.14),
      inset 0 0 0 3px rgba(254, 216, 19, 0.75),
      inset 0 0 20px 0 rgba(254, 216, 19, 0.12);
  }
  100% {
    box-shadow:
      0 4px 20px -12px rgba(15, 23, 42, 0.1),
      inset 0 0 0 0 rgba(254, 216, 19, 0);
  }
}

@keyframes fbQcardSectionHighlightDark {
  0% {
    box-shadow:
      0 4px 24px -10px rgba(0, 0, 0, 0.45),
      inset 0 0 0 0 rgba(254, 216, 19, 0);
  }
  16% {
    box-shadow:
      0 6px 28px -10px rgba(0, 0, 0, 0.5),
      inset 0 0 0 3px rgba(254, 216, 19, 0.55),
      inset 0 0 22px 0 rgba(254, 216, 19, 0.1);
  }
  48% {
    box-shadow:
      0 6px 28px -10px rgba(0, 0, 0, 0.5),
      inset 0 0 0 3px rgba(254, 216, 19, 0.55),
      inset 0 0 22px 0 rgba(254, 216, 19, 0.1);
  }
  100% {
    box-shadow:
      0 4px 24px -10px rgba(0, 0, 0, 0.45),
      inset 0 0 0 0 rgba(254, 216, 19, 0);
  }
}

@keyframes fbQcardAnswerFlash {
  0% {
    filter: brightness(1);
  }
  35% {
    filter: brightness(1.02);
  }
  100% {
    filter: brightness(1);
  }
}

.fb-qcard-root .fb-qcard-section {
  position: relative;
  /* هم‌تراز با rounded-3xl در تمپلیت؛ برای گوشه‌ی منطبق نوار accent و کادر کارت */
  border-radius: 1.5rem;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 20px -12px rgba(15, 23, 42, 0.1);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.25s ease;
}

.fb-qcard-root .fb-qcard-section::after {
  content: "";
  position: absolute;
  inset-block: 0;
  /* RTL: شروع خط = سمت راست؛ نوار رنگی باید روی همان لبه باشد */
  inset-inline-start: 0;
  width: var(--fb-qcard-accent-w);
  border-start-start-radius: inherit;
  border-end-start-radius: inherit;
  background: linear-gradient(to bottom, #fcd34d, #fb923c);
  pointer-events: none;
  transition: background 0.35s ease;
}

.fb-qcard-root .fb-qcard-section:hover {
  border-color: rgba(203, 213, 225, 0.95);
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.16);
}

.fb-qcard-root .fb-qcard-section.fb-qcard-section--answered {
  border-color: rgba(167, 243, 208, 0.85);
  box-shadow: 0 8px 30px -12px rgba(16, 185, 129, 0.18);
}

.fb-qcard-root .fb-qcard-section.fb-qcard-section--answered::after {
  background: linear-gradient(to bottom, #34d399, #14b8a6);
}

/* همان نود هم id=self-eval-sections است هم fb-qcard-root؛ نه .fb-qcard-root #self-eval-sections */
#self-eval-sections.fb-qcard-root > .fb-qcard-section {
  animation: fbQcardFadeInUp 0.45s ease-out backwards;
}

#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(1) {
  animation-delay: 0ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(2) {
  animation-delay: 60ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(3) {
  animation-delay: 120ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(4) {
  animation-delay: 180ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(5) {
  animation-delay: 240ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(6) {
  animation-delay: 300ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(7) {
  animation-delay: 360ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(8) {
  animation-delay: 420ms;
}
#self-eval-sections.fb-qcard-root > .fb-qcard-section:nth-child(n + 9) {
  animation-delay: 480ms;
}

.fb-qcard-root .fb-qcard-section.answer-just-completed,
.fb-qcard-root .fb-qcard-section.fb-qcard-answer-flash {
  animation: fbQcardAnswerFlash 0.55s ease-out;
}

/* پالس «سؤال بعدی» — اولویت بالا + delay صفر (nth-child قبلاً animation-delay می‌گذاشت) */
#self-eval-sections.fb-qcard-root > .fb-qcard-section.section-highlight-pulse {
  animation: fbQcardSectionHighlight 1.85s ease-out forwards;
  animation-delay: 0s !important;
}

[data-theme="dark"] #self-eval-sections.fb-qcard-root > .fb-qcard-section.section-highlight-pulse {
  animation: fbQcardSectionHighlightDark 1.85s ease-out forwards;
  animation-delay: 0s !important;
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-section {
  background: var(--bg-card);
  border-color: var(--border-default);
  box-shadow: 0 4px 24px -10px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-section:hover {
  border-color: var(--border-strong);
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-section.fb-qcard-section--answered {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 8px 28px -10px rgba(16, 185, 129, 0.22);
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-section::after {
  background: linear-gradient(to bottom, rgba(52, 211, 153, 0.95), rgba(20, 184, 166, 0.85));
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-section.fb-qcard-section--answered::after {
  background: linear-gradient(to bottom, #10b981, #0d9488);
}

.fb-qcard-root .fb-qcard-status {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(253, 230, 138, 0.95);
  background: #fffbeb;
  color: #b45309;
  white-space: nowrap;
}

.fb-qcard-root .fb-qcard-section.fb-qcard-section--answered .fb-qcard-status {
  border-color: rgba(167, 243, 208, 0.95);
  background: #ecfdf5;
  color: #047857;
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-status {
  background: rgba(120, 53, 15, 0.35);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-section.fb-qcard-section--answered .fb-qcard-status {
  background: rgba(6, 78, 59, 0.45);
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.fb-qcard-root .fb-field-num.fb-qcard-num {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fef3c7, #ffedd5);
  color: #b45309;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.35);
}

/* هم‌تراز با QuestionCard: emerald-400 → teal-500 + سایهٔ سبز */
.fb-qcard-root .fb-field-num.fb-qcard-num.fb-qcard-num--answered {
  background: linear-gradient(to bottom right, #34d399, #14b8a6);
  color: #ffffff;
  box-shadow:
    0 4px 6px -1px rgba(15, 118, 110, 0.12),
    0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .fb-qcard-root .fb-field-num.fb-qcard-num {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.55), rgba(154, 52, 18, 0.45));
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.22);
}

[data-theme="dark"] .fb-qcard-root .fb-field-num.fb-qcard-num.fb-qcard-num--answered {
  background: linear-gradient(to bottom right, #34d399, #0d9488);
  color: #ffffff;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.25),
    0 10px 15px -3px rgba(16, 185, 129, 0.35);
}

.fb-qcard-root input[type="checkbox"].fb-field {
  accent-color: #10b981;
}

.fb-qcard-root .fb-qcard-num-wrap {
  position: relative;
}

.fb-qcard-root .fb-qcard-num-wrap:not(:has(.fb-qcard-num--answered)) .fb-qcard-num::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: fbQcardPulseRing 2.4s ease-out infinite;
}

.fb-qcard-root .fb-qcard-section .fb-field-heading h2 {
  font-size: clamp(0.95rem, 0.9rem + 0.35vw, 1.1rem);
  color: #0f172a;
  line-height: 1.65;
}

[data-theme="dark"] .fb-qcard-root .fb-qcard-section .fb-field-heading h2 {
  color: var(--text-heading);
}

.fb-qcard-root .fb-qcard-section .fb-field-body {
  margin-top: 0.75rem;
}

.fb-qcard-root .rich-text-container {
  border-radius: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fb-qcard-root .rich-text-container:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 18px -8px rgba(16, 185, 129, 0.15);
}

.fb-qcard-root .tiptap-field-mount:focus-within {
  background: rgba(236, 253, 245, 0.55) !important;
}

[data-theme="dark"] .fb-qcard-root .tiptap-field-mount:focus-within {
  background: rgba(6, 78, 59, 0.35) !important;
}

@keyframes fbQcardCheckPop {
  0% {
    transform: scale(0.65);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Manager feedback Likert scale — QuestionCard markup (.fb-qc-*) */

.fb-qcard-root .fb-qc-card-title {
  font-size: clamp(0.9375rem, 0.9rem + 0.28vw, 1.09375rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-card-title {
  color: var(--text-heading);
}

.fb-qcard-root .fb-qc-card-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #64748b;
}

.fb-qcard-root .fb-qc-card-hint svg {
  margin-top: 0.125rem;
  flex-shrink: 0;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-card-hint {
  color: #94a3b8;
}

/* فاصلهٔ عمودی بین گرید گزینه‌ها و ردیف «اطلاعات کافی» — هم‌تراز با mock (مثل mt-2.5 بین گرید و دکمه) */
.fb-qcard-root .fb-qc-scale {
  min-width: 0;
}

.fb-qcard-root .fb-qc-scale-prompts {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.625rem;
  min-width: 0;
}

.fb-qcard-root .fb-qc-scale > .fb-qc-extra,
.fb-qcard-root .fb-qc-scale > .fb-qc-meta-row {
  margin-top: 1rem;
}

.fb-qcard-root .fb-qc-scale-grid {
  display: grid;
  margin-top: 0.625rem;
  align-self: stretch;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .fb-qcard-root .fb-qc-scale-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.fb-qcard-root .fb-qc-opt-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.375rem;
  border-radius: 9999px;
  overflow: hidden;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.fb-qcard-root .fb-qc-opt-num {
  display: block;
}

.fb-qcard-root .fb-qc-opt-check {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: #ffffff;
}

.fb-qcard-root .fb-qc-opt:has(.fb-qc-radio:checked) .fb-qc-opt-num {
  display: none;
}

.fb-qcard-root .fb-qc-opt:has(.fb-qc-radio:checked) .fb-qc-opt-check {
  display: grid;
}

.fb-qcard-root .fb-qc-opt:has(.fb-qc-radio:checked) .fb-qc-opt-check svg {
  animation: fbQcardCheckPop 0.28s ease-out;
}

/* همان منطق :has با سلکتور خواهر مجاور — برای مرورگرهای بدون :has یا با باگ رندر */
.fb-qcard-root .fb-qc-opt .fb-qc-radio:checked + .fb-qc-opt-dot .fb-qc-opt-num {
  display: none;
}

.fb-qcard-root .fb-qc-opt .fb-qc-radio:checked + .fb-qc-opt-dot .fb-qc-opt-check {
  display: grid;
}

.fb-qcard-root .fb-qc-opt-text {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  color: #475569;
  text-align: center;
  max-width: 100%;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt-dot {
  background: rgba(30, 41, 59, 0.9);
  color: #94a3b8;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt-text {
  color: #cbd5e1;
}

/* کاشی لیکرت — انتخاب‌نشده: کادر خاکستری مینیمال یکدست (بدون رنگ طیفی روی border) */
html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt:not(:has(.fb-qc-radio:checked)) {
  background: #ffffff;
  border: 2px solid #d1d5db;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt:hover:not(:has(input:disabled)) {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt:not(:has(.fb-qc-radio:checked)) {
  background: var(--bg-surface-secondary);
  border: 2px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt:hover:not(:has(input:disabled)) {
  background: var(--bg-surface-tertiary);
  border-color: rgba(148, 163, 184, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* فقط کیبورد: دور کادر تمرکز؛ با کلیک ماوس outline نده تا دوبل با border انتخاب نشود */
.fb-qcard-root .fb-qc-opt:has(.fb-qc-radio:focus-visible) {
  outline: 2px solid rgba(16, 185, 129, 0.5);
  outline-offset: 2px;
}

.fb-qcard-root .fb-qc-opt:active:not(:has(input:disabled)) {
  transform: translateY(0);
}

/* Selected by tone */

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="negative"]:has(.fb-qc-radio:checked) {
  background: #fff1f2;
  border: 2px solid #fb7185;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.14);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #be123c;
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #f43f5e;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(244, 63, 94, 0.35);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="soft-negative"]:has(.fb-qc-radio:checked) {
  background: #fff7ed;
  border: 2px solid #fb923c;
  box-shadow: 0 2px 10px rgba(249, 115, 22, 0.14);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="soft-negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #c2410c;
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="soft-negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #f97316;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.35);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="neutral"]:has(.fb-qc-radio:checked) {
  background: #f1f5f9;
  border: 2px solid #94a3b8;
  box-shadow: 0 2px 10px rgba(100, 116, 139, 0.14);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="neutral"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #334155;
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="neutral"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #64748b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(100, 116, 139, 0.3);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="positive"]:has(.fb-qc-radio:checked) {
  background: #ecfdf5;
  border: 2px solid #34d399;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #047857;
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="strong-positive"]:has(.fb-qc-radio:checked) {
  background: #f0fdfa;
  border: 2px solid #2dd4bf;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="strong-positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #0f766e;
}

html:not([data-theme="dark"]) .fb-qcard-root .fb-qc-opt[data-qc-tone="strong-positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #14b8a6;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(20, 184, 166, 0.35);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="negative"]:has(.fb-qc-radio:checked) {
  background: rgba(127, 29, 29, 0.45);
  border: 2px solid rgba(251, 113, 133, 0.75);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #fecaca;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #fb7185;
  color: #ffffff;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="soft-negative"]:has(.fb-qc-radio:checked) {
  background: rgba(124, 45, 18, 0.45);
  border: 2px solid rgba(251, 146, 60, 0.65);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="soft-negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #fdba74;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="soft-negative"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #fb923c;
  color: #ffffff;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="neutral"]:has(.fb-qc-radio:checked) {
  background: rgba(30, 41, 59, 0.75);
  border: 2px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="neutral"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #e2e8f0;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="neutral"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #94a3b8;
  color: #ffffff;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="positive"]:has(.fb-qc-radio:checked) {
  background: rgba(6, 78, 59, 0.45);
  border: 2px solid rgba(52, 211, 153, 0.65);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #6ee7b7;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #34d399;
  color: #0f172a;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="strong-positive"]:has(.fb-qc-radio:checked) {
  background: rgba(6, 78, 59, 0.55);
  border: 2px solid rgba(45, 212, 191, 0.65);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="strong-positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-text {
  color: #5eead4;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-opt[data-qc-tone="strong-positive"]:has(.fb-qc-radio:checked) .fb-qc-opt-dot {
  background: #2dd4bf;
  color: #0f172a;
}

/* «اطلاعات کافی ندارم» — شبیه ردیف رادیو با حلقهٔ انتخاب (الگوی UI قرصی) */
.fb-qcard-root .fb-qc-no-info {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.75rem;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  cursor: pointer;
  border: 2px dashed #e2e8f0;
  background: #ffffff;
  color: #64748b;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: start;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.fb-qcard-root .fb-qc-no-info:hover:not(:has(input:disabled)) {
  border-color: #cbd5e1;
  background: #fafafa;
  color: #475569;
}

.fb-qcard-root .fb-qc-no-info--readonly,
.fb-qcard-root .fb-qc-no-info:has(input:disabled) {
  cursor: default;
  opacity: 0.95;
}

.fb-qcard-root .fb-qc-no-info-indicator {
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  display: grid;
  place-items: center;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.fb-qcard-root .fb-qc-no-info-text {
  flex: 0 1 auto;
  min-width: 0;
}

.fb-qcard-root .fb-qc-no-info-check {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}

.fb-qcard-root .fb-qc-no-info:has(input:checked) .fb-qc-no-info-check {
  display: flex;
}

.fb-qcard-root .fb-qc-no-info:has(input:checked) .fb-qc-no-info-indicator {
  border-color: #059669;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.fb-qcard-root .fb-qc-no-info:has(input:checked) {
  border-color: rgba(52, 211, 153, 0.65);
  border-style: solid;
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-no-info {
  border-color: rgba(71, 85, 105, 0.55);
  background: rgba(15, 23, 42, 0.5);
  color: #94a3b8;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-no-info:hover:not(:has(input:disabled)) {
  border-color: rgba(100, 116, 139, 0.75);
  background: rgba(30, 41, 59, 0.65);
  color: #cbd5e1;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-no-info-indicator {
  border-color: #64748b;
  background: rgba(15, 23, 42, 0.6);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-no-info:has(input:checked) .fb-qc-no-info-indicator {
  border-color: #34d399;
  background: #059669;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}

[data-theme="dark"] .fb-qcard-root .fb-qc-no-info:has(input:checked) {
  background: rgba(6, 78, 59, 0.35);
  border-color: rgba(52, 211, 153, 0.45);
  color: #bbf7d0;
}

.fb-qcard-root .fb-qc-no-info:focus-within {
  outline: 2px solid rgba(16, 185, 129, 0.4);
  outline-offset: 2px;
}

/* Details / optional note row */
.fb-qcard-root .fb-qc-extra-summary::-webkit-details-marker {
  display: none;
}

.fb-qcard-root .fb-qc-extra:not([open]) .fb-qc-extra-close {
  display: none !important;
}

.fb-qcard-root .fb-qc-extra[open] .fb-qc-extra-open {
  display: none !important;
}

.fb-qcard-root .fb-qc-selected-line strong {
  font-weight: 600;
  color: #0f172a;
}

[data-theme="dark"] .fb-qcard-root .fb-qc-selected-line strong {
  color: var(--text-heading);
}

.fb-qcard-root .fb-qc-extra[open] .fb-qc-selected-line {
  color: #94a3b8;
}

.fb-qcard-root .fb-qc-draft-textarea:focus {
  box-shadow: 0 0 0 4px rgba(252, 211, 77, 0.25);
}

/* کارت معرفی محرمانگی — همان عرض ستون فرم (فرزند مستقیم .fb-qcard-page نیست وقتی ستون max-w-5xl داریم) */
.fb-qcard-page .fb-qcard-hero {
  border-radius: 1.5rem;
  border-color: rgba(167, 243, 208, 0.45);
  box-shadow: 0 8px 28px -14px rgba(16, 185, 129, 0.14);
}

[data-theme="dark"] .fb-qcard-page .fb-qcard-hero {
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: 0 8px 28px -14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .fb-qcard-page #mgr-feedback-form .sticky-footer {
  border-top-color: rgba(52, 211, 153, 0.28);
  box-shadow: 0 -12px 32px -14px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  #self-eval-sections.fb-qcard-root > .fb-qcard-section,
  .fb-qcard-root .fb-qcard-section.answer-just-completed,
  .fb-qcard-root .fb-qcard-section.fb-qcard-answer-flash,
  #self-eval-sections.fb-qcard-root > .fb-qcard-section.section-highlight-pulse,
  .fb-qcard-root .fb-qcard-num-wrap:not(:has(.fb-qcard-num--answered)) .fb-qcard-num::after {
    animation: none !important;
  }

  .fb-qcard-root .fb-qc-opt:has(.fb-qc-radio:checked) .fb-qc-opt-check svg {
    animation: none !important;
  }

  .fb-qcard-root .fb-qc-opt:hover:not(:has(input:disabled)) {
    transform: none;
  }
}

/* ----- HRBP: راهنمای فوری «اولین ارزیابی» (بدون تأخیر native title) ----- */
.hrbp-help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 1px;
  padding: 0;
  border-radius: 9999px;
  border: 1px solid var(--border-default);
  background: var(--bg-card, #ffffff);
  color: var(--info-600, #2563eb);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: help;
  transition: background-color 0.1s ease, border-color 0.1s ease, box-shadow 0.1s ease, color 0.1s ease;
}

.hrbp-help-tip:hover,
.hrbp-help-tip:focus-visible {
  background: var(--info-50, #eff6ff);
  border-color: var(--info-200, #bfdbfe);
  color: var(--info-700, #1d4ed8);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
  outline: none;
}

[data-theme="dark"] .hrbp-help-tip {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--border-default);
  color: var(--info-500, #60a5fa);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .hrbp-help-tip:hover,
[data-theme="dark"] .hrbp-help-tip:focus-visible {
  background: rgba(30, 58, 138, 0.45);
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hrbp-help-tip-float {
  position: fixed;
  z-index: 10050;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-default);
  background: var(--bg-card, #ffffff);
  color: var(--text-primary, #1e293b);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: right;
  box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.28), 0 4px 14px -6px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
}

[data-theme="dark"] .hrbp-help-tip-float {
  background: var(--bg-card, #1e293b);
  color: var(--text-primary, #f1f5f9);
  border-color: var(--border-default);
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.55);
}


/* ========================================================================
   Committee Decision Page — UI Redesign v2
   Scoped to .committee-* namespace. Append to styles.css; rebuild admin-built.css.
   ======================================================================== */

/* ── 0. Page header — back + status pill (match btn-sm footprint) ─────── */
.committee-page-header__controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  flex-shrink: 0;
}
.committee-header-pill {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.125rem;
  min-width: 6.5rem;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.committee-header-pill--published {
  background: #d1fae5;
  border: 2px solid rgba(16, 185, 129, 0.35);
  color: #065f46;
}
.committee-header-pill--finalized {
  background: #d1fae5;
  border: 2px solid rgba(16, 185, 129, 0.35);
  color: #065f46;
}
.committee-header-pill--pending {
  background: #fef3c7;
  border: 2px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
}
.committee-header-pill--draft {
  background: #fef3c7;
  border: 2px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
}
.committee-header-pill--empty {
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
  color: #6b7280;
  font-weight: 500;
}
[data-theme="dark"] .committee-header-pill--published,
[data-theme="dark"] .committee-header-pill--finalized {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}
[data-theme="dark"] .committee-header-pill--pending {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}
[data-theme="dark"] .committee-header-pill--draft {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}
[data-theme="dark"] .committee-header-pill--empty {
  background: rgba(55, 65, 81, 0.5);
  border-color: #4b5563;
  color: #9ca3af;
}

/* ── 1. Decision Status Banner (C4) ──────────────────────────────────── */
.committee-status-banner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
}
.committee-status-banner--published {
  background: #d1fae5;
  border-color: rgba(16,185,129,0.4);
  color: #065f46;
}
.committee-status-banner--finalized {
  background: #d1fae5;
  border-color: rgba(16,185,129,0.4);
  color: #065f46;
}
.committee-status-banner--draft {
  background: #fef3c7;
  border-color: rgba(245,158,11,0.4);
  color: #92400e;
}
.committee-status-banner--empty {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #6b7280;
}
[data-theme="dark"] .committee-status-banner--published {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.35);
  color: #6ee7b7;
}
[data-theme="dark"] .committee-status-banner--finalized {
  background: rgba(16,185,129,0.15);
  border-color: rgba(16,185,129,0.35);
  color: #6ee7b7;
}
[data-theme="dark"] .committee-status-banner--draft {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.35);
  color: #fcd34d;
}
[data-theme="dark"] .committee-status-banner--empty {
  background: rgba(55,65,81,0.5);
  border-color: #4b5563;
  color: #9ca3af;
}

/* ── 2. Tab Bar Enhancement (C1 / M4) ────────────────────────────────── */
.committee-tabs {
  border-radius: 1rem;
  border: 1px solid var(--border-default, #e5e7eb);
  background: var(--bg-muted, #f3f4f6);
  padding: 0.375rem;
}
[data-theme="dark"] .committee-tabs {
  border-color: #374151;
  background: rgba(31, 41, 55, 0.72);
}

/* همه سایزها: اسکرول افقی روان در یک ردیف */
.committee-tabs__scroll {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1023px) {
  .committee-tabs__scroll {
    padding-bottom: 0.125rem;
  }
}

.committee-tab {
  scroll-snap-align: start;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
@media (min-width: 768px) {
  .committee-tab {
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
  }
}

.committee-tab:focus-visible {
  outline: 2px solid #fed813;
  outline-offset: 2px;
}

.committee-tab svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

.committee-tab--inactive {
  color: #4b5563;
  background: transparent;
}
.committee-tab--inactive:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.72);
}
[data-theme="dark"] .committee-tab--inactive {
  color: #9ca3af;
}
[data-theme="dark"] .committee-tab--inactive:hover {
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.06);
}

.committee-tab--active {
  color: #111827;
  background: #fff;
  border-color: rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
[data-theme="dark"] .committee-tab--active {
  color: #f9fafb;
  background: #374151;
  border-color: #4b5563;
  box-shadow: none;
}

.committee-tab-separator {
  width: 1px;
  background: #d1d5db;
  margin: 0.375rem 0.25rem;
  border-radius: 9999px;
  flex-shrink: 0;
  align-self: stretch;
}
[data-theme="dark"] .committee-tab-separator { background: #4b5563; }

.committee-tab-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #d1d5db;
  flex-shrink: 0;
  margin-inline-start: 1px;
}
.committee-tab-dot--filled { background: #10b981; }
[data-theme="dark"] .committee-tab-dot { background: #4b5563; }
[data-theme="dark"] .committee-tab-dot--filled { background: #34d399; }

.committee-tab-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #fed813;
  animation: committee-tab-pulse-anim 1.6s ease-in-out infinite;
  flex-shrink: 0;
  margin-inline-start: 2px;
}
@keyframes committee-tab-pulse-anim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.75); }
}

/* ── 3. Permission Banner (H3) ───────────────────────────────────────── */
.committee-permission-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-radius: 0.875rem;
  background: #fffbeb;
  border: 1.5px solid #fbbf24;
  color: #92400e;
}
.committee-permission-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  border-radius: 0.625rem;
  background: #fef3c7;
  color: #b45309;
  flex-shrink: 0;
}
[data-theme="dark"] .committee-permission-banner {
  background: rgba(120,53,15,0.15);
  border-color: #b45309;
  color: #fcd34d;
}
[data-theme="dark"] .committee-permission-banner__icon {
  background: rgba(120,53,15,0.3);
  color: #fbbf24;
}

/* ── 4. Choice Cards (Performance / Sub-Level) ──────────────────────── */
.committee-choice-card {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 1.25rem;
  transition: box-shadow .2s, border-color .2s;
}
.committee-choice-card:hover { box-shadow: 0 4px 16px rgba(17,24,39,0.05); }
/* دراپ‌داون سطح شغلی — پنل absolute از کارت بیرون نزند */
.committee-choice-card--career-overflow,
.committee-choice-card--career-overflow .snap-proposed-picker {
  overflow: visible;
}
/* ویرایش inline سطح در هدر کمیته — پنل absolute زیر دکمه (نه fixed؛ RTL-safe) */
.career-level-inline-edit-bar,
.career-level-inline-picker-host,
.career-level-inline-picker-host .snap-proposed-picker {
  overflow: visible;
}
.page-committee .card:has(.career-level-inline-edit-bar) {
  overflow: visible;
}
[data-theme="dark"] .committee-choice-card {
  background: #111827;
  border-color: #374151;
}
.committee-choice-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.125rem;
}
.committee-choice-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.committee-choice-card__icon--perf  { background: #fef3c7; color: #d97706; }
.committee-choice-card__icon--level { background: rgba(47,190,168,0.12); color: #2fbea8; }
[data-theme="dark"] .committee-choice-card__icon--perf  { background: rgba(217,119,6,0.18); color: #fbbf24; }
[data-theme="dark"] .committee-choice-card__icon--level { background: rgba(47,190,168,0.18); color: #5eead4; }
.committee-choice-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  line-height: 1.25;
}
[data-theme="dark"] .committee-choice-card__title { color: #f3f4f6; }
.committee-choice-card__subtitle {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.125rem;
}
.committee-choice-card__count {
  margin-inline-start: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.committee-choice-card__count--level { color: #0d9488; background: rgba(47,190,168,0.12); }
[data-theme="dark"] .committee-choice-card__count       { color: #fbbf24; background: rgba(217,119,6,0.2); }
[data-theme="dark"] .committee-choice-card__count--level{ color: #5eead4; background: rgba(47,190,168,0.2); }

.committee-choice-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.committee-choice-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.875rem;
  background: #ffffff;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  position: relative;
}
.committee-choice-option:hover {
  border-color: #d1d5db;
  background: #f9fafb;
}
[data-theme="dark"] .committee-choice-option {
  background: #1f2937;
  border-color: #374151;
}
[data-theme="dark"] .committee-choice-option:hover {
  background: #283242;
  border-color: #4b5563;
}

.committee-choice-option--perf:hover  { border-color: #fcd34d; background: #fffbeb; }
.committee-choice-option--level:hover { border-color: rgba(47,190,168,0.4); background: rgba(47,190,168,0.04); }
[data-theme="dark"] .committee-choice-option--perf:hover  { border-color: rgba(252,211,77,0.4); background: rgba(217,119,6,0.08); }
[data-theme="dark"] .committee-choice-option--level:hover { border-color: rgba(47,190,168,0.4); background: rgba(47,190,168,0.08); }

.committee-choice-option--selected {
  border-color: #f3c42e;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(254,216,19,0.18);
}
[data-theme="dark"] .committee-choice-option--selected {
  border-color: #fed813;
  background: rgba(217,119,6,0.12);
  box-shadow: 0 0 0 3px rgba(254,216,19,0.18);
}
.committee-choice-option--selected-level {
  border-color: #2fbea8;
  background: rgba(47,190,168,0.07);
  box-shadow: 0 0 0 3px rgba(47,190,168,0.18);
}
[data-theme="dark"] .committee-choice-option--selected-level {
  background: rgba(47,190,168,0.14);
  box-shadow: 0 0 0 3px rgba(47,190,168,0.22);
}

.committee-choice-option__badge {
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background: #f3f4f6;
  color: #9ca3af;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
/* هم‌اندازه و هم‌خانوادهٔ بج کارت بُعد کمیته */
.committee-choice-option--quality .committee-choice-option__badge {
  width: 1.875rem;
  height: 1.875rem;
  min-width: 1.875rem;
  min-height: 1.875rem;
  border-radius: 0.5rem;
  box-sizing: border-box;
}
[data-theme="dark"] .committee-choice-option__badge {
  background: #374151;
  color: #9ca3af;
}
.committee-choice-option__badge--active-perf  { background: linear-gradient(135deg,#fed813,#f3c42e); color: #323232; }
.committee-choice-option__badge--active-level { background: linear-gradient(135deg,#2fbea8,#0d9488); color: #ffffff; }

.committee-choice-option__content {
  flex: 1;
  min-width: 0;
}
.committee-choice-option__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  line-height: 1.3;
}
[data-theme="dark"] .committee-choice-option__title { color: #e5e7eb; }
.committee-choice-option--selected .committee-choice-option__title,
.committee-choice-option--selected-level .committee-choice-option__title {
  color: #111827;
  font-weight: 700;
}
[data-theme="dark"] .committee-choice-option--selected .committee-choice-option__title,
[data-theme="dark"] .committee-choice-option--selected-level .committee-choice-option__title {
  color: #f9fafb;
}
.committee-choice-option__desc {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 0.2rem;
  line-height: 1.4;
}
[data-theme="dark"] .committee-choice-option__desc { color: #6b7280; }

.committee-choice-option__check {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  transition: all .15s;
}
[data-theme="dark"] .committee-choice-option__check { border-color: #4b5563; }
.committee-choice-option__check--active {
  border-color: #f3c42e;
  background: #f3c42e;
  color: #ffffff;
}
.committee-choice-option__check--active-level {
  border-color: #2fbea8;
  background: #2fbea8;
  color: #ffffff;
}
/* گزینه‌های کارت کمیته (پتانسیل / اثرگذاری): پس‌زمینه رنگی از اینلاین؛ تیک باید روشن باشد */
.committee-choice-option__check--active-q {
  color: #ffffff;
}

/* ── 5. Dimension Scale Legend (M1) ──────────────────────────────────── */
.committee-scale-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  margin-bottom: 0.875rem;
}
.committee-scale-legend__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #9ca3af;
  flex-shrink: 0;
}
.committee-scale-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: #6b7280;
}
.committee-scale-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
[data-theme="dark"] .committee-scale-legend {
  background: #1f2937;
  border-color: #374151;
}
[data-theme="dark"] .committee-scale-legend__label { color: #6b7280; }
[data-theme="dark"] .committee-scale-legend__item { color: #9ca3af; }

/* ── 6. Dimensions 2-col Grid (H1) ───────────────────────────────────── */
.committee-dims-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.625rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: stretch;
}
.committee-dims-grid > .committee-dim-card,
.committee-dims-grid > .committee-dims-grid__ai-slot {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .committee-dims-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* تعداد فرد محور (۳ یا ۵): ردیف آخر تمام‌عرض تا سلول خالی نماند */
  .committee-dims-grid[data-dim-count="3"] > .committee-dim-card:last-child,
  .committee-dims-grid[data-dim-count="5"] > .committee-dim-card:last-child {
    grid-column: 1 / -1;
  }
}

/* کارت برداشت سریع — پیش‌فرض: یک سلول در شبکهٔ ۲ ستونه (۵ محور / مدیر) */
.committee-dims-grid__ai-slot {
  min-height: 0;
  height: 100%;
  min-width: 0;
}
@media (min-width: 1024px) {
  /* فقط ۴ محور (IC غیرفنی): کارت AI تمام‌عرض زیر گرید ۲×۲ */
  .committee-dims-grid--with-ai[data-dim-count="4"] > .committee-dims-grid__ai-slot {
    grid-column: 1 / -1;
    width: 100%;
  }
}
.committee-dims-grid__ai-slot.committee-ai-profile-card {
  display: flex;
  flex-direction: column;
  padding: 0.625rem 0.75rem;
}
@media (min-width: 768px) {
  .committee-dims-grid--with-ai[data-dim-count="4"] > .committee-dims-grid__ai-slot.committee-ai-profile-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 1rem;
  }
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__head {
  margin-bottom: 0.35rem;
  padding-bottom: 0.35rem;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .committee-dims-grid--with-ai[data-dim-count="4"] > .committee-dims-grid__ai-slot .committee-ai-profile-card__head {
    margin-bottom: 0;
    padding-bottom: 0;
    padding-inline-end: 1rem;
    margin-inline-end: 0;
    border-bottom: none;
    border-inline-end: 1px solid rgba(139, 92, 246, 0.22);
    min-width: 9.5rem;
  }
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__icon {
  width: 1.75rem;
  height: 1.75rem;
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__title {
  font-size: 0.75rem;
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__subtitle {
  display: none;
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__body {
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__text {
  font-size: 0.7rem;
  line-height: 1.45;
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__text--headline {
  font-size: 0.72rem;
  line-height: 1.45;
}
.committee-dims-grid--with-ai[data-dim-count="4"] > .committee-dims-grid__ai-slot .committee-ai-profile-card__text--headline {
  font-size: 0.8rem;
  line-height: 1.55;
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__block--trend .committee-ai-profile-card__text {
  font-size: 0.68rem;
  line-height: 1.45;
}
.committee-dims-grid--with-ai:not([data-dim-count="4"]) > .committee-dims-grid__ai-slot .committee-ai-profile-card__text--headline {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.committee-dims-grid--with-ai:not([data-dim-count="4"]) > .committee-dims-grid__ai-slot .committee-ai-profile-card__block--trend .committee-ai-profile-card__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.committee-dims-grid--with-ai[data-dim-count="4"] > .committee-dims-grid__ai-slot .committee-ai-profile-card__block--trend .committee-ai-profile-card__text {
  font-size: 0.75rem;
  line-height: 1.5;
}
.committee-dims-grid__ai-slot .committee-ai-profile-card__label--trend {
  font-size: 0.65rem;
  margin-bottom: 0.15rem;
}

.committee-ai-profile-card {
  display: block;
  border-radius: 0.875rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.06), rgba(37, 99, 235, 0.04));
  padding: 0.75rem 0.875rem;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}
.committee-ai-profile-card--standalone {
  margin-top: 0.75rem;
}
.committee-ai-profile-card__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}
.committee-ai-profile-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  flex-shrink: 0;
}
.committee-ai-profile-card__titles {
  min-width: 0;
}
.committee-ai-profile-card__title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.35;
}
.committee-ai-profile-card__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.65rem;
  line-height: 1.45;
  color: #6b7280;
}
.committee-ai-profile-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.committee-ai-profile-card__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #7c3aed;
  margin-bottom: 0.25rem;
}
.committee-ai-profile-card__label--trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #5b21b6;
}
.committee-ai-profile-card__label-icon {
  width: 0.875rem;
  height: 0.875rem;
  stroke-width: 2;
}
.committee-ai-profile-card__text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #374151;
}
.committee-ai-profile-card__text--headline {
  font-weight: 500;
  color: #111827;
  overflow-wrap: anywhere;
}
.committee-ai-profile-card__text--headline strong {
  font-weight: 900;
}
.committee-ai-profile-card__sticker {
  display: inline-flex;
  align-items: center;
  vertical-align: text-bottom;
  margin-inline-end: 0.25rem;
  color: #7c3aed;
  flex-shrink: 0;
}
.committee-ai-profile-card__sticker--warn {
  color: #d97706;
}
.committee-ai-profile-card__sticker-icon {
  display: block;
}
[data-theme="dark"] .committee-ai-profile-card__sticker {
  color: #a78bfa;
}
[data-theme="dark"] .committee-ai-profile-card__sticker--warn {
  color: #fbbf24;
}
.committee-ai-profile-card__more {
  font-weight: 800;
  color: #7c3aed;
  white-space: nowrap;
}
.committee-ai-profile-card__separator {
  color: #9ca3af;
  padding-inline: 0.2rem;
}
.committee-ai-profile-card__text--muted {
  margin: 0;
  color: #9ca3af;
  font-size: 0.72rem;
}
.committee-ai-profile-card__quotes {
  margin: 0;
  padding: 0;
  list-style: none;
}
.committee-ai-profile-card__quote-row {
  margin-bottom: 0.5rem;
}
.committee-ai-profile-card__quote-row:last-child {
  margin-bottom: 0;
}
.committee-ai-profile-card__quote-src {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 0.15rem;
}
.committee-ai-profile-card__quote {
  display: block;
  margin: 0;
  padding-inline-start: 0.65rem;
  border-inline-start: 2px solid rgba(139, 92, 246, 0.45);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #4b5563;
  font-style: normal;
  quotes: none;
}
.committee-ai-profile-card__block--trend .committee-ai-profile-card__text {
  font-size: 0.74rem;
}

[data-theme="dark"] .committee-ai-profile-card {
  border-color: rgba(167, 139, 250, 0.35);
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.12), rgba(37, 99, 235, 0.08));
}
[data-theme="dark"] .committee-ai-profile-card__head {
  border-bottom-color: rgba(167, 139, 250, 0.25);
}
[data-theme="dark"] .committee-dims-grid--with-ai[data-dim-count="4"] > .committee-dims-grid__ai-slot .committee-ai-profile-card__head {
  border-inline-end-color: rgba(167, 139, 250, 0.25);
}
[data-theme="dark"] .committee-ai-profile-card__icon {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}
[data-theme="dark"] .committee-ai-profile-card__title {
  color: #f3f4f6;
}
[data-theme="dark"] .committee-ai-profile-card__subtitle {
  color: #9ca3af;
}
[data-theme="dark"] .committee-ai-profile-card__text {
  color: #d1d5db;
}
[data-theme="dark"] .committee-ai-profile-card__text--headline {
  color: #f9fafb;
}
[data-theme="dark"] .committee-ai-profile-card__more {
  color: #c4b5fd;
}
[data-theme="dark"] .committee-ai-profile-card__text--muted {
  color: #6b7280;
}
[data-theme="dark"] .committee-ai-profile-card__label--trend {
  color: #ddd6fe;
}
[data-theme="dark"] .committee-ai-profile-card__quote {
  color: #d1d5db;
  border-inline-start-color: rgba(167, 139, 250, 0.5);
}
[data-theme="dark"] .committee-ai-profile-card__quote-src {
  color: #9ca3af;
}

/* فضای خالی زیر فرم تا نوار ثابت روی فیلدها نیفتد.
   ارتفاع ~۳.۷۵rem + padding + احتمال wrap دکمه‌ها؛ با pb-4 تیلویند هم‌زمان نکنید (override می‌شود). */
.committee-decision-tab--fixed-actions {
  padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
}

/* اعضای کمیته — گرید واکنش‌گرا (۳–۴ کارت در ردیف روی دسکتاپ) */
.committee-roster-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 1rem;
}

@media (min-width: 640px) {
  .committee-roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .committee-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .committee-roster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.committee-roster-grid__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
}

/* صفحهٔ کمیته: نوار اکشن fixed باید نسبت به ویوپورت باشد، نه main جمع‌شده.
   انیمیشن pageEnter (transform) و در برخی موتورها view-transition-name روی main
   باعث می‌شود fixed به نیاکان محدود شود و نوار باریک/گوشه‌دار دیده شود. */
body.page-committee main#main-content {
  view-transition-name: none;
}

/* pageEnter uses transform — breaks position:fixed descendants until animation ends */
body.page-committee .page-shell.animate-page-enter {
  animation: none;
  transform: none;
}

/* ── 7. Action Bar (C2 / H4) — fixed to viewport (x-teleport="body"), inset for sidebar */
.committee-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(254, 216, 19, 0.5);
  box-shadow: 0 -4px 20px rgba(17, 24, 39, 0.08);
  margin: 0;
  border-radius: 0;
  padding: 0.75rem max(1.25rem, env(safe-area-inset-inline-start, 0px)) calc(0.75rem + env(safe-area-inset-bottom, 0px)) max(1.25rem, env(safe-area-inset-inline-end, 0px));
  min-height: 3.75rem;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .committee-sticky-bar {
    right: var(--shell-sidebar-w);
    left: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  body.layout-sidebar-collapsed .committee-sticky-bar {
    right: var(--shell-sidebar-w-collapsed);
  }
}

.committee-sticky-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
}
.committee-sticky-bar__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.committee-sticky-bar__dirty {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #92400e;
}
.committee-sticky-bar__status-text {
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.committee-sticky-bar__status-text--saving { color: #6b7280; }
.committee-sticky-bar__status-text--saved  { color: #047857; }
.committee-sticky-bar__status-text--error  { color: #b91c1c; }
.committee-sticky-bar__save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  background: linear-gradient(to left, #fed813, #f3c42e);
  color: #323232;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.committee-sticky-bar__save-btn:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(254,216,19,0.45);
  opacity: 0.95;
}
.committee-sticky-bar__save-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.committee-sticky-bar__secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: calc(0.7rem - 2px) 1.75rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.5;
  background: var(--bg-card);
  border: 2px solid var(--border-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}
.committee-sticky-bar__secondary-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--gold-light);
  color: var(--jet);
}
[data-theme="dark"] .committee-sticky-bar__secondary-btn:hover:not(:disabled) {
  color: var(--text-primary);
}
[data-theme="dark"] .committee-sticky-bar {
  background: rgba(30, 41, 59, 0.97);
  border-top-color: rgba(52, 211, 153, 0.28);
  box-shadow: 0 -12px 32px -14px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .committee-sticky-bar__dirty  { color: #fcd34d; }
[data-theme="dark"] .committee-sticky-bar__status-text--saved  { color: #6ee7b7; }
[data-theme="dark"] .committee-sticky-bar__status-text--saving { color: #9ca3af; }
[data-theme="dark"] .committee-sticky-bar__status-text--error  { color: #fca5a5; }

/* ── 8. Publish Card (H2) ────────────────────────────────────────────── */
.committee-publish-card {
  border-radius: 0.875rem;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  padding: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.committee-publish-card--active {
  border-color: #2fbea8;
  background: rgba(47,190,168,0.04);
}
[data-theme="dark"] .committee-publish-card {
  background: rgba(55,65,81,0.3);
  border-color: #4b5563;
}
[data-theme="dark"] .committee-publish-card--active {
  border-color: #2fbea8;
  background: rgba(47,190,168,0.08);
}

/* ── 9. Internal Notes Enhancement (M3) ──────────────────────────────── */
.committee-notes-section {
  border-radius: 0.875rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-inline-start: 4px solid #2fbea8;
  padding: 1rem 1.25rem;
}
[data-theme="dark"] .committee-notes-section {
  background: rgba(14,116,144,0.08);
  border-color: rgba(47,190,168,0.2);
  border-inline-start-color: #2fbea8;
}
.committee-notes-section__char-count {
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: end;
  margin-top: 0.375rem;
}
[data-theme="dark"] .committee-notes-section__char-count { color: #6b7280; }

/* ── 10. Dimension Card (redesigned) ─────────────────────────────────── */
.committee-dim-card {
  padding: 1.125rem;
  border-radius: 1rem;
  background: #fafbfc;
  border: 1.5px solid #e5e7eb;
  transition: border-color .2s, background .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}
.committee-dim-card:hover { box-shadow: 0 2px 8px rgba(17,24,39,0.04); }
[data-theme="dark"] .committee-dim-card {
  background: rgba(31,41,55,0.6);
  border-color: #374151;
}
.committee-dim-card--scored { box-shadow: 0 2px 12px rgba(17,24,39,0.05); }

.committee-dim-card__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.committee-dim-card__badge {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background-color .2s, color .2s, border-color .2s;
  box-sizing: border-box;
}
/* قبل از انتخاب امتیاز: بدون خاکستریِ نامرئی (#e5e7eb + شفافیت) */
.committee-dim-card__badge--empty {
  background: rgba(254, 216, 19, 0.2);
  color: #78350f;
  border: 1px solid rgba(254, 216, 19, 0.45);
}
[data-theme="dark"] .committee-dim-card__badge--empty {
  background: rgba(254, 216, 19, 0.14);
  color: #fcd34d;
  border-color: rgba(254, 216, 19, 0.28);
}
.committee-dim-card__title { flex: 1; min-width: 0; position: relative; }
.committee-dim-card__name-row {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.committee-dim-card__name-wrap {
  display: block;
}
.committee-dim-card__name--has-tip {
  cursor: default;
  text-decoration: underline dotted rgba(107, 114, 128, 0.4);
  text-underline-offset: 0.2em;
}
[data-theme="dark"] .committee-dim-card__name--has-tip {
  text-decoration-color: rgba(156, 163, 175, 0.5);
}
.committee-dim-card__name {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  margin: 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .committee-dim-card__name { color: #f3f4f6; }
.committee-dim-card__name-en {
  font-size: 0.65rem;
  color: #9ca3af;
  display: block;
  margin-top: 0.125rem;
}
.committee-dim-card__score-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.3rem 0.5rem;
  border-radius: 9999px;
  background: #e5e7eb;
  color: #6b7280;
  flex-shrink: 1;
  min-width: 0;
  max-width: 11rem;
  white-space: normal;
  line-height: 1.25;
  text-align: center;
  transition: background-color .2s, color .2s;
}
.committee-dim-card__score-pill-text {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
[data-theme="dark"] .committee-dim-card__score-pill { background: #374151; color: #9ca3af; }
.committee-dim-card__score-pill--active { font-weight: 700; }

.committee-dim-card__desc {
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  padding-inline-start: 0.625rem;
  border-inline-start: 2px solid #f3c42e;
}
[data-theme="dark"] .committee-dim-card__desc { color: #9ca3af; }

/* چهار دکمهٔ پلکان: بدون حداقل ثابت per-column؛ در هر کارت نیم‌صفحهٔ جمع‌شده خارج نزند */
.committee-dim-card__scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}
@media (min-width: 1024px) {
  .committee-dim-card__scores {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.committee-dim-score-btn {
  min-width: 0;
  min-height: 3.35rem;
  border-radius: 0.625rem;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  font-weight: 700;
  font-size: 0.65rem;
  line-height: 1.35;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  padding: 0.35rem 0.3rem;
  hyphens: none;
}
.committee-dim-score-btn:hover {
  border-color: #9ca3af;
  background: #f9fafb;
  transform: translateY(-1px);
}
[data-theme="dark"] .committee-dim-score-btn {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}
[data-theme="dark"] .committee-dim-score-btn:hover { background: #283242; border-color: #4b5563; }
.committee-dim-score-btn--active {
  color: #ffffff !important;
  /* scale باعث بریده شدن لبهٔ دکمه در شبکهٔ تنگ می‌شد */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.committee-dim-card__progress {
  height: 4px;
  border-radius: 9999px;
  background: #e5e7eb;
  overflow: hidden;
}
[data-theme="dark"] .committee-dim-card__progress { background: #374151; }
.committee-dim-card__progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width .5s cubic-bezier(0.4,0,0.2,1), background-color .2s;
}

.committee-dim-card__note { margin-top: 0.125rem; }
.committee-dim-card__note-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #f3c42e;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color .15s;
}
.committee-dim-card__note-btn:hover { color: #d97706; }

/* ── 12. Supplementary Decisions Section ─────────────────────────────── */
.committee-supp-section {
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
[data-theme="dark"] .committee-supp-section {
  background: rgba(17,24,39,0.4);
  border-color: #374151;
}
.committee-supp-section__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.committee-supp-section__heading {
  min-width: 0;
  flex: 1;
}
.committee-supp-section__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #6b7280;
  font-weight: 400;
}
[data-theme="dark"] .committee-supp-section__subtitle { color: #9ca3af; }
.committee-supp-section__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #6b7280;
  flex-shrink: 0;
}
[data-theme="dark"] .committee-supp-section__icon { background: #374151; color: #9ca3af; }
.committee-supp-section__title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
}
[data-theme="dark"] .committee-supp-section__title { color: #f3f4f6; }

.committee-supp-section--compact-readonly {
  padding: 1rem 1.125rem;
  margin-bottom: 1.25rem;
}
.committee-supp-section--compact-readonly .committee-supp-section__header {
  margin-bottom: 0.75rem;
}
.committee-supp-section__compact-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.committee-supp-section__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
@media (min-width: 768px) {
  .committee-supp-section__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.committee-supp-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border-radius: 0.875rem;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: all .15s;
}
.committee-supp-toggle:hover {
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-1px);
}
[data-theme="dark"] .committee-supp-toggle {
  background: #1f2937;
  border-color: #374151;
}
[data-theme="dark"] .committee-supp-toggle:hover { background: #283242; border-color: #4b5563; }

/* Active states using :has() — reflects checkbox state without JS */
.committee-supp-toggle--gold:has(input:checked) {
  border-color: #f3c42e;
  background: #fffbeb;
  box-shadow: 0 0 0 3px rgba(254,216,19,0.18);
}
.committee-supp-toggle--green:has(input:checked) {
  border-color: #2fbea8;
  background: rgba(47,190,168,0.06);
  box-shadow: 0 0 0 3px rgba(47,190,168,0.18);
}
.committee-supp-toggle--red:has(input:checked) {
  border-color: #ef4444;
  background: rgba(239,68,68,0.05);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.16);
}
[data-theme="dark"] .committee-supp-toggle--gold:has(input:checked)  { background: rgba(217,119,6,0.12); }
[data-theme="dark"] .committee-supp-toggle--green:has(input:checked) { background: rgba(47,190,168,0.12); }
[data-theme="dark"] .committee-supp-toggle--red:has(input:checked)   { background: rgba(239,68,68,0.12); }

.committee-supp-toggle__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.committee-supp-toggle__icon--gold  { background: #fef3c7; color: #d97706; }
.committee-supp-toggle__icon--green { background: rgba(47,190,168,0.12); color: #0d9488; }
.committee-supp-toggle__icon--red   { background: #fee2e2; color: #dc2626; }
[data-theme="dark"] .committee-supp-toggle__icon--gold  { background: rgba(217,119,6,0.18); color: #fbbf24; }
[data-theme="dark"] .committee-supp-toggle__icon--green { background: rgba(47,190,168,0.18); color: #5eead4; }
[data-theme="dark"] .committee-supp-toggle__icon--red   { background: rgba(220,38,38,0.18); color: #fca5a5; }

.committee-supp-toggle__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.committee-supp-toggle__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
}
[data-theme="dark"] .committee-supp-toggle__label { color: #f3f4f6; }
.committee-supp-toggle__hint {
  font-size: 0.68rem;
  color: #9ca3af;
  margin-top: 0.2rem;
  line-height: 1.4;
}

.committee-supp-impact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  height: 100%;
  min-height: 0;
  padding: 0.875rem;
  border-radius: 0.875rem;
  border: 1.5px dashed #d1d5db;
  background: #f9fafb;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.committee-supp-impact-card--green {
  border-color: rgba(47,190,168,0.55);
  background: rgba(47,190,168,0.055);
}
.committee-supp-impact-card--red {
  border-color: rgba(239,68,68,0.5);
  background: rgba(239,68,68,0.045);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}
.committee-supp-impact-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6b7280;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
.committee-supp-impact-card--green .committee-supp-impact-card__icon {
  color: #0d9488;
  background: rgba(47,190,168,0.12);
  border-color: rgba(47,190,168,0.25);
}
.committee-supp-impact-card--red .committee-supp-impact-card__icon {
  color: #dc2626;
  background: #fee2e2;
  border-color: rgba(239,68,68,0.24);
}
.committee-supp-impact-card__body {
  min-width: 0;
}
.committee-supp-impact-card__eyebrow {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #6b7280;
}
.committee-supp-impact-card__text {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #374151;
}
[data-theme="dark"] .committee-supp-impact-card {
  background: rgba(31,41,55,0.65);
  border-color: #4b5563;
}
[data-theme="dark"] .committee-supp-impact-card--green {
  background: rgba(47,190,168,0.1);
  border-color: rgba(94,234,212,0.35);
}
[data-theme="dark"] .committee-supp-impact-card--red {
  background: rgba(239,68,68,0.1);
  border-color: rgba(252,165,165,0.35);
}
[data-theme="dark"] .committee-supp-impact-card__icon {
  background: rgba(17,24,39,0.55);
  border-color: #4b5563;
  color: #9ca3af;
}
[data-theme="dark"] .committee-supp-impact-card--green .committee-supp-impact-card__icon {
  color: #5eead4;
  background: rgba(47,190,168,0.16);
  border-color: rgba(94,234,212,0.24);
}
[data-theme="dark"] .committee-supp-impact-card--red .committee-supp-impact-card__icon {
  color: #fca5a5;
  background: rgba(220,38,38,0.16);
  border-color: rgba(252,165,165,0.24);
}
[data-theme="dark"] .committee-supp-impact-card__eyebrow {
  color: #d1d5db;
}
[data-theme="dark"] .committee-supp-impact-card__text {
  color: #e5e7eb;
}

/* Custom toggle switch */
.committee-supp-switch {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}
.committee-supp-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.committee-supp-switch__track {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 9999px;
  transition: background .2s;
  cursor: pointer;
}
.committee-supp-switch__thumb {
  position: absolute;
  top: 2px;
  inset-inline-end: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: inset-inline-end .2s, inset-inline-start .2s;
  pointer-events: none;
}
.committee-supp-switch input:checked + .committee-supp-switch__track { background: #f3c42e; }
.committee-supp-switch input:checked ~ .committee-supp-switch__thumb {
  inset-inline-end: auto;
  inset-inline-start: 2px;
}
.committee-supp-switch--green input:checked + .committee-supp-switch__track { background: #2fbea8; }
.committee-supp-switch--red   input:checked + .committee-supp-switch__track { background: #ef4444; }
.committee-supp-switch--gold  input:checked + .committee-supp-switch__track { background: #f59e0b; }
.committee-supp-switch--disabled .committee-supp-switch__track { opacity: 0.65; cursor: not-allowed; }
[data-theme="dark"] .committee-supp-switch__track { background: #4b5563; }

/* Promotion level picker (revealed when promotion checked) */
.committee-supp-promo-picker {
  margin-top: 0.75rem;
  padding: 1rem 1.125rem;
  background: linear-gradient(135deg, rgba(254,216,19,0.06), rgba(243,196,46,0.04));
  border: 1.5px solid rgba(243,196,46,0.35);
  border-radius: 0.875rem;
}
[data-theme="dark"] .committee-supp-promo-picker {
  background: rgba(217,119,6,0.08);
  border-color: rgba(217,119,6,0.3);
}
.committee-supp-promo-picker__label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 0.5rem;
}
[data-theme="dark"] .committee-supp-promo-picker__label { color: #fbbf24; }

.committee-promo-level-hint {
  margin: 0 0 0.625rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #78716c;
}
[data-theme="dark"] .committee-promo-level-hint {
  color: #a8a29e;
}

.committee-promo-level-select-wrap {
  max-width: 42rem;
  width: 100%;
}

.committee-promo-level-select {
  width: 100%;
  min-height: 3rem;
  padding-block: 0.625rem;
  padding-inline: 0.875rem 2.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  border-radius: 0.75rem;
  border-width: 1.5px;
  cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2378716c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center left 0.65rem;
  background-size: 1.125rem;
  appearance: none;
}
html[dir="rtl"] .committee-promo-level-select {
  background-position: center right 0.65rem;
  padding-inline: 2.25rem 0.875rem;
}

.committee-promo-level-select:hover {
  border-color: rgba(217, 119, 6, 0.45);
}

.committee-promo-level-select:focus {
  outline: none;
  border-color: #fed813;
  box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.28);
}

.committee-promo-level-select:focus-visible {
  outline: none;
  border-color: #fed813;
  box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.28);
}

[data-theme="dark"] .committee-promo-level-select {
  background-color: #1f2937;
  color: #f3f4f6;
  border-color: #4b5563;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
}

[data-theme="dark"] .committee-promo-level-select:hover {
  border-color: rgba(251, 191, 36, 0.45);
}

/* ── 13. Publish Card v2 ─────────────────────────────────────────────── */
.committee-publish-wrap { margin-top: 1rem; }
.committee-publish-v2 {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.125rem;
  border-radius: 1rem;
  border: 1.5px solid #e5e7eb;
  background: linear-gradient(135deg, #f9fafb, #ffffff);
  cursor: pointer;
  transition: all .2s;
}
.committee-publish-v2:hover:not(.committee-publish-v2--locked):not(.committee-publish-v2--done) {
  border-color: rgba(47,190,168,0.45);
  background: linear-gradient(135deg, rgba(47,190,168,0.04), #ffffff);
}
[data-theme="dark"] .committee-publish-v2 {
  background: linear-gradient(135deg, rgba(17,24,39,0.4), rgba(31,41,55,0.4));
  border-color: #374151;
}
.committee-publish-v2--active {
  border-color: #2fbea8;
  background: linear-gradient(135deg, rgba(47,190,168,0.08), rgba(47,190,168,0.02));
  box-shadow: 0 0 0 3px rgba(47,190,168,0.15);
}
.committee-publish-v2--done { opacity: 0.85; cursor: default; }
.committee-publish-v2--locked { cursor: not-allowed; }

.committee-publish-v2__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(47,190,168,0.12);
  color: #0d9488;
}
[data-theme="dark"] .committee-publish-v2__icon { background: rgba(47,190,168,0.18); color: #5eead4; }
.committee-publish-v2__icon--gray { background: #f3f4f6; color: #6b7280; }
[data-theme="dark"] .committee-publish-v2__icon--gray { background: #374151; color: #9ca3af; }

.committee-publish-v2__body { flex: 1; min-width: 0; }
.committee-publish-v2__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #064e3b;
  line-height: 1.25;
  display: block;
}
[data-theme="dark"] .committee-publish-v2__title { color: #d1fae5; }
.committee-publish-v2--locked .committee-publish-v2__title { color: #374151; }
[data-theme="dark"] .committee-publish-v2--locked .committee-publish-v2__title { color: #d1d5db; }

.committee-publish-v2__hint {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.committee-publish-v2--done .committee-publish-v2__hint { color: #047857; font-weight: 600; }
[data-theme="dark"] .committee-publish-v2__hint { color: #9ca3af; }
[data-theme="dark"] .committee-publish-v2--done .committee-publish-v2__hint { color: #6ee7b7; }

.committee-publish-v2__alert {
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  background: rgba(47,190,168,0.1);
  border: 1px solid rgba(47,190,168,0.25);
  border-radius: 0.5rem;
  font-size: 0.72rem;
  color: #065f46;
  display: flex;
  gap: 0.375rem;
  line-height: 1.5;
}
[data-theme="dark"] .committee-publish-v2__alert {
  background: rgba(47,190,168,0.12);
  border-color: rgba(47,190,168,0.3);
  color: #6ee7b7;
}

/* ── 14. Internal Notes v2 ───────────────────────────────────────────── */
.committee-notes-v2 {
  border-radius: 1rem;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  overflow: hidden;
  transition: border-color .15s;
}
.committee-notes-v2:focus-within {
  border-color: #2fbea8;
  box-shadow: 0 0 0 3px rgba(47,190,168,0.15);
}
[data-theme="dark"] .committee-notes-v2 {
  background: rgba(17,24,39,0.5);
  border-color: #374151;
}
.committee-notes-v2__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(47,190,168,0.06), rgba(47,190,168,0.02));
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}
[data-theme="dark"] .committee-notes-v2__header {
  background: rgba(47,190,168,0.08);
  border-bottom-color: #374151;
}
.committee-notes-v2__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.committee-notes-v2__lock-icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: rgba(47,190,168,0.18);
  color: #0d9488;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .committee-notes-v2__lock-icon { color: #5eead4; }
.committee-notes-v2__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
}
[data-theme="dark"] .committee-notes-v2__label { color: #f3f4f6; }
.committee-notes-v2__badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
}
[data-theme="dark"] .committee-notes-v2__badge {
  color: #7dd3fc;
  background: rgba(3,105,161,0.18);
  border-color: rgba(186,230,253,0.2);
}
.committee-notes-v2__badge--public {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}
[data-theme="dark"] .committee-notes-v2__badge--public {
  color: #fcd34d;
  background: rgba(245,158,11,0.15);
  border-color: rgba(253,230,138,0.25);
}
.committee-notes-v2--feedback {
  border-color: rgba(245,158,11,0.35);
}
[data-theme="dark"] .committee-notes-v2--feedback {
  border-color: rgba(245,158,11,0.25);
}
.committee-notes-v2__textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #111827;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  overflow-y: hidden;
  font-family: inherit;
  line-height: 1.6;
  /* auto-grow to fit content without JS (Chrome 123+) */
  field-sizing: content;
}
[data-theme="dark"] .committee-notes-v2__textarea { color: #f3f4f6; }
.committee-notes-v2__textarea::placeholder { color: #9ca3af; }
.committee-notes-v2__footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}
[data-theme="dark"] .committee-notes-v2__footer {
  background: rgba(31,41,55,0.5);
  border-top-color: #374151;
}
.committee-notes-v2__char-count {
  font-size: 0.7rem;
  color: #9ca3af;
  font-weight: 500;
}

/* Read-only decision notes (compact / locked tab) */
.committee-notes-v2--readonly:focus-within {
  border-color: #e5e7eb;
  box-shadow: none;
}
[data-theme="dark"] .committee-notes-v2--readonly:focus-within {
  border-color: #374151;
}
.committee-notes-v2__body--readonly {
  padding: 0.875rem 1rem 1rem;
  text-align: start;
}
.committee-notes-v2__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.75;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
}
[data-theme="dark"] .committee-notes-v2__text { color: #f3f4f6; }
.committee-notes-v2__text--placeholder {
  color: #9ca3af;
  font-style: normal;
}
[data-theme="dark"] .committee-notes-v2__text--placeholder { color: #6b7280; }
.committee-notes-v2__body--empty {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.committee-notes-v2__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem 0.75rem;
  font-size: 0.7rem;
  color: #6b7280;
  border-top: 1px solid #f3f4f6;
  background: #fafafa;
}
[data-theme="dark"] .committee-notes-v2__meta {
  color: #9ca3af;
  border-top-color: #374151;
  background: rgba(31,41,55,0.45);
}
.committee-notes-v2__meta-sep { opacity: 0.55; }

/* Compact readonly summary fields (finalized committee decision) */
.committee-decision-ro-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-radius: 0.875rem;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 0.875rem 1rem;
  min-height: 0;
}
[data-theme="dark"] .committee-decision-ro-field {
  border-color: #374151;
  background: rgba(17,24,39,0.55);
}
.committee-decision-ro-field__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: start;
}
.committee-decision-ro-field__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}
.committee-decision-ro-field__icon svg.icon {
  display: block;
  flex-shrink: 0;
}
.committee-decision-ro-field__icon--level {
  background: rgba(47,190,168,0.12);
  color: #0d9488;
}
.committee-decision-ro-field__icon--perf {
  background: #fef3c7;
  color: #d97706;
}
.committee-decision-ro-field__icon--amber {
  background: rgba(245,158,11,0.15);
  color: #b45309;
}
.committee-decision-ro-field__icon--neutral {
  background: #f3f4f6;
  color: #6b7280;
}
.committee-decision-ro-field__icon--green {
  background: rgba(34,197,94,0.12);
  color: #15803d;
}
.committee-decision-ro-field__icon--warning {
  background: #fef3c7;
  color: #b45309;
}
.committee-decision-ro-field__icon--danger {
  background: rgba(239,68,68,0.1);
  color: #b91c1c;
}
[data-theme="dark"] .committee-decision-ro-field__icon--level {
  background: rgba(47,190,168,0.18);
  color: #5eead4;
}
[data-theme="dark"] .committee-decision-ro-field__icon--perf {
  background: rgba(217,119,6,0.18);
  color: #fbbf24;
}
[data-theme="dark"] .committee-decision-ro-field__icon--amber {
  background: rgba(245,158,11,0.2);
  color: #fbbf24;
}
[data-theme="dark"] .committee-decision-ro-field__icon--neutral {
  background: #374151;
  color: #9ca3af;
}
[data-theme="dark"] .committee-decision-ro-field__icon--green {
  background: rgba(34,197,94,0.18);
  color: #4ade80;
}
[data-theme="dark"] .committee-decision-ro-field__icon--warning {
  background: rgba(217,119,6,0.18);
  color: #fbbf24;
}
[data-theme="dark"] .committee-decision-ro-field__icon--danger {
  background: rgba(239,68,68,0.18);
  color: #f87171;
}
.committee-decision-ro-field__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.4;
}
[data-theme="dark"] .committee-decision-ro-field__title { color: #9ca3af; }
.committee-decision-ro-field__value {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.5;
  color: #111827;
  text-align: start;
  width: 100%;
}
.committee-decision-ro-field__value--ltr bdi {
  unicode-bidi: isolate;
}
[data-theme="dark"] .committee-decision-ro-field__value { color: #f3f4f6; }
.committee-decision-ro-field__value--empty {
  font-weight: 500;
  color: #9ca3af;
}
.committee-choice-card--compact-readonly {
  padding-bottom: 0.25rem;
}
.committee-choice-card--compact-readonly .committee-choice-card__header {
  margin-bottom: 0.25rem;
}

[data-committee-decision-compact="1"] .committee-dim-card {
  padding: 0.75rem 0.875rem;
}
[data-committee-decision-compact="1"] .committee-dim-card__score-pill {
  display: none;
}
[data-committee-decision-compact="1"] .committee-dim-card__selected-value {
  margin-top: 0.375rem !important;
  padding-top: 0.375rem;
  padding-inline-start: calc(1.875rem + 0.625rem);
  border-top: 1px dashed #e5e7eb;
  font-size: 0.8125rem !important;
  text-align: start;
}
[data-theme="dark"] [data-committee-decision-compact="1"] .committee-dim-card__selected-value {
  border-top-color: #374151;
}
[data-committee-decision-compact="1"] .rounded-2xl.border.p-5.mb-5 > .flex.items-center.gap-3.mb-4 {
  margin-bottom: 0.75rem;
}
[data-committee-decision-compact="1"] .rounded-2xl.border.p-5.mb-5 > .flex.items-center.gap-3.mb-4 p.text-\[11px\] {
  display: none;
}

/* ── 14b. Session Notes v2 (CommitteeNote — per-author) ─────────────── */
.committee-session-notes-v2 {
  border-radius: 1rem;
  background: #ffffff;
  border: 1.5px solid #e5e7eb;
  overflow: hidden;
}
[data-theme="dark"] .committee-session-notes-v2 {
  background: rgba(17,24,39,0.5);
  border-color: #374151;
}
.committee-session-notes-v2__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(254,216,19,0.08), rgba(254,216,19,0.02));
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}
[data-theme="dark"] .committee-session-notes-v2__header {
  background: rgba(254,216,19,0.06);
  border-bottom-color: #374151;
}
.committee-session-notes-v2__title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.committee-session-notes-v2__icon {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  background: rgba(254,216,19,0.22);
  color: #b45309;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-theme="dark"] .committee-session-notes-v2__icon { color: #fcd34d; }
.committee-session-notes-v2__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
[data-theme="dark"] .committee-session-notes-v2__label { color: #f3f4f6; }
.committee-session-notes-v2__badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 0.2rem 0.625rem;
  border-radius: 9999px;
}
[data-theme="dark"] .committee-session-notes-v2__badge {
  color: #fcd34d;
  background: rgba(146,64,14,0.2);
  border-color: rgba(253,230,138,0.2);
}
.committee-session-notes-v2__body {
  padding: 1rem;
}
.committee-session-notes-v2__hint {
  font-size: 0.8125rem;
  color: #6b7280;
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
[data-theme="dark"] .committee-session-notes-v2__hint { color: #9ca3af; }
.committee-session-notes-v2__add-form {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
}
[data-theme="dark"] .committee-session-notes-v2__add-form {
  border-bottom-color: #374151;
}
.committee-session-notes-v2__composer-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.committee-session-notes-v2__composer {
  width: 100%;
  min-height: 2.5rem;
  max-height: 12rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
}
.committee-session-notes-v2__composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.committee-session-notes-v2__send-btn {
  min-height: 2.25rem;
  min-width: 5.5rem;
}
.committee-session-notes-v2__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.committee-session-notes-v2__item {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}
[data-theme="dark"] .committee-session-notes-v2__item {
  background: transparent;
  border: none;
}
.committee-session-notes-v2__row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.committee-session-notes-v2__avatar.avatar,
.committee-session-notes-v2__avatar {
  width: 1.5625rem !important;
  height: 1.5625rem !important;
  font-size: 0.625rem !important;
  flex-shrink: 0;
}
.committee-session-notes-v2__content {
  flex: 1;
  min-width: 0;
}
.committee-session-notes-v2__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-bottom: 0.125rem;
}
.committee-session-notes-v2__author {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #374151;
  line-height: 1.3;
}
[data-theme="dark"] .committee-session-notes-v2__author { color: #e5e7eb; }
.committee-session-notes-v2__time {
  font-size: 0.625rem;
  color: #9ca3af;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .committee-session-notes-v2__time { color: #6b7280; }
.committee-session-notes-v2__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: auto;
}
.committee-session-notes-v2__action-btn {
  font-size: 0.625rem;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.committee-session-notes-v2__action-btn--edit {
  color: #b45309;
}
.committee-session-notes-v2__action-btn--edit:hover { text-decoration: underline; }
[data-theme="dark"] .committee-session-notes-v2__action-btn--edit { color: #fbbf24; }
.committee-session-notes-v2__action-btn--delete {
  color: #dc2626;
}
.committee-session-notes-v2__action-btn--delete:hover { text-decoration: underline; }
[data-theme="dark"] .committee-session-notes-v2__action-btn--delete { color: #f87171; }
.committee-session-notes-v2__action-sep {
  color: #d1d5db;
  font-size: 0.625rem;
}
[data-theme="dark"] .committee-session-notes-v2__action-sep { color: #4b5563; }
.committee-session-notes-v2__text {
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
[data-theme="dark"] .committee-session-notes-v2__text { color: #d1d5db; }
.committee-session-notes-v2__edit-form {
  margin-top: 0.375rem;
}
.committee-session-notes-v2__empty {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}
[data-theme="dark"] .committee-session-notes-v2__empty { color: #9ca3af; }

/* ── کامنت درون‌خطی: DOM mark فقط برای click — visual از CSS Highlight API ── */
.mgr-summary-comment-mark,
.prose .mgr-summary-comment-mark,
.prose mark.mgr-summary-comment-mark,
.mgr-summary-section__body .mgr-summary-comment-mark,
.committee-summary-panel__rich .mgr-summary-comment-mark,
.committee-self-eval-card__rich .mgr-summary-comment-mark,
[data-rich-text-readonly] .mgr-summary-comment-mark {
  display: inline;
  margin: 0;
  padding: 0;
  background: transparent !important;
  background-color: transparent !important;
  color: inherit !important;
  cursor: pointer;
  border: none !important;
  border-radius: 0;
  line-height: inherit;
  vertical-align: baseline;
}
.mgr-summary-comment-mark:focus {
  outline: none;
}
/* پیش‌نویس انتخاب */
::highlight(mgr-summary-pending) {
  background-color: rgba(254, 216, 19, 0.28);
  color: inherit;
}
[data-theme="dark"] ::highlight(mgr-summary-pending) {
  background-color: rgba(243, 196, 46, 0.32);
}
/* کامنت‌های ثبت‌شده — highlight زرد بدون underline */
::highlight(mgr-summary-comment-permanent) {
  background-color: rgba(254, 216, 19, 0.32);
}
[data-theme="dark"] ::highlight(mgr-summary-comment-permanent) {
  background-color: rgba(243, 196, 46, 0.28);
}
/* فوکوس کامنت در حالت ویرایش TipTap (کلیک روی نوار بازخورد) */
::highlight(mgr-summary-edit-focus) {
  background-color: rgba(254, 216, 19, 0.55);
  color: inherit;
}
[data-theme="dark"] ::highlight(mgr-summary-edit-focus) {
  background-color: rgba(243, 196, 46, 0.48);
}

/* HRBP manager summary review panel (committee summary tab) */
.committee-summary-hrbp-panel__status {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
}
.committee-summary-hrbp-panel__status--success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #065f46;
}
[data-theme="dark"] .committee-summary-hrbp-panel__status--success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
}
.committee-summary-hrbp-panel__status--pending {
  background: rgba(254, 216, 19, 0.12);
  border-color: rgba(254, 216, 19, 0.35);
  color: #78350f;
}
[data-theme="dark"] .committee-summary-hrbp-panel__status--pending {
  background: rgba(254, 216, 19, 0.1);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
.committee-summary-hrbp-panel__actions {
  margin-top: 0.25rem;
}

/* ویرایش inline جمع‌بندی در پرونده کمیته + نوار بازخورد */
.committee-summary-edit-layout {
  display: grid;
  gap: 1rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .committee-summary-edit-layout {
    grid-template-columns: minmax(0, 1fr) min(22rem, 32%);
  }
}
.committee-summary-edit-layout__main {
  min-width: 0;
}

.mgr-summary-feedback-rail {
  border: 1px solid var(--border-default, #e5e7eb);
  border-radius: 0.75rem;
  background: var(--surface-secondary, #f9fafb);
  min-width: 0;
}
[data-theme="dark"] .mgr-summary-feedback-rail {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(71, 85, 105, 0.6);
}
@media (min-width: 1024px) {
  .mgr-summary-feedback-rail {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    display: flex;
    flex-direction: column;
  }
}
.mgr-summary-feedback-rail__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  font-family: 'Vazirmatn', sans-serif;
  cursor: pointer;
  text-align: start;
}
.mgr-summary-feedback-rail__toggle-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading, #111827);
}
.mgr-summary-feedback-rail__header {
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-default, #e5e7eb);
}
.mgr-summary-feedback-rail__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading, #111827);
}
.mgr-summary-feedback-rail__body {
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
  max-height: 20rem;
}
@media (min-width: 1024px) {
  .mgr-summary-feedback-rail__body {
    flex: 1;
    max-height: none;
    min-height: 0;
  }
}
.mgr-summary-feedback-rail__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mgr-summary-feedback-rail__card {
  border-radius: 0.75rem;
  border: 1px solid var(--border-default, #e5e7eb);
  background: var(--surface, #fff);
  padding: 0.75rem;
}
[data-theme="dark"] .mgr-summary-feedback-rail__card {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(71, 85, 105, 0.5);
}
.mgr-summary-feedback-rail__card--clickable {
  cursor: pointer;
}
.mgr-summary-feedback-rail__card--clickable:hover {
  border-color: rgba(251, 191, 36, 0.55);
}
.mgr-summary-feedback-rail__card--active {
  border-color: rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 0 1px rgba(254, 216, 19, 0.35);
}
[data-theme="dark"] .mgr-summary-feedback-rail__card--active {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 0 1px rgba(243, 196, 46, 0.25);
}
.mgr-summary-feedback-rail__card-meta,
.mgr-summary-feedback-rail__reply-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #6b7280);
}
.mgr-summary-feedback-rail__author {
  font-weight: 600;
  color: var(--text-heading, #111827);
}
.mgr-summary-feedback-rail__sep {
  margin-inline: 0.25rem;
  opacity: 0.5;
}
.mgr-summary-feedback-rail__section {
  display: inline-block;
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  background: rgba(254, 216, 19, 0.2);
  color: #92400e;
}
[data-theme="dark"] .mgr-summary-feedback-rail__section {
  background: rgba(243, 196, 46, 0.15);
  color: #fcd34d;
}
.mgr-summary-feedback-rail__quote {
  margin: 0.5rem 0 0;
  padding-inline-start: 0.75rem;
  border-inline-start: 3px solid var(--brand-gold, #fed813);
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-body, #374151);
  line-height: 1.6;
}
.mgr-summary-feedback-rail__quote--active {
  background: rgba(254, 216, 19, 0.2);
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
}
[data-theme="dark"] .mgr-summary-feedback-rail__quote--active {
  background: rgba(243, 196, 46, 0.15);
}
.mgr-summary-feedback-rail__body-text,
.mgr-summary-feedback-rail__reply-text {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--text-body, #374151);
  white-space: pre-wrap;
  word-break: break-word;
}
.mgr-summary-feedback-rail__replies {
  margin: 0.625rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 2px solid var(--border-default, #e5e7eb);
}
.mgr-summary-feedback-rail__reply {
  font-size: 0.8125rem;
}

.mgr-summary-comments {
  margin-top: 1.25rem;
}
.mgr-summary-comments__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #111827;
}
[data-theme="dark"] .mgr-summary-comments__title { color: #f3f4f6; }
.mgr-summary-comments__threads {
  max-height: 28rem;
  overflow-y: auto;
  margin-top: 0.75rem;
}

/* نوار عمل انتخاب متن — کپی / کامنت */
.mgr-summary-selection-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.25rem;
  background: #fff;
  border: 2px solid var(--brand-gold, #fed813);
  border-radius: 9999px;
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(254, 216, 19, 0.12);
  z-index: 45;
}
[data-theme="dark"] .mgr-summary-selection-actions {
  background: #1f2937;
  border-color: #f3c42e;
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(243, 196, 46, 0.18);
}
.mgr-summary-selection-actions__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.375rem 0.75rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #1f2937;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: 'Vazirmatn', sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.mgr-summary-selection-actions__btn:hover {
  background: rgba(254, 216, 19, 0.22);
  color: #111827;
}
.mgr-summary-selection-actions__btn:focus-visible {
  outline: 2px solid var(--brand-gold, #fed813);
  outline-offset: 2px;
}
[data-theme="dark"] .mgr-summary-selection-actions__btn {
  color: #f3f4f6;
}
[data-theme="dark"] .mgr-summary-selection-actions__btn:hover {
  background: rgba(243, 196, 46, 0.18);
  color: #fff;
}
.mgr-summary-selection-actions__divider {
  width: 1px;
  height: 1.25rem;
  background: rgba(17, 24, 39, 0.12);
  flex-shrink: 0;
}
[data-theme="dark"] .mgr-summary-selection-actions__divider {
  background: rgba(255, 255, 255, 0.14);
}

/* آیکون micro-interaction — نوار عمل انتخاب */
.icon-hover-lift svg {
  transition: transform 0.22s ease-out;
  transform-origin: center;
}
.icon-hover-lift:hover svg {
  transform: translateY(-3px);
}
.icon-hover-scale svg {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}
.icon-hover-scale:hover svg {
  transform: scale(1.28);
}
@media (prefers-reduced-motion: reduce) {
  [class*="icon-hover-"] svg {
    transition: none !important;
    animation: none !important;
  }
  .icon-hover-lift:hover svg,
  .icon-hover-scale:hover svg {
    transform: none;
  }
}

.mgr-summary-comment-popover {
  width: min(22rem, calc(100vw - 1rem));
  background: #fff;
  border: 2px solid var(--brand-gold, #fed813);
  border-radius: 0.75rem;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(254, 216, 19, 0.15);
  padding: 0.75rem;
  /* زیر .header (50) — هنگام اسکرول مثل متن زیر هدر برود، نه روی آن */
  z-index: 45;
}
[data-theme="dark"] .mgr-summary-comment-popover {
  background: #1f2937;
  border-color: #f3c42e;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(243, 196, 46, 0.2);
}
.mgr-summary-comment-thread-panel {
  width: min(24rem, calc(100vw - 1rem));
  max-height: min(70vh, 28rem);
  overflow: auto;
  background: #fff;
  border: 2px solid var(--brand-gold, #fed813);
  border-radius: 0.75rem;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(254, 216, 19, 0.15);
  padding: 0.5rem 0.75rem 0.75rem;
  z-index: 45;
}
[data-theme="dark"] .mgr-summary-comment-thread-panel {
  background: #1f2937;
  border-color: #f3c42e;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(243, 196, 46, 0.2);
}
.mgr-summary-comment-thread-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-inline-start: auto;
  margin-bottom: 0.25rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #6b7280;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.mgr-summary-comment-thread-panel__close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #111827;
}
[data-theme="dark"] .mgr-summary-comment-thread-panel__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
}
.mgr-summary-comment-thread-panel__content .mgr-summary-comment-thread {
  border-bottom: none;
  padding-bottom: 0;
}
/* پنل کنار هایلایت: کاربر همان بخش را دیده — نقل‌قول تکراری نیست */
.mgr-summary-comment-thread-panel .mgr-summary-comment-thread__quote {
  display: none;
}
.mgr-summary-comment-composer__input {
  width: 100%;
  min-height: 4rem;
  resize: vertical;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.mgr-summary-comment-composer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.mgr-summary-comment-composer__delete {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}
.mgr-summary-comment-composer__delete:hover { color: #374151; }
.mgr-summary-comment-composer__submit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--gold, #fed813), var(--saffron, #f3c42e));
  color: var(--jet, #323232);
  font-size: 0.8125rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(254, 216, 19, 0.35);
}
.mgr-summary-comment-composer__submit:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(254, 216, 19, 0.45);
  transform: translateY(-1px);
}
.mgr-summary-comment-composer__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
[data-theme="dark"] .mgr-summary-comment-composer__submit {
  color: #111827;
}
.mgr-summary-comment-composer__enter-hint {
  opacity: 0.7;
  font-size: 0.75rem;
}

.mgr-summary-comment-thread {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.mgr-summary-comment-thread:last-child { border-bottom: none; }
.mgr-summary-comment-thread--active {
  background: rgba(254, 216, 19, 0.12);
  border-radius: 0.5rem;
  padding-inline: 0.5rem;
}
[data-theme="dark"] .mgr-summary-comment-thread { border-bottom-color: #374151; }

.mgr-summary-comment-thread__root,
.mgr-summary-comment-thread__reply {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.mgr-summary-comment-thread__avatar.avatar,
.mgr-summary-comment-thread__avatar {
  width: 1.75rem !important;
  height: 1.75rem !important;
  min-width: 1.75rem;
  font-size: 0.625rem;
}
.mgr-summary-comment-thread__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.2rem;
}
.mgr-summary-comment-thread__author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111827;
}
[data-theme="dark"] .mgr-summary-comment-thread__author { color: #e5e7eb; }
.mgr-summary-comment-thread__time {
  font-size: 0.6875rem;
  color: #9ca3af;
}
.mgr-summary-comment-thread__quote {
  font-size: 0.75rem;
  color: #6b7280;
  border-inline-start: 2px solid #fed813;
  padding-inline-start: 0.5rem;
  margin: 0.25rem 0 0.35rem;
}
.mgr-summary-comment-thread__text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
}
[data-theme="dark"] .mgr-summary-comment-thread__text { color: #d1d5db; }
.mgr-summary-comment-thread__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  font-size: 0.75rem;
}
.mgr-summary-comment-thread__toolbar .mgr-summary-comment-thread__actions::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1rem;
  margin-inline: 0.15rem;
  background: var(--border-medium, #e5e7eb);
  align-self: center;
}
[data-theme="dark"] .mgr-summary-comment-thread__toolbar .mgr-summary-comment-thread__actions::before {
  background: var(--border-medium, #4b5563);
}
.mgr-summary-comment-thread__action {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #6b7280;
}
.mgr-summary-comment-thread__action:hover { text-decoration: underline; }
.mgr-summary-comment-thread__action--danger { color: #dc2626; }
.mgr-summary-comment-thread__toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.mgr-summary-comment-thread__reactions-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}
.mgr-summary-comment-thread__reactions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.mgr-summary-comment-thread__reaction-who {
  margin: 0;
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
}
.mgr-summary-comment-thread__reaction-emoji {
  font-size: 1.05rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.mgr-summary-comment-thread__reaction--on .mgr-summary-comment-thread__reaction-emoji {
  transform: scale(1.12);
}
.mgr-summary-comment-thread__reaction,
.mgr-summary-comment-thread__like {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 0.375rem;
}
.mgr-summary-comment-thread__reaction:hover,
.mgr-summary-comment-thread__like:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .mgr-summary-comment-thread__reaction:hover,
[data-theme="dark"] .mgr-summary-comment-thread__like:hover {
  background: rgba(255, 255, 255, 0.08);
}
.mgr-summary-comment-thread__reaction--like.mgr-summary-comment-thread__reaction--on {
  color: #16a34a;
  background: rgba(22, 163, 74, 0.1);
}
.mgr-summary-comment-thread__reaction--dislike.mgr-summary-comment-thread__reaction--on {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}
.mgr-summary-comment-thread__like--on { color: #16a34a; }
.mgr-summary-comment-thread__reply-btn {
  font-size: 0.75rem;
  color: #b45309;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
[data-theme="dark"] .mgr-summary-comment-thread__reply-btn {
  color: #fbbf24;
}
.mgr-summary-comment-thread__replies {
  margin-top: 0.5rem;
  margin-inline-start: 1.75rem;
  padding-inline-start: 0.75rem;
  border-inline-start: 2px solid #e5e7eb;
}
[data-theme="dark"] .mgr-summary-comment-thread__replies { border-inline-start-color: #4b5563; }
.mgr-summary-comment-thread__reply {
  margin-top: 0.65rem;
}
.mgr-summary-comment-thread__reply-form {
  margin-top: 0.5rem;
  margin-inline-start: 1.75rem;
}
.mgr-summary-comment-threads__empty {
  font-size: 0.875rem;
  color: #6b7280;
  padding: 0.5rem 0;
}

/* Rich-text readonly images: see tiptap-editor.css (width/align from Tiptap data-width + data-align) */

/* Rich-text readonly RTL lists: see tiptap-editor.css (loads after admin-built) */

/* ── Rich-text readonly: پاراگراف‌های خالی (فاصله با Enter) را حفظ کن ── */
/* Tiptap خط خالی رو به‌صورت <p><br></p> ذخیره می‌کنه — browser آن را collapse می‌کند */
[data-rich-text-readonly] p:empty,
[data-rich-text-readonly] p:has(> br:only-child),
[dir="rtl"] .prose p:empty,
[dir="rtl"] .prose p:has(> br:only-child),
.prose[dir="rtl"] p:empty,
.prose[dir="rtl"] p:has(> br:only-child) {
  min-height: 1em;
  display: block;
}

/* ── Rich-text readonly: فاصله بین پاراگراف‌ها را مانند ادیتور تنظیم کن ── */
/* prose-sm فاصله کمتری می‌دهد؛ این rule آن را به حس ادیتور نزدیک می‌کند */
[data-rich-text-readonly] p,
[dir="rtl"] .prose p,
.prose[dir="rtl"] p {
  margin-bottom: 0.75em !important;
  margin-top: 0 !important;
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Summary Guide Panel — confirm-modal-layer (modal) + docked side panel
   ═══════════════════════════════════════════════════════════════════════════ */

.summary-guide-modal-wrapper {
  max-width: min(680px, calc(100vw - 2rem));
  width: 100%;
}

/* ── Panel base ── */
.guide-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-fa, 'Vazirmatn', sans-serif);
  background: var(--bg-card, #ffffff);
}
[data-theme="dark"] .guide-panel { background: #1e293b; }

/* ── Modal variant (inside confirm-modal-wrapper) ── */
.guide-panel--modal {
  width: 100%;
  max-height: min(82vh, 760px);
  min-height: 0;
  border-radius: 1.25rem;
  border: 1px solid var(--border-light, #e5e7eb);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  animation: confirmModalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
[data-theme="dark"] .guide-panel--modal {
  border-color: #334155;
}

/* ── Docked variant (fixed to viewport left, below app header) ── */
:root {
  --summary-guide-dock-w: min(400px, 38vw);
}

@keyframes guideDockSlideIn {
  from { transform: translateX(-12px); opacity: 0.85; }
  to { transform: translateX(0); opacity: 1; }
}

.guide-panel--docked {
  position: fixed;
  top: var(--shell-header-h, 64px);
  bottom: 0;
  left: 0;
  right: auto;
  z-index: 45;
  width: var(--summary-guide-dock-w);
  min-width: 300px;
  max-width: 100vw;
  border-radius: 0;
  border-right: 2px solid #fed813;
  box-shadow: 4px 0 24px -6px rgba(0, 0, 0, 0.14);
  animation: guideDockSlideIn 0.22s ease-out;
}
[data-theme="dark"] .guide-panel--docked {
  box-shadow: 4px 0 24px -6px rgba(0, 0, 0, 0.45);
}

/* فضای کنار محتوا وقتی راهنما سنجاق است */
body.summary-guide-docked-open .main-content {
  padding-left: calc(var(--summary-guide-dock-w) + 1.5rem);
  transition: padding-left 0.22s ease;
}

/* راهنمای سنجاق‌شده جای «منابع مرجع» را می‌گیرد — پنل مرجع را مخفی کن */
body.summary-guide-docked-open .summary-ref-panel,
body.summary-guide-docked-open .summary-split-handle {
  display: none !important;
}

@media (max-width: 1023px) {
  .guide-panel--docked {
    display: none !important;
  }
  body.summary-guide-docked-open .main-content {
    padding-left: 1.5rem;
  }
}

/* ── Docked: فشرده‌تر برای عرض باریک ── */
.guide-panel--docked .guide-panel__toolbar {
  padding: 0.75rem 1rem;
  background: var(--bg-card, #ffffff);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}
.guide-panel--docked .guide-panel__body {
  padding: 1rem 1rem 1.75rem;
}
.guide-panel--docked .guide-doc-header {
  margin-bottom: 1.25rem;
  border-radius: 14px;
}
.guide-panel--docked .guide-doc-header__inner {
  padding: 1.25rem 1rem;
  gap: 0.875rem;
}
.guide-panel--docked .guide-doc-header__icon-wrap {
  height: 48px;
  width: 48px;
  border-radius: 12px;
}
.guide-panel--docked .guide-doc-header__title {
  font-size: 1.05rem;
}
.guide-panel--docked .guide-doc-header__subtitle {
  font-size: 0.75rem;
}
.guide-panel--docked .guide-section-card {
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.guide-panel--docked .guide-section-title {
  font-size: 0.875rem;
}
.guide-panel--docked .guide-prose {
  font-size: 0.8125rem;
  line-height: 1.75;
}

/* ── Toolbar ── */
.guide-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafafa;
  flex-shrink: 0;
}
[data-theme="dark"] .guide-panel__toolbar {
  background: #0f172a;
  border-bottom-color: #334155;
}
.guide-panel__toolbar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #374151;
}
[data-theme="dark"] .guide-panel__toolbar-title { color: #e2e8f0; }

.guide-panel__tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.guide-panel__tool-btn:hover { background: #f3f4f6; color: #374151; }
[data-theme="dark"] .guide-panel__tool-btn:hover { background: #334155; color: #e2e8f0; }

/* ── Scrollable body ── */
.guide-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.25rem 2rem;
  overscroll-behavior: contain;
}

/* ── Guide doc header (charter-style — always dark card) ── */
.guide-doc-header {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 20px;
  background: var(--jet, #323232);
  color: #ffffff;
}
[data-theme="dark"] .guide-doc-header {
  background: #111827;
}
.guide-doc-header__stripe {
  pointer-events: none;
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 1;
  height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(to left, #ffb113, #fed813, #f3c42e);
}
.guide-doc-header__blob {
  pointer-events: none;
  position: absolute;
  z-index: 0;
  border-radius: 50%;
}
.guide-doc-header__blob--start {
  inset-inline-start: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  opacity: 0.12;
  background: radial-gradient(circle, #fed813 0%, transparent 70%);
}
.guide-doc-header__blob--end {
  inset-inline-end: 10%;
  bottom: -80px;
  width: 280px;
  height: 280px;
  opacity: 0.07;
  background: radial-gradient(circle, #fed813 0%, transparent 65%);
}
.guide-doc-header__grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 20px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.guide-doc-header__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
}
@media (min-width: 640px) {
  .guide-doc-header__inner {
    padding-inline: 2.5rem;
  }
}
.guide-doc-header__icon-wrap {
  display: flex;
  height: 64px;
  width: 64px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1.5px solid rgba(254, 216, 19, 0.3);
  background: rgba(254, 216, 19, 0.12);
}
.guide-doc-header__icon {
  color: var(--gold, #fed813);
}
.guide-doc-header__text {
  min-width: 0;
  flex: 1;
}
.guide-doc-header__title {
  margin: 0 0 0.375rem;
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
}
.guide-doc-header__subtitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: #999999;
}
.guide-doc-header__subtitle-accent {
  display: inline-block;
  flex-shrink: 0;
  width: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gold, #fed813);
}

/* ── Guide doc header (charter-style) is styled above ── */

/* ── Section card ── */
.guide-section-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 1.25rem 1.375rem;
  margin-bottom: 1rem;
}
[data-theme="dark"] .guide-section-card {
  background: rgba(30,41,59,0.9);
  border-color: #334155;
}

/* ── Section title ── */
.guide-section-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.0rem;
  font-weight: 800;
  color: #323232;
  border-bottom: 2.5px solid #fed813;
  padding-bottom: 0.625rem;
  margin-bottom: 0.875rem;
}
[data-theme="dark"] .guide-section-title { color: #f1f5f9; }
.guide-section-title--ded { border-bottom-color: #fed813; }
.guide-section-icon { flex-shrink: 0; color: #323232; }
[data-theme="dark"] .guide-section-icon { color: #fcd34d; }

.guide-prose {
  margin: 0 0 0.875rem;
  font-size: 0.875rem;
  line-height: 1.8;
  color: #444444;
}
.guide-prose:last-child {
  margin-bottom: 0;
}
.guide-section-card strong,
.guide-intro-box strong,
.guide-callout strong,
.guide-level-card__desc strong,
.guide-bullet-list__item strong {
  font-weight: 700;
  color: inherit;
}
[data-theme="dark"] .guide-prose {
  color: #cbd5e1;
}
.guide-bullet-list--tight-top {
  margin-top: 0;
}

/* ── Intro box ── */
.guide-intro-box {
  border-inline-start: 4px solid #fed813;
  background: #fffbea;
  border-radius: 0 0.625rem 0.625rem 0;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.75;
  color: #444444;
}
[data-theme="dark"] .guide-intro-box {
  background: rgba(180,130,0,0.12);
  border-inline-start-color: #f59e0b;
  color: #e2e8f0;
}

/* ── Performance level cards ── */
.guide-level-card {
  border-radius: 0.75rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid #ebebeb;
  background: #f9f9f9;
}
[data-theme="dark"] .guide-level-card {
  background: rgba(30,41,59,0.6);
  border-color: #475569;
}
.guide-level-card--gray   { border-color: #d1d5db; }
.guide-level-card--yellow { border-color: #fde68a; background: #fffbeb; }
.guide-level-card--green  { border-color: #6ee7b7; background: #f0fdf4; }
.guide-level-card--gold { border-color: #fcd34d; background: #fef9c3; }
[data-theme="dark"] .guide-level-card--yellow { background: rgba(120,80,0,0.18); border-color: #b45309; }
[data-theme="dark"] .guide-level-card--green  { background: rgba(0,80,40,0.18);  border-color: #065f46; }
[data-theme="dark"] .guide-level-card--gold   { background: rgba(146,64,14,0.18); border-color: #d97706; }

.guide-level-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}
.guide-level-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: #fed813;
  color: #1f2937;
  font-size: 0.6875rem;
  font-weight: 800;
  flex-shrink: 0;
}
.guide-level-card__title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #323232;
}
[data-theme="dark"] .guide-level-card__title { color: #f1f5f9; }
.guide-level-card__desc {
  font-size: 0.8rem;
  line-height: 1.7;
  color: #555555;
  margin: 0;
}
[data-theme="dark"] .guide-level-card__desc { color: #cbd5e1; }

/* ── Career level bands ── */
.guide-career-bands {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.guide-career-band {
  display: grid;
  grid-template-columns: 6.25rem minmax(0, 1fr);
  gap: 0.875rem;
  align-items: start;
  background: #f9f9f9;
  border: 1px solid #ebebeb;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
}
[data-theme="dark"] .guide-career-band {
  background: rgba(30, 41, 59, 0.6);
  border-color: #475569;
}
.guide-career-band__tag-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 0.125rem;
}
.guide-career-band__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.25rem;
  max-width: 100%;
  padding: 0.3rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.25;
  text-align: center;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  white-space: normal;
  word-break: break-word;
}
[data-theme="dark"] .guide-career-band__tag {
  color: #fcd34d;
  background: rgba(120, 80, 0, 0.28);
  border-color: rgba(251, 191, 36, 0.35);
}
.guide-career-band__content {
  min-width: 0;
}
.guide-career-band__title {
  margin: 0 0 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
  color: #323232;
}
[data-theme="dark"] .guide-career-band__title { color: #f1f5f9; }
.guide-career-band__desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #666666;
}
[data-theme="dark"] .guide-career-band__desc { color: #94a3b8; }

@media (max-width: 480px) {
  .guide-career-band {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }
  .guide-career-band__tag-wrap {
    justify-content: flex-start;
  }
  .guide-career-band__tag {
    min-width: auto;
    white-space: nowrap;
  }
}

/* ── Callouts ── */
.guide-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.825rem;
  line-height: 1.7;
}
.guide-callout--yellow {
  background: #fffbea;
  border: 1px solid #fed813;
  color: #5a4a00;
}
[data-theme="dark"] .guide-callout--yellow {
  background: rgba(180,130,0,0.15);
  border-color: rgba(253,216,19,0.35);
  color: #fef3c7;
}
.guide-callout--gray {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  color: #555555;
}
[data-theme="dark"] .guide-callout--gray {
  background: rgba(30,41,59,0.7);
  border-color: #475569;
  color: #cbd5e1;
}
.guide-callout--blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a5f;
}
[data-theme="dark"] .guide-callout--blue {
  background: rgba(30,58,138,0.2);
  border-color: rgba(96,165,250,0.3);
  color: #bfdbfe;
}
.guide-callout__icon { color: inherit; opacity: 0.85; }

/* ── Summary page: guide open banner ── */
.summary-guide-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(254, 216, 19, 0.35);
  border-inline-start: 3px solid #fed813;
  background: linear-gradient(to left, rgba(254, 216, 19, 0.06), rgba(254, 216, 19, 0.12));
}
[data-theme="dark"] .summary-guide-banner {
  border-color: rgba(254, 216, 19, 0.28);
  background: linear-gradient(to left, rgba(254, 216, 19, 0.06), rgba(254, 216, 19, 0.1));
}
.summary-guide-banner__icon-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  background: rgba(254, 216, 19, 0.22);
  border: 1px solid rgba(254, 216, 19, 0.35);
}
[data-theme="dark"] .summary-guide-banner__icon-wrap {
  background: rgba(254, 216, 19, 0.12);
  border-color: rgba(254, 216, 19, 0.25);
}
.summary-guide-banner__icon {
  color: #92700a;
}
[data-theme="dark"] .summary-guide-banner__icon {
  color: #fcd34d;
}
.summary-guide-banner__content {
  min-width: 0;
  flex: 1;
}
.summary-guide-banner__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #444444;
}
[data-theme="dark"] .summary-guide-banner__text {
  color: #cbd5e1;
}
.summary-guide-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.625rem;
  padding: 0.4375rem 0.75rem;
  border: none;
  border-radius: 0.5rem;
  background: #fed813;
  color: #323232;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 2px rgba(50, 50, 50, 0.08);
}
.summary-guide-banner__btn:hover {
  background: #f3c42e;
  box-shadow: 0 2px 6px rgba(50, 50, 50, 0.12);
}
.summary-guide-banner__btn:active {
  transform: scale(0.98);
}
.summary-guide-banner__btn:focus-visible {
  outline: 2px solid #323232;
  outline-offset: 2px;
}
[data-theme="dark"] .summary-guide-banner__btn {
  color: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.summary-guide-banner__btn-chevron {
  opacity: 0.7;
}

/* ── Bullet list ── */
.guide-bullet-list { list-style: none; margin: 0; padding: 0; }
.guide-bullet-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.825rem;
  line-height: 1.7;
  color: #444444;
  padding: 0.25rem 0;
}
[data-theme="dark"] .guide-bullet-list__item { color: #cbd5e1; }
.guide-bullet-list__dot {
  display: inline-block;
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fed813;
  margin-top: 0.55rem;
}

/* ── Divider between main guide and DED appendix ── */
.guide-divider {
  height: 2px;
  background: linear-gradient(to left, transparent, #fed813 30%, #fed813 70%, transparent);
  border-radius: 9999px;
  margin: 0.5rem 0 1rem;
  opacity: 0.6;
}

/* ── Minimal layout (results preview for admin/HRBP) ── */
.layout-minimal-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.layout-minimal-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-medium);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.layout-minimal-topbar__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem 1rem;
  max-width: 56rem;
  margin-inline: auto;
  padding: 0.75rem 1rem;
  width: 100%;
}

.layout-minimal-topbar__start,
.layout-minimal-topbar__end {
  display: flex;
  align-items: center;
}

.layout-minimal-brand__logo {
  display: block;
  height: 1.5rem;
  width: auto;
}

.layout-minimal-main {
  flex: 1;
  width: 100%;
  max-width: 56rem;
  margin-inline: auto;
  padding: 1rem 1rem 2rem;
}

.layout-minimal-content.page-shell {
  max-width: none;
  padding-inline: 0;
}

[data-theme="dark"] .layout-minimal-topbar {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

/* Self-eval employee feedback (anonymous ack) */
.self-eval-feedback-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.self-eval-feedback-layout > .self-eval-employee-feedback {
  order: -1;
}
@media (min-width: 1024px) {
  .self-eval-feedback-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(22rem, 34%);
    align-items: start;
    gap: 1.5rem;
  }
  .self-eval-feedback-layout > .self-eval-employee-feedback {
    order: 0;
    grid-column: 2;
    grid-row: 1;
  }
  .self-eval-feedback-layout__main {
    grid-column: 1;
    grid-row: 1;
  }
}
.self-eval-feedback-layout__main {
  min-width: 0;
}
.self-eval-employee-feedback__sidebar {
  min-width: 0;
  border: 2px solid rgba(254, 216, 19, 0.45);
  box-shadow: 0 4px 24px rgba(254, 216, 19, 0.12);
}
[data-theme="dark"] .self-eval-employee-feedback__sidebar {
  border-color: rgba(243, 196, 46, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
@media (min-width: 1024px) {
  .self-eval-employee-feedback__sidebar {
    position: sticky;
    top: 5.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}
.self-eval-employee-feedback__anon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgba(254, 216, 19, 0.18);
}
.self-eval-employee-feedback__your-response {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--surface-secondary, #f9fafb);
  border: 1px solid var(--border-default, #e5e7eb);
}
[data-theme="dark"] .self-eval-employee-feedback__your-response {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(71, 85, 105, 0.6);
}
.self-eval-comment-employee-ack {
  margin-top: 0.5rem;
}
.self-eval-comment-employee-ack p {
  margin-bottom: 0;
}

/* Team performance — KPI library (prototype-aligned grid) */
.tp-kpi-lib__grid {
  display: grid;
  grid-template-columns: 2.5rem minmax(9rem, 1.1fr) minmax(11rem, 1.4fr) 6rem 5.5rem minmax(10rem, 1.1fr) 9.75rem;
  align-items: stretch;
}
.tp-kpi-lib__head-cell {
  border-inline-start: 1px solid rgb(226 232 240);
  padding: 0.5rem 0.625rem;
  font-size: 11px;
  font-weight: 700;
  color: rgb(100 116 139);
}
[data-theme="dark"] .tp-kpi-lib__head-cell {
  border-color: rgb(51 65 85);
  color: rgb(148 163 184);
}
.tp-kpi-lib__drag {
  display: flex;
  cursor: grab;
  touch-action: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  color: rgb(203 213 225);
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tp-kpi-lib__drag:hover {
  color: rgb(100 116 139);
  background: rgb(248 250 252 / 0.9);
}
.tp-kpi-lib__drag:active {
  cursor: grabbing;
  transform: scale(0.96);
}
.tp-kpi-lib__cell {
  display: flex;
  align-items: stretch;
  border-inline-start: 1px solid rgb(241 245 249);
}
[data-theme="dark"] .tp-kpi-lib__cell {
  border-color: rgb(30 41 59);
}
.tp-kpi-lib__cell--center {
  align-items: center;
  padding-inline: 0.25rem;
}
.tp-kpi-lib__input,
.tp-kpi-lib__textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.5rem;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.625rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary, rgb(30 41 59));
}
.tp-kpi-lib__textarea {
  resize: none;
  overflow: hidden;
  min-height: 2.5rem;
  max-height: 8rem;
}
.tp-kpi-lib__input::placeholder,
.tp-kpi-lib__textarea::placeholder {
  color: rgb(203 213 225);
}
.tp-kpi-lib__input:focus,
.tp-kpi-lib__textarea:focus {
  outline: none;
  background: rgb(238 242 255 / 0.7);
}
[data-theme="dark"] .tp-kpi-lib__input:focus,
[data-theme="dark"] .tp-kpi-lib__textarea:focus {
  background: rgb(49 46 129 / 0.25);
}
.tp-kpi-lib__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  max-width: 100%;
  border-radius: 0.625rem;
  border: 1px solid rgb(199 210 254);
  background: rgb(255 255 255);
  padding: 0.375rem 0.5rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgb(67 56 202);
  box-shadow: 0 1px 2px rgb(99 102 241 / 0.1);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}
.tp-kpi-lib__send-label {
  white-space: nowrap;
}
.tp-kpi-lib__send:hover:not(:disabled) {
  border-color: rgb(165 180 252);
  background: rgb(238 242 255);
  box-shadow: 0 2px 6px rgb(99 102 241 / 0.15);
  color: rgb(55 48 163);
}
.tp-kpi-lib__send:focus-visible {
  outline: 2px solid rgb(99 102 241);
  outline-offset: 2px;
}
.tp-kpi-lib__send:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}
[data-theme="dark"] .tp-kpi-lib__send {
  border-color: rgb(67 56 202 / 0.45);
  background: rgb(30 27 75 / 0.35);
  color: rgb(199 210 254);
  box-shadow: none;
}
[data-theme="dark"] .tp-kpi-lib__send:hover:not(:disabled) {
  border-color: rgb(129 140 248);
  background: rgb(49 46 129 / 0.5);
  color: rgb(224 231 255);
}
.tp-kpi-lib__send-icon {
  transform: scaleX(-1);
  transition: transform 0.22s ease-out;
}
.tp-kpi-lib__send.icon-send:hover:not(:disabled) .tp-kpi-lib__send-icon {
  transform: scaleX(-1) translate(-2px, -2px);
}
@media (prefers-reduced-motion: reduce) {
  .tp-kpi-lib__send-icon {
    transition: none;
  }
  .tp-kpi-lib__send.icon-send:hover:not(:disabled) .tp-kpi-lib__send-icon {
    transform: scaleX(-1);
  }
}
.tp-kpi-lib__info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tp-kpi-lib__info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  color: rgb(99 102 241);
  background: rgb(238 242 255 / 0.8);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.tp-kpi-lib__info-btn:hover {
  background: rgb(224 231 255);
  color: rgb(67 56 202);
}
.tp-kpi-lib__info-btn:focus-visible {
  outline: 2px solid rgb(99 102 241);
  outline-offset: 2px;
}
[data-theme="dark"] .tp-kpi-lib__info-btn {
  color: rgb(165 180 252);
  background: rgb(49 46 129 / 0.35);
}
[data-theme="dark"] .tp-kpi-lib__info-btn:hover {
  background: rgb(67 56 202 / 0.45);
  color: rgb(224 231 255);
}
.tp-kpi-lib__tooltip {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  z-index: 400;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.8125rem;
  line-height: 1.65;
  text-align: start;
  color: var(--text-primary, rgb(30 41 59));
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-light, rgb(226 232 240));
  box-shadow: 0 12px 40px -8px rgb(15 23 42 / 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0.14s;
}
.tp-kpi-lib__tooltip-arrow {
  position: absolute;
  bottom: 100%;
  inset-inline-end: 0.65rem;
  width: 0;
  height: 0;
  border-inline: 7px solid transparent;
  border-bottom: 7px solid var(--border-light, rgb(226 232 240));
}
.tp-kpi-lib__tooltip-arrow::after {
  content: "";
  position: absolute;
  inset-inline-start: -6px;
  top: 1px;
  border-inline: 6px solid transparent;
  border-bottom: 6px solid var(--bg-card, #fff);
}
[data-theme="dark"] .tp-kpi-lib__tooltip {
  border-color: var(--border-light, rgb(51 65 85));
  box-shadow: 0 16px 48px -6px rgb(0 0 0 / 0.55);
}
[data-theme="dark"] .tp-kpi-lib__tooltip-arrow {
  border-bottom-color: var(--border-light, rgb(51 65 85));
}
[data-theme="dark"] .tp-kpi-lib__tooltip-arrow::after {
  border-bottom-color: var(--bg-card, #1e293b);
}
.tp-kpi-lib__info-tip:hover .tp-kpi-lib__tooltip,
.tp-kpi-lib__info-tip:focus-within .tp-kpi-lib__tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .tp-kpi-lib__tooltip {
    transition: none;
  }
}
.tp-kpi-lib__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  border-style: dashed;
  border-width: 2px;
}
.tp-kpi-lib__add-icon {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tp-kpi-lib__add:hover:not(:disabled) .tp-kpi-lib__add-icon {
  transform: scale(1.15);
}
.tp-kpi-lib__save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.tp-kpi-lib__save-status--pending {
  color: rgb(180 83 9);
}
.tp-kpi-lib__save-status--saving {
  color: rgb(37 99 235);
}
.tp-kpi-lib__save-status--saved {
  color: rgb(5 150 105);
}
.tp-kpi-lib__save-status--error {
  color: rgb(220 38 38);
}
[data-theme="dark"] .tp-kpi-lib__save-status--pending {
  color: rgb(251 191 36);
}
[data-theme="dark"] .tp-kpi-lib__save-status--saving {
  color: rgb(96 165 250);
}
[data-theme="dark"] .tp-kpi-lib__save-status--saved {
  color: rgb(52 211 153);
}
[data-theme="dark"] .tp-kpi-lib__save-status--error {
  color: rgb(248 113 113);
}
@media (prefers-reduced-motion: reduce) {
  .tp-kpi-lib__add-icon {
    transition: none;
  }
  .tp-kpi-lib__add:hover:not(:disabled) .tp-kpi-lib__add-icon {
    transform: none;
  }
}
.tp-kpi-lib__delete {
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: rgb(203 213 225);
  transition: color 0.15s, background-color 0.15s;
}
.tp-kpi-lib__delete:hover {
  background: rgb(255 241 242);
  color: rgb(244 63 94);
}
[data-theme="dark"] .tp-kpi-lib__delete:hover {
  background: rgb(127 29 29 / 0.35);
  color: rgb(251 113 133);
}
.tp-kpi-lib__panel {
  overflow: visible;
}
.tp-kpi-lib__panel-scroll {
  overflow-x: auto;
  overflow-y: visible;
}
.tp-kpi-lib__jobs {
  position: relative;
  width: 100%;
  padding: 0.25rem 0.375rem;
}
.tp-kpi-lib__jobs-trigger {
  display: flex;
  width: 100%;
  min-height: 2.25rem;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.375rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(248 250 252 / 0.8);
  padding: 0.375rem 0.5rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(71 85 105);
  cursor: pointer;
  text-align: start;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.tp-kpi-lib__jobs-trigger-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}
.tp-kpi-lib__jobs-placeholder {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(148 163 184);
}
.tp-kpi-lib__jobs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.tp-kpi-lib__job-tag {
  display: inline-flex;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.tp-kpi-lib__job-tag--0 {
  background: rgb(254 243 199);
  color: rgb(120 53 15);
}
.tp-kpi-lib__job-tag--1 {
  background: rgb(254 226 226);
  color: rgb(153 27 27);
}
.tp-kpi-lib__job-tag--2 {
  background: rgb(219 234 254);
  color: rgb(30 64 175);
}
[data-theme="dark"] .tp-kpi-lib__job-tag--0 {
  background: rgb(113 63 18 / 0.45);
  color: rgb(254 243 199);
}
[data-theme="dark"] .tp-kpi-lib__job-tag--1 {
  background: rgb(127 29 29 / 0.4);
  color: rgb(254 202 202);
}
[data-theme="dark"] .tp-kpi-lib__job-tag--2 {
  background: rgb(30 58 138 / 0.45);
  color: rgb(191 219 254);
}
.tp-kpi-lib__jobs-trigger:hover {
  border-color: rgb(203 213 225);
  background: rgb(255 255 255);
}
.tp-kpi-lib__jobs-trigger--open {
  border-color: rgb(250 204 21);
  background: rgb(255 255 255);
}
[data-theme="dark"] .tp-kpi-lib__jobs-trigger {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59 / 0.55);
  color: rgb(203 213 225);
}
.tp-kpi-lib__jobs-panel {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 50;
  max-height: 11rem;
  overflow-y: auto;
  border-radius: 0.625rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  padding: 0.375rem;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.12);
}
.tp-kpi-lib__jobs-panel--floating {
  position: fixed;
  inset-inline-start: auto;
  inset-inline-end: auto;
  top: auto;
  z-index: 120;
}
[data-theme="dark"] .tp-kpi-lib__jobs-panel {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.35);
}
.tp-kpi-lib__jobs-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgb(51 65 85);
  cursor: pointer;
}
.tp-kpi-lib__jobs-option:hover {
  background: rgb(248 250 252);
}
[data-theme="dark"] .tp-kpi-lib__jobs-option {
  color: rgb(226 232 240);
}
[data-theme="dark"] .tp-kpi-lib__jobs-option:hover {
  background: rgb(30 41 59);
}
.tp-kpi-lib__jobs-empty {
  padding: 0.5rem;
  font-size: 0.6875rem;
  color: rgb(148 163 184);
  text-align: center;
}

/* Team performance — monthly report editor */
.tp-dim-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.tp-dim-field {
  border-radius: 0.75rem;
  background: rgb(248 250 252);
  border-color: rgb(226 232 240);
}
[data-theme="dark"] .tp-dim-field {
  background: rgb(15 23 42 / 0.55);
  border-color: rgb(51 65 85);
}
.tp-dim-composer__field {
  border-radius: 0.75rem;
  border: 1.5px solid rgb(226 232 240);
  background: rgb(255 255 255);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.tp-dim-composer__field:focus-within {
  border-color: rgb(250 204 21);
  box-shadow: 0 0 0 4px rgb(254 216 19 / 0.15);
}
[data-theme="dark"] .tp-dim-composer__field {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59 / 0.55);
}
[data-theme="dark"] .tp-dim-composer__field:focus-within {
  border-color: rgb(202 138 4);
  box-shadow: 0 0 0 4px rgb(202 138 4 / 0.12);
}
.tp-dim-composer__textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 6.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  resize: vertical;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-primary, rgb(30 41 59));
  direction: rtl;
  outline: none;
}
.tp-dim-composer__textarea::placeholder {
  color: rgb(148 163 184);
  font-weight: 400;
}
[data-theme="dark"] .tp-dim-composer__textarea {
  color: rgb(248 250 252);
}
[data-theme="dark"] .tp-dim-composer__textarea::placeholder {
  color: rgb(100 116 139);
}
.tp-level-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  padding: 0.25rem 0.625rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgb(71 85 105);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.tp-level-hint:hover:not(:disabled) {
  border-color: rgb(199 210 254);
  background: rgb(248 250 252);
  color: rgb(79 70 229);
}
.tp-level-hint:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.tp-level-hint--next {
  border-style: solid;
}
.tp-level-hint__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
[data-theme="dark"] .tp-level-hint {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59 / 0.6);
  color: rgb(203 213 225);
}
[data-theme="dark"] .tp-level-hint:hover:not(:disabled) {
  border-color: rgb(99 102 241);
  background: rgb(49 46 129 / 0.25);
  color: rgb(165 180 252);
}
.tp-level-hint-modal__wrapper {
  max-width: min(48rem, calc(100vw - 2rem));
}
.tp-level-hint-modal__box {
  max-width: none;
}
.tp-level-hint-modal__body {
  max-height: min(70vh, 28rem);
  overflow-y: auto;
}
.tp-editor-empty {
  border-radius: 0.75rem;
  border: 1px dashed rgb(203 213 225);
  background: rgb(248 250 252 / 0.5);
}
[data-theme="dark"] .tp-editor-empty {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.35);
}
.tp-editor-add-bar {
  border-radius: 1rem;
  border: 2px dashed rgb(226 232 240);
  padding: 0.75rem;
}
[data-theme="dark"] .tp-editor-add-bar {
  border-color: rgb(51 65 85);
}
.tp-editor-add-bar__hint {
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(148 163 184);
}
.tp-editor-add-bar__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .tp-editor-add-bar__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .tp-editor-add-bar__grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.tp-editor-add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  padding: 0.75rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tp-editor-add-card:hover {
  transform: translateY(-1px);
  border-color: rgb(165 180 252);
  box-shadow: 0 2px 8px rgb(99 102 241 / 0.12);
}
.tp-editor-add-card:focus-visible {
  outline: 2px solid rgb(99 102 241);
  outline-offset: 2px;
}
[data-theme="dark"] .tp-editor-add-card {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59 / 0.5);
}
.tp-editor-add-card__icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
}
.tp-editor-add-card__icon--kpi {
  background: rgb(224 242 254);
  color: rgb(3 105 161);
}
.tp-editor-add-card__icon--okr {
  background: rgb(220 252 231);
  color: rgb(21 128 61);
}
.tp-editor-add-card__icon--project {
  background: rgb(237 233 254);
  color: rgb(109 40 217);
}
.tp-editor-add-card__icon--task {
  background: rgb(254 243 199);
  color: rgb(180 83 9);
}
.tp-editor-add-card__icon--text {
  background: rgb(241 245 249);
  color: rgb(71 85 105);
}
.tp-editor-add-card__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(51 65 85);
}
.tp-editor-add-card__desc {
  font-size: 0.625rem;
  line-height: 1.35;
  color: rgb(148 163 184);
}
[data-theme="dark"] .tp-editor-add-card__title {
  color: rgb(226 232 240);
}
.tp-editor-block {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(248 250 252 / 0.65);
  padding: 1rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.tp-editor-block--animating {
  z-index: 3;
  position: relative;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.tp-editor-block--highlight {
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  border-color: rgb(250 204 21);
  box-shadow:
    0 0 0 3px rgb(254 216 19 / 0.28),
    0 8px 24px rgb(15 23 42 / 0.08);
}
[data-theme="dark"] .tp-editor-block--highlight {
  box-shadow:
    0 0 0 3px rgb(202 138 4 / 0.35),
    0 8px 28px rgb(0 0 0 / 0.35);
}
@media (prefers-reduced-motion: reduce) {
  .tp-editor-block--animating {
    transition: none;
    will-change: auto;
  }
  .tp-editor-block--highlight {
    transition: none;
  }
}
.tp-editor-block:hover {
  border-color: rgb(203 213 225);
}
[data-theme="dark"] .tp-editor-block {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.45);
}
.tp-editor-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.tp-editor-block__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.5rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}
.tp-editor-block__chip--kpi {
  background: rgb(224 242 254);
  color: rgb(3 105 161);
  box-shadow: inset 0 0 0 1px rgb(186 230 253);
}
.tp-editor-block__chip--okr {
  background: rgb(220 252 231);
  color: rgb(21 128 61);
  box-shadow: inset 0 0 0 1px rgb(187 247 208);
}
.tp-editor-block__chip--project {
  background: rgb(237 233 254);
  color: rgb(109 40 217);
  box-shadow: inset 0 0 0 1px rgb(221 214 254);
}
.tp-editor-block__chip--task {
  background: rgb(254 243 199);
  color: rgb(180 83 9);
  box-shadow: inset 0 0 0 1px rgb(253 230 138);
}
.tp-editor-block__chip--text {
  background: rgb(241 245 249);
  color: rgb(71 85 105);
  box-shadow: inset 0 0 0 1px rgb(226 232 240);
}
.tp-editor-block__chip-count {
  border-radius: 0.25rem;
  background: rgb(255 255 255 / 0.75);
  padding: 0.0625rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 600;
  opacity: 0.85;
}
.tp-editor-block__toolbar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  opacity: 0.55;
  transition: opacity 0.15s ease;
}
.tp-editor-reorder {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  height: 1.75rem;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
[data-theme="dark"] .tp-editor-reorder {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59 / 0.85);
}
.tp-editor-reorder .tp-editor-icon-btn--reorder {
  min-width: 1.625rem;
  min-height: 0;
  height: 100%;
  padding: 0;
  border-radius: 0;
  color: rgb(71 85 105);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tp-editor-reorder .tp-editor-icon-btn--reorder + .tp-editor-icon-btn--reorder {
  border-inline-start: 1px solid rgb(226 232 240);
}
[data-theme="dark"] .tp-editor-reorder .tp-editor-icon-btn--reorder + .tp-editor-icon-btn--reorder {
  border-color: rgb(51 65 85);
}
.tp-editor-reorder .tp-editor-icon-btn--reorder:hover:not(:disabled) {
  background: rgb(254 249 195);
  color: rgb(113 63 18);
}
.tp-editor-reorder .tp-editor-icon-btn--reorder:active:not(:disabled) {
  transform: scale(0.94);
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tp-editor-icon-btn--pressed {
  background: rgb(254 240 138) !important;
}
.tp-editor-reorder__chev {
  display: block;
  width: 0.375rem;
  height: 0.375rem;
  border: 1.5px solid currentColor;
  border-right: 0;
  border-bottom: 0;
  margin: 0 auto;
  direction: ltr;
}
.tp-editor-reorder__chev--up {
  transform: rotate(45deg) translateY(1px);
}
.tp-editor-reorder__chev--down {
  transform: rotate(-135deg) translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .tp-editor-reorder .tp-editor-icon-btn--reorder:active:not(:disabled) {
    transform: none;
  }
}
.tp-editor-block:hover .tp-editor-block__toolbar,
.tp-editor-block:focus-within .tp-editor-block__toolbar {
  opacity: 1;
}
.tp-editor-grid-wrap {
  overflow-x: auto;
  border-radius: 0.75rem;
  box-shadow: inset 0 0 0 1px rgb(226 232 240);
  background: rgb(255 255 255);
}
[data-theme="dark"] .tp-editor-grid-wrap {
  box-shadow: inset 0 0 0 1px rgb(51 65 85);
  background: rgb(15 23 42 / 0.35);
}
.tp-editor-grid {
  min-width: 52rem;
}
.tp-editor-grid--project {
  min-width: 64rem;
}
.tp-editor-grid__head,
.tp-editor-grid__row {
  display: grid;
  grid-template-columns: var(--tp-grid-cols);
  align-items: start;
}
.tp-editor-grid__head {
  background: rgb(241 245 249);
  color: rgb(100 116 139);
}
[data-theme="dark"] .tp-editor-grid__head {
  background: rgb(30 41 59);
  color: rgb(148 163 184);
}
.tp-editor-grid__row {
  position: relative;
  border-top: 1px solid rgb(241 245 249);
  background: rgb(255 255 255);
  transition: background-color 0.12s ease;
}
.tp-editor-grid__row--animating {
  position: relative;
  z-index: 2;
  transition: transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.tp-editor-grid__row--highlight {
  background: rgb(254 252 232 / 0.85);
  box-shadow: inset 0 0 0 2px rgb(250 204 21 / 0.55);
  transition:
    background-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="dark"] .tp-editor-grid__row--highlight {
  background: rgb(113 63 18 / 0.22);
  box-shadow: inset 0 0 0 2px rgb(202 138 4 / 0.45);
}
@media (prefers-reduced-motion: reduce) {
  .tp-editor-grid__row--animating {
    transition: none;
    will-change: auto;
  }
  .tp-kpi-lib__drag:active {
    transform: none;
  }
}
.tp-editor-grid__row:hover {
  background: rgb(248 250 252);
}
[data-theme="dark"] .tp-editor-grid__row {
  border-color: rgb(30 41 59);
  background: transparent;
}
[data-theme="dark"] .tp-editor-grid__row:hover {
  background: rgb(30 41 59 / 0.45);
}
.tp-editor-grid__th {
  position: relative;
  overflow: visible;
  border-inline-start: 1px solid rgb(226 232 240);
  padding: 0.5rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
}
.tp-editor-grid__th-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-inline-end: 0.25rem;
}
.tp-editor-grid__th--center .tp-editor-grid__th-label {
  text-align: center;
}
.tp-editor-grid__col-resize {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: -5px;
  width: 10px;
  cursor: col-resize;
  touch-action: none;
  z-index: 4;
}
.tp-editor-grid__col-resize::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 4px;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background-color 0.15s ease;
}
.tp-editor-grid__col-resize:hover::after,
.tp-editor-grid--col-resizing .tp-editor-grid__col-resize::after {
  background: var(--keppel, #2fbea8);
}
body.tp-editor-col-resizing {
  cursor: col-resize !important;
  user-select: none;
}
body.tp-editor-col-resizing * {
  cursor: col-resize !important;
}
.tp-editor-grid__th--center {
  text-align: center;
}
.tp-editor-grid__th--index {
  text-align: center;
  border-inline-start: none;
}
.tp-editor-grid__th--drag {
  text-align: center;
  border-inline-start: none;
  padding-inline: 0.25rem;
}
[data-theme="dark"] .tp-editor-grid__th {
  border-color: rgb(51 65 85);
}
.tp-editor-grid__drag.tp-kpi-lib__drag {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  align-self: stretch;
  user-select: none;
  touch-action: none;
}
.tp-editor-grid__drag-num {
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: rgb(148 163 184);
}
.tp-editor-grid__row--dragging {
  opacity: 0.4;
}
.tp-editor-grid__row--drop-target {
  background: rgb(254 252 232 / 0.75);
  box-shadow: inset 0 0 0 2px rgb(250 204 21);
}
[data-theme="dark"] .tp-editor-grid__row--drop-target {
  background: rgb(113 63 18 / 0.2);
  box-shadow: inset 0 0 0 2px rgb(202 138 4);
}
.tp-editor-grid__drag-preview {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0.94;
  pointer-events: none;
  z-index: 9999;
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgb(15 23 42 / 0.18);
  background: rgb(255 255 255);
  transform: scale(0.98);
}
[data-theme="dark"] .tp-editor-grid__drag-preview {
  background: rgb(30 41 59);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
}
@media (prefers-reduced-motion: reduce) {
  .tp-editor-grid__row--dragging {
    opacity: 0.65;
  }
  .tp-editor-grid__drag-preview {
    transform: none;
  }
}
.tp-editor-grid__cell--note {
  padding: 0.25rem 0.375rem;
}
.tp-editor-grid__note-field {
  display: flex;
  align-items: flex-start;
  gap: 0.125rem;
  width: 100%;
  min-width: 0;
}
.tp-editor-grid__note-field .tp-editor-cell__textarea--grid {
  flex: 1 1 auto;
  min-width: 0;
}
.tp-kpi-lib__delete--inline {
  flex-shrink: 0;
  height: 1.5rem;
  width: 1.5rem;
  margin-top: 0.375rem;
  border-radius: 0.375rem;
}
.tp-kpi-lib__delete--inline svg {
  width: 0.875rem;
  height: 0.875rem;
}
.tp-kpi-lib__delete--row {
  position: absolute;
  z-index: 3;
  top: 50%;
  inset-inline-end: 0.375rem;
  height: 1.5rem;
  width: 1.5rem;
  margin: 0;
  border-radius: 0.375rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.12s ease;
}
.tp-kpi-lib__delete--row svg {
  width: 0.875rem;
  height: 0.875rem;
}
.tp-editor-grid__row:hover .tp-kpi-lib__delete--row,
.tp-editor-grid__row:focus-within .tp-kpi-lib__delete--row {
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .tp-kpi-lib__delete--row {
    transition: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tp-editor-grid__row--dragging {
    opacity: 0.75;
  }
}
.tp-editor-grid__cell {
  display: flex;
  align-items: flex-start;
  border-inline-start: 1px solid rgb(241 245 249);
  min-height: 2.5rem;
}
.tp-editor-grid__cell--center {
  justify-content: stretch;
}
.tp-editor-grid__cell--center .tp-editor-cell__input,
.tp-editor-grid__cell--center .tp-editor-cell__textarea--grid {
  text-align: center;
}
/* یک‌خط در جدول — textarea با auto-grow ارتفاع پویا */
.tp-editor-grid .tp-editor-cell__textarea--grid {
  min-height: 2.5rem;
  padding-block: 0.5rem;
  line-height: 1.25rem;
}
.tp-editor-grid__cell--actions {
  align-items: flex-start;
  justify-content: center;
  padding: 0.375rem 0.25rem;
}
[data-theme="dark"] .tp-editor-grid__cell {
  border-color: rgb(30 41 59);
}
.tp-editor-cell__input,
.tp-editor-cell__textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.5rem;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.625rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary, rgb(30 41 59));
}
.tp-editor-cell__textarea {
  resize: vertical;
  min-height: 3rem;
  max-height: 10rem;
}
.tp-editor-grid .tp-editor-cell__select {
  box-sizing: border-box;
  width: 100%;
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0.375rem 0.625rem;
  padding-inline-end: 1.75rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: var(--text-primary, rgb(30 41 59));
  cursor: pointer;
  appearance: auto;
  text-align: start;
}
.tp-editor-grid .tp-editor-cell__select:focus {
  outline: none;
  background: rgb(238 242 255 / 0.65);
}
[data-theme="dark"] .tp-editor-grid .tp-editor-cell__select {
  color: rgb(248 250 252);
}
[data-theme="dark"] .tp-editor-grid .tp-editor-cell__select:focus {
  background: rgb(49 46 129 / 0.22);
}
.tp-editor-grid .tp-editor-cell__textarea--grid {
  resize: none;
  overflow-y: hidden;
  max-height: none;
  height: auto;
}
.tp-editor-grid .tp-editor-cell__textarea--grid:focus {
  outline: none;
}
.tp-editor-cell__input::placeholder,
.tp-editor-cell__textarea::placeholder {
  color: rgb(203 213 225);
}
.tp-editor-cell__input:focus,
.tp-editor-cell__textarea:focus {
  outline: none;
  background: rgb(238 242 255 / 0.65);
}
[data-theme="dark"] .tp-editor-cell__input:focus,
[data-theme="dark"] .tp-editor-cell__textarea:focus {
  background: rgb(49 46 129 / 0.22);
}
.tp-editor-grid__row-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
}
.tp-editor-icon-btn {
  min-width: 2rem;
  min-height: 1.75rem;
  border-radius: 0.375rem;
  border: 0;
  background: transparent;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(100 116 139);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.tp-editor-icon-btn:hover:not(:disabled) {
  background: rgb(241 245 249);
  color: rgb(51 65 85);
}
.tp-editor-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.tp-editor-icon-btn:focus-visible {
  outline: 2px solid rgb(99 102 241);
  outline-offset: 1px;
}
.tp-editor-icon-btn--danger {
  color: rgb(244 63 94);
}
.tp-editor-icon-btn--danger:hover:not(:disabled) {
  background: rgb(255 241 242);
  color: rgb(225 29 72);
}
[data-theme="dark"] .tp-editor-icon-btn:hover:not(:disabled) {
  background: rgb(51 65 85 / 0.5);
  color: rgb(226 232 240);
}
.tp-editor-seg {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  padding: 0.25rem;
}
.tp-editor-seg__btn {
  border-radius: 0.375rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  padding: 0.125rem 0.375rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(100 116 139);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.tp-editor-seg__btn--on {
  border-color: rgb(250 204 21);
  background: rgb(254 249 195);
  color: rgb(113 63 18);
  font-weight: 700;
}
[data-theme="dark"] .tp-editor-seg__btn {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59);
  color: rgb(203 213 225);
}
[data-theme="dark"] .tp-editor-seg__btn--on {
  border-color: rgb(202 138 4);
  background: rgb(113 63 18 / 0.45);
  color: rgb(254 240 138);
}
.tp-editor-grid__empty {
  grid-column: 1 / -1;
  border-top: 1px solid rgb(241 245 249);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgb(148 163 184);
}
.tp-editor-row-add {
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  padding: 0.375rem 0.75rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.tp-editor-row-add--kpi {
  color: rgb(3 105 161);
}
.tp-editor-row-add--kpi:hover {
  background: rgb(224 242 254);
}
.tp-editor-row-add--okr {
  color: rgb(21 128 61);
}
.tp-editor-row-add--okr:hover {
  background: rgb(220 252 231);
}
.tp-editor-row-add--project {
  color: rgb(109 40 217);
}
.tp-editor-row-add--project:hover {
  background: rgb(237 233 254);
}
.tp-editor-row-add--task {
  color: rgb(180 83 9);
}
.tp-editor-row-add--task:hover {
  background: rgb(254 243 199);
}
/* بلوک لیست تسک — هم‌تراز با tp-editor-text-block */
.tp-editor-task-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240);
  border-inline-start-width: 3px;
  border-inline-start-color: rgb(251 191 36);
  background: rgb(255 255 255);
  padding: 1rem 1.125rem;
}
[data-theme="dark"] .tp-editor-task-block {
  border-color: rgb(51 65 85);
  border-inline-start-color: rgb(245 158 11);
  background: rgb(30 41 59 / 0.4);
}
.tp-editor-task-block__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}
.tp-editor-task-block__label {
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgb(71 85 105);
}
[data-theme="dark"] .tp-editor-task-block__label {
  color: rgb(148 163 184);
}
.tp-editor-task-block__title {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border-radius: 0.625rem;
  border: 1.5px solid rgb(226 232 240);
  background: rgb(248 250 252);
  padding: 0.625rem 0.875rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-heading, rgb(30 41 59));
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}
.tp-editor-task-block__title::placeholder {
  color: rgb(148 163 184);
  font-weight: 400;
}
.tp-editor-task-block__title:hover {
  border-color: rgb(203 213 225);
}
.tp-editor-task-block__title:focus {
  outline: none;
  border-color: rgb(250 204 21);
  background: rgb(255 255 255);
  box-shadow: 0 0 0 4px rgb(254 216 19 / 0.15);
}
[data-theme="dark"] .tp-editor-task-block__title {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.55);
  color: rgb(248 250 252);
}
[data-theme="dark"] .tp-editor-task-block__title:focus {
  border-color: rgb(202 138 4);
  box-shadow: 0 0 0 4px rgb(202 138 4 / 0.12);
}
.tp-editor-task-block__list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tp-editor-task-block__count {
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgb(180 83 9);
  background: rgb(254 243 199);
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
}
[data-theme="dark"] .tp-editor-task-block__count {
  color: rgb(253 230 138);
  background: rgb(113 63 18 / 0.45);
}
.tp-editor-task-block__list-panel {
  border-radius: 0.75rem;
  border: 1.5px solid rgb(226 232 240);
  background: rgb(248 250 252 / 0.65);
  padding: 0.75rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.tp-editor-task-block__list-panel:focus-within {
  border-color: rgb(250 204 21);
  box-shadow: 0 0 0 4px rgb(254 216 19 / 0.12);
}
[data-theme="dark"] .tp-editor-task-block__list-panel {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.45);
}
[data-theme="dark"] .tp-editor-task-block__list-panel:focus-within {
  border-color: rgb(202 138 4);
  box-shadow: 0 0 0 4px rgb(202 138 4 / 0.1);
}
.tp-editor-task-block__empty {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgb(148 163 184);
  text-align: center;
}
.tp-editor-task-list--hidden {
  display: none;
}
.tp-editor-task-block__add {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  border-radius: 0.625rem;
  border: 1px dashed rgb(253 230 138);
  background: rgb(255 251 235 / 0.65);
  padding: 0.5rem 0.75rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgb(180 83 9);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tp-editor-task-block__add:hover {
  border-color: rgb(251 191 36);
  background: rgb(254 243 199);
}
.tp-editor-task-block__add:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgb(254 216 19 / 0.25);
}
[data-theme="dark"] .tp-editor-task-block__add {
  border-color: rgb(180 83 9);
  background: rgb(113 63 18 / 0.25);
  color: rgb(253 230 138);
}
[data-theme="dark"] .tp-editor-task-block__add:hover {
  background: rgb(113 63 18 / 0.4);
}
.tp-editor-task-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.tp-editor-task {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  padding: 0.375rem 0.5rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tp-editor-task:has(.tp-editor-task__checkbox:checked) {
  border-color: rgba(16, 185, 129, 0.45);
  background: #ecfdf5;
}
[data-theme="dark"] .tp-editor-task {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.5);
}
[data-theme="dark"] .tp-editor-task:has(.tp-editor-task__checkbox:checked) {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.12);
}
.tp-editor-task__check {
  position: relative;
  display: flex;
  shrink: 0;
  cursor: pointer;
}
.tp-editor-task__checkbox {
  position: absolute;
  opacity: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
}
.tp-editor-task__box {
  position: relative;
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 2px solid rgb(203 213 225);
  background: rgb(255 255 255);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.tp-editor-task__checkbox:focus-visible + .tp-editor-task__box {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}
.tp-editor-task__checkbox:checked + .tp-editor-task__box {
  border-color: #10b981;
  background: #10b981;
  box-shadow: none;
}
.tp-editor-task__checkbox:checked + .tp-editor-task__box::after {
  content: "";
  position: absolute;
  top: 45%;
  left: 50%;
  width: 0.3125rem;
  height: 0.5625rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -55%) rotate(45deg);
}
[data-theme="dark"] .tp-editor-task__box {
  border-color: rgb(100 116 139);
  background: rgb(15 23 42);
}
.tp-editor-task:has(.tp-editor-task__checkbox:checked) .tp-editor-task__text {
  color: #047857;
}
[data-theme="dark"] .tp-editor-task:has(.tp-editor-task__checkbox:checked) .tp-editor-task__text {
  color: #6ee7b7;
}
.tp-editor-task__text {
  flex: 1;
  min-width: 0;
  min-height: 2.25rem;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0.375rem 0.5rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-heading, rgb(30 41 59));
}
.tp-editor-task__text::placeholder {
  color: rgb(148 163 184);
}
.tp-editor-task__text:focus {
  outline: none;
}
[data-theme="dark"] .tp-editor-task__text {
  color: rgb(248 250 252);
}
/* بلوک یادداشت — هم‌تراز با composer استقلال/نفوذ */
.tp-editor-text-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240);
  border-inline-start-width: 3px;
  border-inline-start-color: rgb(148 163 184);
  background: rgb(255 255 255);
  padding: 1rem 1.125rem;
}
[data-theme="dark"] .tp-editor-text-block {
  border-color: rgb(51 65 85);
  border-inline-start-color: rgb(100 116 139);
  background: rgb(30 41 59 / 0.4);
}
.tp-editor-text-block__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}
.tp-editor-text-block__label {
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgb(71 85 105);
}
[data-theme="dark"] .tp-editor-text-block__label {
  color: rgb(148 163 184);
}
.tp-editor-text-block__title {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border-radius: 0.625rem;
  border: 1.5px solid rgb(226 232 240);
  background: rgb(248 250 252);
  padding: 0.625rem 0.875rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-heading, rgb(30 41 59));
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}
.tp-editor-text-block__title::placeholder {
  color: rgb(148 163 184);
  font-weight: 400;
}
.tp-editor-text-block__title:hover {
  border-color: rgb(203 213 225);
}
.tp-editor-text-block__title:focus {
  outline: none;
  border-color: rgb(250 204 21);
  background: rgb(255 255 255);
  box-shadow: 0 0 0 4px rgb(254 216 19 / 0.15);
}
[data-theme="dark"] .tp-editor-text-block__title {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.55);
  color: rgb(248 250 252);
}
[data-theme="dark"] .tp-editor-text-block__title:focus {
  border-color: rgb(202 138 4);
  box-shadow: 0 0 0 4px rgb(202 138 4 / 0.12);
}
.tp-editor-text-block__field--body .tp-dim-composer__field {
  border-radius: 0.75rem;
}
.tp-editor-text-block__content {
  min-height: 5.5rem;
}

/* Team performance — report editor header (prototype ReportEditor) */
.tp-report-editor__chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  border: 1px solid var(--border-default, #e5e7eb);
  background: var(--bg-surface, #fff);
  padding: 0.375rem 0.75rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-body, #475569);
  text-decoration: none;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.tp-report-editor__chip-btn:hover {
  border-color: rgb(203 213 225);
  background: rgb(248 250 252);
  color: var(--text-heading, #1f2937);
}
.tp-report-editor__chip-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(254, 216, 19, 0.35);
}
[data-theme="dark"] .tp-report-editor__chip-btn {
  background: rgb(30 41 59 / 0.65);
  border-color: rgb(51 65 85);
  color: rgb(203 213 225);
}
[data-theme="dark"] .tp-report-editor__chip-btn:hover {
  background: rgb(51 65 85 / 0.55);
  color: rgb(248 250 252);
}
.tp-report-editor__chip-btn--back {
  padding-inline-start: 0.375rem;
  font-weight: 600;
  color: var(--text-heading, #1f2937);
}
.tp-report-editor__chip-btn--back:hover {
  border-color: rgba(254, 216, 19, 0.55);
}
.tp-report-editor__chip-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: rgba(254, 216, 19, 0.4);
  color: var(--text-heading, #1f2937);
}
[data-theme="dark"] .tp-report-editor__chip-btn--back {
  color: rgb(248 250 252);
}
[data-theme="dark"] .tp-report-editor__chip-btn-icon {
  background: rgba(254, 216, 19, 0.22);
  color: rgb(254 243 199);
}
.tp-report-editor__hero {
  background: rgb(255 255 255 / 0.92);
}
[data-theme="dark"] .tp-report-editor__hero {
  background: rgb(30 41 59 / 0.55);
}
/* ── Team performance: manager dashboard stat strip ── */
.tp-manager-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .tp-manager-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.tp-manager-stats__card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  min-height: 4rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.tp-manager-stats__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tp-manager-stats__card--emerald .tp-manager-stats__icon {
  background: #ecfdf5;
  color: #059669;
}

.tp-manager-stats__card--amber .tp-manager-stats__icon {
  background: #fffbeb;
  color: #d97706;
}

.tp-manager-stats__card--slate .tp-manager-stats__icon {
  background: #f1f5f9;
  color: #64748b;
}

.tp-manager-stats__card--gold .tp-manager-stats__icon {
  background: #fef9c3;
  color: #ca8a04;
}

.tp-manager-stats__body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}

.tp-manager-stats__body--progress {
  gap: 0.375rem;
}

.tp-manager-stats__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.tp-manager-stats__value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.tp-manager-stats__label {
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tp-manager-stats__bar {
  height: 0.25rem;
  border-radius: 9999px;
  background: var(--border-light, #e2e8f0);
  overflow: hidden;
}

.tp-manager-stats__bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: #eab308;
  transition: width 0.3s ease;
}

[data-theme="dark"] .tp-manager-stats__card--emerald .tp-manager-stats__icon {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
}

[data-theme="dark"] .tp-manager-stats__card--amber .tp-manager-stats__icon {
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
}

[data-theme="dark"] .tp-manager-stats__card--slate .tp-manager-stats__icon {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

[data-theme="dark"] .tp-manager-stats__card--gold .tp-manager-stats__icon {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
}

/* Team performance — senior org: vertical team coverage chart */
.tp-team-coverage-chart__head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tp-team-coverage-chart__head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgb(238 242 255);
  color: rgb(79 70 229);
}

[data-theme="dark"] .tp-team-coverage-chart__head-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
}

.tp-team-coverage-chart__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.6875rem;
  line-height: 1.25;
  color: var(--text-secondary);
}

.tp-team-coverage-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.tp-team-coverage-chart__swatch {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 0.125rem;
  flex-shrink: 0;
}

.tp-team-coverage-chart__swatch--final {
  background: #10b981;
}

.tp-team-coverage-chart__swatch--review {
  background: #38bdf8;
}

.tp-team-coverage-chart__swatch--incomplete {
  background: #e2e8f0;
}

[data-theme="dark"] .tp-team-coverage-chart__swatch--incomplete {
  background: #475569;
}

.tp-team-coverage-chart__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

.tp-team-coverage-chart__col {
  display: flex;
  flex: 1 1 5.25rem;
  min-width: 5.25rem;
  max-width: 6.5rem;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 0.5rem;
  padding: 0.25rem;
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: inherit;
  transition: background-color 0.15s ease, transform 0.2s ease;
}

.tp-team-coverage-chart__col:hover {
  background: rgb(248 250 252);
}

.tp-team-coverage-chart__col:focus-visible {
  outline: 2px solid rgb(165 180 252);
  outline-offset: 2px;
}

.tp-team-coverage-chart__col:hover .tp-team-coverage-chart__bar {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgb(165 180 252);
}

[data-theme="dark"] .tp-team-coverage-chart__col:hover {
  background: rgba(51, 65, 85, 0.35);
}

.tp-team-coverage-chart__pct {
  flex-shrink: 0;
  min-height: 1.25rem;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.25rem;
  color: var(--text-primary);
}

.tp-team-coverage-chart__bar {
  display: flex;
  flex-direction: column-reverse;
  flex-shrink: 0;
  width: 100%;
  max-width: 4.25rem;
  height: 10.5rem;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgb(226 232 240 / 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .tp-team-coverage-chart__bar {
  background: #334155;
  box-shadow: inset 0 0 0 1px rgb(71 85 105 / 0.8);
}

.tp-team-coverage-chart__seg {
  width: 100%;
  min-height: 0;
  flex-shrink: 0;
  transition: height 0.35s ease;
}

.tp-team-coverage-chart__seg--final {
  background: linear-gradient(to top, #10b981, #34d399);
}

.tp-team-coverage-chart__seg--review {
  background: #38bdf8;
}

.tp-team-coverage-chart__meta {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: calc(0.75rem * 1.3 * 2 + 0.125rem + 0.625rem * 1.25);
  flex-shrink: 0;
}

.tp-team-coverage-chart__team-name {
  flex: 1 1 0;
  min-height: 0;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tp-team-coverage-chart__ratio {
  flex-shrink: 0;
  margin-top: 0.125rem;
  font-size: 0.625rem;
  line-height: 1.25;
  color: var(--text-secondary);
}

@keyframes tp-sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.animate-sheet {
  animation: tp-sheet-up 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .animate-sheet {
    animation: none;
  }
}

[data-page-modal-box].tp-coverage-sheet {
  padding: 0 !important;
  border-radius: 1.5rem 1.5rem 0 0 !important;
  border-bottom: none !important;
  max-height: 82vh !important;
  max-width: 48rem !important;
  width: 100% !important;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25) !important;
}

/* Team performance — org tree (senior dashboard) */
.tp-org-tree {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tp-org-tree__search-wrap {
  padding: 0.125rem;
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240 / 0.8);
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

[data-theme="dark"] .tp-org-tree__search-wrap {
  background: var(--bg-surface);
  border-color: var(--border-default);
}

.tp-org-tree__search-input {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.tp-org-tree__search-input:focus {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}

.tp-org-tree__search-input::-webkit-search-cancel-button {
  display: none;
}

.tp-org-tree__search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: none;
  border-radius: 0.375rem;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.tp-org-tree__search-clear:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover, rgb(248 250 252));
}

.tp-org-tree__search-clear:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.tp-org-tree__search-wrap:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgb(254 216 19 / 0.15);
}

[data-theme="dark"] .tp-org-tree__search-wrap:focus-within {
  box-shadow: 0 0 0 4px rgb(254 216 19 / 0.12);
}

.tp-org-tree__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tp-org-tree__card {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240 / 0.8);
  background: rgb(255 255 255 / 0.9);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.05);
}

[data-theme="dark"] .tp-org-tree__card {
  background: var(--surface-bg);
  border-color: var(--border-default);
}

.tp-org-tree__head {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: start;
  font: inherit;
  color: inherit;
  transition: background-color 0.15s ease;
}

.tp-org-tree__head:hover:not(:disabled) {
  background: rgb(248 250 252);
}

[data-theme="dark"] .tp-org-tree__head:hover:not(:disabled) {
  background: rgb(51 65 85 / 0.35);
}

.tp-org-tree__head:disabled {
  cursor: default;
}

.tp-org-tree__head:focus-visible {
  outline: 2px solid rgb(165 180 252);
  outline-offset: -2px;
}

.tp-org-tree__chev {
  display: flex;
  flex-shrink: 0;
  color: rgb(148 163 184);
  transition: transform 0.2s ease;
}

.tp-org-tree__chev--open {
  transform: rotate(0deg);
}

.tp-org-tree__chev:not(.tp-org-tree__chev--open):not(.tp-org-tree__chev--spacer) {
  transform: rotate(-90deg);
}

.tp-org-tree__chev--spacer {
  width: 1rem;
  height: 1rem;
}

.tp-org-tree__team-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: rgb(241 245 249);
  font-size: 1.125rem;
  line-height: 1;
}

[data-theme="dark"] .tp-org-tree__team-icon {
  background: rgb(51 65 85);
}

.tp-org-tree__team-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-org-tree__lead {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  line-height: 1.25;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-org-tree__badge {
  flex-shrink: 0;
  padding: 0.25rem 0.625rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgb(241 245 249);
  border-radius: 9999px;
  box-shadow: inset 0 0 0 1px rgb(226 232 240);
}

[data-theme="dark"] .tp-org-tree__badge {
  background: rgb(51 65 85);
  box-shadow: inset 0 0 0 1px rgb(71 85 105);
}

.tp-org-tree__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 1rem 0.5rem 1rem;
  padding-inline-start: 1rem;
  padding-inline-end: 1rem;
  border-top: 1px solid rgb(241 245 249);
}

[data-theme="dark"] .tp-org-tree__body {
  border-top-color: rgb(51 65 85);
}

.tp-org-tree__child {
  padding-inline-start: 0.5rem;
}

.tp-org-tree__member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.75rem;
  transition: background-color 0.15s ease;
}

.tp-org-tree__member .tp-status-pill--toolbar {
  justify-self: end;
  justify-content: center;
  box-sizing: border-box;
  min-inline-size: 7.25rem;
  white-space: nowrap;
}

.tp-org-tree__member:hover {
  background: rgb(248 250 252);
}

[data-theme="dark"] .tp-org-tree__member:hover {
  background: rgb(51 65 85 / 0.35);
}

.tp-org-tree__member-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tp-org-tree__member-role {
  font-size: 0.6875rem;
  line-height: 1.25;
  color: var(--text-secondary);
}

.tp-org-tree__view-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
  height: 2rem;
  padding-inline: 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(79 70 229);
  text-decoration: none;
  background: rgb(238 242 255);
  border-radius: 0.5rem;
  transition: background-color 0.15s ease;
}

.tp-org-tree__view-btn:hover {
  background: rgb(224 231 255);
}

.tp-org-tree__view-btn--disabled {
  cursor: not-allowed;
  color: rgb(203 213 225);
  background: rgb(248 250 252);
  pointer-events: none;
}

.tp-org-tree__foot {
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid rgb(241 245 249);
}

[data-theme="dark"] .tp-org-tree__foot {
  border-top-color: rgb(51 65 85);
}

.tp-org-tree__progress {
  height: 0.375rem;
  overflow: hidden;
  border-radius: 9999px;
  background: rgb(226 232 240);
}

[data-theme="dark"] .tp-org-tree__progress {
  background: rgb(51 65 85);
}

.tp-org-tree__progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: rgb(129 140 248);
  transition: width 0.35s ease;
}

/* Team performance — manager dashboard member cards */
.tp-member-grid {
  display: grid;
  gap: 0.625rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .tp-member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .tp-member-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tp-member-card {
  --tp-member-accent: #94a3b8;
  display: flex;
  flex-direction: column;
  border-radius: 0.875rem;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-card, #fff);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tp-member-card--slate {
  --tp-member-accent: #94a3b8;
}

.tp-member-card--amber {
  --tp-member-accent: #f59e0b;
}

.tp-member-card--sky {
  --tp-member-accent: #0ea5e9;
}

.tp-member-card--emerald {
  --tp-member-accent: #10b981;
}

.tp-member-card:hover {
  border-color: rgb(203 213 225);
  box-shadow: 0 2px 8px rgb(15 23 42 / 0.06);
}

.tp-member-card__hit {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1rem;
  padding-inline-start: 0.75rem;
  min-height: 4.75rem;
  text-decoration: none;
  color: inherit;
  border-inline-start: 3px solid var(--tp-member-accent);
  outline: none;
  transition: background-color 0.15s ease;
}

.tp-member-card__hit:hover {
  background: rgb(248 250 252 / 0.85);
}

.tp-member-card__hit:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(254, 216, 19, 0.55);
}

.tp-member-card__head {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
}

.tp-member-card__name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-heading, #1f2937);
}

.tp-member-card__role {
  margin: 0.125rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-secondary, #64748b);
}

.tp-member-card__body {
  flex: 1;
  min-width: 0;
}

.tp-member-card__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  color: rgb(148 163 184);
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.tp-member-card:hover .tp-member-card__chev {
  color: rgb(71 85 105);
  background: rgb(241 245 249);
}

.tp-member-card__alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding-inline: 0.2rem;
  border-radius: 9999px;
  background: rgb(124 58 237);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tp-member-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-top: 1px solid var(--border-light, #f1f5f9);
  background: rgb(248 250 252 / 0.65);
  font-size: 0.6875rem;
  line-height: 1.35;
}

.tp-member-card__state {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  min-width: 0;
}

.tp-member-card__state-dot {
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--tp-member-accent);
}

.tp-member-card__compare {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  font-weight: 600;
  color: rgb(100 116 139);
  text-decoration: none;
  border-radius: 0.375rem;
  padding: 0.125rem 0.25rem;
  transition: color 0.15s ease;
}

.tp-member-card__compare:hover {
  color: var(--text-heading, #1f2937);
}

.tp-member-card__compare:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(254, 216, 19, 0.45);
}

[data-theme="dark"] .tp-member-card {
  background: rgb(30 41 59 / 0.45);
  border-color: rgb(51 65 85);
}

[data-theme="dark"] .tp-member-card:hover {
  border-color: rgb(71 85 105);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.2);
}

[data-theme="dark"] .tp-member-card__hit:hover {
  background: rgb(51 65 85 / 0.35);
}

[data-theme="dark"] .tp-member-card__foot {
  border-top-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.35);
}

[data-theme="dark"] .tp-member-card:hover .tp-member-card__chev {
  background: rgb(51 65 85);
  color: rgb(226 232 240);
}

[data-theme="dark"] .tp-member-card__compare {
  color: rgb(148 163 184);
}

[data-theme="dark"] .tp-member-card__compare:hover {
  color: rgb(248 250 252);
}

.tp-status-pill--toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: inset 0 0 0 1px currentColor;
}
.tp-status-pill__dot {
  width: 0.375rem;
  height: 0.375rem;
  flex-shrink: 0;
  border-radius: 9999px;
}
.tp-status-pill--toolbar.tp-status-pill--draft {
  color: rgb(180 83 9);
  background: rgb(255 251 235);
}
.tp-status-pill__dot--draft {
  background: rgb(251 191 36);
}
.tp-status-pill--toolbar.tp-status-pill--with-employee {
  color: rgb(3 105 161);
  background: rgb(240 249 255);
}
.tp-status-pill__dot--with-employee {
  background: rgb(14 165 233);
}
.tp-status-pill--toolbar.tp-status-pill--final {
  color: rgb(4 120 87);
  background: rgb(236 253 245);
}
.tp-status-pill__dot--final {
  background: rgb(16 185 129);
}
.tp-status-pill--toolbar.tp-status-pill--none {
  color: rgb(71 85 105);
  background: rgb(248 250 252);
}
.tp-status-pill__dot--none {
  background: rgb(148 163 184);
}
[data-theme="dark"] .tp-status-pill--toolbar.tp-status-pill--draft {
  color: rgb(253 230 138);
  background: rgb(113 63 18 / 0.35);
}
[data-theme="dark"] .tp-status-pill--toolbar.tp-status-pill--with-employee {
  color: rgb(125 211 252);
  background: rgb(12 74 110 / 0.35);
}
[data-theme="dark"] .tp-status-pill--toolbar.tp-status-pill--final {
  color: rgb(110 231 183);
  background: rgb(6 78 59 / 0.35);
}
[data-theme="dark"] .tp-status-pill--toolbar.tp-status-pill--none {
  color: rgb(203 213 225);
  background: rgb(51 65 85 / 0.45);
}

/* Team performance — report editor sticky action bar */
.tp-report-editor__footer {
  position: sticky;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  margin: 0.75rem -1.5rem -1.5rem;
  padding: 0.625rem 1.5rem;
  background: var(--bg-surface, #fff);
  border-top: 1px solid var(--border-default, #e5e7eb);
  box-shadow: 0 -1px 3px rgba(17, 24, 39, 0.05);
}
.tp-report-editor__save-status {
  margin: 0;
  min-height: 1.25rem;
  flex: 1 1 auto;
  text-align: start;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
}
.tp-report-editor__save-status:empty {
  display: none;
}
.tp-report-editor__save-status--saved {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #047857;
}
.tp-report-editor__save-status-icon {
  width: 1.0625rem;
  height: 1.0625rem;
  flex-shrink: 0;
}
.tp-report-editor__save-status--unsaved {
  color: #b91c1c;
}
.tp-report-editor__save-status--saving {
  color: #b91c1c;
}
[data-theme="dark"] .tp-report-editor__save-status--saved {
  color: #6ee7b7;
}
[data-theme="dark"] .tp-report-editor__save-status--unsaved,
[data-theme="dark"] .tp-report-editor__save-status--saving {
  color: #fca5a5;
}
.tp-report-editor__footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-inline-start: auto;
}
@media (min-width: 1024px) {
  .tp-report-editor__footer {
    margin-left: calc(-50vw + 50% + var(--shell-sidebar-half));
    margin-right: calc(-50vw + 50% + var(--shell-sidebar-half));
    padding-left: calc(50vw - 50% - var(--shell-sidebar-half));
    padding-right: calc(50vw - 50% - var(--shell-sidebar-half));
  }
}
[data-theme="dark"] .tp-report-editor__footer {
  background: var(--bg-surface, #1e293b);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.25);
}

/* Team performance — report viewer (read-only KPI/project grids) */
.tp-editor-grid--readonly.tp-editor-grid--kpi {
  --tp-grid-cols: 2.5rem minmax(8.5rem, 1.1fr) minmax(11rem, 1.7fr) 5.5rem 4.5rem 5.5rem minmax(10rem, 1.5fr);
}
.tp-editor-grid--readonly.tp-editor-grid--okr {
  --tp-grid-cols: 2.5rem minmax(9rem, 1.2fr) minmax(10rem, 1.5fr) 5.5rem minmax(9rem, 1.2fr) minmax(10rem, 1.4fr);
}
.tp-editor-grid--readonly.tp-editor-grid--project {
  --tp-grid-cols: 2.5rem minmax(7rem, 1fr) minmax(8.5rem, 1.3fr) minmax(7rem, 1fr) minmax(8rem, 1.1fr) minmax(
      8.5rem,
      1.3fr
    ) minmax(8.5rem, 1.3fr) minmax(8.5rem, 1.2fr);
}
.tp-editor-grid--readonly .tp-editor-grid__cell {
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgb(31 41 55);
}
.tp-editor-grid--readonly .tp-editor-grid__cell--center {
  text-align: center;
  justify-content: center;
}
.tp-editor-grid--readonly .tp-editor-grid__cell--index {
  justify-content: center;
  align-items: center;
  padding-inline: 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: rgb(148 163 184);
}
.tp-viewer-grid__cell--strong {
  font-weight: 600;
}
[data-theme="dark"] .tp-editor-grid--readonly .tp-editor-grid__cell {
  color: rgb(241 245 249);
}
[data-theme="dark"] .tp-editor-grid--readonly .tp-editor-grid__cell--index {
  color: rgb(100 116 139);
}

#tp-report-viewer {
  min-width: 0;
  max-width: 100%;
}
.tp-viewer-dim-section {
  min-width: 0;
  max-width: 100%;
}
.tp-viewer-dim-text {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.tp-viewer-note-saved {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(22 163 74);
}
[data-theme="dark"] .tp-viewer-note-saved {
  color: rgb(74 222 128);
}

/* Team performance — report viewer (comments & notes) */
.tp-viewer-field.textarea {
  min-height: 6rem;
  font-size: 0.875rem;
  line-height: 1.65;
}
.tp-comments-section {
  --tp-comment-radius: 0.75rem;
}
.tp-comment-card {
  border-radius: var(--tp-comment-radius);
  border: 1px solid rgb(226 232 240);
  background: rgb(248 250 252 / 0.65);
  padding: 0.75rem 1rem;
}
[data-theme="dark"] .tp-comment-card {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42 / 0.45);
}
.tp-comment-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}
.tp-comment-card__author {
  font-weight: 700;
  color: var(--text-primary, rgb(30 41 59));
}
.tp-comment-card__role {
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-weight: 600;
  font-size: 0.6875rem;
}
.tp-comment-card__role--senior {
  background: rgb(237 233 254);
  color: rgb(109 40 217);
}
.tp-comment-card__role--manager {
  background: rgb(224 242 254);
  color: rgb(3 105 161);
}
.tp-comment-card__role--employee {
  background: rgb(241 245 249);
  color: rgb(71 85 105);
}
[data-theme="dark"] .tp-comment-card__role--senior {
  background: rgb(76 29 149 / 0.35);
  color: rgb(216 180 254);
}
[data-theme="dark"] .tp-comment-card__role--manager {
  background: rgb(12 74 110 / 0.4);
  color: rgb(125 211 252);
}
[data-theme="dark"] .tp-comment-card__role--employee {
  background: rgb(51 65 85 / 0.5);
  color: rgb(203 213 225);
}
.tp-comment-card__quote {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: italic;
  color: rgb(100 116 139);
}
.tp-comment-card__body {
  margin: 0;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  line-height: 1.65;
  white-space: pre-wrap;
  color: var(--text-primary, rgb(30 41 59));
}
[data-theme="dark"] .tp-comment-card__body {
  color: rgb(241 245 249);
}
.tp-comments-empty {
  margin: 0;
  padding: 0.5rem 0;
}
.tp-comment-composer {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(226 232 240);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
[data-theme="dark"] .tp-comment-composer {
  border-top-color: rgb(51 65 85);
}
.tp-comment-composer__label {
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(71 85 105);
}
[data-theme="dark"] .tp-comment-composer__label {
  color: rgb(203 213 225);
}
.tp-comment-composer__field {
  border-radius: 0.75rem;
  border: 1.5px solid rgb(226 232 240);
  background: rgb(255 255 255);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.tp-comment-composer__field:focus-within {
  border-color: rgb(250 204 21);
  box-shadow: 0 0 0 4px rgb(254 216 19 / 0.15);
}
[data-theme="dark"] .tp-comment-composer__field {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59 / 0.55);
}
[data-theme="dark"] .tp-comment-composer__field:focus-within {
  border-color: rgb(202 138 4);
  box-shadow: 0 0 0 4px rgb(202 138 4 / 0.12);
}
.tp-comment-composer__textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 5.5rem;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  resize: vertical;
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-primary, rgb(30 41 59));
  direction: rtl;
  outline: none;
}
.tp-comment-composer__textarea::placeholder {
  color: rgb(148 163 184);
  font-weight: 400;
}
[data-theme="dark"] .tp-comment-composer__textarea {
  color: rgb(248 250 252);
}
[data-theme="dark"] .tp-comment-composer__textarea::placeholder {
  color: rgb(100 116 139);
}
.tp-comment-composer__quote {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border-inline-start: 3px solid rgb(250 204 21);
  background: rgb(254 252 232 / 0.8);
  font-family: "Vazirmatn", sans-serif;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgb(113 63 18);
}
[data-theme="dark"] .tp-comment-composer__quote {
  background: rgb(113 63 18 / 0.25);
  color: rgb(254 240 138);
}
.tp-comment-composer__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Team performance — multi-month compare (prototype MultiMonthReport) */
.tp-compare-month-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  background: var(--bg-surface, #fff);
  color: rgb(71 85 105);
  box-shadow: inset 0 0 0 1px rgb(226 232 240);
}
.tp-compare-month-pill:hover {
  background: rgb(248 250 252);
}
.tp-compare-month-pill--active {
  background: rgb(79 70 229);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(79 70 229);
}
.tp-compare-month-pill--active:hover {
  background: rgb(67 56 202);
}
.tp-compare-month-pill__dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  flex-shrink: 0;
}
.tp-compare-month-pill__dot--has-report {
  background: rgb(52 211 153);
}
.tp-compare-month-pill__dot--active {
  background: rgb(255 255 255 / 0.8);
}
.tp-compare-quick-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(100 116 139);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgb(226 232 240);
  transition: background-color 0.15s ease;
}
.tp-compare-quick-pill:hover {
  background: rgb(248 250 252);
  color: rgb(71 85 105);
}
[data-theme="dark"] .tp-compare-month-pill {
  background: var(--bg-surface);
  color: rgb(203 213 225);
  box-shadow: inset 0 0 0 1px var(--border-default, rgb(51 65 85));
}
[data-theme="dark"] .tp-compare-month-pill:hover {
  background: rgb(30 41 59);
}
[data-theme="dark"] .tp-compare-quick-pill {
  color: rgb(148 163 184);
  box-shadow: inset 0 0 0 1px var(--border-default, rgb(51 65 85));
}
[data-theme="dark"] .tp-compare-quick-pill:hover {
  background: rgb(30 41 59);
}
.tp-compare-kpi-grid {
  display: grid;
  align-items: center;
  grid-template-columns: var(--tp-compare-cols);
}
.tp-compare-kpi-grid--head {
  background: rgb(241 245 249);
}
[data-theme="dark"] .tp-compare-kpi-grid--head {
  background: rgb(30 41 59);
}
.tp-compare-kpi-grid__th {
  padding: 0.5rem 0.75rem;
  font-size: 11px;
  font-weight: 700;
  color: rgb(100 116 139);
}
.tp-compare-kpi-grid__th--month {
  text-align: center;
  border-inline-start: 1px solid rgb(226 232 240);
  color: rgb(71 85 105);
}
[data-theme="dark"] .tp-compare-kpi-grid__th--month {
  border-inline-start-color: var(--border-default, rgb(51 65 85));
}
.tp-compare-kpi-grid--row {
  border-top: 1px solid rgb(241 245 249);
  background: var(--bg-surface, #fff);
}
[data-theme="dark"] .tp-compare-kpi-grid--row {
  border-top-color: var(--border-default, rgb(51 65 85));
}
.tp-compare-kpi-grid__label {
  padding: 0.5rem 0.75rem;
}
.tp-compare-kpi-grid__cell {
  padding: 0.5rem 0.75rem;
  border-inline-start: 1px solid rgb(241 245 249);
  vertical-align: top;
}
[data-theme="dark"] .tp-compare-kpi-grid__cell {
  border-inline-start-color: var(--border-default, rgb(51 65 85));
}
.tp-compare-status-dot {
  display: inline-block;
  width: 0.375rem;
  height: 0.375rem;
  margin-inline-end: 0.25rem;
  border-radius: 9999px;
  vertical-align: middle;
}
.tp-compare-status-dot--final {
  background: rgb(16 185 129);
}
.tp-compare-status-dot--with_employee {
  background: rgb(14 165 233);
}
.tp-compare-status-dot--draft {
  background: rgb(251 191 36);
}

