@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --body-bg: #f7fafc;
  --text-primary: #0f172a;
  --text-muted: #334155;
  --banner-height: 2.5rem;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-border: rgba(148, 163, 184, 0.55);
  --surface-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
  --overlay: rgba(248, 250, 252, 0.12);
  --input-bg: rgba(255, 255, 255, 0.98);
  --input-border: rgba(148, 163, 184, 0.52);
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --accent-soft: rgba(14, 165, 233, 0.08);
  --logo-from: #0ea5e9;
  --logo-to: #0284c7;
  --selection-bg: rgba(14, 165, 233, 0.35);
  --selection-text: #fff;
  --card-surface: rgba(255, 255, 255, 0.97);
  --card-border: rgba(148, 163, 184, 0.35);
  --issue-card-bg: rgba(255, 255, 255, 0.97);
  --issue-card-text: #0f172a;
  --issue-card-border: rgba(148, 163, 184, 0.38);
}

:root[data-theme="light"] {
  color-scheme: light;
  --body-bg: #f7fafc;
  --text-primary: #0f172a;
  --text-muted: #334155;
  --banner-height: 2.5rem;
  --surface: rgba(255, 255, 255, 0.95);
  --surface-border: rgba(148, 163, 184, 0.55);
  --surface-shadow: 0 24px 55px rgba(15, 23, 42, 0.12);
  --overlay: rgba(248, 250, 252, 0.12);
  --input-bg: rgba(255, 255, 255, 0.98);
  --input-border: rgba(148, 163, 184, 0.52);
  --accent: #0ea5e9;
  --accent-strong: #0284c7;
  --accent-soft: rgba(14, 165, 233, 0.08);
  --logo-from: #0ea5e9;
  --logo-to: #0284c7;
  --selection-bg: rgba(14, 165, 233, 0.35);
  --selection-text: #fff;
  --card-surface: rgba(255, 255, 255, 0.97);
  --card-border: rgba(148, 163, 184, 0.35);
  --issue-card-bg: rgba(255, 255, 255, 0.97);
  --issue-card-text: #0f172a;
  --issue-card-border: rgba(148, 163, 184, 0.38);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --body-bg: #0b1120;
  --text-primary: #e2e8f0;
  --text-muted: #94a3b8;
  --banner-height: 2.5rem;
  --surface: rgba(15, 23, 42, 0.88);
  --surface-border: rgba(148, 163, 184, 0.28);
  --surface-shadow: 0 32px 70px rgba(8, 47, 73, 0.42);
  --overlay: rgba(15, 23, 42, 0.18);
  --input-bg: rgba(15, 23, 42, 0.92);
  --input-border: rgba(148, 163, 184, 0.42);
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-soft: rgba(14, 165, 233, 0.18);
  --logo-from: #38bdf8;
  --logo-to: #0ea5e9;
  --selection-bg: rgba(14, 165, 233, 0.5);
  --selection-text: #fff;
  --card-surface: rgba(15, 23, 42, 0.9);
  --card-border: rgba(148, 163, 184, 0.26);
  --issue-card-bg: rgba(15, 23, 42, 0.88);
  --issue-card-text: #e2e8f0;
  --issue-card-border: rgba(148, 163, 184, 0.24);
}

@media (prefers-color-scheme: dark) {
  :root {
    --body-bg: #0b1120;
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;
    --banner-height: 2.5rem;
    --surface: rgba(15, 23, 42, 0.88);
    --surface-border: rgba(148, 163, 184, 0.28);
    --surface-shadow: 0 32px 70px rgba(8, 47, 73, 0.42);
    --overlay: rgba(15, 23, 42, 0.18);
    --input-bg: rgba(15, 23, 42, 0.92);
    --input-border: rgba(148, 163, 184, 0.42);
    --accent: #38bdf8;
    --accent-strong: #0284c7;
    --accent-soft: rgba(14, 165, 233, 0.18);
    --logo-from: #38bdf8;
    --logo-to: #0ea5e9;
    --selection-bg: rgba(14, 165, 233, 0.5);
    --card-surface: rgba(15, 23, 42, 0.9);
    --card-border: rgba(148, 163, 184, 0.26);
    --issue-card-bg: rgba(15, 23, 42, 0.88);
    --issue-card-text: #e2e8f0;
    --issue-card-border: rgba(148, 163, 184, 0.24);
    .request-row {
  background-color: rgba(2, 6, 23, 0.98);
  border-color: rgba(15, 23, 42, 0.85);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.6);
}

.request-row span {
  color: #e2e8f0;
} 
  }
}

body {
  background-color: var(--body-bg);
  color: var(--text-primary);
  font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

/* Enforce Vazirmatn across the app, including form controls and headings */
html, body, button, input, select, textarea, h1, h2, h3, h4, h5, h6 {
  font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
}

/* Ensure all text elements use Vazirmatn font */
*, *::before, *::after {
  font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
}

/* Special rules for progress text and rating text */
.progress-text, .executor-rating-text, .issue-popup-empty, .related-issue-title {
  font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
}

::selection {
  background-color: var(--selection-bg);
  color: var(--selection-text);
}

.site-banner {
  position: relative;
  z-index: 30;
  background-color: var(--surface);
  border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  padding: 0 1.25rem;
  min-height: var(--banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-banner span,
.site-banner strong {
  font-weight: inherit;
}

.theme-toggle {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--surface-border);
  background-color: rgba(255, 255, 255, 0.72);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
  min-height: 2rem;
}

:root[data-theme="dark"] .theme-toggle {
  background-color: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.35);
  color: var(--text-primary);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.theme-toggle [data-theme-toggle-icon] {
  font-size: 0.9rem;
  line-height: 1;
}

.theme-toggle [data-theme-toggle-label] {
  line-height: 1;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle {
    background-color: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--text-primary);
  }
}

@media (min-width: 768px) {
  .site-banner {
    font-size: 1rem;
    padding: 0 2rem;
  }
}

.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;
}

.is-hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted);
}

.auth-screen::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translateX(-50%);
  background: radial-gradient(circle at top, rgba(14, 165, 233, 0.15), transparent 55%);
  pointer-events: none;
}

.auth-screen {
  width: 100%;
  min-height: calc(100vh - var(--banner-height));
  overflow: hidden;
}

.dashboard-screen {
  min-height: calc(100vh - var(--banner-height));
}

