/* Крупно, контрастно, одна колонка. Основной экран — телефон 360px. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 16px 14px 48px;
  font-family: Arial, "Helvetica Neue", sans-serif; font-size: 20px; line-height: 1.45;
  color: #111; background: #fff;
}
main { max-width: 640px; margin: 0 auto; }
h1 { font-size: 28px; line-height: 1.25; margin: 4px 0 18px; }
h2 { font-size: 24px; margin: 0 0 10px; }
p { margin: 0 0 12px; }

.org { font-size: 18px; color: #333; margin-bottom: 6px; }
.stepno { display: inline-block; font-size: 18px; font-weight: bold; color: #fff; background: #333;
          padding: 4px 12px; border-radius: 6px; margin-bottom: 8px; }

label { display: block; font-weight: bold; margin: 14px 0 6px; }
input[type=text], input[type=password] {
  width: 100%; font-size: 26px; padding: 12px 14px; min-height: 60px;
  border: 3px solid #333; border-radius: 8px; background: #fff; color: #000;
}
input[type=text]:focus, input[type=password]:focus { outline: 4px solid #f5b400; outline-offset: 1px; }
input.big { font-size: 34px; text-align: center; letter-spacing: 1px; }
input:disabled { background: #e6e6e6; color: #777; border-color: #999; }

.btn {
  display: block; width: 100%; margin: 22px 0 10px; padding: 16px 14px; min-height: 64px;
  font-size: 24px; font-weight: bold; text-align: center; text-decoration: none;
  color: #fff; background: #0b4f9c; border: none; border-radius: 10px; cursor: pointer;
}
.btn:active { background: #083a73; }
.btn.secondary { background: #fff; color: #0b4f9c; border: 3px solid #0b4f9c; }
.link { display: block; text-align: center; font-size: 20px; color: #0b4f9c; margin: 14px 0; }

.block { border: 3px solid #333; border-radius: 10px; padding: 14px; margin: 0 0 18px; }
.block.skipped { border-style: dashed; border-color: #999; }
.block.skipped .inner { display: none; }
.debt { font-size: 22px; }
.debt b { white-space: nowrap; }
.prev { margin: 4px 0; }
.calc { background: #eef5ff; border-left: 6px solid #0b4f9c; padding: 10px 12px; margin: 12px 0 4px;
        white-space: pre-line; }
.calc:empty { display: none; }

.skip { display: flex; align-items: center; gap: 12px; margin: 10px 0 2px; font-weight: normal; cursor: pointer; }
.skip input { width: 32px; height: 32px; flex: none; margin: 0; }

.error { background: #fde8e8; color: #7a0000; border: 3px solid #b00000; border-radius: 8px;
         padding: 10px 12px; margin: 10px 0; font-weight: bold; }
.warning { background: #fff4cc; color: #4a3500; border: 3px solid #c08a00; border-radius: 8px;
           padding: 10px 12px; margin: 10px 0; font-weight: bold; }
.note { background: #f2f2f2; border-radius: 8px; padding: 12px; margin: 0 0 18px; }
.msgs:empty { display: none; }

.total { font-size: 26px; font-weight: bold; text-align: center; margin: 20px 0 0; }
.total span { white-space: nowrap; }

.code { font-size: 40px; font-weight: bold; text-align: center; letter-spacing: 2px;
        border: 4px solid #111; border-radius: 10px; padding: 10px; margin: 8px 0 18px; }
.qr { text-align: center; margin: 0 0 12px; }
.qr svg { width: 100%; max-width: 320px; height: auto; }
.sum { font-size: 30px; font-weight: bold; text-align: center; margin: 0 0 6px; }
.items { list-style: none; padding: 0; margin: 0 0 16px; text-align: center; }
.howto { font-size: 22px; padding-left: 26px; margin: 0 0 12px; }
.howto li { margin-bottom: 6px; }
textarea.req { width: 100%; font-size: 18px; font-family: inherit; padding: 10px; border: 2px solid #333;
               border-radius: 8px; min-height: 260px; }
.copied { text-align: center; color: #0a5a0a; font-weight: bold; min-height: 1.4em; }
.paid { background: #e6f6e6; border: 3px solid #1a7a1a; color: #0a4a0a; border-radius: 10px;
        padding: 14px; font-size: 24px; font-weight: bold; text-align: center; margin-bottom: 18px; }

/* --- Кабинет казначея --- */
body.admin main { max-width: 900px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
          margin-bottom: 10px; }
.topbar a { font-size: 20px; color: #0b4f9c; font-weight: bold; }
.topbar form { margin: 0; }
.topbar button { font-size: 18px; background: none; border: 2px solid #666; border-radius: 8px; padding: 6px 12px;
                 color: #333; cursor: pointer; }
.bigmenu .btn { min-height: 90px; font-size: 26px; display: flex; align-items: center; justify-content: center; }
.btn.green { background: #1a7a1a; }
.btn.small { min-height: 52px; font-size: 20px; margin: 10px 0; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.btns .btn { flex: 1 1 260px; margin: 0; }
.muted { color: #555; }
.card { border: 3px solid #333; border-radius: 10px; padding: 14px; margin: 0 0 18px; }
.card h2 { margin-top: 0; }
.big-number { font-size: 28px; font-weight: bold; }
table.list { width: 100%; border-collapse: collapse; font-size: 18px; margin: 6px 0 18px; }
table.list th, table.list td { border-bottom: 1px solid #bbb; padding: 8px 6px; text-align: left; vertical-align: top; }
table.list th { background: #f0f0f0; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
.cancelled td { color: #888; text-decoration: line-through; }
.cancelled td.reason { text-decoration: none; }
.scroll { overflow-x: auto; }
select { width: 100%; font-size: 24px; padding: 10px; min-height: 60px; border: 3px solid #333; border-radius: 8px;
         background: #fff; }
textarea.input { width: 100%; font-size: 22px; padding: 10px; border: 3px solid #333; border-radius: 8px; min-height: 90px;
                 font-family: inherit; }
input[type=file] { font-size: 20px; margin: 10px 0; }
.radio { display: flex; align-items: center; gap: 12px; font-weight: normal; margin: 8px 0; }
.radio input { width: 28px; height: 28px; margin: 0; }
.plotrow { display: block; text-decoration: none; color: #111; border: 2px solid #999; border-radius: 10px;
           padding: 10px 14px; margin: 0 0 10px; }
.plotrow b { font-size: 24px; color: #0b4f9c; }
.plotrow .d { font-size: 18px; }
.debt-plus { color: #9b0000; font-weight: bold; }
.debt-minus { color: #0a5a0a; font-weight: bold; }
@media print {
  .noprint, .topbar, .org { display: none !important; }
  body { font-size: 16px; padding: 0; }
}
/* На телефоне таблицы истории — карточками, без прокрутки вбок */
@media (max-width: 600px) {
  table.list.stack, table.list.stack tbody { display: block; }
  table.list.stack tr { display: block; border-bottom: 2px solid #999; padding: 8px 0; }
  table.list.stack tr:first-child { display: none; }
  table.list.stack td { display: block; border: none; padding: 2px 4px; text-align: left; }
  table.list.stack td.num { text-align: left; }
  table.list.stack td:empty { display: none; }
  table.list.stack td[data-l]::before { content: attr(data-l) ": "; color: #555; }
}
