#c .tp-page {
  --tp-border: var(--tms-border, #dbe3ed);
  --tp-panel: var(--tms-bg-panel, #fff);
  --tp-muted: var(--tms-text-secondary, #66778c);
  --tp-brand: var(--tms-brand, #1677ff);
  color: var(--tms-text-primary, #17283d);
  display: grid;
  gap: 18px;
  min-width: 0;
}

#c .tp-head,
#c .tp-section-head {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

#c .tp-head { margin: 2px 0 4px; }
#c .tp-head h1 { font-size: clamp(24px, 2vw, 30px); letter-spacing: -.025em; margin: 0; }
#c .tp-head p,
#c .tp-section-head p { color: var(--tp-muted); margin: 6px 0 0; }
#c .tp-head .tp-kicker { color: var(--tp-brand); font-size: 12px; font-weight: 700; letter-spacing: .08em; margin: 0 0 5px; }

#c .tp-section {
  background: var(--tp-panel);
  border: 1px solid var(--tp-border);
  border-radius: var(--tms-card-radius, 14px);
  box-shadow: var(--tms-shadow, 0 2px 9px rgba(18, 38, 63, .04));
  min-width: 0;
  padding: clamp(16px, 2vw, 22px);
}

#c .tp-section h2 { font-size: 18px; letter-spacing: -.01em; margin: 0; }
#c .tp-notice { border-radius: 9px; color: var(--tp-muted); min-height: 20px; padding: 0 2px; }
#c .tp-notice[data-state="error"] { color: #b42318; }
#c .tp-notice[data-state="success"] { color: #16804a; }

#c .tp-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

#c .tp-field { color: var(--tp-muted); display: grid; flex: 1 1 145px; font-size: 13px; font-weight: 600; gap: 6px; min-width: 125px; }
#c .tp-field-wide { flex-basis: 220px; }
#c .tp-field input,
#c .tp-field select { box-sizing: border-box; min-height: 40px; width: 100%; }
#c .tp-check { align-items: center; display: flex; gap: 7px; min-height: 40px; white-space: nowrap; }
#c .tp-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
#c .tp-form button { min-height: 40px; }
#c .tp-summary { color: var(--tp-muted); margin: 12px 0 0; }

#c .tp-table-wrap { border: 1px solid var(--tp-border); border-radius: 10px; margin-top: 16px; overflow: auto; }
#c .tp-table-wrap table { border-collapse: collapse; min-width: 610px; width: 100%; }
#c .tp-table-wrap th,
#c .tp-table-wrap td { border-bottom: 1px solid var(--tp-border); padding: 11px 13px; text-align: left; vertical-align: middle; }
#c .tp-table-wrap th { background: var(--tms-bg-panel-soft, #f4f7fa); color: var(--tp-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
#c .tp-table-wrap tbody tr:last-child td { border-bottom: 0; }
#c .tp-table-wrap tbody tr:hover td { background: var(--tms-row-hover, rgba(22,119,255,.045)); }
#c .tp-money { font-variant-numeric: tabular-nums; white-space: nowrap; }
#c .tp-muted,
#c .tp-empty { color: var(--tp-muted); }
#c .tp-empty { padding: 22px !important; text-align: center !important; }
#c .tp-more { margin-top: 12px; min-height: 38px; }
#c .tp-finance-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
#c .tp-permission-note { border-style: dashed; }
#c .tp-permission-note p { color: var(--tp-muted); margin: 6px 0 0; }

@media (max-width: 1100px) {
  #c .tp-finance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  #c .tp-head { align-items: flex-start; }
  #c .tp-head > button { flex: 0 0 auto; }
  #c .tp-account-form > button { width: 100%; }
  #c .tp-field { flex-basis: 100%; }
}