.auth-background {
  position: fixed !important;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.auth-background img {
  position: fixed !important;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  z-index: 0;
}

.auth-overlay {
  position: fixed !important;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

@media (max-height: 720px) {
  .auth-screen {
    overflow-y: auto;
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

.auth-overlay {
  background-color: var(--overlay);
  backdrop-filter: blur(1.5px);
}

.auth-card {
  background-color: var(--card-surface);
  border-color: var(--card-border);
  box-shadow: var(--surface-shadow);
  border-radius: 0.75rem;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 85px rgba(14, 165, 233, 0.18);
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 6px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.65);
  background: transparent;
  z-index: 40;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .site-footer {
    color: rgba(226, 232, 240, 0.72);
  }
}

@media (max-width: 640px) {
  .site-footer { font-size: 0.62rem; }
}

.logo-badge {
  background-image: linear-gradient(135deg, var(--logo-from), var(--logo-to));
  border-radius: 0.75rem;
}

.field-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.floating-field {
  position: relative;
  --floating-label-bg: var(--input-bg);
}

.floating-field .floating-control,
.floating-field .floating-input {
  padding-top: 1.65rem;
  padding-bottom: 0.65rem;
}

.floating-field textarea.floating-control,
.floating-field textarea.floating-input {
  padding-top: 2rem;
  min-height: 7rem;
  resize: vertical;
}

.floating-label {
  position: absolute;
  inset-inline-end: 1rem;
  right: 1rem;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
  background-color: var(--floating-label-bg);
  padding: 0 0.35rem;
  transition: top 180ms ease, transform 180ms ease, font-size 180ms ease, color 180ms ease, background-color 180ms ease;
  line-height: 1.2;
}

.floating-field:focus-within .floating-label,
.floating-field.is-filled .floating-label,
.floating-field .floating-control:not(:placeholder-shown) + .floating-label,
.floating-field .floating-input:not(:placeholder-shown) + .floating-label {
  top: 0;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--accent);
}

.floating-field .floating-control:disabled + .floating-label,
.floating-field .floating-input:disabled + .floating-label {
  color: var(--text-muted);
  opacity: 0.75;
}

.floating-field .floating-control:-webkit-autofill + .floating-label,
.floating-field .floating-input:-webkit-autofill + .floating-label {
  top: 0;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--accent);
}

.form-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Tree multiselect */
.tree-select {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  padding: 0.35rem;
}

.tree-select-search {
  margin-bottom: 0.5rem;
}

.tree-select-list {
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.25rem;
}

.tree-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  font-size: 0.93rem;
}

.tree-trigger-caret {
  color: var(--text-muted);
}

.tree-panel {
  margin-top: 0.4rem;
  border-top: 1px dashed var(--surface-border);
  padding-top: 0.4rem;
}

.tree-item {
  text-align: right;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.25rem;
}

.tree-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.35rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  transform: rotate(0deg);
  transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}

.tree-row[aria-expanded="true"] > .tree-toggle {
  transform: rotate(90deg);
}

.tree-toggle:hover {
  background-color: rgba(148, 163, 184, 0.12);
}

.tree-spacer {
  width: 1.25rem;
  height: 1.25rem;
}

.tree-check {
  accent-color: var(--accent);
}

.tree-label {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.tree-children {
  margin-right: 1rem;
  border-right: 1px dashed var(--surface-border);
  padding-right: 0.5rem;
}

.tree-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.tree-chip {
  border: 1px solid rgba(14, 165, 233, 0.25);
  background-color: rgba(14, 165, 233, 0.12);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
}

.tree-chip-more {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Ontology manager */
.ontology-actions { display: flex; gap: 0.5rem; align-items: center; }
.ontology-tree { padding: 0.5rem; border: 1px dashed var(--surface-border); border-radius: 0.75rem; background: var(--surface); }
.ont-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.25rem; }
.ont-toggle { width: 1.25rem; height: 1.25rem; border: 1px solid transparent; background: transparent; color: var(--text-muted); border-radius: 0.35rem; }
.ont-toggle.is-spacer { visibility: hidden; }
.ont-title { flex: 1; font-size: 0.92rem; color: var(--text-primary); }
.ont-actions { display: inline-flex; gap: 0.4rem; }
.ont-children { margin-right: 1.25rem; border-right: 1px dashed var(--surface-border); padding-right: 0.5rem; }

/* Executors section */
.executor-layout { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 768px) { .executor-layout { grid-template-columns: minmax(220px, 300px) 1fr; } }
.executor-list { display: flex; flex-direction: column; gap: 0.5rem; }
.executor-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.7rem; border: 1px solid var(--card-border); border-radius: 0.6rem; background: var(--card-surface); cursor: pointer; }
.executor-item.is-active { outline: 2px solid var(--accent-soft); }
.executor-avatar { width: 2rem; height: 2rem; border-radius: 0.5rem; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.executor-name { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); }
.executor-meta { margin-inline-start: auto; font-size: 0.75rem; color: var(--text-muted); }
.executor-detail { border: 1px solid var(--card-border); border-radius: 0.75rem; background: var(--card-surface); padding: 0.75rem; min-height: 10rem; }
.executor-project { padding: 0.4rem 0.5rem; border-bottom: 1px dashed var(--surface-border); }
.executor-project:last-child { border-bottom: 0; }
.executor-stars { display: inline-flex; gap: 0.25rem; font-size: 1.2rem; color: #ec4899; }

/* Assign performers (trustee) */
.assign-layout { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 768px) { .assign-layout { grid-template-columns: minmax(240px, 320px) 1fr; } }
.assign-list { display: flex; flex-direction: column; gap: 0.5rem; }
.assign-item { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.6rem 0.7rem; border: 1px solid var(--card-border); border-radius: 0.6rem; background: var(--card-surface); cursor: pointer; }
.assign-item.is-active { outline: 2px solid var(--accent-soft); }
.assign-title { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); }
.assign-desc { font-size: 0.78rem; color: var(--text-muted); }
.assign-detail { border: 1px solid var(--card-border); border-radius: 0.75rem; background: var(--card-surface); padding: 0.75rem; min-height: 10rem; display: grid; gap: 0.75rem; }
.assign-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.5rem; border: 1px solid rgba(14,165,233,0.25); background: rgba(14,165,233,0.12); color: var(--accent-strong); border-radius: 999px; font-size: 0.75rem; }
.assign-chip button { border: 0; background: transparent; color: var(--accent-strong); cursor: pointer; }
.assign-chiplist { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.assign-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.assign-suggest { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* Reports list (trustee) */
.reports-layout { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 768px) { .reports-layout { grid-template-columns: minmax(260px, 340px) 1fr; } }
.reports-list { display: flex; flex-direction: column; gap: 0.5rem; }
.reports-item { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.5rem; padding: 0.6rem 0.7rem; border: 1px solid var(--card-border); border-radius: 0.6rem; background: var(--card-surface); cursor: pointer; }
.reports-item.is-active { outline: 2px solid var(--accent-soft); }
.reports-title { font-weight: 700; font-size: 0.92rem; color: var(--text-primary); grid-column: 1 / -1; }
.reports-meta { font-size: 0.78rem; color: var(--text-muted); }
.reports-progress { font-size: 0.78rem; color: var(--text-muted); justify-self: end; }
.reports-detail { border: 1px solid var(--card-border); border-radius: 0.75rem; background: var(--card-surface); padding: 0.75rem; min-height: 10rem; display: grid; gap: 0.5rem; }

.btn-primary {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background-image: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 20px 45px rgba(14, 165, 233, 0.25);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 28px 60px rgba(14, 165, 233, 0.32);
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.link-muted {
  color: var(--text-muted);
  transition: color 150ms ease;
}

.link-muted:hover {
  color: var(--accent);
}

.auth-card h1 {
  color: var(--text-primary);
}

.link-muted:focus {
  outline: none;
  text-decoration: underline;
  color: var(--accent);
}

.auth-card,
.btn-primary,
.logo-badge,
.form-input {
  will-change: transform, box-shadow, border-color;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.8rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-strong);
  background-color: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 18px 35px rgba(14, 165, 233, 0.18);
}

.btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(14, 165, 233, 0.35);
  color: var(--accent-strong);
  background-color: transparent;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.btn-ghost:hover {
  border-color: rgba(14, 165, 233, 0.55);
  background-color: rgba(14, 165, 233, 0.12);
}

.btn-ghost:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dashboard-wrapper {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--banner-height));
  position: relative;
}

