/* Раскладки экранов обзора, кассы и продаж (из макетов web/design). */
.page-header:has(h1.is-hoisted) { display: none; }
@container shell (max-width: 1023px) {
  .av-top { flex-wrap: wrap; height: auto; }
  .av-top__titles { flex: 1 1 160px; }
  .av-top__actions { flex: 1 1 100%; justify-content: flex-start; }
}

.dz-li > * { min-width: 0; }
.dz-li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
a.dz-li:hover, button.dz-li:hover { background: var(--surface-2); }
.dz-attn {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.dz-attn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.dz-attn__top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dz-attn__top > .av-t-label { flex: 1; min-width: 0; }
.dz-attn__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.dz-attn__value { font-family: Tektur, sans-serif; font-weight: 700; font-size: 24px; line-height: 28px; white-space: nowrap; }
.dz-attn__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dz-attn__go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--link); white-space: nowrap; }
.dz-attn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@container content (max-width: 1100px) { .dz-attn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container content (max-width: 560px) { .dz-attn-grid { grid-template-columns: 1fr; } }
button.av-hint {
  all: unset;
  --hint-glyph: var(--surface);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: help;
  flex: none;
  border-radius: var(--radius-full);
  line-height: 0;
}
button.av-hint:focus,
button.av-hint:focus-visible { outline: none; box-shadow: none; }
button.av-hint svg { display: block; width: 14px; height: 14px; }
.av-kpi--instrument button.av-hint,
.av-card--asphalt button.av-hint { --hint-glyph: var(--asphalt); }
.overview-section-title:has(.av-hint) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.av-hint__pop {
  position: fixed;
  z-index: 80;
  width: max-content;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-2);
  font: 400 12px/16px var(--font-sans);
  pointer-events: none;
}
.dz-kpis { display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 16px; }
@container content (max-width: 1100px) {
  .dz-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dz-kpis > :first-child { grid-column: 1 / -1; }
}
.dz-two { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dz-two--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@container content (max-width: 1100px) { .dz-two, .dz-two--even { grid-template-columns: 1fr; } }
.dz-cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
@container content (max-width: 1100px) { .dz-cards3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container content (max-width: 640px) { .dz-cards3 { grid-template-columns: 1fr; } }
.dz-mini { display: flex; flex-direction: column; gap: 6px; }
.dz-big { font-family: Tektur, sans-serif; font-weight: 700; font-size: 28px; line-height: 32px; white-space: nowrap; }
.dz-branch { display: flex; flex-direction: column; gap: 2px; }
.dz-charts { display: flex; flex-direction: column; gap: 12px; }
.dz-charts .av-chart { --h: 96px; }

.sales-page .av-table tr[data-sale-id] { cursor: pointer; }
.sales-page .sale-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(920px, calc(100vw - 32px));
  width: 100%;
}
.sales-page .sale-dialog::backdrop { background: var(--scrim); }
.sales-page .sale-dialog-body {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  max-height: min(86vh, 820px);
  overflow: auto;
}
.sales-page .sale-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}
.sales-page .sale-dialog-head h2 { margin: 0; font: 650 22px/28px var(--font-display); }
.sales-page #sale_dialog_content, .sales-page #debt_dialog_content { padding: 16px 20px 20px; }

body.pos-page .pos-wrap { max-width: none; padding: 0; }
body.pos-page .av-pos__receipt {
  position: relative;
  top: auto;
  align-self: start;
  max-height: none;
  overflow: visible;
  display: flex;
  flex-direction: column;
}
body.pos-page .av-pos__products {
  display: flex;
  flex-direction: column;
  max-height: min(640px, calc(100dvh - var(--topbar-h, 72px) - 32px));
}
body.pos-page .av-pos__products .av-card__body {
  min-height: 0;
  overflow: auto;
}
body.pos-page .av-pos__receipt > .av-receipt {
  flex: none;
  max-height: none;
  overflow: visible;
}
body.pos-page .av-pos__receipt > .av-pay {
  flex: 1 1 auto;
  overflow: visible;
}
body.pos-page .av-pos__full { margin-top: var(--space-5); position: relative; z-index: 1; }
body.pos-page .pos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  gap: 20px;
  align-items: start;
}
body.pos-page .pos-right { position: sticky; top: calc(var(--topbar-h, 72px) + 16px); }
body.pos-page .av-pay .pos-input,
body.pos-page .av-pay select,
body.pos-page .av-pay textarea,
body.pos-page .av-pay input {
  background: var(--asphalt-2);
  color: var(--on-asphalt);
  border-color: #3a3f47;
}
body.pos-page .av-pay,
body.pos-page .av-pay .hint,
body.pos-page .av-pay label,
body.pos-page .av-pay summary {
  color: var(--on-asphalt-2);
}
body.pos-page .av-pay__due-value { color: var(--signal); }
body.pos-page .av-qty input {
  width: 52px;
  border: 0;
  background: transparent;
  text-align: center;
  font: 600 13px/1 var(--font-mono);
  color: inherit;
  padding: 0;
}
body.pos-page .av-qty--liters {
  padding-right: 8px;
  gap: 2px;
}
body.pos-page .av-qty--liters input {
  width: 72px;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}
body.pos-page .av-qty--liters input::-webkit-outer-spin-button,
body.pos-page .av-qty--liters input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body.pos-page .av-qty__unit {
  font: 600 12px/1 var(--font-mono);
  color: var(--ink-3);
}
body.pos-page .av-rline .pos-line-extra { color: var(--ink-2); }
body.pos-page .av-disc > summary { list-style: none; }
body.pos-page .av-disc > summary::-webkit-details-marker { display: none; }
body.pos-page .pos-pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.pos-page .pos-pay-grid #postpone_order_btn,
body.pos-page #postpone_order_btn { grid-column: 1 / -1; }
body.pos-page .pos-services.av-svc-grid { margin-top: 0; }
body.pos-page .av-svc {
  height: auto;
  white-space: normal;
  overflow: hidden;
  align-items: stretch;
  justify-content: space-between;
}
body.pos-page .av-svc__name {
  min-width: 0;
  white-space: normal;
  overflow: hidden;
}
@media (max-width: 1024px) {
  body.pos-page .pos-grid { grid-template-columns: 1fr; }
  body.pos-page .pos-right { position: static; }
}
