/* Прокат: то же лёгкое оформление, что в кассе — системные шрифты, без анимаций и картинок. */
* { box-sizing: border-box; }
html { font-size: clamp(12px, 0.6vw + 0.6vh + 2px, 22px); font-family: "Segoe UI", Tahoma, Arial, sans-serif; line-height: 1.35; color: #1b1b1b; background: #f4f2f5; height: 100%; }
body { margin: 0; height: 100%; }
#app { display: flex; flex-direction: column; height: 100%; }
h1 { font-size: 1.375rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.125rem; margin: 0 0 0.625rem; }
h3 { font-size: 1rem; margin: 0.875rem 0 0.375rem; }
p { margin: 0 0 0.625rem; }
[hidden] { display: none !important; }
.pad { padding: 1.25rem; }
.muted { color: #667; }
.small { font-size: 0.813rem; }
.warn { color: #b3261e; }
.ok { color: #1a7f45; }
.b { font-weight: 600; }
.right { text-align: right; }
.grow { flex: 1 1 auto; }

/* шапка */
.top { display: flex; flex-wrap: wrap; align-items: center; background: #7a3b6a; color: #fff; }
.top nav { display: flex; flex-wrap: wrap; flex: 1 1 auto; }
.top nav a { color: #fff; text-decoration: none; padding: 0.875rem 0.813rem; font-size: 1rem; }
.top nav a.active { background: #fff; color: #7a3b6a; text-shadow: 0 0 0.03em currentColor; }
.status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.375rem 0.875rem; font-size: 0.875rem; }
.status .muted { color: #e6d6e2; }
.status .link { color: #fff; border-bottom-color: #e6d6e2; }
.dot::before { content: ""; display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 50%; margin-right: 0.375rem; }
.dot.on::before { background: #5fd38d; }
.dot.off::before { background: #ffb347; }
main { flex: 1 1 auto; min-height: 0; overflow-y: scroll; scrollbar-gutter: stable; padding: 0.875rem; width: 100%; max-width: 87.5rem; margin: 0 auto; }
/* Страница во всю высоту: заголовок и фильтры стоят на месте, прокручивается список. */
.page-col { display: flex; flex-direction: column; height: 100%; }
.page-col > .scroll-x { flex: 1 1 auto; min-height: 0; overflow: auto; }
.page-col > .scroll-x thead th { position: sticky; top: 0; z-index: 1; background: #fff; }

/* кнопки и поля — крупные, под палец */
.btn { font: inherit; min-height: 2.75rem; padding: 0.5rem 1rem; border: 1px solid #b8c0c8; border-radius: 0.25rem; background: #fff; color: #1b1b1b; cursor: pointer; }
.btn:active { background: #e8e3ea; }
.btn:disabled { opacity: .5; }
.btn.primary { background: #7a3b6a; border-color: #7a3b6a; color: #fff; }
.btn.primary:active { background: #5d2c51; }
.btn.danger { color: #b3261e; border-color: #dba7a3; }
.btn.big { min-height: 3.25rem; font-size: 1.125rem; padding: 0.625rem 1.5rem; }
.btn.sq { min-width: 2.75rem; padding: 0; font-size: 1.375rem; line-height: 1; }
.btn.on { background: #7a3b6a; border-color: #7a3b6a; color: #fff; }
.link { font: inherit; background: none; border: 0; border-bottom: 1px dashed #889; padding: 0.25rem 0; cursor: pointer; color: inherit; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], select, textarea {
  font: inherit; min-height: 2.75rem; padding: 0.375rem 0.625rem; border: 1px solid #b8c0c8; border-radius: 0.25rem; background: #fff; width: 100%; }
textarea { min-height: 4.5rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b07aa0; outline-offset: -1px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; margin-bottom: 0.75rem; }
.row.end { justify-content: flex-end; margin-top: 0.75rem; }
.field { display: block; margin-bottom: 0.625rem; }
.field > span { display: block; font-size: 0.875rem; color: #556; margin-bottom: 3px; }
.field.inline { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.field.inline > span { margin: 0; white-space: nowrap; }
.field.inline select, .field.inline input { width: auto; }
.check { display: flex; align-items: center; gap: 0.625rem; min-height: 2.75rem; }
.check input { width: 1.375rem; height: 1.375rem; }
.form2 { display: flex; flex-wrap: wrap; gap: 0 0.75rem; }
.form2 .field { flex: 1 1 11rem; }

/* таблицы */
.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl th { text-align: left; font-size: 0.813rem; font-weight: 600; color: #556; padding: 0.5rem 0.625rem; border-bottom: 2px solid #ddd5db; white-space: nowrap; }
.tbl td { padding: 0.5rem 0.625rem; border-bottom: 1px solid #e8e3e7; vertical-align: middle; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl td.grow { width: 99%; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:active { background: #f0e8ee; }
.tbl tr.late td { background: #fff1ef; }
.tbl .empty { text-align: center; color: #778; padding: 1.75rem 0.625rem; }
.scroll-x { overflow-x: auto; }

/* купальники плитками */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.75rem; align-content: start; }
.tile { background: #fff; border: 1px solid #ddd5db; padding: 0.5rem; text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 0.25rem; }
.tile:active { background: #f6f0f4; }
.tile .pic { width: 100%; aspect-ratio: 3 / 4; background: #f0ecef center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #998; font-size: 0.813rem; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .t { font-weight: 600; line-height: 1.2; }
.chip { display: inline-block; font-size: 0.75rem; padding: 1px 0.5rem; border-radius: 0.625rem; background: #efe9ed; color: #333; white-space: nowrap; }
.chip.free { background: #e4f6ea; color: #14612f; }
.chip.booked { background: #fff2d8; color: #7a5200; }
.chip.out { background: #e6eefb; color: #1a4480; }
.chip.overdue, .chip.late { background: #ffe2de; color: #8c1d14; }
.chip.sold, .chip.retired { background: #e8e8e8; color: #555; }
.chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }

/* карточка купальника */
.card2 { display: flex; flex-wrap: wrap; gap: 0.875rem; }
.card2 .photos { flex: 1 1 12rem; display: flex; flex-wrap: wrap; gap: 0.375rem; align-content: start; }
.card2 .photos .ph { position: relative; width: 100%; }
.card2 .photos img { width: 100%; display: block; border: 1px solid #ddd5db; }
.card2 .photos .del { position: absolute; top: 0.25rem; right: 0.25rem; }
.card2 .facts { flex: 2 1 16rem; min-width: 0; }
.facts dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; margin: 0 0 0.75rem; }
.facts dt { color: #556; font-size: 0.875rem; }
.facts dd { margin: 0; }
.money-big { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.sum-line { display: grid; grid-template-columns: 1fr auto; gap: 2px 0.75rem; }
.sum-line b { text-align: right; }

/* карточки и сводки */
.cards { display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: flex-start; }
.card { flex: 1 1 16rem; background: #fff; border: 1px solid #ddd5db; padding: 0.875rem; min-width: 0; }
.summary { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; background: #fff; border: 1px solid #ddd5db; padding: 0.625rem 0.875rem; margin-bottom: 0.75rem; }
.summary:empty { display: none; }
.notice { background: #fff4e5; border: 1px solid #f0c080; padding: 0.625rem 0.75rem; margin-bottom: 0.75rem; }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; flex-wrap: wrap; }

/* подсказки поиска: свой список вместо <datalist> — в потоке страницы и в стиле программы */
.combo { position: relative; }
.combo-list { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff;
  border: 1px solid #b8c0c8; box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.15); max-height: 13rem; overflow-y: auto; }
.combo-list.open { display: block; }
.combo-item { padding: 0.5rem 0.625rem; cursor: pointer; }
.combo-item:hover { background: #f4ecf2; }
.combo-item:active { background: #e9dce6; }

/* окна */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 0.625rem; overflow-y: auto; z-index: 10; }
.box { background: #fff; width: 100%; max-width: 32.5rem; padding: 1rem; border-radius: 0.25rem; }
.box .btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.625rem; margin-top: 0.875rem; }
.box.np { max-width: 22.5rem; }
.box.wide { max-width: 56.25rem; }
.box .body { max-height: 70vh; overflow-y: auto; }
.box.np .body { max-height: none; overflow: hidden; }
.np-disp { font-size: 2.25rem; font-weight: 700; text-align: right; padding: 0.375rem 0.625rem; border: 1px solid #b8c0c8; border-radius: 0.25rem; min-height: 3.75rem; }
.np-hint { min-height: 1.5rem; text-align: right; color: #1a7f45; font-weight: 600; margin: 0.25rem 0; }
.np-keys { display: flex; flex-wrap: wrap; }
.np-keys .btn { flex: 0 0 33.333%; min-height: 3.75rem; font-size: 1.5rem; border-radius: 0; margin: 0 0 -1px -1px; }

.login { max-width: 23.75rem; margin: 8vh auto; background: #fff; padding: 1.375rem; border: 1px solid #ddd5db; }
.login .btn { width: 100%; }
.err-text { color: #b3261e; min-height: 1.25rem; }

#toasts { position: fixed; left: 0; right: 0; bottom: 0.875rem; display: flex; flex-direction: column; align-items: center; gap: 0.375rem; z-index: 20; pointer-events: none; }
.toast { background: #2c3e50; color: #fff; padding: 0.625rem 1.125rem; border-radius: 0.25rem; max-width: 92vw; }
.toast.err { background: #b3261e; }

/* списки результатов поиска */
.results, .list { background: #fff; margin-bottom: 0.625rem; }
.results { max-height: 45vh; overflow-y: auto; border: 1px solid #ddd5db; }
.results:empty { display: none; }
.result { display: flex; align-items: center; gap: 0.75rem; width: 100%; min-height: 3rem; padding: 0.5rem 0.75rem; font: inherit; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #e8e3e7; cursor: pointer; color: inherit; }
.result:active { background: #f0e8ee; }