@media (min-width: 768px) {
  .dashboard-wrapper {
    flex-direction: row;
  }
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 25;
}

.sidebar-backdrop-active {
  opacity: 1;
  pointer-events: auto;
}

.dashboard-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 18rem;
  padding: 2.25rem 1.75rem;
  overflow-y: auto;
  background-color: var(--surface);
  border-left: 1px solid var(--surface-border);
  box-shadow: 0 30px 60px rgba(14, 165, 233, 0.18);
  transform: translateX(100%);
  transition: transform 220ms ease;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.dashboard-sidebar.sidebar-open {
  transform: translateX(0);
}

@media (min-width: 768px) {
  .dashboard-sidebar {
    position: relative;
    transform: none;
    box-shadow: none;
    width: 19rem;
  }
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar-header-text {
  text-align: right;
  flex: 1;
}

.sidebar-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-subtitle {
  margin-top: 0.35rem;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.sidebar-collapse-btn {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  padding: 0.45rem;
  border: 1px solid var(--surface-border);
  background-color: rgba(148, 163, 184, 0.12);
  color: var(--text-primary);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
  cursor: pointer;
}

.sidebar-collapse-btn:hover {
  background-color: rgba(14, 165, 233, 0.16);
  border-color: rgba(14, 165, 233, 0.35);
}

.sidebar-collapse-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sidebar-collapse-btn svg {
  width: 1.4rem;
  height: 1.4rem;
  transition: transform 160ms ease;
}

@media (min-width: 768px) {
  .sidebar-collapse-btn {
    display: inline-flex;
  }
}

.sidebar-user {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

.sidebar-user-avatar {
  position: relative;
  width: 6rem;
  height: 6rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.8), rgba(99, 102, 241, 0.8));
  border: 2px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  flex-shrink: 0;
}

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

.sidebar-user-avatar-initial {
  pointer-events: none;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-user-role {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-strong);
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
}

.sidebar-nav {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  color: var(--text-primary);
  font-size: 0.93rem;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  color: inherit;
  opacity: 0.9;
}

.sidebar-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.sidebar-text {
  transition: opacity 160ms ease;
  white-space: nowrap;
}

.sidebar-link .sidebar-indicator {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: transparent;
  transition: background-color 160ms ease;
}

.sidebar-link:hover {
  background-color: rgba(14, 165, 233, 0.12);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.sidebar-link:hover .sidebar-icon {
  opacity: 1;
}

.sidebar-link.is-active {
  background-color: rgba(14, 165, 233, 0.18);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.25);
}

.sidebar-link.is-active .sidebar-indicator {
  background-color: var(--accent-strong);
}

.sidebar-divider {
  margin: 1.5rem 0 0.75rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.35);
}

.sidebar-divider-header {
  margin: 1.25rem 0 1.25rem;
}

.sidebar-divider-footer {
  margin: 1.75rem 0 1rem;
}

.sidebar-logout {
  color: #f87171;
  font-weight: 600;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background-color: rgba(248, 113, 113, 0.08);
}

.sidebar-logout:hover {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.35);
  background-color: rgba(220, 38, 38, 0.12);
}

.sidebar-link.sidebar-logout {
  position: relative;
  margin-top: 0.5rem;
}

.sidebar-indicator {
  margin-inline-start: auto;
}

