:root {
  --bg: #f6f4ee;
  --card: #ffffff;
  --ink: #15201c;
  --muted: #5f6763;
  --line: #dcdcd4;
  --primary: #0e3c33;
  --primary-ink: #ffffff;
  --accent: #d9efe6;
  --warn-bg: #fff5d9;
  --warn-ink: #6b4b00;
  --bad-bg: #fde8e6;
  --bad-ink: #8a1c12;
  --ok-ink: #1b6b4f;
  --input-bg: #fbfaf7;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101513;
    --card: #18201d;
    --ink: #e8ece9;
    --muted: #9aa49f;
    --line: #2c3632;
    --primary: #4fb894;
    --primary-ink: #08130f;
    --accent: #1f3a31;
    --warn-bg: #3a3016;
    --warn-ink: #f2d58a;
    --bad-bg: #3d1d1a;
    --bad-ink: #f5aaa2;
    --ok-ink: #7dd8b5;
    --input-bg: #121916;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }
a { color: var(--primary); }
.muted { color: var(--muted); }

.top { background: var(--primary); color: var(--primary-ink); padding: 28px 0 22px; margin-bottom: 24px; }
@media (prefers-color-scheme: dark) { .top { background: #0e3c33; color: #fff; } }
.brand { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.logo { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.14); font-size: 20px; }
.beta { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.18); padding: 3px 8px; border-radius: 99px; }
.tagline { margin: 6px 0 0; opacity: .88; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; transition: opacity .2s; }
.card[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.card h2 { margin: 0 0 10px; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--primary); font-size: 14px; font-weight: 700; }
.card > p { margin: 0 0 14px; }

.drop { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; background: var(--input-bg); }
.drop:hover, .drop.over { border-color: var(--primary); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--primary); color: var(--primary-ink); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--accent); color: var(--primary); }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn.big { width: 100%; padding: 14px; font-size: 17px; }

.status { margin-top: 14px; border-radius: 10px; padding: 12px 14px; background: var(--accent); }
.status.warn { background: var(--warn-bg); color: var(--warn-ink); }
.status.bad { background: var(--bad-bg); color: var(--bad-ink); }
.status ul { margin: 6px 0 0; padding-left: 20px; }
.status p { margin: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=date], input[type=number], input[type=search] {
  font: inherit; font-weight: 400; color: var(--ink); background: var(--input-bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%;
}
input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.toggle { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; }
.toggle legend { font-size: 14px; font-weight: 600; padding: 0 4px; }
.toggle label { flex-direction: row; align-items: center; font-weight: 400; gap: 8px; }

.who-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.who-tools input { max-width: 260px; }
.table-wrap { overflow-x: auto; }
table.who { width: 100%; border-collapse: collapse; font-size: 15px; }
.who th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.who td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.who tfoot td { font-weight: 700; border-bottom: 0; }
.num-col { text-align: right; white-space: nowrap; }
.who input[type=number] { width: 96px; text-align: right; padding: 6px 8px; }
.who td.num-col { padding-top: 14px; }
.who td:first-child { width: 28px; padding-top: 12px; }
.who input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.who tr.off td:not(:first-child):not(:nth-child(2)) { opacity: .35; }
.who tr.hidden { display: none; }
.who .name { font-weight: 600; }
.who .sub { font-size: 13px; color: var(--muted); }
.who .issue { font-size: 13px; color: var(--bad-ink); }
.who .note { font-size: 13px; color: var(--warn-ink); }
.hint { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--muted); font-size: 10px; margin-left: 4px; cursor: help; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--primary); margin-left: 6px; vertical-align: 1px; }

.ok-line { color: var(--ok-ink); font-weight: 700; margin: 16px 0 8px; }
.files { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.file { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.file:hover { border-color: var(--primary); }
.file small { display: block; color: var(--muted); font-size: 13px; }
.file[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.ext { flex: none; width: 46px; height: 46px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: 12px; font-weight: 800; }

.notes { padding: 8px 4px 0; font-size: 14px; color: var(--muted); }
.notes h3 { color: var(--ink); font-size: 15px; margin: 16px 0 4px; }
.notes ul { padding-left: 18px; }
.foot { padding: 20px 16px 40px; font-size: 14px; border-top: 1px solid var(--line); margin-top: 24px; }
.foot p { margin: 0 0 6px; }
.foot .maker { font-weight: 600; }
.foot .small { font-size: 12px; margin-top: 10px; }

@media (max-width: 600px) {
  .card { padding: 16px; }
  /* Each musician becomes a small card: name on top, fee and expenses side by side, then super and bank. */
  .who thead { display: none; }
  .who, .who tbody, .who tfoot { display: block; }
  .who tr { display: grid; grid-template-columns: 26px 1fr 1fr; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .who td, .who td:first-child { border: 0; padding: 0; width: auto; }
  .who td:nth-child(2) { grid-column: 2 / 4; }
  .who td:nth-child(3), .who td:nth-child(5) { grid-column: 2; }
  .who td:nth-child(4), .who td:nth-child(6) { grid-column: 3; }
  .who td.num-col { text-align: left; padding-top: 0; }
  .who td.num-col::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
  .who input[type=number] { width: 100%; text-align: left; }
  .who tr.off td:nth-child(n+3) { display: none; }
}
.status p.gap { margin-top: 8px; }
