:root {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --panel: #0e0e0e;
  --panel-2: #141414;
  --line: #1f1f1f;
  --line-2: #2a2a2a;
  --red: #ff6a00;
  --red-2: #ff8a1a;
  --red-dim: #7a3a08;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --ok: #7dff9a;
  --bad: #ff5a5a;
  --accent: #ff6a00;
}
* { box-sizing: border-box; border-radius: 0 !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 420px at 8% -12%, rgba(255, 106, 0, .08), transparent 60%),
    radial-gradient(700px 480px at 100% 0%, rgba(255, 106, 0, .04), transparent 55%),
    linear-gradient(180deg, #070707, #050505 40%, #030303);
}
.bg::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, .88);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  letter-spacing: .06em;
  display: inline-flex;
  align-items: center;
}
.brand img {
  height: 61px;
  width: auto;
  display: block;
}
.brand:hover { color: var(--red-2); }
nav { display: flex; gap: 18px; align-items: center; }
nav a {
  color: var(--text);
  text-decoration: none;
  opacity: .78;
  font-weight: 400;
}
nav a:hover { color: #fff; opacity: 1; }
.who { color: var(--muted); font-weight: 300; }
.ghost {
  border: 1px solid var(--red);
  padding: 7px 14px;
  color: var(--red-2);
  background: transparent;
  font-weight: 300;
  letter-spacing: .08em;
}
.ghost:hover { background: rgba(255, 106, 0, .08); color: #fff; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }
h1, h2 { font-weight: 400; margin: 0 0 16px; letter-spacing: .01em; }
h1 { color: var(--red-2); }
h2 { margin-top: 32px; font-size: 18px; color: #fff; }
.muted { color: var(--muted); font-weight: 300; }
.gold { color: var(--red-2); font-weight: 400; }
.bad { color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 24px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); padding: 16px;
}
.stat b { display: block; font-size: 26px; color: var(--red-2); font-weight: 400; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 300; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
tr:hover td { background: #121212; }
.card {
  background: var(--panel); border: 1px solid var(--line); padding: 20px;
}
.form label, .login-card label { display: block; margin: 12px 0; color: var(--muted); font-size: 13px; font-weight: 300; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line-2); background: #080808; color: var(--text);
  font-weight: 300;
  font-family: inherit;
  font-size: inherit;
  border-radius: 0;
  box-sizing: border-box;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
}
button, .btn {
  display: inline-block;
  background: transparent;
  color: var(--red-2);
  border: 1px solid var(--red);
  padding: 10px 18px;
  font-weight: 300;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover {
  background: rgba(255, 106, 0, .1);
  color: #fff;
  border-color: var(--red-2);
  box-shadow: 0 0 8px rgba(255, 106, 0, .22);
}
button:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.small { padding: 7px 14px; font-size: 11px; letter-spacing: .14em; }
.ghost-btn {
  background: transparent;
  color: var(--red-2);
  border: 1px solid var(--red);
}
.ghost-btn:hover { background: rgba(255, 106, 0, .1); color: #fff; }
.pill {
  display: inline-block; padding: 3px 8px; font-size: 12px; font-weight: 300;
  background: transparent; color: var(--muted); border: 1px solid var(--line-2);
}
.pill.ok, .pill.open, .pill.paid, .pill.done { color: var(--ok); border-color: #1d3a24; }
.pill.taken, .pill.pending, .pill.processing { color: var(--red-2); border-color: var(--red-dim); }
.pill.closed { color: #ddd; border-color: var(--line-2); }
.pill.expired, .pill.rejected, .pill.cancelled { color: var(--bad); border-color: var(--red-dim); }
.alert { padding: 10px 12px; margin: 12px 0; border: 1px solid var(--line); font-weight: 300; }
.alert.ok { background: #08140c; color: var(--ok); border-color: #1d3a24; }
.alert.bad { background: #160606; color: var(--bad); border-color: var(--red-dim); }
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(420px, 92vw); text-align: center; }
.login-card h1 { margin-bottom: 4px; color: var(--red-2); font-weight: 400; }
.login-card .logo-wrap { margin: 0 0 8px; }
.login-card .logo-wrap img { height: 72px; width: auto; display: block; margin: 0 auto; }
.login-card button { width: 100%; margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.balance-chip {
  background: transparent;
  border: 1px solid var(--red);
  padding: 8px 14px;
  font-weight: 300;
  letter-spacing: .04em;
}
.head-actions { display: flex; align-items: center; gap: 10px; }
.status-on { border-color: #2a4a34; color: var(--ok); }
.status-on:hover { background: rgba(125, 255, 154, .08); color: var(--ok); box-shadow: none; }
.status-off { color: var(--muted); border-color: var(--line-2); }
.inline { display: inline; }
.tabs {
  display: flex;
  gap: 0;
  margin: 8px 0 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tab {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-bottom: 0;
  font-weight: 300;
  letter-spacing: .06em;
}
.tab:hover { color: #fff; }
.tab.active {
  color: var(--red-2);
  background: transparent;
  border-color: var(--line);
  box-shadow: inset 0 -1px 0 var(--red);
}
.tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  color: var(--red-2);
  border: 1px solid var(--red-dim);
  font-size: 12px;
  font-weight: 300;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .01em;
  word-break: break-all;
  font-weight: 400;
}
.cell-main { font-weight: 400; }
.cell-sub { color: var(--muted); font-size: 12px; margin-top: 3px; font-weight: 300; }
td.actions { white-space: nowrap; }
td.actions .close-form { white-space: normal; }
table.payouts td { vertical-align: top; }
.close-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-width: 210px; }
.file-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  max-width: 220px;
}
.file-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border: 1px solid var(--red);
  background: transparent;
  color: var(--red-2);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.file-picker:hover .file-btn {
  background: rgba(255, 106, 0, .1);
  color: #fff;
}
.file-name {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
  font-weight: 300;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red-2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: 0 0 14px;
  padding: 7px 14px;
  border: 1px solid var(--red);
  background: transparent;
}
.back-link:hover { background: rgba(255, 106, 0, .1); color: #fff; }
.payout-page { max-width: 860px; }
.payout-page h1 { font-size: 26px; }
.payout-page h2 { margin-top: 22px; font-size: 16px; }
.payout-card { padding: 16px; }
.payout-card .mono { font-size: 13px; margin: 0 0 12px; }
.stats.compact { gap: 8px; margin-bottom: 12px; }
.stats.compact .stat { padding: 12px; }
.stats.compact .stat b { font-size: 18px; }
.closed-line { margin: 0; font-size: 13px; }
table.payouts.compact th, table.payouts.compact td { padding: 10px 12px; font-size: 13px; }
a { color: var(--red-2); font-weight: 300; }
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 8px;
}
.pager a, .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.pager a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.pager .is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}
.pager .is-disabled {
  color: var(--muted);
  border-color: var(--line);
  opacity: .45;
}
.other-amount-wrap { margin: 0 0 14px; }
.check-pretty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  cursor: pointer;
  user-select: none;
  width: fit-content;
}
.check-pretty input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.check-box {
  width: 18px;
  height: 18px;
  border: 1px solid var(--red);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex: 0 0 18px;
}
.check-pretty input:checked + .check-box {
  background: var(--red);
  box-shadow: 0 0 8px rgba(255, 106, 0, .35);
}
.check-pretty input:checked + .check-box::after {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(-45deg) translate(0, -1px);
}
.check-text { font-size: 13px; letter-spacing: .04em; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; }
.file-remove { background: none; border: 0; color: var(--bad); cursor: pointer; }
.work-actions { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
.add-more { display: inline-flex; }
.btn-finish, button.btn-finish {
  background: #1a3d24;
  color: #8cffb0;
  border-color: #2f6a40;
}
.btn-finish:hover, button.btn-finish:hover {
  background: #245533;
  color: #fff;
  border-color: #3d8a54;
}
.btn-cancel, button.btn-cancel { padding: 8px 12px; font-size: 11px; }

@media (max-width: 720px) {
  .top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .grid2 { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
}

.cancel-box { display: none; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); flex-direction: column; gap: 10px; }
.cancel-box.is-open { display: flex; }
.cancel-box h2 { margin: 0 0 4px; font-size: 16px; }

@font-face {
  font-family: IncomeSans;
  src: url("/static/fonts/consolas.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: IncomeSans;
  src: url("/static/fonts/consolas-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body.theme-income {
  --bg: #000;
  --bg-2: #0b0b0c;
  --panel: #141416;
  --panel-2: #1c1d1f;
  --line: #2a2b2e;
  --line-2: #3a3b40;
  --red: #2688eb;
  --red-2: #5a9eff;
  --red-dim: #1a4d86;
  --text: #e7e8ea;
  --muted: #8b8d91;
  --ok: #4bb34b;
  --bad: #e64646;
  --accent: #2688eb;
  font-family: IncomeSans, Consolas, "Courier New", monospace;
  letter-spacing: 0;
}
body.theme-income .bg {
  background:
    radial-gradient(800px 380px at 10% -10%, rgba(38, 136, 235, .16), transparent 58%),
    linear-gradient(180deg, #0b0b0c, #000);
}
body.theme-income .bg::after { opacity: .12; }
body.theme-income .top {
  background: rgba(10, 10, 12, .92);
  border-bottom-color: var(--line);
}
body.theme-income button, body.theme-income .btn {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  letter-spacing: .04em;
  text-transform: none;
  font-family: inherit;
}
body.theme-income button:hover, body.theme-income .btn:hover {
  background: #3f8ae0;
  border-color: #3f8ae0;
  color: #fff;
  box-shadow: 0 0 10px rgba(38, 136, 235, .28);
}
body.theme-income .ghost-btn,
body.theme-income .btn.ghost-btn {
  background: transparent;
  color: var(--red-2);
}
body.theme-income .card, body.theme-income .stat, body.theme-income table {
  border-color: var(--line);
  background: var(--panel);
}
body.theme-income .tab.active {
  border-color: var(--red);
  color: #fff;
}
body.theme-income .pager .is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
body.theme-income .gold { color: #5a9eff; }
body.theme-income .btn-finish, body.theme-income button.btn-finish {
  background: #4bb34b;
  border-color: #4bb34b;
  color: #fff;
}

body.theme-income * { border-radius: 0 !important; }
body.theme-income button,
body.theme-income .btn,
body.theme-income input,
body.theme-income select,
body.theme-income textarea,
body.theme-income .tab,
body.theme-income .pager a,
body.theme-income .pager span,
body.theme-income .file-btn,
body.theme-income .file-list li,
body.theme-income .alert {
  border-radius: 8px !important;
  border-width: 0.3px !important;
}
body.theme-income {
  font-size: 14px;
}
body.theme-income button,
body.theme-income .btn,
body.theme-income .small,
body.theme-income .btn-cancel,
body.theme-income button.btn-cancel,
body.theme-income .file-btn,
body.theme-income .tab,
body.theme-income .pager a,
body.theme-income .pager span,
body.theme-income input,
body.theme-income select,
body.theme-income textarea {
  font-size: 13px !important;
  line-height: 1.3 !important;
  padding: 8px 14px !important;
  letter-spacing: 0 !important;
  font-weight: 400 !important;
  text-transform: none !important;
  font-family: inherit !important;
}
body.theme-income th,
body.theme-income td,
body.theme-income .cell-main,
body.theme-income .cell-sub,
body.theme-income .muted,
body.theme-income label,
body.theme-income .who,
body.theme-income nav a,
body.theme-income .alert,
body.theme-income .check-text,
body.theme-income .pill,
body.theme-income .balance-chip {
  font-size: 13px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
body.theme-income h1 { font-size: 22px !important; font-weight: 700 !important; }
body.theme-income h2 { font-size: 16px !important; font-weight: 700 !important; }
body.theme-income .stat b { font-size: 20px !important; }
body.theme-income .stat span { font-size: 13px !important; }
body.theme-income .card,
body.theme-income .stat,
body.theme-income .login-card,
body.theme-income .payout-card {
  border-radius: 12px !important;
  border-width: 0.3px !important;
}
body.theme-income table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  border-width: 0.3px !important;
}
body.theme-income table th,
body.theme-income table td {
  border-width: 0 0 1px 0 !important;
  border-style: solid !important;
  border-color: var(--line) !important;
}
body.theme-income table tr:last-child td { border-bottom-width: 0 !important; }
body.theme-income .pill,
body.theme-income .balance-chip {
  border-radius: 999px !important;
  border-width: 0.3px !important;
  font-size: 12px !important;
}

body.theme-income .brand img,
body.theme-income .login-card img {
  -webkit-filter: hue-rotate(204deg);
  filter: hue-rotate(204deg);
}

body.theme-income a.btn,
body.theme-income .actions a,
body.theme-income input[type=submit],
body.theme-income input[type=button] {
  border-radius: 8px !important;
}
#copy-toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--panel); border: 1px solid var(--line-2); color: var(--text);
  padding: 8px 14px; z-index: 20;
}
body.theme-income #copy-toast { border-radius: 8px !important; }

.copy {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  transition: filter .15s ease, color .15s ease;
}
.copy::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  opacity: .45;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.copy:hover { filter: brightness(1.35); color: #fff !important; }
.copy:hover::after { opacity: 1; }
.col-time .cell-main, .col-time .cell-sub { font-size: 12px; }
.pill.closed {
  color: #c6f27a;
  background: rgba(198, 242, 122, .12);
  border: 0;
}
body.theme-income .ghost,
body.theme-income .back-link,
body.theme-income a.ghost {
  border-radius: 8px !important;
  border-width: 0.3px !important;
  color: var(--red-2) !important;
}
body.theme-income .ghost:hover,
body.theme-income .back-link:hover,
body.theme-income a.ghost:hover {
  background: rgba(38, 136, 235, .16) !important;
  color: #fff !important;
  box-shadow: none;
  border-color: var(--red) !important;
}
body.theme-income .pill.closed {
  color: #c6f27a !important;
  background: rgba(198, 242, 122, .14) !important;
  border: 0 !important;
}
body.theme-income .pill.cancelled,
body.theme-income .pill.expired,
.pill.cancelled, .pill.expired {
  background: #5a1d1d;
  color: #ff9b9b;
  border: 0 !important;
}
body.theme-income .copy:hover { filter: brightness(1.45); }

.cell-main, .cell-sub, .cell-rate { display: block; }
.cell-main, .cell-sub { display: block; }
.cell-main.copy, .cell-sub.copy, .copy {
  display: flex;
  align-items: center;
  gap: 4px;
}

.col-req .cell-main, .col-req .cell-sub { display: block; }
.cell-rate { color: var(--muted); font-size: 11px; margin-top: 2px; }

.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 999px !important;
  background: #a8ee75;
  color: #1c5823;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: 0;
}

body.theme-income .nav-badge {
  border-radius: 999px !important;
  background: #a8ee75 !important;
  color: #1c5823 !important;
}

.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 20px; }
.tabs-row .tabs { margin: 0; flex: 1; }
.tab-search { display: flex; gap: 8px; align-items: center; }
.tab-search input[type=search] { width: 220px; margin: 0; padding: 8px 12px; }
.tab-search button { margin: 0; }

body:not(.theme-income) {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}
body:not(.theme-income) button,
body:not(.theme-income) .btn,
body:not(.theme-income) .small,
body:not(.theme-income) .ghost,
body:not(.theme-income) .ghost-btn,
body:not(.theme-income) .back-link,
body:not(.theme-income) .file-btn,
body:not(.theme-income) .tab,
body:not(.theme-income) .pager a,
body:not(.theme-income) .pager span,
body:not(.theme-income) input,
body:not(.theme-income) select,
body:not(.theme-income) textarea,
body:not(.theme-income) .balance-chip {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 8px 14px;
  border-width: 0.5px;
  font-family: inherit;
}
body:not(.theme-income) th,
body:not(.theme-income) td,
body:not(.theme-income) .muted,
body:not(.theme-income) label,
body:not(.theme-income) nav a,
body:not(.theme-income) .who,
body:not(.theme-income) .cell-main,
body:not(.theme-income) .cell-sub,
body:not(.theme-income) .pill,
body:not(.theme-income) .alert {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
body:not(.theme-income) h1 { font-size: 22px; font-weight: 400; }
body:not(.theme-income) h2 { font-size: 16px; font-weight: 400; }
body:not(.theme-income) .stat b { font-size: 20px; }
body:not(.theme-income) .stat span,
body:not(.theme-income) .cell-rate { font-size: 12px; }
body:not(.theme-income) button,
body:not(.theme-income) .btn,
body:not(.theme-income) .ghost,
body:not(.theme-income) .back-link,
body:not(.theme-income) .balance-chip {
  border: 0.5px solid var(--red);
}

.ok, td.ok { color: var(--ok); }

.lim { min-width: 140px; }
.lim-top { font-size: 12px; text-align: right; color: var(--red-2); }
.lim-top.full { color: var(--ok); }
.lim-track { height: 4px; background: #2a2a2a; margin: 6px 0; overflow: hidden; }
.lim-fill { display: block; height: 100%; background: var(--red); }
.lim-fill.full { background: var(--ok); }
.lim-left { font-size: 12px; text-align: right; color: var(--red-2); }
.lim-left.full { color: var(--ok); }
.kebab { position: relative; display: inline-block; }
.kebab > summary { list-style: none; cursor: pointer; padding: 4px 10px; border: 1px solid var(--line-2); color: var(--text); }
.kebab > summary::-webkit-details-marker { display: none; }
.kebab-menu { position: absolute; right: 0; top: 110%; z-index: 20; min-width: 180px; background: #111; border: 1px solid var(--line); padding: 8px; }
.kebab-menu form, .kebab-menu a { display: block; margin: 6px 0; }
.st-wait { color: #f5a623 !important; }
.st-ok { color: #3dcc6d !important; }
.st-bad { color: #ff2d2d !important; }

.balance-chip.debt, .balance-chip.zero { color: var(--bad); }
.debt-label {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid var(--bad);
  color: var(--bad);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.amt-neg { color: var(--bad) !important; }
button:disabled, button[disabled] { opacity: .45; cursor: not-allowed; }

/* RichPay-like finance cards */
.fin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 16px 0 8px;
}
.fin-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
}
.fin-card-title {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
}
.fin-card-value {
  font-size: 28px;
  font-weight: 400;
  color: #fff;
}
.fin-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
}
.fin-actions { display: flex; gap: 8px; margin-top: auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab {
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.tab.active, .tab:hover { color: #fff; border-color: var(--red); }
.pay-box .qr-wrap { margin: 12px 0; }
.qr-img { max-width: 280px; border: 1px solid var(--line-2); background: #fff; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  width: min(440px, 100%);
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  padding: 22px 20px 24px;
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.modal-head h2 { margin: 0; font-size: 18px; color: #fff; }
.modal-x {
  border: none; background: transparent; color: var(--muted);
  font-size: 28px; line-height: 1; padding: 0 6px; cursor: pointer;
  letter-spacing: 0; text-transform: none;
}
.modal-x:hover { color: #fff; box-shadow: none; background: transparent; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }
