/* Accounts book (src/accounts.ts): the owner's money in / out, guest supplies, shops, the year. Phone first. */
.acc h1 { margin: 4px 0 0; font-size: 1.5rem; }
.acc h1 .muted { font-size: 1rem; }
.acc-name { margin: 0 0 10px; }
.acc-back { margin: 0; }
.acc section { padding: 18px 0; }
.acc h2 { font-size: 1.25rem; }
.acc-foot { margin-top: 28px; text-align: center; }

.acc-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; max-width: 560px; }
.acc-tabs a, .acc-tabs span { padding: 8px 2px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--deep); text-decoration: none; font-weight: 600; font-size: .86rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-tabs .on { background: var(--deep); border-color: var(--deep); color: #fff; }

.acc-month { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; margin: 4px 0 10px; }
.acc-month a { font-size: 1.6rem; text-decoration: none; line-height: 1; padding: 6px 0; }
.acc-month strong { font-size: 1.1rem; color: var(--deep); }

.acc-add { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.acc-add .btn { min-height: 64px; flex-direction: column; gap: 0; font-size: 1.05rem; border-radius: 16px; }
.acc-add .btn small { font-weight: 400; font-size: .8rem; opacity: .9; }
.acc-out { background: #b3261e; }
.acc-in { background: var(--ok); }

.acc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.acc-tiles > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 8px; min-width: 0; }
.acc-tiles span { display: block; font-size: .76rem; color: var(--muted); }
.acc-tiles b { display: block; font-size: 1.12rem; overflow-wrap: anywhere; }
.acc-tiles .t-in b { color: var(--ok); }
.acc-tiles .t-out b { color: var(--bad); }
.acc-tiles .t-left b { color: var(--deep); }
.acc-tiles .neg b { color: var(--bad); }
.acc-owes { margin: 6px 0; }
.acc-owe { color: var(--bad); }

.acc-low { background: #fff4e0; border: 1px solid #f0d49b; border-radius: 12px; padding: 12px 14px !important; margin: 12px 0; }
.acc-low h2 { margin-bottom: .3em; }
.acc-rep li { margin: 8px 0; }
.acc-paused { border-color: #e7a59f; background: #fdecea; }
.acc-demo { border-color: #c9b6ec; background: #f3eefc; }

.acc-bars { list-style: none; padding: 0; margin: 0; }
.acc-bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin: 10px 0; align-items: baseline; }
.acc-bars progress { grid-column: 1 / -1; width: 100%; height: 10px; -webkit-appearance: none; appearance: none; border: 0; border-radius: 6px; background: #eee9dc; overflow: hidden; }
.acc-bars progress::-webkit-progress-bar { background: #eee9dc; border-radius: 6px; }
.acc-bars progress::-webkit-progress-value { background: var(--accent); border-radius: 6px; }
.acc-bars progress::-moz-progress-bar { background: var(--accent); border-radius: 6px; }

.acc-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.acc-e > a, .acc-e > div { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.acc-e > a:hover { background: #fbf8f1; }
.acc-e .d { color: var(--muted); font-size: .85rem; padding-top: 2px; }
.acc-e .w { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.acc-e .w small { display: block; font-weight: 400; color: var(--muted); font-size: .84rem; }
.acc-e .w small.tg { font-size: .78rem; }
.acc-e .a { font-weight: 700; white-space: nowrap; }
.acc-e.in .a { color: var(--ok); }
.acc-e.out .a { color: var(--bad); }
.acc-e.web > a, .acc-e.web > div { background: #f6faf7; }

.acc-form { max-width: 640px; }
.acc-form .row { margin-bottom: 10px; }
.acc-form > label, .acc-form .acc-gst { margin: 0 0 10px; }
.acc-chips { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 6px; min-width: 0; }
.acc-chips legend { font-weight: 700; color: var(--deep); margin-bottom: 6px; padding: 0; font-size: .92rem; }
.acc-chips label { display: flex; position: relative; font-weight: 400; color: var(--ink); min-width: 0; }
.acc-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; pointer-events: none; }
.acc-chips span { display: block; width: 100%; padding: 7px 10px; border: 1.5px solid #cfc7b4; border-radius: 12px; background: #fff; cursor: pointer; font-size: .88rem; line-height: 1.25; }
.acc-chips span i { display: block; font-style: normal; color: var(--muted); font-size: .74rem; margin-top: 1px; }
.acc-chips input:checked + span { background: var(--deep); color: #fff; border-color: var(--deep); }
.acc-chips input:checked + span i { color: #d9ecea; }
.acc-chips input:focus-visible + span { outline: 3px solid rgba(28,107,100,.35); }
.acc-items { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; background: #fff; }
.acc-items summary { cursor: pointer; font-weight: 700; color: var(--deep); padding: 4px 0; }
.acc-items table { width: 100%; }
.acc-items td input { width: 100%; min-height: 40px; padding: 8px; }
.acc-items td:first-child { width: 55%; }
.acc-photo-row { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acc-photo-row p { flex-basis: 100%; margin: 0; }
.acc-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }

.acc-it, .acc-shop { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--ok); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.acc-it.low { border-left-color: var(--warn); }
.acc-it header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.acc-it h3, .acc-shop h3 { margin: 0; font-size: 1.05rem; }
.acc-it .q { font-weight: 700; white-space: nowrap; color: var(--deep); }
.acc-it p, .acc-shop p { margin: .35em 0; }
.acc-it-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 6px; }
.acc-it-acts .inline input { width: 5.5em; }
.acc-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.acc-new summary, .acc-shop details summary { cursor: pointer; }
.acc-shop { border-left-color: var(--lagoon); }

table.acc-year { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.acc-year th, table.acc-year td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.acc-year th:first-child { text-align: left; }
table.acc-year .neg { color: var(--bad); }
table.acc-year tr.tot th, table.acc-year tr.tot td { font-weight: 700; border-top: 2px solid var(--deep); }

/* the card on the owner page */
.acc-card { border-top: 1px solid var(--line); }
.acc-card.on .acc-mini { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 1.02rem; margin: .3em 0; }
.acc-card .linkbtn.small { font-size: .85rem; }

@media (max-width: 420px) {
  .acc-tiles { gap: 6px; }
  .acc-tiles > div { padding: 8px 7px 6px; }
  .acc-tiles b { font-size: .98rem; }
  .acc-e > a, .acc-e > div { grid-template-columns: 44px minmax(0, 1fr) auto; }
}
@media print {
  .no-print, .acc-add, .acc-tabs, .acc-back, form, .acc-low a.btn { display: none !important; }
  .acc { padding: 0; }
  .acc-e > a, .acc-e > div { break-inside: avoid; }
}