.dashboard-sidebar.sidebar-collapsed {
  width: 5.5rem;
  padding: 2.25rem 1rem;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-header {
  align-items: center;
  justify-content: center;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-header-text {
  display: none;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-collapse-btn {
  margin: 0 auto;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.dashboard-sidebar.sidebar-collapsed .sidebar-nav {
  align-items: center;
  gap: 0.5rem;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-divider {
  display: none;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-user {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.dashboard-sidebar.sidebar-collapsed .sidebar-user-info { display: none; }
.dashboard-sidebar.sidebar-collapsed .sidebar-user-avatar {
  width: 2.75rem;
  height: 2.75rem;
}

/* Clickable manager rating section */
.manager-rating-section { cursor: pointer; }

.dashboard-sidebar.sidebar-collapsed .sidebar-link {
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  gap: 0.4rem;
  flex-direction: column;
  border-radius: 1rem;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-icon {
  margin: 0;
  width: 1.7rem;
  height: 1.7rem;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-text {
  display: none;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-link .sidebar-indicator {
  display: none;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-logout {
  justify-content: center;
}

.dashboard-sidebar.sidebar-collapsed .sidebar-link.sidebar-logout::before {
  left: 25%;
  right: 25%;
}

.dashboard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem;
}

@media (min-width: 1024px) {
  .dashboard-content {
    padding: 0.5rem 0.25rem 0.25rem;
    gap: 0.5rem;
  }
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background-color: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 1rem;
  padding: 0.65rem 0.85rem;
  box-shadow: var(--surface-shadow);
}

.sidebar-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.35rem;
}

.sidebar-toggle span {
  display: block;
  width: 1.6rem;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 999px;
  transition: transform 160ms ease, opacity 160ms ease;
}

@media (min-width: 768px) {
  .sidebar-toggle {
    display: none;
  }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-regions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 0%;
}

.topbar-regions.is-fixed {
  position: fixed;
  z-index: 50;
}

.topbar-region-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.topbar-region-btn {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
  transform: translateY(0);
}

.topbar-region-btn:hover,
.topbar-region-btn:focus {
  color: var(--accent-strong);
  border-color: rgba(14, 165, 233, 0.55);
  background: rgba(14, 165, 233, 0.15);
  transform: translateY(-1px);
}

.topbar-region-btn.is-active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.85), rgba(56, 189, 248, 0.75));
  color: #fff;
  border-color: rgba(14, 165, 233, 0.9);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.25);
}


.topbar-region-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topbar-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.topbar-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.topbar-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dashboard-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.summary-card {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 0.75rem;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.summary-card::after {
  content: '';
  position: absolute;
  inset: auto auto -45% 50%;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.3), transparent 65%);
  transform: translateX(-50%);
  pointer-events: none;
}

.summary-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(14, 165, 233, 0.16);
  color: var(--accent-strong);
}

.summary-icon svg {
  width: 1.6rem;
  height: 1.6rem;
  stroke-width: 1.4;
}

.summary-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.summary-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.summary-value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.summary-trend {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.summary-trend.is-positive {
  color: #22c55e;
}

.summary-trend.is-negative {
  color: #f97316;
}

.summary-progress {
  position: relative;
  width: 100%;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  overflow: hidden;
}

.summary-progress-fill {
  position: absolute;
  inset: 0;
  width: var(--progress, 0%);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.85), rgba(56, 189, 248, 0.85));
}

.summary-stars {
  display: inline-flex;
  gap: 0.2rem;
  color: #fbbf24;
  font-size: 0.95rem;
  letter-spacing: 0.1rem;
}

.issue-list-card {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid var(--issue-card-border);
  background: var(--issue-card-bg);
  padding: 1.6rem 1.8rem;
  color: var(--issue-card-text);
  box-shadow: 0 35px 70px rgba(7, 89, 133, 0.12);
  overflow: hidden;
}

.issue-list-card::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.22), transparent 70%);
  opacity: 0.45;
  pointer-events: none;
}

.issue-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.issue-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.issue-tabs {
  display: inline-flex;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.25rem;
  gap: 0.25rem;
}
.issue-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.issue-tab[aria-selected="true"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

@media (max-width: 767px) {
  .issue-controls {
    align-items: flex-start;
  }
}

.issue-control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  --floating-label-bg: var(--card-surface);
}

.issue-control .floating-label {
  font-size: 0.78rem;
}

.issue-clear {
  align-self: flex-end;
  padding: 0.6rem 1.2rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: rgba(14, 165, 233, 0.08);
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease, transform 150ms ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
}

@media (max-width: 767px) {
  .issue-clear {
    min-height: auto;
    align-self: flex-start;
  }
}

.issue-clear:hover {
  border-color: rgba(14, 165, 233, 0.6);
  background: rgba(14, 165, 233, 0.12);
}

.issue-clear:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.issue-control .form-input {
  min-width: 170px;
  background-color: var(--card-surface);
  color: var(--text-primary);
  border-color: var(--card-border);
}

.issue-control .form-input:focus {
  border-color: rgba(56, 189, 248, 0.6);
}

.issue-list-header {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  z-index: 1;
}

@media (min-width: 768px) {
  .issue-list-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.issue-list-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.issue-list-header p {
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.8);
}

.issue-total {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  font-weight: 500;
}

.issue-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.65rem;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  position: relative;
}

.issue-actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.issue-decision-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.1rem 1.5rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0.85rem;
  background: var(--card-surface);
}

.issue-decision-legend {
  position: absolute;
  top: -0.7rem;
  inset-inline-start: 1.25rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: var(--card-surface);
  color: #0284c7;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.issue-decision-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.issue-decision-option.is-active .issue-decision-count {
  color: var(--text-primary);
}

.issue-decision-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.issue-decision-btn-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.issue-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

@media (min-width: 768px) {
  .issue-row-main {
    flex-direction: row;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

.issue-row-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(59, 130, 246, 0.9));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 18px rgba(14, 165, 233, 0.24);
}

.issue-row-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.issue-row-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--issue-card-text);
}

.issue-row-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.issue-row-ratings {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .issue-row-ratings {
    width: auto;
    min-width: 220px;
    margin-inline-start: auto;
  }
}

@media (min-width: 1024px) {
  .issue-row-ratings {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .issue-rating {
    flex: 1;
  }
}

.issue-rating {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.08);
}

.issue-rating-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.issue-rating-count {
  font-size: 0.68rem;
  color: rgba(71, 85, 105, 0.7);
}

.issue-row-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.1rem;
  color: #fbbf24;
  cursor: pointer;
}

.issue-star {
  display: inline-flex;
  color: rgba(148, 163, 184, 0.45);
  transition: color 120ms ease, transform 120ms ease;
  user-select: none;
}

.issue-star.is-filled {
  color: currentColor;
}

.issue-row-rating:not(.is-locked) .issue-star:hover {
  transform: translateY(-2px);
}

.issue-row-rating:not(.is-locked) .issue-star:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.issue-row-rating.is-locked {
  cursor: default;
  opacity: 0.85;
}

.issue-row-rating.is-locked .issue-star {
  pointer-events: none;
}

.issue-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.issue-progress-steps {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.65rem;
  color: rgba(71, 85, 105, 0.75);
}

.issue-progress-step {
  position: relative;
  flex: 1;
  text-align: center;
  padding-bottom: 1.6rem;
  white-space: nowrap;
}

.issue-progress-step::before {
  content: '';
  position: absolute;
  left: 50%;
  /* Pull dot closer to the progress track */
  bottom: -0.05rem;
  transform: translateX(-50%);
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.45);
  background: var(--card-surface);
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

/* Labels stacked above the dot */
.issue-progress-step-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
.issue-progress-step-title {
  font-weight: 600;
}
.issue-progress-step-date {
  color: rgba(71, 85, 105, 0.75);
  font-size: 0.62rem;
}

