:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: #25272c;
  background: #f7f8fa;
  font-synthesis: none;
  --accent: #db343c;
  --accent-hover: #bd252e;
  --border: #e5e7eb;
  --muted: #737782;
  --surface: #fff;
  --green: #24734f;
  --amber: #9b671b;
  --sidebar-width: 220px;
}

* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { border-radius: 6px; }
:focus-visible { outline: 3px solid #db343c66; outline-offset: 3px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 2px; }
[hidden] { display: none !important; }
svg, .icon { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.75px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.3; font-weight: 650; overflow-wrap: anywhere; }
h2 { font-size: 16px; font-weight: 650; line-height: 1.4; }
h3 { font-size: 14px; font-weight: 600; }
small { font-size: 12px; }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 100; padding: 12px 16px; background: #fff; border: 1px solid var(--accent); border-radius: 4px; }
.skip-link:focus { top: 12px; }
.boot-state { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid #e1e3e7; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--sidebar-width); display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); padding: 0 14px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 0 12px; font-size: 22px; font-weight: 700; flex-shrink: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--accent); }
.brand-mark svg { width: 21px; height: 21px; }
.brand-pay { color: var(--accent); }
.nav-caption { color: #92959e; font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 18px 12px 10px; }
.nav { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; min-height: 42px; padding: 9px 12px; gap: 11px; border-radius: 6px; color: #636772; font-size: 13px; font-weight: 500; }
.nav-item:hover { color: #292c32; background: #f5f6f8; }
.nav-item[aria-current="page"] { color: #c82e36; background: #fceef0; font-weight: 600; }
.nav-item .nav-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nav-item .count { background: #fce5e7; color: #c82e36; }
.sidebar-bottom { margin-top: auto; padding: 18px 0 16px; border-top: 1px solid var(--border); }
.workspace-label { padding: 12px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.workspace-label svg { width: 16px; height: 16px; }
.sidebar-close { display: none !important; }
.sidebar-backdrop { display: none; }
.workspace { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border-bottom: 1px solid var(--border); padding: 12px 32px; }
.breadcrumb { display: flex; gap: 10px; align-items: center; min-width: 0; color: var(--muted); font-size: 12px; }
.breadcrumb svg { width: 14px; height: 14px; }
.breadcrumb-current { color: #41454f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.account-email { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.account-role { font-size: 11px; color: var(--muted); }
.avatar { height: 32px; width: 32px; border: 1px solid var(--border); background: #f7f8fa; display: grid; place-items: center; border-radius: 50%; flex-shrink: 0; color: #616571; }
.mobile-menu { display: none !important; }
.main { padding: 30px 32px 48px; max-width: 1680px; margin: auto; min-width: 0; outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.heading-main { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.page-date { font-size: 12px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 8px 13px; border: 1px solid #dce0e5; background: #fff; color: #414550; font-size: 13px; font-weight: 550; line-height: 18px; max-width: 100%; }
.btn:hover:not(:disabled) { background: #f5f6f8; border-color: #c9cdd4; }
.btn-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: #c32e36; border-color: #efd3d6; }
.btn-danger:hover:not(:disabled) { background: #fdf0f1; border-color: #e4b9be; }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-small { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.btn-small svg { width: 15px; height: 15px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; height: 34px; width: 34px; flex: 0 0 34px; padding: 0; background: transparent; color: #747985; border: 1px solid transparent; }
.icon-btn:hover:not(:disabled) { color: #30343c; background: #f0f2f5; }
.icon-btn.danger:hover:not(:disabled) { color: #c32e36; background: #fdf0f1; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; white-space: nowrap; }
.text-link { color: #bd3038; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; line-height: 1.4; overflow-wrap: anywhere; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link svg { width: 14px; height: 14px; }
.project-link { color: #2e323c; font-weight: 600; }
.project-link:hover { color: #c12d35; text-decoration: underline; text-underline-offset: 3px; }
.section { min-width: 0; margin-top: 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 10px; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 21px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; background: #eceef2; color: #6e7380; font-variant-numeric: tabular-nums; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.metric { padding: 24px 22px; min-width: 0; border-right: 1px solid var(--border); }
.metric:last-child { border-right: 0; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.metric-top svg { color: #9096a0; width: 17px; height: 17px; }
.metric-value { display: block; margin-top: 14px; font-size: 27px; line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-value.money { font-size: 22px; color: var(--green); }
.status-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 15px 0; font-size: 12px; border-bottom: 1px solid var(--border); }
.status-strip a { display: inline-flex; align-items: center; gap: 8px; }
.status-strip a:hover { text-decoration: underline; text-underline-offset: 3px; }
.status-strip svg { width: 15px; height: 15px; }
.status-strip .attention { color: var(--amber); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 0 0 16px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.filter-field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.filter-field select { max-width: 240px; }
.search { position: relative; min-width: 180px; width: 264px; max-width: 100%; }
.search svg { position: absolute; top: 10px; left: 11px; color: #969ba5; width: 16px; height: 16px; pointer-events: none; }
.search input { padding-left: 35px; width: 100%; }
.table-wrap { max-width: 100%; width: 100%; overflow-x: auto; background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); scrollbar-width: thin; }
table { width: 100%; min-width: 780px; border-collapse: collapse; text-align: left; font-size: 13px; }
table.compact { min-width: 780px; }
th { background: #f9fafb; color: #858a95; font-size: 11px; font-weight: 550; padding: 13px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 16px; border-bottom: 1px solid #eef0f3; line-height: 1.5; max-width: 300px; overflow-wrap: anywhere; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfd; }
th.align-right, td.align-right { text-align: right; }
td.cell-actions { width: 1%; padding: 10px 12px; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 160px; }
td > .project-link { display: inline-block; min-width: 140px; }
.cell-stack small { color: var(--muted); font-size: 11px; }
.amount { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-footer { padding: 12px 0; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; max-width: 100%; min-height: 23px; border-radius: 4px; background: #f0f1f4; color: #727783; font-size: 11px; font-weight: 500; line-height: 1.45; white-space: nowrap; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.success { color: var(--green); background: #eaf5ee; }
.badge.warning { color: var(--amber); background: #fcf3df; }
.badge.danger { color: #be3c46; background: #fcedef; }
.badge.sandbox { color: #176c71; background: #eaf5f5; border: 1px solid #cce5e4; }
.badge.live { color: #ad2634; background: #fff0f1; border: 1px solid #efcbd0; }
.badge-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.empty-state, .error-state, .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 240px; padding: 40px 20px; gap: 13px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.empty-state > svg, .error-state > svg { width: 32px; height: 32px; stroke-width: 1.3px; color: #a5abb4; margin-bottom: 5px; }
.empty-state p, .error-state p { color: var(--muted); max-width: 480px; line-height: 1.7; overflow-wrap: anywhere; }
.error-state > svg { color: #c9464e; }
.loading-state { color: var(--muted); font-size: 13px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); margin-top: -4px; margin-bottom: 28px; overflow-x: auto; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 13px 0; white-space: nowrap; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13px; }
.tab svg { width: 16px; height: 16px; }
.tab[aria-current="page"] { color: #c92d35; border-bottom-color: var(--accent); font-weight: 600; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 580px) minmax(200px, 1fr); gap: 48px; align-items: start; }
.detail-aside { border-left: 1px solid var(--border); padding-left: 28px; min-width: 0; }
.detail-aside h2 { margin-bottom: 20px; }
.detail-list { margin: 0; display: grid; gap: 17px; }
.detail-pair { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr); gap: 12px; align-items: start; font-size: 13px; }
.detail-pair dt { color: var(--muted); line-height: 1.5; }
.detail-pair dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
.detail-aside .detail-pair { grid-template-columns: 1fr; gap: 5px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
.form-fields { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 550; color: #4c515d; }
.field-required { color: #c72d35; margin-left: 3px; }
.field-hint { font-size: 11px; color: var(--muted); line-height: 1.5; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { min-height: 38px; border: 1px solid #dce0e6; background: #fff; color: #303540; padding: 9px 11px; width: 100%; min-width: 0; font-size: 13px; }
input::placeholder, textarea::placeholder { color: #a0a5ae; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #bac1cb; }
input:focus, select:focus, textarea:focus { border-color: #d56168; }
input:disabled, select:disabled, textarea:disabled { background: #f5f6f8; color: #9095a0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 16px; margin: 0; }
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 22px; }
.form-actions.start { justify-content: flex-start; }
.form-error { color: #b32b35; background: #fff0f1; border-left: 3px solid #d95560; padding: 11px 13px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; margin-top: 18px; }
.notice { display: flex; align-items: flex-start; gap: 10px; color: #886323; background: #fcf5e6; padding: 12px 14px; font-size: 12px; line-height: 1.65; border-radius: 4px; }
.notice svg { margin-top: 1px; width: 17px; height: 17px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.5; cursor: pointer; }
.checkbox-label input { margin-top: 2px; }
.event-options { display: grid; gap: 12px; }
.event-copy { display: flex; flex-direction: column; gap: 3px; }
.event-copy small { color: var(--muted); font-size: 11px; }
.segmented { display: flex; gap: 3px; padding: 3px; width: fit-content; max-width: 100%; border: 1px solid var(--border); border-radius: 6px; background: #f0f2f5; }
.segment { position: relative; min-width: 0; }
.segment input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segment span, .segmented > button { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 7px 14px; min-height: 32px; font-size: 12px; border-radius: 4px; color: var(--muted); cursor: pointer; border: 0; background: transparent; font-weight: 500; }
.segment input:checked + span, .segmented > button[aria-pressed="true"] { color: #343946; background: #fff; box-shadow: 0 1px 3px #161b2612; }
.segment input:focus-visible + span { outline: 3px solid #db343c66; outline-offset: 1px; }
.segment input:disabled + span { cursor: not-allowed; opacity: .6; }
.segment svg { width: 15px; height: 15px; }
.notification-list { border-top: 1px solid var(--border); background: #fff; }
.notification { display: flex; gap: 14px; padding: 21px 18px; border-bottom: 1px solid var(--border); }
.notification.unread { background: #fffdfd; }
.notification-symbol { height: 34px; width: 34px; flex: 0 0 34px; display: grid; place-items: center; background: #f2f3f5; color: #828794; border-radius: 6px; }
.unread .notification-symbol { color: #c7444d; background: #fceef0; }
.notification-body { flex: 1; min-width: 0; }
.notification-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 7px; }
.notification-message { color: #646a76; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.notification-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; color: #9499a2; font-size: 11px; }
.unread-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dialog { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #e0e3e9; border-radius: 8px; background: #fff; color: inherit; box-shadow: 0 20px 80px #11182726; overflow: auto; overscroll-behavior: contain; }
.dialog.wide { width: min(720px, calc(100% - 32px)); }
.dialog::backdrop { background: #20232a66; }
body:has(.dialog[open]) { overflow: hidden; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 18px; border-bottom: 1px solid var(--border); }
.dialog-header h2 { font-size: 18px; padding-top: 5px; overflow-wrap: anywhere; }
.dialog-subtitle { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 7px; overflow-wrap: anywhere; }
.dialog-body { padding: 24px; }
.dialog-actions { padding-top: 24px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.secret-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; margin-top: 18px; font-size: 12px; }
.secret-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.stepper { display: flex; align-items: center; gap: 12px; padding-bottom: 24px; font-size: 12px; color: #9197a1; }
.step { display: inline-flex; align-items: center; gap: 8px; }
.step-number { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center; background: #f1f2f5; color: #9096a0; font-size: 11px; }
.step.active { color: #333944; font-weight: 600; }
.step.active .step-number { color: #c63039; background: #fcecee; }
.stepper-line { width: 30px; height: 1px; background: var(--border); }
.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.qr-image { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.payment-amount { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; margin-bottom: 12px; overflow-wrap: anywhere; }
.payment-summary { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.simulation { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.simulation h3 { margin-bottom: 12px; }
.simulation-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.payment-heading { flex-wrap: wrap; }
.payment-heading .heading-actions { flex-wrap: wrap; flex-shrink: 1; min-width: 0; max-width: 100%; }
.payment-heading .btn { overflow-wrap: anywhere; }
.project-payments-link { margin-top: 20px; }
.payment-filters { display: grid; gap: 16px; margin-bottom: 24px; }
.payment-search-row { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(145px, 170px) minmax(145px, 170px) auto; gap: 12px; align-items: end; }
.payment-search-row .search { width: 100%; min-width: 0; }
.payment-search-row .search input { padding-left: 35px; }
.payment-filter-actions { display: flex; align-items: center; gap: 6px; min-height: 38px; }
.payment-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.payment-filter-grid select { text-overflow: ellipsis; }
.payment-totals { margin-bottom: 24px; }
.payment-totals .section-heading { padding-bottom: 12px; }
.payment-totals h2 { font-size: 14px; }
.payment-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: #fff; border-block: 1px solid var(--border); }
.payment-metric { min-width: 0; padding: 18px; border-right: 1px solid var(--border); }
.payment-metric:last-child { border-right: 0; }
.payment-metric dt { color: var(--muted); font-size: 12px; line-height: 1.5; }
.payment-metric dd { margin: 10px 0 0; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.4; overflow-wrap: anywhere; }
.payment-metric.paid dd { color: var(--green); }
.payment-metric.attention dd { color: var(--amber); }
.payment-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.payment-pagination-controls, .payment-page-form { display: flex; align-items: center; gap: 8px; min-width: 0; }
.payment-pagination .field { flex-direction: row; align-items: center; gap: 8px; }
.payment-pagination .field-label { white-space: nowrap; }
.payment-pagination select { width: 76px; }
.payment-pagination .payment-page-input { width: 80px; min-height: 34px; padding: 7px; font-variant-numeric: tabular-nums; }
.payment-page-form > span { white-space: nowrap; }
.payment-mode-notice.sandbox { color: #176c71; background: #eaf5f5; border-left: 3px solid #3c9295; }
.payment-mode-notice.live { color: #ad2634; background: #fff0f1; border-left: 3px solid #d95560; }
.dialog.wide.payment-detail { width: min(880px, calc(100% - 32px)); }
.payment-qr { display: flex; flex-direction: column; align-items: stretch; gap: 14px; min-width: 0; }
.payment-qr > .btn { align-self: flex-start; }
.payment-qr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sandbox-qr-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #176c71; font-weight: 600; line-height: 1.6; }
.payment-last-error { display: flex; gap: 10px; margin-bottom: 24px; padding: 14px; border-left: 3px solid #d95560; background: #fff0f1; color: #a82633; }
.payment-last-error > div { min-width: 0; }
.payment-last-error p { margin-top: 6px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.payment-history { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 22px; }
.payment-history > .error-state { min-height: 160px; padding: 24px 16px; }
.payment-timeline { list-style: none; margin: 0; padding: 0 0 0 7px; }
.payment-timeline li { position: relative; border-left: 1px solid var(--border); padding: 0 0 24px 22px; }
.payment-timeline li:last-child { padding-bottom: 0; }
.payment-timeline li::before { content: ''; position: absolute; width: 7px; height: 7px; left: -4px; top: 6px; border-radius: 50%; background: #88949d; box-shadow: 0 0 0 4px #fff; }
.payment-timeline-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 9px; }
.payment-timeline-heading h3 { font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.payment-timeline-heading time { color: var(--muted); font-size: 11px; }
.payment-timeline p { margin-top: 8px; font-size: 12px; line-height: 1.65; color: #646a76; overflow-wrap: anywhere; }
.payment-provider-status { align-self: center; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; min-width: 0; }
.payment-refresh-status { margin-top: 20px; font-size: 12px; line-height: 1.6; color: var(--amber); overflow-wrap: anywhere; }
.refund-register-totals { display: flex; flex-direction: column; gap: 3px; font-variant-numeric: tabular-nums; }
.refund-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.refund-totals > div { min-width: 0; }
.refund-totals dt { color: var(--muted); font-size: 12px; }
.refund-totals dd { margin: 7px 0 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.refund-section > .notice, .refund-section > .sandbox-qr-label { margin-block: 16px; }
.refund-saved-attempt { border-block: 1px solid var(--border); padding-block: 18px; margin-top: 20px; }
.refund-saved-attempt h3, .refund-confirmation h3 { font-size: 15px; }
.refund-saved-attempt .detail-list { margin-block: 12px; }
.refund-reason { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 200px; overflow: auto; line-height: 1.65; }
.refund-attempt-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-block: 18px; }
.refund-history { margin-top: 22px; }
.refund-confirmation .btn, .refund-attempt-actions .btn { white-space: normal; overflow-wrap: anywhere; }
.refund-form input[readonly] { background: #f4f5f7; }
@media (max-width: 600px) {
  .refund-totals { grid-template-columns: 1fr; gap: 14px; }
  .refund-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .refund-totals dd { margin: 0; text-align: right; }
  .refund-form .segment span { padding-inline: 10px; }
}
.toasts { position: fixed; right: 24px; bottom: 24px; width: min(370px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 10px; z-index: 100; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--green); box-shadow: 0 4px 20px #1a223014; border-radius: 6px; padding: 12px 10px 12px 14px; pointer-events: auto; font-size: 12px; line-height: 1.5; }
.toast > svg { color: var(--green); }
.toast.error { border-left-color: #c13843; }
.toast.error > svg { color: #c13843; }
.toast p { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast .icon-btn { width: 26px; height: 26px; flex-basis: 26px; }
.login-page { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 36px 24px; background: #fff; }
.login-panel { width: 360px; max-width: 100%; }
.login-panel .brand { padding: 0; min-height: auto; margin-bottom: 42px; font-size: 28px; }
.login-panel .brand-mark { width: 38px; height: 38px; }
.login-panel h1 { font-size: 24px; margin-bottom: 28px; }
.login-panel .btn-primary { width: 100%; margin-top: 6px; }
.login-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 26px; margin-top: 28px; border-top: 1px solid var(--border); font-size: 12px; color: #8c919b; }
.login-footer a { display: inline-flex; align-items: center; gap: 6px; }
.login-footer a svg { width: 13px; height: 13px; }

@media (min-width: 1500px) {
  .main { padding: 36px 44px 56px; }
  .topbar { padding-inline: 44px; }
}
@media (max-width: 1150px) {
  .main { padding: 26px 24px 40px; }
  .topbar { padding-inline: 24px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .detail-aside { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .detail-aside .detail-pair { grid-template-columns: 150px minmax(0, 1fr); }
  .payment-search-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payment-metric { padding: 16px 12px; }
  .payment-metric dd { font-size: 20px; }
  .payment-pagination-controls { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .18s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: inline-flex !important; position: absolute; top: 22px; right: 10px; }
  .sidebar .brand { padding-left: 8px; font-size: 21px; }
  .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: #20232a66; z-index: 39; }
  body.menu-open { overflow: hidden; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-flex !important; }
  .topbar { min-height: 60px; padding: 10px 16px; gap: 12px; }
  .breadcrumb { flex: 1; gap: 6px; }
  .breadcrumb-home, .breadcrumb > svg { display: none; }
  .account { gap: 5px; }
  .account-copy { display: none; }
  .avatar { width: 28px; height: 28px; }
  .main { padding: 24px 16px 40px; }
  h1 { font-size: 23px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 23px; }
  .page-heading .btn { padding: 8px 10px; font-size: 12px; }
  .page-date { display: none; }
  .metric { padding: 19px 15px; }
  .metric-value { font-size: 25px; }
  .metric-value.money { font-size: 20px; }
  .metric-top { font-size: 11px; }
  .tabs { gap: 23px; }
  .filters { width: 100%; }
  .toolbar .search { width: 100%; }
  .filter-field { flex: 1 1 140px; }
  .filter-field select { max-width: none; width: 100%; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  th, td { padding-left: 13px; padding-right: 13px; }
  .dialog { max-height: calc(100dvh - 24px); }
  .dialog-header { padding: 17px 18px 15px; }
  .dialog-body { padding: 20px 18px; }
  .dialog-header h2 { font-size: 17px; }
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .notification { padding: 18px 12px; gap: 10px; }
  .notification-symbol { width: 30px; height: 30px; flex-basis: 30px; }
  .notification > .icon-btn { width: 30px; height: 30px; flex-basis: 30px; }
  .qr-layout { grid-template-columns: 1fr; }
  .qr-image { margin: auto; }
  .payment-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-filter-grid > .field:first-child { grid-column: 1 / -1; }
  .payment-search-row > .field:first-child { grid-column: 1 / -1; }
  .payment-filter-actions { grid-column: 1 / -1; }
  .payment-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-metric:nth-child(2) { border-right: 0; }
  .payment-metric:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .payment-metric dd { font-size: 19px; }
  .payment-qr { align-items: center; }
  .payment-qr > .btn { align-self: center; }
  .payment-qr .field, .payment-qr-actions { width: 100%; }
  .payment-pagination-controls { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; width: 100%; gap: 8px; }
  .payment-pagination-controls > .field { grid-column: 1 / -1; justify-self: start; }
  .payment-page-form { justify-content: center; }
  .detail-pair { grid-template-columns: minmax(92px, .7fr) minmax(0, 1.3fr); }
  .toasts { right: 16px; bottom: 16px; }
}
@media (max-width: 420px) {
  .payment-heading .heading-actions { width: 100%; }
  .payment-page-form .field-label { display: none; }
  .payment-pagination .payment-page-input { width: 68px; }
  .payment-page-form { gap: 4px; }
}
@media (max-width: 380px) {
  .page-heading { flex-wrap: wrap; }
  .heading-actions { margin-left: auto; }
  .metric-top svg { display: none; }
  .metric-value.money { font-size: 18px; }
  .detail-aside .detail-pair { grid-template-columns: 1fr; }
  .segment span { padding-inline: 10px; }
}
@media (max-width: 360px) {
  .payment-filter-grid, .payment-search-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
