/* =========================================================================
   نظام پیشنهادات — هویت بصری «کارتابل رسمی»
   پالت: کاغذ کرم + جوهر سرمه‌ای + مهر طلایی
   ========================================================================= */

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #16233d;
  --ink-2: #223454;
  --paper: #f6f3ec;
  --paper-2: #efe9db;
  --line: #ddd4bf;
  --seal: #b98b34;
  --seal-dark: #8f6a26;
  --success: #3f7d58;
  --success-bg: #e7f1ea;
  --danger: #b34b3e;
  --danger-bg: #f8e9e7;
  --warn: #a97a1f;
  --warn-bg: #fbf0dd;
  --muted: #6b6455;
  --text: #241f16;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 35, 61, 0.06), 0 1px 12px rgba(22, 35, 61, 0.05);
  --font-body: "Vazirmatn", "Tahoma", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  direction: rtl;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  max-width: 100%;
}

a { color: inherit; text-decoration: none; }

/* ------------------------------------------------------------------- */
/* چیدمان اصلی: نوار کناری راست + محتوا                                 */
/* حالت پایه (موبایل‌محور) است؛ حالت دسکتاپ در رسانه‌ی min-width اضافه   */
/* می‌شود. این ترتیب عمداً برعکس شده تا اگر مرورگر یا نسخه‌ی کش‌شده‌ای از  */
/* CSS به هر دلیل رسانه‌ی حداقل‌عرض را اجرا نکرد، چیدمان پیش‌فرض همچنان   */
/* حالت امن و جمع‌وجور موبایل باشد، نه چیدمان کنار-هم دسکتاپ که باعث     */
/* هم‌پوشانی نوار کناری با محتوا می‌شد.                                   */
/* ------------------------------------------------------------------- */
.mobile-topbar {
  display: flex; align-items: center; justify-content: space-between;
  position: fixed; top: 0; inset-inline-start: 0; inset-inline-end: 0;
  background: var(--ink); color: #fff; padding: 14px 18px; z-index: 60;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(15, 20, 32, 0.45);
  z-index: 65;
}
.sidebar-backdrop.open { display: block; }

