.opinion-wrap textarea {
  width: 100%;
  min-height: 100px;
  resize: none;
  border: 1px solid #d7e0ea;
  border-radius: 4px;
  padding: 10px 12px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.55;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.opinion-wrap textarea::placeholder {
  color: #94a3b8;
}

.opinion-wrap textarea:focus {
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px var(--theme-focus-ring);
  outline: none;
}

/* ── Side Cards ── */
.side-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;
}

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

.side-card .card-header {
  padding: 12px 16px;
}

.side-card.compact {
  border-radius: 4px;
}

/* ── Risk Card ── */
.risk-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 11px;
}

.risk-total span { font-weight: 750; }

.risk-total.high {
  background: var(--danger-soft);
  color: var(--danger-hover);
}

.risk-total.high strong { font-size: 16px; font-weight: 900; }

.risk-items {
  padding: 4px 14px 14px;
  display: grid;
  gap: 8px;
}

.risk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #f1f5f9;
  transition: all 160ms ease;
}

.risk-row:hover { border-color: #e2e8f0; background: #fafbfd; }

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

.risk-row.high .risk-icon { background: var(--danger-soft); color: var(--danger); }
.risk-row.medium .risk-icon { background: var(--warning-soft); color: var(--warning-active); }

.risk-text {
  flex: 1;
  color: #334155;
  font-size: 13px;
  line-height: 1.4;
}

.risk-level {
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

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

/* ── Side Dual ── */
.side-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.reminder-list {
  margin: 0;
  padding: 10px 16px 14px;
  display: grid;
  gap: 8px;
  list-style: none;
}

.reminder-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #334155;
  font-size: 12px;
  line-height: 1.5;
}

.reminder-list li i {
  margin-top: 2px;
  color: var(--warning);
  font-size: 14px;
  flex-shrink: 0;
}

.info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 13px;
}

.info-list dt { color: #94a3b8; font-weight: 700; }
.info-list dd { margin: 0; color: #0f172a; font-weight: 850; }

/* ── Modal Footer ── */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 28px;
  background: #fff;
  border-top: 1px solid #e8eef6;
}

.footer-right {
  display: flex;
  gap: 10px;
}

.action-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
  transition: all 180ms ease;
  border: 1px solid transparent;
}

.action-btn.back {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

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

.action-btn.supplement {
  background: #fff;
  border-color: var(--warning-line);
  color: var(--warning-active);
}

.action-btn.supplement:hover {
  background: var(--warning-soft);
  box-shadow: 0 4px 12px rgba(var(--warning-rgb), .12);
}

.action-btn.reject {
  background: #fff;
  border-color: var(--danger-line);
  color: var(--danger);
}

.action-btn.reject:hover {
  background: var(--danger-soft);
  box-shadow: 0 4px 12px rgba(var(--danger-rgb), .12);
}

.action-btn.approve {
  background: var(--theme-primary);
  color: #fff;
  box-shadow: 0 4px 16px var(--theme-primary-shadow);
}

.action-btn.approve:hover {
  background: var(--theme-primary-active);
  box-shadow: 0 8px 24px rgba(var(--theme-primary-rgb), .30);
}

.action-btn:active { transform: scale(.97); }

/* ── Modal Transitions ── */
.detail-modal-enter-active { transition: opacity 260ms ease; }
.detail-modal-enter-active .detail-modal { transition: transform 320ms cubic-bezier(.2, .8, .2, 1), opacity 280ms ease; }

.detail-modal-leave-active { transition: opacity 200ms ease; }
.detail-modal-leave-active .detail-modal { transition: transform 220ms ease, opacity 200ms ease; }

.detail-modal-enter-from { opacity: 0; }
.detail-modal-enter-from .detail-modal { transform: translateY(16px); opacity: 0; }

.detail-modal-leave-to { opacity: 0; }
.detail-modal-leave-to .detail-modal { transform: translateY(8px); opacity: 0; }

/* ── Responsive ── */
@media (max-width: 1320px) {
  .list-toolbar, .list-foot { grid-template-columns: 1fr; }

  .detail-hero {
    grid-template-columns: minmax(0, 1.8fr) repeat(4, minmax(0, 1fr));
  }

  .hero-summary-panel {
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  }

  .detail-expense-table {
    overflow-x: auto;
  }

  .detail-expense-table table {
    min-width: 980px;
  }

  .detail-modal {
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
  }

  .body-grid { grid-template-columns: 1fr; }
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }
  .side-dual { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .approval-list { padding: 16px; }
  .status-tabs { gap: 18px; overflow-x: auto; }
  .filter-set { width: 100%; }
  .filter-btn, .page-size { width: 100%; }
  .list-foot { justify-items: stretch; }
  .pager, .page-size { justify-self: stretch; }

  .detail-hero {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
  }

  .applicant-card,
  .hero-summary-panel,
  .progress-line {
    grid-column: 1 / -1;
  }

  .hero-summary-panel {
    grid-template-columns: 1fr;
  }

  .hero-summary-item {
    padding: 14px 0;
  }

  .detail-card {
    padding: 14px 16px;
  }

  .detail-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-total {
    align-self: flex-start;
  }

  .detail-expense-table table {
    min-width: 980px;
  }

  .detail-modal {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-header { padding: 16px 18px; flex-wrap: wrap; }
  .header-right { width: 100%; justify-content: flex-end; }
  .metrics-strip { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .progress-track { overflow-x: auto; padding-bottom: 8px; }
  .node-label strong { font-size: 11px; }
  .modal-footer { flex-direction: column; padding: 14px 18px; }
  .footer-right { width: 100%; }
  .action-btn { flex: 1; }
}