.issue-progress-step.is-complete::before {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.issue-progress-step.is-current::before {
  background: #fff;
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.issue-progress-step.is-complete,
.issue-progress-step.is-current {
  color: var(--text-primary);
  font-weight: 600;
}

.issue-progress-track {
  position: relative;
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
  /* Remove extra gap so the track touches the dots */
  margin-top: 0;
}

.issue-progress-fill {
  position: absolute;
  inset: 0;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(59, 130, 246, 0.95));
  box-shadow: 0 8px 16px rgba(14, 165, 233, 0.25);
}

.report-field-row {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 1024px) {
  .report-field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

.report-region-fieldset {
  border: 1px solid var(--card-border);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  background: var(--card-surface);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.report-region-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.report-region-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 768px) {
  .report-region-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .report-region-option {
    flex: 1 1 calc(50% - 0.6rem);
    min-width: 220px;
  }
}

@media (min-width: 1024px) {
  .report-region-list {
    flex-wrap: nowrap;
  }

  .report-region-option {
    flex: 1 1 auto;
  }
}

.report-region-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  direction: rtl;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.report-region-option:hover,
.report-region-option:focus-within {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}

.report-region-option input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent-strong);
}

.report-region-option span {
  font-size: 0.85rem;
}


.topbar-region-btn,
.report-region-option {
  direction: rtl;
}

@media (prefers-color-scheme: dark) {
  .summary-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.92));
    border-color: rgba(148, 163, 184, 0.25);
  }

  .issue-list-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.95));
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 35px 70px rgba(7, 89, 133, 0.3);
  }

  .issue-list-card::before {
    opacity: 0.65;
  }

  .issue-list-header p {
    color: rgba(226, 232, 240, 0.74);
  }

  .issue-row {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(148, 163, 184, 0.18);
  }

  .issue-row-content h4 {
    color: #e2e8f0;
  }

  .issue-row-content p {
    color: rgba(226, 232, 240, 0.72);
  }

  .report-region-option {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
    box-shadow: 0 18px 35px rgba(7, 89, 133, 0.25);
  }

  .issue-empty {
    background: rgba(15, 23, 42, 0.6);
    color: rgba(226, 232, 240, 0.68);
  }

  .region-entry {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.28);
  }

  .report-region-fieldset {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.28);
  }

  .home-level-track {
    background: rgba(148, 163, 184, 0.28);
  }

  .home-level-track-fill {
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.25);
  }

  .home-level-step {
    color: rgba(226, 232, 240, 0.78);
  }

  .home-level-step::before {
    border-color: rgba(148, 163, 184, 0.38);
    background: rgba(15, 23, 42, 0.85);
  }

  .home-level-step.is-current::before {
    background: rgba(15, 23, 42, 0.92);
  }

  .home-level-step.is-complete {
    color: #38bdf8;
    font-weight: 600;
  }

  .home-level-step.is-current {
    color: #38bdf8;
    font-weight: 700;
  }

  .region-remove:disabled {
    background: rgba(248, 113, 113, 0.16);
    color: rgba(248, 250, 252, 0.68);
  }
}

.issue-empty {
  padding: 1.2rem;
  border-radius: 0.9rem;
  background: rgba(148, 163, 184, 0.12);
  color: rgba(71, 85, 105, 0.75);
  text-align: center;
  font-size: 0.85rem;
}
.panel {
  background-color: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 0.85rem;
  box-shadow: var(--surface-shadow);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

@media (min-width: 768px) {
  .panel-body {
    gap: 1.1rem;
  }
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .panel-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.panel-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.panel-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

.home-stats-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .home-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .home-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.home-level-card {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  padding: 1.6rem;
  border-radius: 1rem;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.1);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .home-level-card {
    padding: 1.75rem;
  }
}

.home-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-level-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.home-level-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: rgba(14, 165, 233, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

.home-level-progress {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.home-level-steps {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.home-level-step {
  position: relative;
  flex: 1;
  text-align: center;
  padding-bottom: 1rem;
  white-space: nowrap;
  transition: color 160ms ease;
}

.home-level-step::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.45);
  background: var(--card-surface);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-level-step.is-complete::before {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.home-level-step.is-current::before {
  background: var(--card-surface);
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.home-level-step.is-complete {
  color: var(--accent-strong);
  font-weight: 600;
}

.home-level-step.is-current {
  color: var(--accent-strong);
  font-weight: 700;
}

.home-level-track {
  position: relative;
  height: 0.65rem;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
  margin-top: -0.35rem;
}

.home-level-track-fill {
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(59, 130, 246, 0.95));
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
  width: var(--level-progress-percent, 0%);
}

.home-level-message {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: right;
}

.home-stat-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: 1rem;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
  min-height: 100%;
}

.home-progress {
  --progress: 0deg;
  position: relative;
  width: 7.2rem;
  height: 7.2rem;
  border-radius: 50%;
  /* Ensure the unfilled arc starts exactly after the filled arc */
  background: conic-gradient(var(--accent-strong) var(--progress, 0deg), rgba(148, 163, 184, 0.2) var(--progress, 0deg) 360deg);
  display: grid;
  place-items: center;
  margin: 0 auto;
}

/* Dark mode: increase remainder contrast in circular progress */
:root[data-theme="dark"] .home-progress {
  background: conic-gradient(var(--accent-strong) var(--progress, 0deg), rgba(148, 163, 184, 0.35) var(--progress, 0deg) 360deg);
}

.home-progress::before {
  content: '';
  position: absolute;
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 50%;
  background: var(--card-surface);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.home-progress-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-progress-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.home-progress-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.home-stat-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-align: center;
}

.home-progress.home-progress-decisions {
  --approve-color: #0f766e;
  --reject-color: #b91c1c;
  --decisions-background: rgba(148, 163, 184, 0.2);
  background: conic-gradient(var(--decisions-background) 0deg 360deg);
}

/* Dark mode: make the undecided slice darker in decisions ring */
:root[data-theme="dark"] .home-progress.home-progress-decisions {
  --decisions-background: rgba(148, 163, 184, 0.35);
}

.home-stat-meta-decisions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.home-stat-meta-decisions span::before {
  content: '';
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-inline-end: 0.3rem;
}

.home-meta-approved::before {
  background-color: #0f766e;
}

.home-meta-rejected::before {
  background-color: #b91c1c;
}

.home-stat-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.home-stat-body p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-stat-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.profile-info-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-info-row {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .profile-info-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.profile-info-row label {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
}

.profile-upgrade {
  border-radius: 0.85rem;
  border: 1px solid var(--surface-border);
  background: var(--card-surface);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.profile-upgrade-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: right;
}

.profile-upgrade-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-upgrade-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.profile-upgrade-options {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .profile-upgrade-options {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.profile-upgrade-option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--surface-border);
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.profile-upgrade-option:hover {
  border-color: rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.12);
  transform: translateY(-2px);
}

.profile-upgrade-option:focus-within {
  outline: none;
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.profile-upgrade-option input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: var(--accent-strong);
  flex-shrink: 0;
}

.profile-upgrade-option span {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-upgrade-option small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.profile-upgrade-option input[type="radio"]:checked + div span {
  color: var(--accent-strong);
}

.profile-upgrade-option input[type="radio"]:checked + div small {
  color: var(--accent-strong);
}

.profile-upgrade-submit {
  align-self: flex-start;
  width: auto;
  min-width: 0;
}

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .panel-actions {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }
}

.panel-actions .btn-primary {
  width: 100%;
}

.panel-actions .btn-secondary {
  width: 100%;
}

@media (min-width: 640px) {
  .panel-actions .btn-primary,
  .panel-actions .btn-secondary {
    width: auto;
  }
}

.region-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.region-entry {
  border-radius: 0.85rem;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.region-entry .floating-field {
  --floating-label-bg: var(--card-surface);
}

.region-entry-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .region-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.region-entry-extra {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .region-entry-extra {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) auto;
    align-items: stretch;
  }
}

.region-entry-remove {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

@media (min-width: 640px) {
  .region-entry-remove {
    justify-content: flex-end;
  }
}

.region-remove {
  border: none;
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border-radius: 0.75rem;
  padding: 0.45rem 0.95rem;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  width: 100%;
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

@media (min-width: 640px) {
  .region-remove {
    width: auto;
    min-width: 8rem;
    height: 100%;
  }
}

.region-remove:hover,
.region-remove:focus {
  background: rgba(248, 113, 113, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(248, 113, 113, 0.18);
}

.region-remove:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
}

.region-remove:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: rgba(248, 113, 113, 0.08);
  color: rgba(248, 113, 113, 0.75);
  transform: none;
  box-shadow: none;
}

.region-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.region-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8.25 9l3.75 3.75L15.75 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 1rem center;
  background-size: 1rem;
  padding-left: 2.5rem;
}

input[type="date"].form-input {
  direction: rtl;
}

input[type="file"].form-input {
  cursor: pointer;
  padding-inline: 0.9rem;
}

@media (min-width: 768px) {
  .panel-body .form-input {
    min-height: 3.1rem;
  }
}

.panel-body .floating-field {
  --floating-label-bg: var(--card-surface);
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(14, 116, 144, 0.12));
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.profile-avatar-section + .profile-info-grid {
  margin-top: 0.75rem;
}

.profile-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  font-weight: 600;
  color: #0f172a;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
  border: 2px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

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

.profile-avatar-actions {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.profile-avatar:hover .profile-avatar-actions,
.profile-avatar:focus-within .profile-avatar-actions {
  opacity: 1;
  pointer-events: auto;
}

.profile-avatar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.profile-avatar-action:hover,
.profile-avatar-action:focus {
  background: rgba(15, 23, 42, 0.7);
}

.profile-avatar.has-avatar {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.12));
}

.dark .profile-avatar {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(79, 70, 229, 0.35));
  border-color: rgba(96, 165, 250, 0.35);
}

.dark .sidebar-user-avatar {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.8), rgba(99, 102, 241, 0.8));
  border-color: rgba(147, 197, 253, 0.35);
}

