/* ===== Cards ===== */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px;
}
.card--strong { border-color: var(--line-strong); }
.card--alt { background: var(--panel-alt); }
.card--subtle {
  background: var(--panel-alt);
  border-color: var(--line);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  border: none;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn--secondary { background: var(--accent-soft); color: var(--accent); }
.btn--secondary:hover:not(:disabled) { background: #e8c4ae; }
.btn--outline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn--outline:hover:not(:disabled) { background: var(--panel-alt); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover:not(:disabled) { background: #a04a42; }
.btn--sm { padding: 8px 12px; font-size: 0.8125rem; }
.btn--full { width: 100%; }
.btn--icon { padding: 10px 12px; }

/* ===== Inputs ===== */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  color: var(--ink);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  max-width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
}
.form-input:disabled, .form-select:disabled, .form-textarea:disabled {
  background: #e7e0d6;
  border-color: #d9cec1;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}
.form-input::placeholder { color: var(--muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236F675E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-error { font-size: 0.75rem; color: var(--danger); }
.form-required { color: var(--danger); font-size: 0.6875rem; font-weight: 400; }
.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--ink);
}
.switch-row--between {
  width: 100%;
  justify-content: space-between;
}
.preference-card {
  padding: 14px 16px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
}
.preference-card__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 12px;
}
.preference-card__title {
  font-weight: 600;
}
.preference-card__hint {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== Chips / Tags ===== */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--radius-chip);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.chip--active { background: var(--accent); color: #fff; }
.chip--outline { background: var(--panel); border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.chip--outline:hover { background: var(--panel-alt); }
.chip--stock { background: var(--status-stock); color: #2d5e3a; }
.chip--borrowed { background: var(--status-borrowed); color: #8b4a2a; }
.chip--damaged { background: var(--status-damaged); color: #8b3a32; }
.chip--lost { background: var(--status-lost); color: #6b5252; }
.chip--pending { background: var(--status-pending); color: var(--accent); }
.chip--disabled { background: var(--status-disabled); color: var(--muted); }
.chip--success { background: var(--success-soft); color: var(--success); }
.chip--danger { background: var(--danger-soft); color: var(--danger); }
.chip--warning { background: var(--warning-soft); color: var(--warning); }

/* ===== Badge tag ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-chip);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* ===== Table ===== */
.table-wrapper {
  overflow-x: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.data-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.18px;
  background: linear-gradient(180deg, rgba(249, 244, 237, 0.78) 0%, rgba(255, 252, 247, 0.96) 100%);
}
.data-table td {
  padding: 12px 14px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--panel-alt);
  vertical-align: middle;
  line-height: 1.5;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--panel-alt); }
.data-table--interactive tbody tr {
  cursor: pointer;
  transition: background 0.16s ease;
}
.data-table--interactive tbody tr:hover td {
  background: #f8f1e9;
}
.table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 0;
  overflow: hidden;
}
.table-card > .table-wrapper {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.card > .table-wrapper {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.table-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(249, 244, 237, 0.9) 0%, rgba(255, 252, 247, 0.98) 100%);
}
.table-card__title {
  font-size: 1rem;
  font-weight: 700;
}
.table-card__desc {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 620px;
}
.data-table__link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.data-table__link:hover {
  text-decoration: underline;
}

/* ===== Search Bar ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: var(--ink);
}
.search-bar input::placeholder { color: var(--muted); }
.search-bar svg { flex-shrink: 0; color: var(--muted); }

/* ===== Stat Card ===== */
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px;
}
a.stat-card { color: inherit; text-decoration: none; }
.stat-card__value { font-size: 2rem; font-weight: 600; }
.stat-card__label { font-size: 0.75rem; color: var(--muted); margin-top: 4px; }
.stat-card__hint { font-size: 0.75rem; color: var(--accent); margin-top: 10px; font-weight: 500; }
.stat-card--interactive {
  display: block;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.stat-card--interactive:hover,
.stat-card--interactive:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
  background: var(--panel-alt);
  text-decoration: none;
}
.stat-card--interactive:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .stat-row--dashboard .stat-card {
    padding: 11px 14px 13px;
    min-height: 108px;
  }
  .stat-row--dashboard .stat-card__value {
    font-size: 1.6rem;
    line-height: 1;
  }
  .stat-row--dashboard .stat-card__label {
    margin-top: 7px;
    line-height: 1.3;
  }
  .stat-row--dashboard .stat-card__hint {
    margin-top: 5px;
    font-size: 0.68rem;
    line-height: 1.3;
  }
}

/* ===== Meta rows (key-value) ===== */
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.75rem;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 16px;
}
.meta-row__label { color: var(--ink); }
.meta-row__value { font-weight: 500; }
.order-summary-card {
  position: relative;
  overflow: hidden;
}
.order-summary-card::after {
  content: '';
  position: absolute;
  inset: auto -120px -120px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(214, 144, 92, 0.12) 0%, rgba(214, 144, 92, 0) 70%);
  pointer-events: none;
}
.order-summary-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.order-summary-card__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.order-summary-card__desc {
  font-size: 0.78rem;
  color: var(--muted);
}
.order-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.order-kpi {
  padding: 14px 16px;
  border: 1px solid rgba(205, 120, 56, 0.12);
  border-radius: var(--radius-input);
  background: rgba(248, 241, 233, 0.65);
}
.order-kpi__label {
  font-size: 0.72rem;
  color: var(--muted);
}
.order-kpi__value {
  margin-top: 6px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.4;
}
.order-batches {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-batch-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 15px 16px;
  border-radius: var(--radius-input);
  background: var(--panel-alt);
  border: 1px solid rgba(205, 120, 56, 0.12);
}
.order-batch-card__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.order-batch-card__name {
  font-size: 0.96rem;
  font-weight: 700;
}
.order-batch-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}
.order-batch-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.approval-task-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(205, 120, 56, 0.16);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
}
.approval-task-card--interactive {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.approval-task-card--interactive:hover {
  border-color: rgba(205, 120, 56, 0.38);
  box-shadow: 0 14px 30px rgba(84, 57, 29, 0.08);
}
.approval-task-card--interactive:active {
  transform: translateY(1px);
}
.approval-task-card + .approval-task-card {
  margin-top: 14px;
}
.approval-task-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 18px 14px;
}
.approval-task-card__order {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--accent);
}
.approval-task-card__applicant {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}
.approval-task-card__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 18px 12px;
}
.approval-task-card__stamp {
  font-size: 0.75rem;
  color: var(--muted);
}
.approval-task-card__items {
  margin: 0 18px 14px;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  background: rgba(244, 236, 225, 0.65);
  border: 1px solid rgba(205, 120, 56, 0.1);
}
.approval-task-card__items-label {
  margin-bottom: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}