.sidebar {
  width: min(280px, 84vw);
  flex-shrink: 0;
  background: var(--ink);
  color: #eee7d6;
  display: flex;
  flex-direction: column;
  position: fixed;
  /* توجه مهم: از right فیزیکی استفاده می‌کنیم نه inset-inline-end. چون صفحه
     dir="rtl" است، inset-inline-end در واقع معادل «چپ» فیزیکی می‌شود، در
     حالی‌که transform: translateX() همیشه در مختصات فیزیکی صفحه (نه منطقی)
     عمل می‌کند. ترکیب این دو باعث می‌شد نوار کناری به‌جای قایم‌شدن بیرون
     صفحه از سمت راست، وسط صفحه بیفتد و با محتوا هم‌پوشانی پیدا کند. */
  right: 0;
  top: 0;
  height: 100dvh;
  z-index: 70;
  transform: translateX(100%);
  transition: transform .22s ease;
  box-shadow: -6px 0 24px rgba(0,0,0,.25);
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar__brand {
  padding: 22px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar__brand .brand-title {
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar__brand .brand-sub {
  font-size: 11.5px;
  color: #b7ad8f;
  margin-top: 3px;
  letter-spacing: .02em;
}

.sidebar__user {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}
.sidebar__user .name { color: #fff; font-weight: 700; }
.sidebar__user .roles { color: #b7ad8f; margin-top: 2px; }

.nav-group {
  padding: 10px 10px;
}
.nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,0.08); }
.nav-label {
  font-size: 11px;
  color: #8b8267;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 10px 10px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #d9d2bd;
  font-size: 13.5px;
  margin: 1px 4px;
}
.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active { background: var(--seal); color: #241f16; font-weight: 700; }
.nav-link .badge-count {
  margin-inline-start: auto;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  font-size: 10.5px;
  padding: 1px 7px;
}

.sidebar__footer {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.logout-link { color: #d9a48a; font-size: 13px; }

.main {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding: 76px 16px 40px;
}

/* ---- دسکتاپ: نوار کناری همیشه باز و کنار محتوا ---- */
@media (min-width: 881px) {
  .mobile-topbar { display: none; }
  .sidebar-backdrop { display: none !important; }
  .app-shell { flex-direction: row; }
  .sidebar {
    width: 250px;
    position: sticky;
    right: auto;
    top: 0;
    height: 100vh;
    z-index: 5;
    transform: none;
    transition: none;
    box-shadow: none;
  }
  .main { padding: 26px 34px 60px; }
}

@media (max-width: 480px) {
  .card { padding: 16px 14px; }
  .topbar h1 { font-size: 18px; }
  .btn { padding: 9px 14px; font-size: 13.5px; }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.topbar h1 {
  font-size: 21px;
  margin: 0;
  color: var(--ink);
}
.topbar .crumb {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ------------------------------------------------------------------- */
/* کارت‌ها، جدول‌ها، فرم‌ها                                              */
/* ------------------------------------------------------------------- */
.card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  max-width: 100%;
  overflow-x: auto;
}
.card h2, .card h3 { margin-top: 0; color: var(--ink); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) {
  .grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5, .grid.cols-6 { grid-template-columns: 1fr; }
}

/* فرم فیلتر فشرده (مثلاً فیلترهای پیشرفته‌ی صفحه‌ی وضعیت دقیق پیشنهاد) —
   همان فیلدهای معمول ولی جمع‌وجورتر تا در فضای کمتری جا شوند. */
.filter-compact .grid { gap: 10px 12px; }
.filter-compact .form-row { margin-bottom: 0; }
.filter-compact .form-row label { font-size: 12px; margin-bottom: 4px; font-weight: 600; }
.filter-compact input[type=text], .filter-compact select {
  padding: 6px 8px; font-size: 13px;
}

.stat-card {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.stat-card .num { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--ink); }
.stat-card .label { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

table { width: 100%; min-width: max-content; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: right;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:hover { background: #faf7ee; }

/* برای جدول‌های داخلِ یک کانتینر اسکرول‌شونده (مثل لیست کاربران در تب
   «کاربران و نقش‌ها»)؛ با اسکرول به پایین، هدر ستون‌ها بالای صفحه ثابت
   می‌ماند تا عنوان هر ستون همیشه قابل‌دیدن باشد. */
.scroll-table-wrap { position: relative; }
.scroll-table-wrap thead th { position: sticky; top: 0; z-index: 2; box-shadow: 0 1px 0 var(--line); }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-2); }
.form-row .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=tel],
input[type=date], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--seal);
  outline-offset: 1px;
  border-color: var(--seal);
}
input[type=file] { font-size: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--seal); color: #241f16; }
.btn-primary:hover { background: var(--seal-dark); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8e3a2f; }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; padding: 6px 10px; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.actions-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ------------------------------------------------------------------- */
/* عنصر شاخص: «مهر» وضعیت پیشنهاد                                       */
/* ------------------------------------------------------------------- */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.stamp.gray   { color: #6b6455; }
.stamp.blue   { color: #2b5583; }
.stamp.gold   { color: var(--seal-dark); }
.stamp.green  { color: var(--success); }
.personnel-row-has-account { background: var(--success-bg); }
.personnel-row-has-account:hover { background: var(--success-bg); }
.stamp.red    { color: var(--danger); }
.stamp.purple { color: #6a4a9c; }

/* ------------------------------------------------------------------- */
/* خلاصه‌ی وضعیت هر ارزیاب برای یک پیشنهاد، در لیست‌های مرحله‌ای         */
/* (بدون نیاز به باز کردن جزئیات هر ارزیابی جداگانه)                    */
/* ------------------------------------------------------------------- */
.eval-badge-list { display: flex; flex-direction: column; gap: 4px; }
.eval-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  width: fit-content;
  cursor: default;
}
.eval-badge-gray  { background: #efece4; color: #6b6455; }
.eval-badge-blue  { background: #e2ecf5; color: #2b5583; }
.eval-badge-green { background: #e3f2e6; color: var(--success); }
.eval-badge-red   { background: #f7e6e3; color: var(--danger); }
.eval-badge-purple { background: #ece4f5; color: #6a4a9c; }

/* ------------------------------------------------------------------- */
/* جعبه‌ی نتایج جست‌وجوی فرد در ویجت «ارجاع ارزیابی» */
/* ------------------------------------------------------------------- */
.delegate-result-item {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.delegate-result-item:last-child { border-bottom: none; }
.delegate-result-item:hover { background: var(--paper-2); }

/* ------------------------------------------------------------------- */
/* منوی کشویی چندانتخابی فشرده (مثلاً فیلتر «وضعیت پیشنهاد» چندتایی)      */
/* ------------------------------------------------------------------- */
.multiselect { position: relative; }
.multiselect-toggle {
  width: 100%; text-align: right; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; font-size: 13px; font-family: inherit;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.multiselect-panel {
  position: absolute; top: 100%; right: 0; left: 0; z-index: 6;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  margin-top: 4px; max-height: 220px; overflow: auto;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.multiselect-option {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; font-size: 12.5px; font-weight: 400; cursor: pointer;
  border-bottom: 1px solid var(--line); margin: 0;
}
.multiselect-option:last-child { border-bottom: none; }
.multiselect-option:hover { background: var(--paper-2); }
.multiselect-option input { width: auto; margin: 0; }

/* ------------------------------------------------------------------- */
/* صفحه‌بندی جدول‌ها (اول/قبلی/بعدی/آخر)                                 */
/* ------------------------------------------------------------------- */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 16px; flex-wrap: wrap;
}
.pagination a, .pagination span.pagination-disabled {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--line);
  font-size: 13px; text-decoration: none; color: var(--text);
  background: #fff;
}
.pagination a:hover { background: var(--paper-2); }
.pagination span.pagination-disabled { color: var(--muted); opacity: .5; cursor: default; }
.pagination .pagination-current {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--seal); color: #241f16; font-weight: 700; font-size: 13px;
  padding: 0 10px;
}

/* ------------------------------------------------------------------- */
/* دیتابار امتیازدهی کیفی ارزیاب‌ها — از سبز کم‌رنگ (حداقل) تا سبز پررنگ    */
/* (حداکثر)، عددی صحیح و بدون اعشار با کشیدن نشانگر انتخاب می‌شود         */
/* ------------------------------------------------------------------- */
.score-slider-row { margin-bottom: 22px; }
.score-slider-wrap { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.score-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(to right, #dcf3dc, #1f7a3d);
  outline: none;
  cursor: pointer;
}
.score-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(to right, #dcf3dc, #1f7a3d);
}
.score-slider::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(to right, #dcf3dc, #1f7a3d);
}
.score-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1f7a3d;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.score-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #1f7a3d;
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.score-slider::-webkit-slider-thumb:active,
.score-slider::-moz-range-thumb:active { cursor: grabbing; }
.score-slider-value {
  min-width: 38px;
  text-align: center;
  font-weight: 700;
  font-size: 15.5px;
  color: #1f7a3d;
  background: var(--paper-2);
  border-radius: 8px;
  padding: 5px 10px;
}
.score-slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.code-chip {
  font-family: var(--font-mono);
  background: var(--ink);
  color: #f6d98a;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 13px;
  letter-spacing: .03em;
}

/* ------------------------------------------------------------------- */
/* هشدارها و پیام‌های فلش                                               */
/* ------------------------------------------------------------------- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; }
.flash.success { background: var(--success-bg); color: var(--success); border: 1px solid #bcd9c6; }
.flash.error { background: var(--danger-bg); color: var(--danger); border: 1px solid #e3bdb6; }
.flash.warning { background: var(--warn-bg); color: var(--warn); border: 1px solid #ecd9ad; }
.flash.info { background: #e8eef7; color: #2b5583; border: 1px solid #c7d6ea; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state .icon { font-size: 34px; margin-bottom: 10px; }

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.participant-row, .dynamic-row {
  display: grid;
  grid-template-columns: 1fr 1fr 90px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}
@media (max-width: 760px) {
  .participant-row, .dynamic-row { grid-template-columns: 1fr; }
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--ink) 0%, #26395c 60%, var(--ink) 100%);
}
.login-card {
  width: min(380px, 92vw);
  background: var(--paper);
  border-radius: 14px;
  padding: 32px 30px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.login-card .brand-title { color: var(--ink); font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.login-card .brand-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 22px; }

.help-box {
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.designer-credit {
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--seal);
}

input[data-personnel-name].lookup-found { color: var(--success); border-color: var(--success); font-weight: 700; }
input[data-personnel-name].lookup-notfound { color: var(--danger); border-color: var(--danger); }

/* ------------------------------------------------------------------- */
/* نمودار مراحل گردش‌کار (پایپ‌لاین)                                     */
/* ------------------------------------------------------------------- */
.pipeline { overflow-x: auto; padding: 6px 4px 14px; }
.pipeline-track {
  display: flex; align-items: flex-start; gap: 0; min-width: max-content;
  position: relative;
}
.pipeline-node {
  display: flex; flex-direction: column; align-items: center;
  width: 118px; flex: 0 0 auto; position: relative; padding-top: 2px;
}
.pipeline-connector {
  flex: 0 0 34px; align-self: flex-start; margin-top: 33px;
  height: 2px; background: repeating-linear-gradient(90deg, var(--seal) 0 6px, transparent 6px 10px);
}
.pipeline-bubble {
  display: flex; align-items: center; justify-content: center;
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(160deg, #fdf3de, #f3dfae);
  border: 2px solid var(--seal);
  color: var(--ink);
  font-family: var(--font-mono); font-size: 23px; font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  direction: ltr;
}
a.pipeline-bubble:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(185, 139, 52, 0.35);
}
.pipeline-total .pipeline-bubble {
  background: var(--ink); border-color: var(--ink-2); color: #fff;
}
.pipeline-label {
  margin-top: 8px; font-size: 11.5px; font-weight: 700; line-height: 1.45;
  text-align: center; color: var(--text); min-height: 32px;
}
.pipeline-reject {
  margin-top: 6px; display: flex; align-items: center; gap: 5px;
  background: var(--danger-bg); border: 1px solid #e3b6ae; color: var(--danger);
  border-radius: 999px; padding: 4px 10px;
  font-size: 10.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .12s;
}
.pipeline-reject:hover { transform: translateY(-1px); }
.pipeline-reject-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); flex: 0 0 auto; }
.pipeline-reject-num { font-family: var(--font-mono); font-size: 14px; font-weight: 800; direction: ltr; }
.proposal-title-link { color: var(--text); text-decoration: none; }
.proposal-title-link:hover { color: var(--seal-dark); text-decoration: underline; }

.checklist { list-style: none; padding: 0; margin: 0; }

/* ------------------------------------------------------------------- */
/* لایه‌ی «در حال آپلود» هنگام ثبت فرم‌های دارای پیوست                    */
/* ------------------------------------------------------------------- */
.upload-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 20, 32, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.upload-overlay-box {
  background: var(--paper); border-radius: 14px; padding: 24px 22px;
  width: min(420px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  text-align: center;
}
.upload-overlay-title { margin: 0 0 8px; font-size: 16.5px; color: var(--ink); }
.upload-overlay-phase { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.upload-overlay-bar {
  height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 16px;
}
.upload-overlay-bar-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, var(--seal), var(--seal-dark));
  transition: width .2s ease;
}
.upload-overlay-files {
  list-style: none; padding: 0; margin: 0 0 16px; max-height: 180px; overflow-y: auto; text-align: start;
}
.upload-overlay-files li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--line);
}
.upload-overlay-files li .fname { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-overlay-files li .fstatus { color: var(--muted); flex-shrink: 0; white-space: nowrap; }
.upload-overlay-retry { margin-bottom: 12px; }

/* ------------------------------------------------------------------- */
/* پیش‌نمایش فایل‌های انتخاب‌شده در اینپوت‌های file (با دکمه‌ی حذف تکی)     */
/* ------------------------------------------------------------------- */
.file-preview-hint { margin: 6px 0 4px; }
.file-preview-list {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}
.file-preview-item {
  position: relative;
  width: 96px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  text-align: center;
}
.file-preview-thumb {
  width: 100%; height: 64px; object-fit: cover; border-radius: 6px; display: block;
}
.file-preview-icon {
  width: 100%; height: 64px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; background: var(--paper-2); border-radius: 6px;
}
.file-preview-meta { margin-top: 5px; }
.file-preview-name {
  font-size: 10.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-preview-size { font-size: 10px; color: var(--muted); }
.file-preview-remove {
  position: absolute; top: -8px; inset-inline-end: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--danger); color: #fff; border: 2px solid var(--paper);
  font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.file-preview-remove:hover { background: var(--danger-dark, #a02f22); }
.checklist li { padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: 13.5px; }
.checklist li:last-child { border-bottom: none; }

.timeline { border-inline-start: 2px solid var(--line); padding-inline-start: 18px; }
.timeline .item { position: relative; padding-bottom: 18px; }
.timeline .item::before {
  content: "";
  position: absolute; inset-inline-start: -24px; top: 3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--seal); border: 2px solid #fffdf8;
}
.timeline .item .t-title { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.timeline .item .t-meta { font-size: 12px; color: var(--muted); }
