/* ────────── Approval List ────────── */
.approval-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  animation: fadeUp 220ms var(--ease) both;
}

.approval-list {
  min-height: 0;
  overflow: hidden;
}

.status-tabs {
  display: flex;
  gap: 28px;
  margin-top: 14px;
  border-bottom: 1px solid #dbe4ee;
}

.status-tabs button {
  position: relative;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 750;
}

.status-tabs button.active { color: var(--theme-primary-active); }

.status-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--theme-primary);
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.filter-set { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.list-search {
  position: relative;
  width: 220px;
}

.list-search .mdi {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 15px;
}

.list-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid #d7e0ea;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.list-search input::placeholder {
  color: #8da0b4;
}

.list-search input:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px var(--theme-focus-ring);
  outline: none;
}

.filter-btn, .page-size {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #334155;
}

.filter-btn { min-width: 104px; justify-content: space-between; }
.filter-btn:hover, .page-size:hover { border-color: rgba(var(--theme-primary-rgb), .32); color: var(--theme-primary-active); }

.hint { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; color: #64748b; font-size: 13px; }

.table-wrap {
  min-height: 400px;
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: linear-gradient(180deg, #fcfeff 0%, #f4f8fc 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.table-wrap.is-empty {
  align-items: center;
  justify-content: center;
}

.table-wrap table {
  width: 100%;
  align-self: flex-start;
}

.table-state {
  width: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px 20px;
  text-align: center;
  color: #64748b;
  background: linear-gradient(180deg, #fcfeff 0%, #f5f9fc 100%);
  align-self: center;
}

.table-state .mdi {
  font-size: 28px;
  color: var(--theme-primary);
}

.table-state strong {
  color: #0f172a;
  font-size: 15px;
}

.table-state p {
  max-width: 420px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.table-state.error .mdi {
  color: var(--danger);
}

.state-action {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(var(--theme-primary-rgb), 0.28);
  border-radius: 8px;
  background: #fff;
  color: var(--theme-primary-active);
  font-size: 13px;
  font-weight: 760;
}

table { width: 100%; min-width: 1520px; border-collapse: collapse; table-layout: fixed; }

th, td {
  padding: 15px 12px;
  border-bottom: 1px solid #edf2f7;
  color: #24324a;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky; top: 0; z-index: 1;
  background: #f7fafc; color: #64748b;
  font-size: 13px; font-weight: 800;
}

tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.spotlight {
  background: linear-gradient(90deg, rgba(var(--theme-primary-rgb), .08), rgba(var(--theme-primary-rgb), .03));
}
tbody tr:last-child td { border-bottom: 0; }

.doc-id { color: var(--theme-primary-active); font-weight: 800; }

.person { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.avatar {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--theme-primary-soft); color: var(--theme-primary-active);
  font-size: 12px; font-weight: 900;
}

.risk-tag, .status-tag {
  min-height: 24px;
  display: inline-flex; align-items: center;
  padding: 0 9px;
  border: 1px solid transparent; border-radius: 6px;
  font-size: 12px; font-weight: 750; white-space: nowrap;
}

.risk-tag.low { background: var(--success-soft); color: var(--success); }
.risk-tag.medium { background: var(--warning-soft); color: var(--warning-active); }
.risk-tag.high { background: var(--danger-soft); color: var(--danger); }

.priority-tag,
.evidence-meta,
.ai-suggestion {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.priority-tag {
  min-width: 66px;
  background: #f1f5f9;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.priority-tag.high {
  border-color: var(--warning-line);
  background: var(--warning-soft);
  color: var(--warning-active);
}

.priority-tag.urgent {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger);
}

.evidence-meta.safe {
  background: var(--success-soft);
  color: var(--success);
}

.evidence-meta.warning {
  border-color: var(--warning-line);
  background: var(--warning-soft);
  color: var(--warning-active);
}

.ai-suggestion {
  overflow: hidden;
  border-color: rgba(var(--theme-primary-rgb), .18);
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
  text-overflow: ellipsis;
}

.sla { font-size: 13px; font-weight: 850; }
.sla.safe { color: var(--success); }
.sla.warning { color: var(--warning-active); }
.sla.danger { color: var(--danger); }

.status-tag.pending { background: var(--theme-primary-soft); color: var(--theme-primary-active); }
.status-tag.urgent { background: var(--warning-soft); color: var(--warning-active); }
.status-tag.done { background: var(--success-soft); color: var(--success); }

.more-btn {
  width: auto; height: auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent;
  color: var(--theme-primary-active); font-size: 13px; font-weight: 800;
}
.more-btn:hover { color: var(--theme-primary-active); }

.list-foot {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px; margin-top: 12px;
}

.page-summary { color: #64748b; font-size: 14px; font-weight: 650; }

.pager {
  display: inline-flex; justify-content: center; gap: 6px;
  padding: 4px;
  border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc;
}

.pager button {
  width: 32px; height: 32px; border: 0; border-radius: 9px;
  background: transparent; color: #334155;
  font-size: 14px; font-weight: 800;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.pager button:hover:not(.active) { background: #fff; color: var(--theme-primary-active); box-shadow: 0 1px 4px rgba(15, 23, 42, .08); }
.pager button.active { background: var(--theme-primary); color: #fff; box-shadow: 0 8px 16px var(--theme-primary-shadow); }
.pager span { color: #64748b; font-weight: 800; }

.page-size {
  justify-self: end; min-width: 112px;
  border-radius: 10px; background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.approval-detail {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.detail-scroll {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding-right: 4px;
  overflow: auto;
}

.detail-hero {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  gap: 18px;
  padding: 22px;
}

.applicant-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.portrait {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--theme-primary-soft-strong), var(--theme-primary-soft));
  color: var(--theme-primary-active);
  font-size: 26px;
  font-weight: 900;
}

.applicant-card h2 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.applicant-card h2 span {
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
  font-size: 12px;
}

.applicant-card p {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

.applicant-card p strong {
  margin-left: 18px;
  color: #334155;
}

.hero-stat {
  display: grid;
  align-content: center;
  gap: 8px;
}

.hero-stat span {
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.hero-stat strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.risk-pill,
.state-pill {
  width: max-content;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 850;
}

.risk-pill.high { background: var(--danger-soft); color: var(--danger); }
.risk-pill.medium { background: var(--warning-soft); color: var(--warning-active); }
.risk-pill.low { background: var(--success-soft); color: var(--success); }
.state-pill { background: var(--theme-primary-soft); color: var(--theme-primary-active); }

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--warning-active) !important;
}

.hero-summary-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 4px 18px;
  padding: 4px 0 0;
  border-top: 1px solid #e5eaf0;
  border-bottom: 1px solid #e5eaf0;
}

.hero-summary-item {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px 0 14px;
}

.hero-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.hero-summary-icon {
  color: var(--theme-primary);
  font-size: 14px;
}

.hero-summary-item strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.5;
}

.progress-block {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid #e5eaf0;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.progress-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

.progress-head h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--theme-primary);
  box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb), .12);
}

.progress-line {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #94a3b8;
}

.progress-step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  z-index: 0;
  height: 2px;
  background: #dbe4ee;
}

.progress-step.active::before { background: var(--theme-primary); }
.progress-step:first-child::before { left: 50%; }
.progress-step:last-child::before { right: 50%; }

.progress-step span {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.current-progress-ring {
  position: absolute;
  inset: -4px;
  z-index: -1;
  border: 2px solid rgba(var(--theme-primary-rgb), .42);
  border-radius: 999px;
  pointer-events: none;
}

.progress-step.active span {
  background: var(--theme-primary-active);
  color: #fff;
}

.progress-step.current span {
  background: var(--theme-primary) !important;
  color: #fff !important;
  box-shadow: 0 0 0 4px rgba(var(--theme-primary-rgb), .15) !important;
  animation: breathe-dot 3s ease-in-out infinite !important;
  transform-origin: center !important;
}

@keyframes breathe-dot {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), .3), 0 0 0 4px rgba(var(--theme-primary-rgb), .15);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 4px 20px rgba(var(--theme-primary-rgb), .5), 0 0 0 10px rgba(var(--theme-primary-rgb), .08);
  }
}

.progress-step strong {
  color: #334155;
  font-size: 12px;
}

.progress-step.current strong { color: var(--theme-primary-active); }
.progress-step small { font-size: 11px; }

.progress-step.current small {
  color: var(--theme-primary-active);
}

.detail-grid {
  display: block;
}

.detail-left {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.detail-card,
.detail-side-card {
  padding: 16px 18px;
}

.detail-card h3,
.detail-side-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

.detail-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.detail-card-head h3 {
  margin-bottom: 4px;
}

.detail-card-head p {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.detail-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 102px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
  font-size: 14px;
  font-weight: 900;
}

.detail-card textarea {
  width: 100%;
  min-height: 84px;
  resize: none;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.detail-expense-table table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
}

.detail-expense-table th,
.detail-expense-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf2f7;
  color: #24324a;
  text-align: left;
  font-size: 12px;
  vertical-align: top;
  white-space: normal;
}

.detail-expense-table th {
  position: static;
  background: #f7fafc;
  color: #64748b;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.detail-expense-table th:nth-child(1),
.detail-expense-table td:nth-child(1) { width: 12%; }
.detail-expense-table th:nth-child(2),
.detail-expense-table td:nth-child(2) { width: 12%; }
.detail-expense-table th:nth-child(3),
.detail-expense-table td:nth-child(3) { width: 23%; }
.detail-expense-table th:nth-child(4),
.detail-expense-table td:nth-child(4) { width: 10%; }
.detail-expense-table th:nth-child(5),
.detail-expense-table td:nth-child(5) { width: 18%; }
.detail-expense-table th:nth-child(6),
.detail-expense-table td:nth-child(6) { width: 25%; }

.expense-time strong,
.expense-type strong,
.expense-desc strong,
.expense-amount strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.4;
}

.expense-time span,
.expense-type span,
.expense-desc span,
.expense-amount span,
.expense-attachment .attachment-hint {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}

.expense-amount strong {
  font-variant-numeric: tabular-nums;
}

.over-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  margin-top: 7px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.over-tag.ok {
  background: var(--success-soft);
  color: var(--success);
}

.over-tag.bad {
  background: var(--danger-soft);
  color: var(--danger);
}

.expense-attachment-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-pill,
.risk-inline-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.attachment-pill.ok { background: var(--success-soft); color: var(--success); }
.attachment-pill.partial { background: var(--warning-soft); color: var(--warning-active); }
.attachment-pill.missing { background: var(--danger-soft); color: var(--danger); }
.attachment-pill.neutral { background: var(--info-soft); color: var(--info); }

.inline-action {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #dbe4ee;
  border-radius: 4px;
  background: #fff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.inline-action:hover {
  border-color: rgba(var(--theme-primary-rgb), .36);
  color: var(--theme-primary-active);
}

.risk-inline-tag.low { background: var(--success-soft); color: var(--success); }
.risk-inline-tag.medium { background: var(--warning-soft); color: var(--warning-active); }
.risk-inline-tag.high { background: var(--danger-soft); color: var(--danger-hover); }

.expense-risk p {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.expense-expand-row td {
  padding: 0 10px 12px;
  background: #fbfdff;
  border-bottom: 1px solid #edf2f7;
}

.expense-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 0;
}

.expense-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.expense-file-chip i {
  color: var(--theme-primary);
  font-size: 12px;
}

.total-row td {
  color: #0f172a;
  font-weight: 900;
  background: #f8fafc;
}

.detail-attachment-list {
  display: grid;
  gap: 10px;
}

.side-attachments {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-attachment {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.detail-attachment.missing {
  border-color: var(--warning-line);
  border-style: dashed;
  background: var(--warning-soft);
}

.detail-attachment i { color: var(--theme-primary); font-size: 24px; }
.detail-attachment.missing i { color: var(--warning-active); }

.detail-attachment strong {
  display: block;
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-attachment small {
  color: #64748b;
  font-size: 11px;
}

.attach-note {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.detail-side-card.risk-card {
  min-height: 332px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.risk-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.risk-card header span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.risk-card header b { color: var(--danger); }

.risk-list {
  display: grid;
  overflow: hidden;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

.risk-list div {
  min-height: 38px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
}

.risk-list div:last-child { border-bottom: 0; }
.risk-list i { color: var(--warning-active); }
.risk-list b.high { color: var(--danger); }
.risk-list b.medium { color: var(--warning-active); }

.risk-note {
  margin-top: 12px;
  padding: 12px 14px 0;
  border-top: 1px solid #eef2f7;
}

.risk-note strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
}

.risk-note p {
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.detail-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 0 0;
  border-top: 1px solid #e5eaf0;
  background: transparent;
}

.detail-actions button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 760;
}

.back-action {
  min-width: 104px;
  border: 1px solid #d7e0ea;
  background: #fff;
  color: #475569;
}

.back-action:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.approval-action-group {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: auto;
}

.approve-action {
  min-width: 92px;
  border: 1px solid var(--theme-primary);
  background: var(--theme-primary);
  color: #fff;
  box-shadow: 0 4px 10px var(--theme-primary-shadow);
}

.reject-action {
  min-width: 86px;
  border: 1px solid var(--danger-line);
  background: #fff;
  color: var(--danger);
}

.supplement-action {
  min-width: 86px;
  border: 1px solid var(--warning-line);
  background: #fff;
  color: var(--warning-active);
}

/* ────────── Detail Modal Overlay ────────── */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.detail-modal {
  position: relative;
  width: calc(100vw - 80px);
  max-width: 1440px;
  height: calc(100vh - 64px);
  max-height: 960px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-radius: 4px;
  background: #f8fafc;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, .08),
    0 20px 60px rgba(15, 23, 42, .18),
    0 4px 16px rgba(15, 23, 42, .06);
  overflow: hidden;
}

/* ── Modal Header ── */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  background: linear-gradient(135deg, #fff 0%, #f9fbff 100%);
  border-bottom: 1px solid #e8eef6;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.req-badge {
  padding: 6px 14px;
  border-radius: 3px;
  background: var(--theme-primary-soft);
  border-left: 3px solid var(--theme-primary-active);
  color: var(--theme-primary-active);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .02em;
}

.header-title-group h2 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.01em;
}

.header-title-group p {
  margin-top: 3px;
  color: #64748b;
  font-size: 13px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 800;
}

.header-indicator.high {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.header-indicator.medium {
  background: var(--warning-soft);
  color: var(--warning-active);
}

.header-indicator.low {
  background: var(--success-soft);
  color: var(--success);
}

.header-indicator.status {
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
}

.close-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid #e2e8f0; border-radius: 4px;
  background: #fff; color: #64748b;
  font-size: 18px;
  transition: all 160ms ease;
}

.close-btn:hover {
  border-color: #cbd5e1;
  background: #f1f5f9; color: #0f172a;
}

/* ── Progress Track ── */
.modal-progress {
  padding: 18px 28px 14px;
  background: #fff;
  border-bottom: 1px solid #edf2f7;
}

.progress-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.progress-node {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.node-dot {
  position: relative;
  z-index: 2;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  transition: all 300ms ease;
}

.progress-node.done .node-dot,
.progress-node.active .node-dot {
  background: var(--theme-primary-active);
  color: #fff;
  box-shadow: 0 4px 12px var(--theme-primary-shadow);
}

.progress-node.current .node-dot {
  background: var(--theme-primary);
  box-shadow: 0 4px 12px var(--theme-primary-shadow), 0 0 0 5px rgba(var(--theme-primary-rgb), .1);
  animation: breathe-pulse 2s ease-in-out infinite;
}

@keyframes breathe-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 4px 12px var(--theme-primary-shadow), 0 0 0 4px rgba(var(--theme-primary-rgb), .15);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb), .4), 0 0 0 10px rgba(var(--theme-primary-rgb), .08);
  }
}

.node-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.node-label strong {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.progress-node.current .node-label strong { color: var(--theme-primary-active); }

.node-label small {
  color: #94a3b8;
  font-size: 11px;
}

.node-line {
  position: absolute;
  top: 15px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 2px;
  background: #e2e8f0;
  z-index: 1;
  border-radius: 1px;
  transition: background 300ms ease;
}

.node-line.filled { background: var(--theme-primary); }

/* ── Modal Body ── */
.modal-body {
  min-height: 0;
  padding: 20px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

.body-main { display: grid; gap: 16px; }
.body-side { display: grid; gap: 14px; }

/* ── Metrics Strip (inside summary card) ── */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #f1f5f9;
}

.metric-block {
  padding: 14px 16px;
  background: #fff;
  transition: background 160ms ease;
}

.metric-block:hover { background: #f8fbff; }

.metric-block.amount {
  background: var(--theme-primary-soft);
}

.metric-label {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.metric-value {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.02em;
}

.metric-value.sla { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.metric-value.sla.safe { color: var(--success); }
.metric-value.sla.warning { color: var(--warning); }
.metric-value.sla.danger { color: var(--danger); }

/* ── Content Card ── */
.content-card {
  border-radius: 4px;
  background: #fff;
  border: 1px solid #edf2f7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  overflow: hidden;
  transition: box-shadow 200ms ease;
}

.content-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fafbfd, #fff);
}

.card-header.slim {
  padding: 10px 16px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--theme-primary);
  font-size: 18px;
}

.card-title h3 {
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
}

.card-badge {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--theme-primary-soft);
  color: var(--theme-primary-active);
  font-size: 12px;
  font-weight: 800;
}

.card-badge.warn {
  background: var(--warning-soft);
  color: var(--warning-active);
}

/* ── Summary Grid ── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #f1f5f9;
}

.summary-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  transition: background 160ms ease;
}

.summary-cell:hover { background: #f8fbff; }

.cell-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: var(--theme-primary-soft);
  color: var(--theme-primary);
  font-size: 18px;
  flex-shrink: 0;
}

.cell-content span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
}

.cell-content strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

/* ── Expense Table ── */
.expense-table-wrap {
  overflow-x: auto;
}

.expense-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
}

.expense-table th {
  position: static;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f7;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  text-align: left;
}

.expense-table th.right { text-align: right; }
.expense-table th.center { text-align: center; }

.expense-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

.expense-table td.right { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.expense-table td.center { text-align: center; }

.expense-table td strong { color: #0f172a; font-weight: 850; }

.expense-table tfoot td {
  padding: 14px 16px;
  border-top: 2px solid #e2e8f0;
  border-bottom: 0;
  background: #f8fafc;
}

.total-amount {
  color: var(--theme-primary-active) !important;
  font-size: 16px;
}

.over-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
}

.over-badge.ok { background: var(--success-soft); color: var(--success); }
.over-badge.bad { background: var(--danger-soft); color: var(--danger); }

/* ── Attachments (sidebar list) ── */
.attachment-list-side {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}

.attachment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #f1f5f9;
  border-radius: 4px;
  background: #fff;
  transition: background 160ms ease;
}

.attachment-row:hover { background: #fafbfd; }

.attachment-row.missing {
  border: 1px dashed var(--warning-line);
  background: var(--warning-soft);
}

.file-icon-sm {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 4px;
  font-size: 16px;
  flex-shrink: 0;
}

.file-icon-sm.pdf { background: var(--danger-soft); color: var(--danger); }
.file-icon-sm.img { background: var(--theme-primary-soft); color: var(--theme-primary); }
.file-icon-sm.miss { background: var(--warning-soft); color: var(--warning); }

.file-detail strong {
  display: block;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-detail span {
  display: block;
  color: #94a3b8;
  font-size: 11px;
}

/* ── Opinion Textarea ── */
.opinion-wrap {
  padding: 12px 14px;
}