.profile-avatar-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-avatar-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f172a;
}

.profile-avatar-role {
  font-size: 0.9rem;
  color: rgba(71, 85, 105, 0.85);
}

.dark .profile-avatar-name {
  color: #f1f5f9;
}

.dark .profile-avatar-role {
  color: rgba(148, 163, 184, 0.85);
}

.request-card {
  overflow: hidden;
}

.request-region-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  justify-content: flex-end;
}

.request-list {
  display: flex;
  flex-direction: column;
  /* Reduced vertical spacing */
  gap: 0.35rem;
  padding: 0.75rem 0.9rem 1rem;
}

.request-row {
  display: grid;
  grid-template-columns: minmax(2.75rem, 3.25rem) repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 1.25rem;
  background-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
  cursor: pointer;
  position: relative;
}

:root[data-theme="dark"] .request-row {
  /* Darker background and subtler border in dark mode */
  background-color: rgba(2, 6, 23, 0.98);
  border-color: rgba(15, 23, 42, 0.85);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.6);
}

.request-row span {
  font-size: 0.92rem;
  color: #0f172a;
}

:root[data-theme="dark"] .request-row span {
  color: #e2e8f0;
}

/* Trailing arrow indicator for rows */
.row-trailing-arrow {
  font-size: 1.9rem;
  color: var(--text-muted);
  text-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
  transition: transform 160ms ease, color 160ms ease, text-shadow 160ms ease;
}

/* Better alignment for row arrow in grid rows */
.request-row .row-trailing-arrow {
  justify-self: end;
}

.issue-row:hover .row-trailing-arrow,
.request-row:hover .row-trailing-arrow {
  transform: translateX(-2px) scale(1.05);
  color: var(--accent-strong);
  text-shadow: 0 8px 22px rgba(14, 165, 233, 0.35);
}

/* Sidebar help as button */
.sidebar-help { cursor: pointer; text-align: right; }

/* Product tour */
.tour-overlay { position: fixed; inset: 0; background: rgba(2, 6, 23, 0.6); backdrop-filter: blur(1px); z-index: 60; }
.tour-spotlight { position: fixed; border: 2px solid var(--accent); border-radius: 0.75rem; box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.25); z-index: 61; pointer-events: none; }
.tour-tooltip { position: fixed; max-width: 320px; background: var(--surface); color: var(--text-primary); border: 1px solid var(--surface-border); border-radius: 0.75rem; box-shadow: var(--surface-shadow); padding: 0.75rem; z-index: 62; }
.tour-controls { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.5rem; }

/* Make decision buttons visually closer to other buttons */
.issue-decision-btn {
  border-radius: 0.75rem !important;
  font-weight: 600 !important;
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.15);
}

.issue-decision-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(14, 165, 233, 0.25);
}

.issue-decision-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 20px 36px rgba(14, 165, 233, 0.25);
}

/* Request index similar to issue index */
.request-row .request-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.95), rgba(59, 130, 246, 0.9));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 18px rgba(14, 165, 233, 0.24);
}

.request-row .request-index {
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
}

.request-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.request-actions .issue-decision-option {
  gap: 0.15rem;
}

.request-actions .issue-decision-option .issue-decision-btn {
  width: 2.75rem;
  height: 2.75rem;
}

.request-actions .issue-decision-option .issue-decision-count {
  font-size: 0.7rem;
  color: rgba(71, 85, 105, 0.7);
}

:root[data-theme="dark"] .request-actions .issue-decision-option .issue-decision-count {
  color: rgba(148, 163, 184, 0.7);
}

