*, *::before, *::after { box-sizing: border-box; }
:root { color-scheme: light dark; font-family: system-ui, sans-serif; line-height: 1.5; }
body { max-width: 46rem; margin: 0 auto; padding: 1rem; }
header nav a { margin-right: .25rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: rgba(127, 127, 127, .12); padding: .75rem; }
article { border-top: 1px solid rgba(127, 127, 127, .4); margin-top: 1rem; }
input[type=email], input[type=text], textarea, select { max-width: 100%; font: inherit; }
/* A fieldset defaults to min-width: min-content, so a select with long options (SFK rows) widened the page at 360 px (#29). */
fieldset { min-width: 0; }
label { display: inline-block; margin-right: .5rem; }
.bad { color: #b00020; font-weight: 600; }
form.inline { display: inline; }
form.stack label { display: block; margin: .4rem 0; }
table { border-collapse: collapse; width: 100%; }
/* Wide tables scroll inside their box instead of widening the page on a phone. */
.table-scroll { overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: .3rem .4rem; border-bottom: 1px solid rgba(127, 127, 127, .3); }
td:first-child { white-space: nowrap; }
tr.status-done td, tr.status-skipped td { color: GrayText; }
tr.booking-confirmed td, tr.booking-cancelled td { color: GrayText; }
tr.band-declined td { color: GrayText; }
tr.overdue td { background: rgba(176, 0, 32, .12); }
tr.overdue td:first-child { border-left: 4px solid #b00020; }
.env { color: GrayText; }
.demo-banner { margin: .5rem 0 0; padding: .4rem .6rem; border-left: 4px solid #b26a00; background: rgba(178, 106, 0, .12); }
section.demo { margin-top: 2rem; border-top: 1px solid rgba(127, 127, 127, .4); }
.good { color: #1b7a32; }
table.budget-summary { width: auto; margin: .5rem 0; }
table.budget-summary td, table.budget td:nth-child(3), table.budget td:nth-child(4) { text-align: right; white-space: nowrap; }
table.budget-summary tr.own th, table.budget-summary tr.own td { font-weight: 700; border-top: 2px solid currentColor; }
tr.budget-category th, tr.budget-category td { font-weight: 600; background: rgba(127, 127, 127, .1); }
tr.budget-line td:first-child { padding-left: 1.2rem; white-space: normal; }
form.draft textarea, form.draft input[type=text] { width: 100%; }
.buttons button { margin: 0 .4rem .4rem 0; }
/* Fixed layout + fixed time column: band names line up across stage tables whether or not a row carries "(po půlnoci)". */
table.ro-stage { margin: .5rem 0 1rem; width: 100%; table-layout: fixed; }
table.ro-stage caption { text-align: left; font-weight: 600; padding: .3rem 0; }
table.ro-stage td:first-child { width: 9.5em; }
/* Running order A4: /r/<token>?print=1, /editions/<id>/print, and any page sent to a printer. */
@page { size: A4; margin: 15mm; }
@media print {
  header, footer, nav, form, .env { display: none; }
  body { max-width: none; padding: 0; color: #000; background: #fff; font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
  .ro-day { break-inside: avoid-page; }
  table.ro-stage { break-inside: avoid; }
  .noprint { display: none; }
  table.sfk { break-inside: avoid; }
}
/* SFK application budget (/grants/<id>/sfk). */
table.sfk td:nth-child(3), table.sfk td:nth-child(4), table.grants td:nth-child(2), table.grants td:nth-child(3) { text-align: right; white-space: nowrap; }
table.sfk tr.total th, table.sfk tr.total td { font-weight: 700; }
tr.grant-rejected td { color: GrayText; }
/* Grant final report (/grants/<id>/report): flagged charged lines highlighted, also on paper. */
table.report td:nth-child(4), table.report td:nth-child(5), table.report-sum td:nth-child(2) { text-align: right; white-space: nowrap; }
table.report tr.total th, table.report tr.total td { font-weight: 700; }
tr.flagged td { background: #fff2a8; color: #000; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
body.print { max-width: 190mm; color: #000; background: #fff; font-size: 11pt; }
body.print { color-scheme: light; }
/* OSA (/editions/<id>/osa, /bands/<id>/setlist): sheet labels on the left, playlist box and setlist inputs full width. */
table.osa-sheet th { text-align: left; vertical-align: top; width: 16rem; }
textarea.playlist { width: 100%; font-family: ui-monospace, monospace; }
table.setlist { width: 100%; }
table.setlist input[type=text] { width: 100%; box-sizing: border-box; }