.approval-task-card__items .approval-item-row:first-child {
  padding-top: 0;
}
.approval-task-card__items .approval-item-row:last-child {
  padding-bottom: 0;
}
.approval-task-card__mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.approval-task-card__mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(205, 120, 56, 0.08);
}
.approval-task-card__mini-item:last-child {
  border-bottom: none;
}
.approval-task-card__mini-main {
  min-width: 0;
}
.approval-task-card__mini-code {
  font-size: 0.85rem;
  font-weight: 700;
}
.approval-task-card__mini-name {
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--muted);
}
.approval-task-card__mini-meta {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
}
.approval-task-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(205, 120, 56, 0.08);
}
.approval-task-card--history .approval-task-card__footer {
  padding-top: 10px;
  padding-bottom: 12px;
}
.approval-task-card--history .approval-task-card__footer:empty {
  display: none;
}
.approval-task-card--history .approval-task-card__items {
  margin-bottom: 10px;
}
.approval-task-card__comment {
  max-width: 240px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}
.approval-task-card__action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.approval-item-row {
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--panel);
}
.approval-item-row:last-child {
  border-bottom: none;
}
.approval-item-row__media {
  position: relative;
  flex: 0 0 92px;
  width: 92px;
}
.approval-item-row__image,
.approval-item-row__placeholder {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
}
.approval-item-row__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  color: var(--accent);
  border: 1px dashed rgba(205, 120, 56, 0.32);
}
.approval-item-row__placeholder svg {
  width: 28px;
  height: 28px;
}
.approval-item-row__count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(31, 27, 22, 0.76);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}
.approval-item-row__body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.approval-item-row__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.approval-item-row__code {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.approval-item-row__name {
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.approval-item-row__damage {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .card {
    padding: 16px;
  }
  .btn {
    min-height: 44px;
    padding: 11px 14px;
  }
  .btn--sm {
    min-height: 40px;
    padding: 8px 12px;
  }
  .table-wrapper {
    border-radius: 16px;
  }
  .table-card__head,
  .approval-task-card__head,
  .approval-task-card__summary,
  .approval-task-card__footer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .table-card__head {
    padding-top: 16px;
    padding-bottom: 12px;
    align-items: flex-start;
  }
  .table-card__head .tag {
    align-self: flex-start;
  }
  .approval-task-card__summary,
  .approval-task-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .approval-task-card--history .approval-task-card__footer {
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 10px;
  }
  .approval-task-card__action-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .approval-task-card__action-group .btn {
    width: 100%;
  }
  .approval-task-card__items {
    margin-left: 14px;
    margin-right: 14px;
  }
  .approval-task-card__comment {
    max-width: none;
  }
  .order-batch-card {
    padding: 14px;
  }
  .order-kpi-grid {
    grid-template-columns: 1fr;
  }
  .order-batch-card {
    flex-direction: column;
  }
  .order-batch-card__actions {
    align-items: flex-start;
    width: 100%;
  }
  .order-batch-card__actions .btn,
  .order-batch-card__actions > a.btn {
    width: 100%;
  }
  .meta-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .approval-item-row {
    gap: 12px;
  }
  .approval-item-row__media {
    flex-basis: 84px;
    width: 84px;
  }
  .approval-item-row__image,
  .approval-item-row__placeholder {
    width: 84px;
    height: 84px;
    border-radius: 12px;
  }
  .approval-item-row__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .modal {
    width: calc(100vw - 24px);
    max-width: none;
    padding: 18px 16px;
    border-radius: 18px;
  }
  .modal__header {
    margin-bottom: 14px;
    gap: 10px;
  }
  .modal__title {
    font-size: 1rem;
  }
  .modal__footer {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .modal__footer .btn {
    width: 100%;
  }
  .empty-state {
    padding: 36px 18px;
  }
}

/* ===== Toast / Alert ===== */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  --toast-offset-y: 0px;
  --toast-opacity: 1;
  transform: translate(-50%, var(--toast-offset-y));
  opacity: var(--toast-opacity);
  width: min(calc(100vw - 32px), 420px);
  padding: 14px 20px;
  border-radius: var(--radius-input);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  z-index: 9999;
  animation: toastIn 0.24s ease;
  box-shadow: var(--shadow-elevated);
  transition: transform 0.18s ease, opacity 0.18s ease;
  touch-action: none;
}
.toast--dragging {
  transition: none;
}
.toast--dismissed {
  --toast-offset-y: -30px;
  --toast-opacity: 0;
}
.toast--success { background: var(--success-soft); color: #2d5e3a; border: 1px solid var(--success); }
.toast--error { background: var(--danger-soft); color: #8b3a32; border: 1px solid var(--danger); }
.toast--info { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
@keyframes toastIn {
  from { transform: translate(-50%, -12px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(32,30,26,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal {
  background: var(--panel);
  border-radius: var(--radius-card);
  padding: var(--space-block);
  width: 90%; max-width: 480px;
  box-shadow: var(--shadow-elevated);
}
.modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal__title { font-size: 1.125rem; font-weight: 600; }
.modal__close { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 1.25rem; }
.modal__footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.modal-overlay--panel {
  padding: 20px;
}
.approval-panel {
  width: min(1020px, calc(100vw - 40px));
  max-width: 1020px;
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.approval-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(241, 235, 225, 0.62) 0%, rgba(255, 253, 252, 0.96) 100%);
}
.approval-panel__header-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.approval-panel__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--accent);
  text-transform: uppercase;
}
.approval-panel__title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}
.approval-panel__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.approval-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.approval-panel__body {
  padding: 18px 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.approval-panel__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.approval-panel__section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(251, 247, 241, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.approval-panel__section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.approval-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
}
.approval-panel__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.approval-panel__label {
  font-size: 0.75rem;
  color: var(--muted);
}
.approval-panel__value {
  font-size: 0.9375rem;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}
.approval-panel__note {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.approval-panel__note-body {
  padding: 12px 14px;
  border-radius: var(--radius-input);
  background: var(--panel-alt);
  line-height: 1.6;
  color: var(--ink-soft);
}
.approval-panel__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.approval-panel__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  background: var(--panel-alt);
}
.approval-panel__item--stack {
  flex-direction: column;
}
.approval-panel__item-main {
  min-width: 0;
}
.approval-panel__item-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}
.approval-panel__item-code {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}
.approval-panel__item-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
}
.approval-panel__item--stack .approval-panel__item-meta {
  align-items: flex-start;
  text-align: left;
}
.approval-panel__item-note {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .modal-overlay--panel {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  .approval-panel {
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100%;
    border-radius: 0;
  }
  .approval-panel__header,
  .approval-panel__body,
  .approval-panel__footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .approval-panel__header {
    padding-top: 16px;
  }
  .approval-panel__body {
    gap: 14px;
  }
  .approval-panel__footer {
    padding-bottom: 16px;
    flex-wrap: wrap;
  }
  .approval-panel__footer .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
  .approval-panel__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .approval-panel__item {
    flex-direction: column;
  }
  .approval-panel__item-meta {
    align-items: flex-start;
    text-align: left;
  }
}

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--line);
}
.timeline__item {
  position: relative;
  padding-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -17px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 2px var(--line);
  flex-shrink: 0;
}
.timeline__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ===== Empty state ===== */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state svg { margin: 0 auto 16px; }

/* ===== Loading spinner ===== */
.spinner { width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; justify-content: center; align-items: center; padding: 48px; }

.route-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10001;
  pointer-events: none;
  overflow: hidden;
}
.route-progress__bar {
  width: 36%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(207, 116, 56, 0.25), var(--accent), rgba(207, 116, 56, 0.25));
  animation: routeProgressSlide 0.9s ease-in-out infinite;
}
@keyframes routeProgressSlide {
  0% { transform: translateX(-120%); }
  60% { transform: translateX(160%); }
  100% { transform: translateX(220%); }
}