.request-status-note {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.request-status-note.status-approved {
  background-color: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.request-status-note.status-rejected {
  background-color: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

:root[data-theme="dark"] .request-status-note {
  background-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

:root[data-theme="dark"] .request-status-note.status-approved {
  background-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

:root[data-theme="dark"] .request-status-note.status-rejected {
  background-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

@media (max-width: 767px) {
  .profile-avatar-section {
    flex-direction: column;
    text-align: center;
  }

  .request-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
  }

  .request-actions {
    grid-column: span 2;
    justify-content: center;
  }
}

.profile-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:0;transition:opacity .2s ease;}
.profile-modal.is-visible{pointer-events:auto;opacity:1;}
.profile-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.5);}
.profile-modal-dialog{position:relative;background:#fff;border-radius:1rem;padding:2rem;max-width:28rem;width:90%;box-shadow:0 20px 45px rgba(15,23,42,.25);}
.profile-modal-close{position:absolute;top:1rem;left:1rem;background:none;border:0;font-size:1.25rem;cursor:pointer;}
.profile-modal-content{display:flex;flex-direction:column;gap:.5rem;color:#0f172a;}
.profile-modal-role{font-weight:600;color:#6366f1;}



.region-entry-hint{font-size:0.8rem;color:var(--text-muted);margin-top:0.35rem;}
.region-entry-summary{margin-top:0.6rem;font-weight:600;color:var(--text-primary);}
.profile-modal{z-index:1000;}
.profile-modal-dialog{z-index:1001;}

:root[data-theme="dark"] .profile-modal-dialog{background:rgba(15,23,42,0.92);color:var(--text-primary);}

.profile-modal-header{display:flex;flex-direction:column;gap:0.4rem;margin-bottom:1.25rem;}
.profile-modal-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:0.85rem 1rem;}
.profile-modal-field{background-color:var(--surface);border:1px solid var(--surface-border);border-radius:0.9rem;padding:0.85rem 1rem;display:flex;flex-direction:column;gap:0.35rem;}
:root[data-theme="dark"] .profile-modal-field{background-color:rgba(15,23,42,0.6);border-color:rgba(148,163,184,0.25);color:var(--text-primary);}
.profile-modal-field.profile-modal-field-wide{grid-column:span 2;}
@media (max-width: 640px){.profile-modal-field.profile-modal-field-wide{grid-column:span 1;}}
.profile-modal-field-label{font-size:0.75rem;color:var(--text-muted);}
.profile-modal-field-value{font-weight:600;color:var(--text-primary);}

[data-topbar-placeholder]{display:block;width:100%;height:0 !important;}

/* Filter Controls Toggle */
.issue-controls {
  position: relative;
}

.issue-controls .issue-control,
.issue-controls .issue-clear {
  display: none;
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease, display 0.3s ease;
  transform-origin: top center;
}

.issue-controls.is-expanded .issue-control,
.issue-controls.is-expanded .issue-clear {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.issue-filter-toggle {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.issue-filter-toggle:hover {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.45);
  color: var(--accent-strong);
}

.issue-filter-toggle.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

/* Dark mode support for filter toggle */
@media (prefers-color-scheme: dark) {
  .issue-filter-toggle {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.35);
    color: rgba(226, 232, 240, 0.85);
  }

  .issue-filter-toggle:hover {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(14, 165, 233, 0.45);
    color: #93c5fd;
  }

  .issue-filter-toggle.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }
}

/* RTL support for filter toggle */
[dir="rtl"] .issue-filter-toggle {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* Popup Modal Styles */
.issue-popup-modal {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   z-index: 1000;
   display: flex;
   align-items: center;
   justify-content: center;
   opacity: 0;
   visibility: hidden;
   transition: opacity 0.3s ease, visibility 0.3s ease;
   font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
 }

/* Related Issues Styles - Improved dropdown styling */
.related-issue-item {
   padding: 0.75rem 1rem;
   border-radius: 0.75rem;
   background: var(--card-surface);
   border: 1px solid var(--card-border);
   margin-bottom: 0.75rem;
   box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
   transition: all 0.2s ease;
   cursor: pointer;
   position: relative;
 }

.related-issue-item:hover {
   background: rgba(14, 165, 233, 0.08);
   border-color: rgba(14, 165, 233, 0.35);
   transform: translateY(-1px);
   box-shadow: 0 12px 24px rgba(14, 165, 233, 0.15);
 }

.related-issue-title {
   font-size: 0.9rem;
   font-weight: 600;
   color: var(--text-primary);
   margin: 0;
   line-height: 1.4;
 }

/* Popup Progress Bar Styles */
.progress-track {
   flex: 1;
   height: 0.75rem;
   border-radius: 999px;
   background: rgba(148, 163, 184, 0.25);
   overflow: hidden;
   position: relative;
   min-width: 100px;
   font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
 }

.progress-fill {
   position: absolute;
   inset: 0;
   width: var(--progress, 0%);
   background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(59, 130, 246, 0.95));
   box-shadow: 0 8px 16px rgba(14, 165, 233, 0.25);
   transition: width 0.3s ease;
   font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
 }

.progress-text {
   font-size: 0.85rem;
   font-weight: 600;
   color: var(--accent-strong);
   min-width: 3rem;
   text-align: center;
   font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
   direction: ltr;
 }

/* Executor Styles */
.executor-item {
   display: flex;
   flex-direction: column;
   gap: 1rem;
   padding: 1.25rem;
   border-radius: 0.85rem;
   background: var(--card-surface);
   border: 1px solid var(--card-border);
   margin-bottom: 1rem;
   box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
 }

.executor-header {
   display: flex;
   flex-direction: column;
   gap: 0.75rem;
 }

@media (min-width: 640px) {
   .executor-header {
     flex-direction: row;
     align-items: center;
     justify-content: space-between;
   }
 }

.executor-name {
   font-size: 1rem;
   font-weight: 600;
   color: var(--text-primary);
   margin: 0;
 }

.executor-rating {
   display: flex;
   flex-direction: column;
   gap: 0.5rem;
   align-items: center;
 }

@media (min-width: 640px) {
   .executor-rating {
     align-items: flex-end;
   }
 }

.executor-stars {
   display: inline-flex;
   align-items: center;
   gap: 0.3rem;
   font-size: 1.1rem;
   color: #fbbf24;
   cursor: pointer;
 }

.executor-rating-text {
   font-size: 0.75rem;
   color: var(--text-muted);
   font-weight: 500;
 }

.executor-progress {
   display: flex;
   align-items: center;
   gap: 0.75rem;
 }

/* Overall Progress Styles - Collapsible */
.overall-progress-section {
   display: flex;
   flex-direction: column;
   gap: 0.75rem;
   padding: 1rem;
   border-radius: 0.75rem;
   background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(56, 189, 248, 0.12));
   border: 1px solid rgba(14, 165, 233, 0.35);
   margin-bottom: 1.5rem;
   transition: background-color 0.2s ease, border-color 0.2s ease;
   cursor: pointer;
 }

.overall-progress-section:hover {
   background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(56, 189, 248, 0.18));
   border-color: rgba(14, 165, 233, 0.45);
 }

.overall-progress-section.is-expanded {
   background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(56, 189, 248, 0.22));
   border-color: rgba(14, 165, 233, 0.55);
 }

.overall-progress-header {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 0.5rem;
 }

.overall-progress-title {
   font-size: 0.95rem;
   font-weight: 600;
   color: var(--accent-strong);
   margin: 0;
   text-align: center;
 }

.overall-progress-toggle {
   color: var(--accent-strong);
   font-weight: 600;
   transition: transform 0.2s ease;
 }

.overall-progress-container {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   margin-top: 0.5rem;
 }

/* Executors List - Collapsible Content */
.executors-list {
   margin-top: 1rem;
   padding-top: 1rem;
   border-top: 1px solid rgba(14, 165, 233, 0.25);
   background: rgba(14, 165, 233, 0.05);
   border-radius: 0 0 0.75rem 0.75rem;
   border: 2px solid rgba(14, 165, 233, 0.3);
   border-top: none;
   margin: 0 1rem 1rem 1rem;
   animation: slideDown 0.3s ease-out;
   overflow: hidden;
 }

.executors-list:empty {
   display: none;
 }

@keyframes slideDown {
   from {
     opacity: 0;
     max-height: 0;
     transform: translateY(-10px);
   }
   to {
     opacity: 1;
     max-height: 1000px;
     transform: translateY(0);
   }
 }

.issue-popup-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 2rem;
    font-style: italic;
  }

/* Collapsible Related Issues Styles */
.related-issues-collapsible {
    border: 1px solid var(--card-border);
    border-radius: 0.85rem;
    background: var(--card-surface);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
  }

  .related-issues-collapsible::before {
    content: '';
    position: absolute;
    inset: -40% -20% auto auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15), transparent 70%);
    opacity: 0.3;
    pointer-events: none;
  }

  .related-issues-collapsible:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(56, 189, 248, 0.05));
    border-color: rgba(14, 165, 233, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(14, 165, 233, 0.15);
  }

  .related-issues-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    position: relative;
    z-index: 1;
  }

  .related-issues-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
    flex: 1;
  }

  .related-issues-toggle {
    color: var(--accent-strong);
    font-weight: 600;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    font-size: 1.2rem;
  }

  .related-issues-content {
    padding: 0 1.5rem 1.5rem;
    background: rgba(14, 165, 233, 0.03);
    border-radius: 0 0 0.85rem 0.85rem;
    position: relative;
    z-index: 1;
  }

  .related-issue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--card-surface);
    border-radius: 0.75rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
    transition: all 0.2s ease;
  }

  .related-issue-item:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.15);
  }

  .related-issue-item h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
  }

  .related-issue-progress {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-strong);
    background: rgba(14, 165, 233, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(14, 165, 233, 0.3);
  }

  /* Animation for collapsible content */
  .related-issues-content {
    animation: slideDown 0.3s ease-out;
    overflow: hidden;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      max-height: 1000px;
      transform: translateY(0);
    }
  }

.issue-popup-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Ensure Vazir Matn font for all popup content */
.issue-popup-content,
.issue-popup-content *,
.issue-popup-title,
.issue-popup-description,
.issue-popup-section-title,
.issue-rating-label,
.issue-decision-legend,
.issue-decision-btn-label,
.issue-decision-count,
.executor-name,
.executor-rating-text,
.overall-progress-title,
.progress-text {
  font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
}

.issue-popup-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.issue-popup-dialog {
   position: relative;
   background: white;
   border-radius: 1rem;
   box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
   max-width: 90vw;
   max-height: 90vh;
   width: 600px;
   display: flex;
   flex-direction: column;
   margin: 1rem;
   animation: modalSlideIn 0.3s ease-out;
   font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', 'Segoe UI', sans-serif !important;
 }

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-2rem) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.issue-popup-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  z-index: 10;
}

.issue-popup-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.issue-popup-content {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.issue-popup-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.issue-popup-title-container {
   display: flex;
   align-items: center;
   gap: 1rem;
   margin-bottom: 0.5rem;
 }

.issue-popup-title {
   font-size: 1.5rem;
   font-weight: 700;
   color: #111827;
   margin: 0;
   line-height: 1.3;
   flex: 1;
 }

.issue-popup-id {
   font-size: 0.875rem;
   font-weight: 600;
   color: var(--accent-strong);
   background: rgba(14, 165, 233, 0.1);
   padding: 0.25rem 0.75rem;
   border-radius: 0.5rem;
   border: 1px solid rgba(14, 165, 233, 0.25);
   white-space: nowrap;
 }

.issue-popup-description {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  font-size: 1rem;
}

.issue-popup-body {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.issue-popup-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.issue-popup-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

/* Popup Ratings - Horizontal Layout */
.issue-popup-ratings {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

.issue-popup-rating {
  display: flex;
  gap: 0.5rem;
}

.issue-popup-rating .issue-rating-label {
  font-weight: 500;
  color: #374151;
  font-size: 0.9rem;
}

.issue-popup-operations {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.issue-decision-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.issue-decision-legend {
  font-weight: 600;
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 0.5rem;
}

.issue-decision-actions {
  justify-content: center;
}

/* Dark mode support for popup */
@media (prefers-color-scheme: dark) {
  .issue-popup-dialog {
    background: #1f2937;
    color: #f9fafb;
  }

  .issue-popup-title {
    color: #f9fafb;
  }

  .issue-popup-description {
    color: #d1d5db;
  }

  .issue-popup-section-title {
    color: #e5e7eb;
  }

  .issue-popup-rating .issue-rating-label {
    color: #e5e7eb;
  }

  .issue-decision-legend {
    background: #374151;
    color: #d1d5db;
  }

  .issue-popup-close {
    color: #d1d5db;
  }

  .issue-popup-close:hover {
    background: #374151;
    color: #f9fafb;
  }
}

/* Responsive design for popup and filters */
@media (max-width: 768px) {
  .issue-popup-dialog {
    width: 95vw;
    max-width: none;
    margin: 0.5rem;
  }

  .issue-popup-content {
    padding: 1.5rem;
  }

  .issue-popup-ratings {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .issue-decision-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .issue-decision-actions .issue-decision-btn {
    width: 100%;
  }

  .issue-controls.is-expanded .issue-control,
  .issue-controls.is-expanded .issue-clear {
    transform: translateY(0) scale(1);
  }
}
