﻿:root {
  color-scheme: dark;
  --bg: #090b0f;
  --panel: #111821;
  --panel-strong: #0d1219;
  --ink: #f8f3ec;
  --muted: #a7adb7;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #45bdf4;
  --good: #45d68f;
  --danger: #ff796c;
  --control-height: 44px;
  --control-radius: 8px;
  --control-bg: rgba(17, 24, 33, 0.92);
  --control-bg-hover: rgba(21, 31, 42, 0.98);
  --control-border: rgba(69, 189, 244, 0.26);
  --control-border-focus: rgba(69, 189, 244, 0.54);
  --control-shadow-focus: 0 0 0 3px rgba(69, 189, 244, 0.13);
  --button-bg: rgba(69, 189, 244, 0.1);
  --button-bg-hover: rgba(69, 189, 244, 0.16);
  --button-bg-active: rgba(69, 189, 244, 0.22);
  --button-border: rgba(69, 189, 244, 0.34);
  --button-border-hover: rgba(69, 189, 244, 0.62);
  --button-ink: #9bdfff;
  --button-primary-bg: rgba(69, 214, 143, 0.16);
  --button-primary-bg-hover: rgba(69, 214, 143, 0.23);
  --button-primary-bg-active: rgba(69, 214, 143, 0.3);
  --button-primary-border: rgba(69, 214, 143, 0.48);
  --button-primary-border-hover: rgba(69, 214, 143, 0.76);
  --button-primary-ink: #baf6d2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(69, 189, 244, 0.17), transparent 34%),
    linear-gradient(145deg, #070a0e 0%, #111923 58%, #090c10 100%);
  color: var(--ink);
}

html[data-portrait-fallback="cw"],
html[data-portrait-fallback="ccw"],
body[data-portrait-fallback="cw"],
body[data-portrait-fallback="ccw"] {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

html[data-portrait-fallback="cw"] .app-root,
html[data-portrait-fallback="ccw"] .app-root {
  position: fixed;
  width: 100vh;
  height: 100vw;
  min-width: 320px;
  min-height: 100vw;
  max-width: none;
  overflow: hidden;
  background: var(--bg);
}

html[data-portrait-fallback="cw"] .app-root {
  top: -100vw;
  left: 0;
  transform-origin: bottom left;
  transform: rotate(90deg);
}

html[data-portrait-fallback="ccw"] .app-root {
  top: 0;
  left: -100vh;
  transform-origin: top right;
  transform: rotate(-90deg);
}

button,
input,
select {
  font: inherit;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.date-field {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 0 12px;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  background-color: var(--control-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  outline: none;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #9bdfff 50%),
    linear-gradient(135deg, #9bdfff 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% + 1px),
    calc(100% - 12px) calc(50% + 1px);
  background-repeat: no-repeat;
  background-size: 6px 6px;
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover,
.date-field:hover {
  border-color: rgba(69, 189, 244, 0.4);
  background-color: var(--control-bg-hover);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus,
.date-field:focus {
  border-color: var(--control-border-focus);
  box-shadow: var(--control-shadow-focus);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.82;
}

select option,
option {
  background: var(--panel);
  color: var(--ink);
}

button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--button-border);
  border-radius: var(--control-radius);
  background: var(--button-bg);
  color: var(--button-ink);
  font: inherit;
  font-weight: 950;
  text-align: center;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 120ms ease;
}

button:not(.floor-item):not(:disabled):hover {
  border-color: var(--button-border-hover);
  background-color: var(--button-bg-hover);
  box-shadow: 0 10px 28px rgba(69, 189, 244, 0.12);
  transform: translateY(-1px);
}

button:not(.floor-item):not(:disabled):active {
  background-color: var(--button-bg-active);
  box-shadow: 0 4px 14px rgba(69, 189, 244, 0.1);
  transform: translateY(0);
}

.date-field,
.time-field {
  cursor: pointer;
}

.date-popover,
.time-popover {
  position: fixed;
  z-index: 500;
  width: 286px;
  padding: 10px;
  border: 1px solid rgba(69, 189, 244, 0.34);
  border-radius: 10px;
  background: rgba(12, 18, 25, 0.98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

.date-head {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.date-head strong {
  color: var(--ink);
  text-align: center;
}

.date-head button,
.date-grid button {
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.08);
  color: #d7f1ff;
  font-weight: 900;
}

.date-head button {
  min-height: 34px;
  font-size: 1.25rem;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.date-weekdays {
  margin-bottom: 5px;
}

.date-weekdays span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.date-grid button {
  min-width: 0;
  min-height: 32px;
}

.date-grid button.is-selected {
  border-color: rgba(69, 214, 143, 0.72);
  background: rgba(69, 214, 143, 0.22);
  color: #baf6d2;
}

.time-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.time-head strong,
.time-popover p {
  margin: 0;
  color: var(--ink);
  font-weight: 950;
}

.time-popover p {
  margin: 9px 0 6px;
  color: var(--accent);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.time-head button,
.time-grid button,
.time-apply {
  min-height: 32px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.08);
  color: #d7f1ff;
  font-weight: 900;
}

.time-grid {
  display: grid;
  gap: 5px;
}

.time-grid-hours,
.time-grid-minutes {
  grid-template-columns: repeat(6, 1fr);
}

.time-grid button.is-selected {
  border-color: rgba(69, 214, 143, 0.72);
  background: rgba(69, 214, 143, 0.22);
  color: #baf6d2;
}

.time-apply {
  width: 100%;
  margin-top: 10px;
  border-color: rgba(69, 214, 143, 0.48);
  background: rgba(69, 214, 143, 0.16);
  color: #baf6d2;
}

@media (max-width: 760px), (pointer: coarse) {
  .date-popover.is-mobile-picker,
  .time-popover.is-mobile-picker {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    top: auto;
    width: auto;
    max-height: min(78dvh, calc(100vh - 20px));
    overflow-y: auto;
    padding: 14px;
    border-radius: 12px;
    z-index: 1600;
    overscroll-behavior: contain;
  }

  .date-popover.is-mobile-picker {
    max-height: min(70dvh, calc(100vh - 20px));
  }

  .date-popover.is-mobile-picker .date-head {
    grid-template-columns: 48px 1fr 48px;
  }

  .date-popover.is-mobile-picker .date-head button,
  .date-popover.is-mobile-picker .date-grid button,
  .time-popover.is-mobile-picker .time-head button,
  .time-popover.is-mobile-picker .time-grid button,
  .time-popover.is-mobile-picker .time-apply {
    min-height: 48px;
    border-radius: 9px;
    font-size: 1rem;
  }

  .date-popover.is-mobile-picker .date-grid,
  .time-popover.is-mobile-picker .time-grid {
    gap: 8px;
  }

  .time-popover.is-mobile-picker .time-grid-hours,
  .time-popover.is-mobile-picker .time-grid-minutes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .time-popover.is-mobile-picker .time-head strong {
    font-size: 1.28rem;
  }

  .time-popover.is-mobile-picker .time-apply {
    position: sticky;
    bottom: 0;
    margin-top: 12px;
  }
}

.connection-banner {
  position: fixed;
  left: 50%;
  top: 9px;
  bottom: auto;
  z-index: 200;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  padding: 11px 14px;
  border: 1px solid rgba(255, 121, 108, 0.45);
  border-radius: 9px;
  background: rgba(30, 12, 14, 0.96);
  color: #ffd1cc;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  font-weight: 900;
  text-align: center;
}

.connection-banner[hidden] {
  display: none;
}

.app-toast {
  top: auto;
  bottom: 12px;
  border-color: rgba(69, 214, 143, 0.45);
  background: rgba(8, 54, 37, 0.96);
  color: #caffdf;
}

.status-banner {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.08);
  color: #d7dce5;
  font-weight: 900;
}

.status-banner.is-online {
  border-color: rgba(69, 214, 143, 0.42);
  background: rgba(69, 214, 143, 0.1);
  color: #baf6d2;
}

.status-banner.is-offline {
  border-color: rgba(255, 121, 108, 0.48);
  background: rgba(255, 121, 108, 0.1);
  color: #ffd1cc;
}

.boot-screen,
.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 18px;
  max-width: 100vw;
  overflow-x: hidden;
}

.boot-screen {
  gap: 8px;
  color: var(--muted);
}

.boot-screen img {
  width: 82px;
  height: 82px;
}

.panel {
  width: min(440px, 100%);
  max-width: 100%;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 10px;
  background: rgba(17, 24, 33, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.object-shell .panel {
  width: min(1120px, 100%);
}

.object-select-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}

.object-select-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
}

.object-select-topbar .top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.object-select-content {
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(90vw, 1420px);
  margin: 18px auto 28px;
  min-width: 0;
}

.panel-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.login-form,
.object-list {
  display: grid;
  gap: 12px;
}

.object-actions {
  margin: 12px 0;
}

.object-chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 9px;
  background: rgba(9, 30, 42, 0.48);
  min-width: 0;
  max-width: 100%;
}

.object-chart-toolbar > div:first-child {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.object-chart-toolbar span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.object-chart-reference {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.object-chart-reference-control {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.object-chart-reference small {
  color: var(--muted);
  font-weight: 950;
}

.object-chart-reference input,
.object-chart-reference-label {
  min-height: 38px;
  width: min(190px, 44vw);
  padding: 8px 11px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--input-ink);
  font: inherit;
  font-weight: 900;
}

.object-chart-reference-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(230px, 48vw);
  width: auto;
  white-space: nowrap;
}

.object-chart-source {
  display: grid;
  grid-template-columns: auto minmax(160px, 210px);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.object-chart-source small {
  color: var(--muted);
  font-weight: 950;
}

.object-chart-source select[data-object-chart-source] {
  min-height: 38px;
  width: 100%;
  min-width: 0;
  padding: 0 38px 0 12px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background-color: var(--control-bg);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(69, 189, 244, 0.06);
}

.object-chart-reference button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--button-border);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-ink);
  font: inherit;
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.object-chart-reference button:hover {
  border-color: rgba(118, 218, 255, 0.82);
  background: rgba(17, 71, 96, 0.82);
}

.object-chart-filter-wrap {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.object-list {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.object-select-content .object-card {
  width: 100%;
}

.object-card-chart {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(69, 189, 244, 0.14);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.object-card-chart-empty {
  min-height: 84px;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.object-card-chart-empty.is-error {
  color: var(--danger-ink);
}

.object-card-chart-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.object-card-chart-meta span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.object-card-chart-meta strong {
  color: var(--success-ink);
  font-size: 1.05rem;
}

.object-card-chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(36px, 1fr);
  align-items: end;
  gap: 5px;
  min-height: 120px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding: 2px 0;
}

.object-card-chart-bars em {
  align-self: center;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.object-card-chart-column {
  display: grid;
  position: relative;
  grid-template-rows: 1fr auto;
  gap: 3px;
  min-width: 36px;
  min-height: 112px;
  text-align: center;
}

.object-card-chart-column em {
  position: absolute;
  left: 50%;
  top: calc(50% - 8px);
  z-index: 2;
  max-height: 78px;
  color: var(--success-ink);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  writing-mode: vertical-rl;
  transform: translate(-50%, -50%) rotate(180deg);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(4, 10, 16, 0.85);
}

.object-card-chart-column i {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: center;
  width: 70%;
  height: var(--bar-height, 4%);
  min-height: 3px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(68, 225, 154, 0.92), rgba(69, 189, 244, 0.76));
  box-shadow: 0 0 12px rgba(68, 225, 154, 0.18);
}

.object-card-chart-column b {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
}

@media (max-width: 640px) {
  .object-shell {
    padding: 12px;
  }

  .object-select-shell {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .object-select-content {
    margin-bottom: 0;
    min-height: 0;
  }

  .object-shell .panel {
    padding: 14px;
  }

  .object-select-topbar {
    align-items: flex-start;
  }

  .object-select-topbar .top-actions {
    gap: 6px;
  }

  .object-select-topbar .top-button {
    min-height: 38px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .object-chart-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .object-chart-filter-wrap,
  .object-chart-toolbar .dashboard-chart-filters {
    justify-content: stretch;
  }

  .object-chart-toolbar .dashboard-chart-filters button {
    flex: 1 1 calc(50% - 5px);
    min-height: 36px;
    padding: 7px 9px;
  }

  .object-chart-reference {
    display: grid;
    gap: 5px;
    width: 100%;
  }

  .object-chart-reference-control {
    width: 100%;
  }

  .object-chart-reference-control {
    gap: 5px;
  }

  .object-chart-reference small {
    font-size: 0.72rem;
  }

  .object-chart-reference input,
  .object-chart-reference-label {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 8px;
    font-size: 0.86rem;
    text-align: center;
  }

  .object-chart-reference button {
    min-width: 34px;
    min-height: 36px;
    padding: 6px 8px;
  }

  .object-chart-source {
    display: grid;
    gap: 5px;
    width: 100%;
  }

  .object-chart-source small {
    font-size: 0.72rem;
  }

  .object-chart-source select[data-object-chart-source] {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0 34px 0 10px;
    font-size: 0.86rem;
  }

  .object-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .object-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .object-card-chart-meta {
    align-items: flex-start;
  }

  .object-card-chart-meta strong {
    font-size: 0.96rem;
    white-space: nowrap;
  }

  .object-card-chart-bars {
    grid-auto-columns: minmax(30px, 1fr);
    gap: 4px;
    min-height: 118px;
  }

  .object-card-chart-column {
    min-width: 30px;
  }

  .object-card-chart-column em,
  .object-card-chart-column b {
    font-size: 0.56rem;
  }

  .object-card-chart-column em {
    top: calc(50% - 7px);
    max-height: 70px;
  }
}

.login-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.login-company-logo {
  width: min(106px, 36vw);
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.login-contact {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  font-size: 0.78rem;
  line-height: 1.25;
  font-weight: 900;
}

.login-contact a {
  color: var(--accent);
  text-decoration: none;
}

.login-contact a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.login-app-brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 8px 0 16px;
  text-align: center;
}

.login-app-brand img {
  width: 126px;
  height: 126px;
  object-fit: contain;
}

.login-app-brand p {
  margin: 0;
  color: var(--accent);
  font-size: 1.06rem;
  font-weight: 950;
  text-transform: uppercase;
}

.login-app-brand strong {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.2;
}

.login-update-stack {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-top: -2px;
}

.login-version-update {
  appearance: none;
  margin: -2px 0 0;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: rgba(188, 236, 255, 0.72);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  cursor: pointer;
}

.login-version-update:hover,
.login-version-update:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
  outline: none;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 850;
}

.login-form input {
  min-height: 48px;
}

.device-code {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.device-panel {
  align-items: center;
  text-align: center;
}

.company-login-logo {
  width: min(190px, 70vw);
  height: auto;
  max-height: 130px;
  object-fit: contain;
}

.device-id-label {
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.device-id-value {
  display: block;
  width: 100%;
  color: var(--ink);
  font-size: clamp(0.86rem, 2.6vw, 1.05rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.device-qr-wrap {
  display: grid;
  place-items: center;
  width: min(184px, 58vw);
  min-height: min(184px, 58vw);
  margin: 10px auto 8px;
  padding: 10px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 10px;
  background: rgba(6, 10, 15, 0.58);
}

.device-qr {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.device-qr-placeholder,
.device-token-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.35;
}

.device-token-note {
  margin: 0 auto 8px;
  max-width: 300px;
}

.device-token-box {
  display: grid;
  gap: 7px;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px;
  border: 1px solid rgba(69, 214, 143, 0.22);
  border-radius: 8px;
  background: rgba(69, 214, 143, 0.07);
  text-align: left;
}

.device-token-box[hidden] {
  display: none;
}

.device-token-box span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.device-token-box strong {
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.compact-button {
  min-height: 36px;
  justify-self: start;
}

.device-message {
  margin: 8px 0 0;
}

.device-contact {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.device-contact a {
  color: var(--accent);
  font-weight: 950;
  text-decoration: none;
}

.device-contact a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.primary-button,
.object-card,
.top-button {
  min-height: 46px;
  border-color: var(--button-border);
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 950;
}

.primary-button {
  border-color: var(--button-primary-border);
  background: var(--button-primary-bg);
  color: var(--button-primary-ink);
}

button.primary-button:not(:disabled):hover,
.primary-button:not(:disabled):hover {
  border-color: var(--button-primary-border-hover);
  background-color: var(--button-primary-bg-hover);
  box-shadow: 0 10px 28px rgba(69, 214, 143, 0.14);
}

button.primary-button:not(:disabled):active,
.primary-button:not(:disabled):active {
  background-color: var(--button-primary-bg-active);
}

.object-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  text-align: left;
}

button.object-card {
  display: grid;
  place-items: initial;
  gap: 4px;
  padding: 14px;
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

button.object-card:not(:disabled):hover,
button.module-card:not(:disabled):hover,
button.product-card:not(:disabled):hover {
  border-color: rgba(69, 189, 244, 0.44);
  background-color: rgba(69, 189, 244, 0.09);
  box-shadow: 0 14px 34px rgba(69, 189, 244, 0.11);
  transform: translateY(-1px);
}

button.object-card:not(:disabled):active,
button.module-card:not(:disabled):active,
button.product-card:not(:disabled):active {
  background-color: rgba(69, 189, 244, 0.13);
  transform: translateY(0);
}

.object-card small,
.muted {
  color: var(--muted);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-content: start;
  padding: 16px;
  overflow: auto;
}

.module-grid.is-compact-menu {
  grid-template-columns: repeat(auto-fill, 170px);
  justify-content: start;
}

.module-grid.is-reorderable .module-card {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.module-grid.is-reorderable .module-card.is-dragging {
  cursor: grabbing;
  opacity: 0.68;
  border-color: rgba(80, 255, 180, 0.68);
  background: rgba(27, 62, 58, 0.86);
  box-shadow: 0 16px 38px rgba(80, 255, 180, 0.14);
  pointer-events: none;
}

.module-placeholder {
  min-height: 112px;
  border: 1px dashed rgba(80, 255, 180, 0.62);
  border-radius: 9px;
  background: rgba(80, 255, 180, 0.08);
  box-shadow: inset 0 0 0 1px rgba(80, 255, 180, 0.06);
}

.module-grid.is-reorderable.is-dragging .module-card:not(.is-dragging) {
  transition: transform 120ms ease, border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.module-card {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.88);
  color: var(--ink);
  text-align: left;
}

button.module-card {
  display: grid;
  place-items: initial;
  gap: 8px;
  align-content: center;
  justify-items: start;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.88);
  color: var(--ink);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

button.module-card[hidden] {
  display: none !important;
}

.module-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.module-card strong {
  font-size: 1rem;
}

.dashboard-chart-panel {
  display: grid;
  gap: 12px;
  margin: 16px 16px 0;
  padding: 14px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(18, 48, 59, 0.92), rgba(13, 22, 31, 0.94)),
    rgba(17, 24, 33, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.dashboard-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.dashboard-chart-head span,
.dashboard-chart-head p {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-chart-head h2 {
  margin: 4px 0;
  font-size: clamp(1.25rem, 2vw, 2rem);
}

.dashboard-chart-head p {
  color: var(--muted);
  text-transform: none;
}

.dashboard-chart-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-chart-filters button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(69, 189, 244, 0.32);
  border-radius: 8px;
  background: rgba(9, 30, 42, 0.84);
  color: var(--button-secondary-text);
  font-weight: 950;
}

.dashboard-chart-filters button.is-active {
  border-color: rgba(68, 225, 154, 0.72);
  background: rgba(20, 76, 58, 0.82);
  color: var(--button-primary-text);
}

.dashboard-chart-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(68, 225, 154, 0.28);
  border-radius: 8px;
  background: rgba(14, 54, 44, 0.74);
}

.dashboard-chart-summary span {
  color: var(--accent);
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-chart-summary strong {
  margin-left: auto;
  color: var(--success-ink);
  font-size: 1.45rem;
}

.dashboard-chart-summary small {
  color: var(--muted);
  font-weight: 900;
}

.dashboard-chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(54px, 1fr);
  gap: 8px;
  min-height: 190px;
  overflow-x: auto;
  padding: 4px 2px 2px;
}

.dashboard-chart-column {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 5px;
  min-width: 54px;
  text-align: center;
}

.dashboard-chart-bar-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 132px;
  border: 1px solid rgba(69, 189, 244, 0.12);
  border-radius: 8px;
  background: rgba(5, 14, 21, 0.42);
  overflow: hidden;
}

.dashboard-chart-bar {
  display: block;
  width: 72%;
  height: var(--bar-height, 2%);
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, rgba(68, 225, 154, 0.96), rgba(69, 189, 244, 0.82));
  box-shadow: 0 0 18px rgba(68, 225, 154, 0.24);
}

.dashboard-chart-column strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.dashboard-chart-column small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.dashboard-chart-empty {
  display: grid;
  min-height: 90px;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.dashboard-chart-empty.is-error {
  color: var(--danger-ink);
}

.admin-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  padding: 14px;
  overflow: auto;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.82);
}

.admin-head h2 {
  margin: 0;
}

.admin-head-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.head-filter {
  display: block;
  min-width: 190px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.head-filter select {
  min-height: var(--control-height);
}

.admin-head-actions .compact {
  min-width: 76px;
}

.compact {
  min-height: var(--control-height);
  padding: 0 14px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.88);
}

.admin-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-weight: 850;
}

.admin-form label > span,
.report-filter label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  min-height: var(--control-height);
}

.admin-form option {
  background: var(--panel);
  color: var(--ink);
}

.admin-form .check-row {
  display: flex;
  flex-direction: row;
  gap: 9px;
  align-items: center;
  align-self: end;
  justify-content: flex-start;
  min-height: 44px;
  padding: 4px 0;
  color: #d7dce5;
  line-height: 1.18;
  text-align: left;
}

.admin-form .check-row input {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: #45bdf4;
}

.form-actions,
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.admin-form > .form-actions {
  grid-column: 1 / -1;
}

.form-actions .primary-button,
.form-actions .top-button,
.modal-form-actions .primary-button,
.modal-form-actions .top-button {
  min-height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(69, 189, 244, 0.16);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.06);
}

.admin-row div:first-child {
  display: grid;
  gap: 3px;
}

.admin-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.88);
}

.detail-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.detail-table th,
.detail-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(69, 189, 244, 0.13);
  text-align: left;
  vertical-align: middle;
}

.detail-table th {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.18;
  text-transform: uppercase;
  background: rgba(69, 214, 143, 0.06);
}

.detail-table tbody tr:hover {
  background: rgba(69, 189, 244, 0.06);
}

.detail-table tr:last-child td {
  border-bottom: 0;
}

.detail-table .numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.detail-table .actions-cell {
  text-align: right;
  white-space: nowrap;
}

.detail-table td strong {
  overflow-wrap: anywhere;
}

.detail-table td small {
  display: block;
  margin-top: 4px;
  color: #9bdfff;
  font-size: 0.78rem;
  line-height: 1.25;
}

.detail-table tfoot th {
  border-bottom: 0;
  border-top: 1px solid rgba(69, 214, 143, 0.28);
  color: #baf6d2;
  background: rgba(69, 214, 143, 0.1);
}

.detail-table .is-negative {
  color: var(--danger);
}

.detail-table .is-positive {
  color: #facc15;
}

.product-form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.product-form .form-actions,
.stock-form .form-actions {
  grid-column: 1 / -1;
}

.stock-form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.product-row {
  align-items: center;
}

.admin-list.is-reorderable .product-row {
  cursor: grab;
}

.admin-list.is-reorderable .product-row:active {
  cursor: grabbing;
}

.product-row.is-dragging {
  border-color: rgba(69, 214, 143, 0.72);
  background: rgba(69, 214, 143, 0.13);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  opacity: 0.72;
}

.product-summary {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
}

.product-summary.no-image {
  grid-template-columns: minmax(0, 1fr);
}

.product-summary img,
.product-mini-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.1);
  object-fit: contain;
}

.product-summary strong {
  overflow-wrap: anywhere;
}

.admin-total {
  position: sticky;
  top: 0;
  z-index: 2;
}

.balance-group {
  display: grid;
  gap: 8px;
}

.balance-group h3 {
  margin: 8px 0 0;
  color: var(--accent);
}

.balance-filter {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

.stock-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.88);
}

.stock-balance-table {
  width: 100%;
  min-width: 1415px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.stock-balance-table .balance-col-code {
  width: 80px;
}

.stock-balance-table .balance-col-name {
  width: 210px;
}

.stock-balance-table .balance-col-type {
  width: 150px;
}

.stock-balance-table .balance-col-unit {
  width: 125px;
}

.stock-balance-table .balance-col-price {
  width: 135px;
}

.stock-balance-table .balance-col-qty {
  width: 95px;
}

.stock-balance-table .balance-col-total-out {
  width: 125px;
}

.stock-balance-table .balance-col-saldo {
  width: 120px;
}

.stock-balance-table th,
.stock-balance-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(69, 189, 244, 0.13);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.stock-balance-table th {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
  background: rgba(69, 214, 143, 0.06);
}

.stock-balance-table tbody tr:hover {
  background: rgba(69, 189, 244, 0.06);
}

.stock-balance-table .numeric {
  text-align: right;
  white-space: nowrap;
}

.stock-balance-table td strong {
  overflow-wrap: anywhere;
}

.stock-balance-table tfoot th {
  border-bottom: 0;
  border-top: 1px solid rgba(69, 214, 143, 0.28);
  color: #baf6d2;
  background: rgba(69, 214, 143, 0.1);
}

.stock-balance-table .is-negative {
  color: var(--danger);
}

.movement-table-wrap {
  margin-top: 12px;
}

.movement-detail-table {
  min-width: 1180px;
  table-layout: fixed;
}

.movement-detail-table th:nth-child(1),
.movement-detail-table td:nth-child(1) {
  width: 128px;
}

.movement-detail-table th:nth-child(2),
.movement-detail-table td:nth-child(2) {
  width: 128px;
}

.movement-detail-table th:nth-child(3),
.movement-detail-table td:nth-child(3) {
  width: 150px;
}

.movement-detail-table th:nth-child(4),
.movement-detail-table td:nth-child(4) {
  width: 90px;
}

.movement-detail-table th:nth-child(5),
.movement-detail-table td:nth-child(5) {
  width: 230px;
}

.movement-detail-table th:nth-child(6),
.movement-detail-table td:nth-child(6) {
  width: 150px;
}

.movement-detail-table th:nth-child(9),
.movement-detail-table td:nth-child(9) {
  width: 130px;
}

.admin-row > strong {
  white-space: nowrap;
  color: #baf6d2;
}

.admin-row > strong.is-negative {
  color: var(--danger);
}

.fiscal-command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.fiscal-command-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.88);
}

.fiscal-command-card > div:first-child {
  display: grid;
  gap: 5px;
}

.fiscal-command-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.fiscal-command-card strong {
  font-size: 1.05rem;
}

.fiscal-command-card small {
  color: var(--muted);
  line-height: 1.35;
}

.fiscal-inline-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.fiscal-found-invoice {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(69, 214, 143, 0.28);
  border-radius: 8px;
  background: rgba(69, 214, 143, 0.08);
}

.fiscal-found-invoice span {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: none;
}

.fiscal-history-panel {
  padding: 0;
  overflow: visible;
}

.danger-action {
  border-color: rgba(255, 121, 108, 0.48);
  background: rgba(255, 121, 108, 0.13);
  color: #ffd0cc;
}

button.danger-action:not(:disabled):hover {
  border-color: rgba(255, 121, 108, 0.76);
  background: rgba(255, 121, 108, 0.2);
}

.movement-filter {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.movement-row {
  align-items: start;
}

.audit-row {
  align-items: start;
}

.audit-row small {
  color: var(--muted);
  white-space: nowrap;
}

.table-history-panel .admin-head {
  align-items: stretch;
}

.table-history-filter {
  flex: 1;
  margin: 0;
}

.table-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 9px;
  background: rgba(18, 50, 62, 0.54);
}

.table-history-summary span,
.table-history-summary strong {
  color: var(--mint);
  font-weight: 950;
}

.table-history-list {
  gap: 10px;
}

.table-history-log {
  display: grid;
  gap: 8px;
}

.table-history-log-head,
.table-history-log-row {
  display: grid;
  grid-template-columns: 150px 120px 180px minmax(280px, 1fr) 110px 230px;
  gap: 12px;
  align-items: start;
}

.table-history-log-head {
  padding: 11px 12px;
  border: 1px solid rgba(70, 211, 150, 0.2);
  border-radius: 8px;
  background: rgba(70, 211, 150, 0.08);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.table-history-log-row {
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-left: 5px solid rgba(69, 189, 244, 0.65);
  border-radius: 9px;
  background: rgba(9, 19, 28, 0.62);
}

.table-history-log-row > div {
  min-width: 0;
}

.table-history-log-row strong {
  color: var(--ink);
}

.table-history-log-row small,
.table-history-muted {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.table-history-amount {
  color: var(--mint);
  font-weight: 950;
  text-align: right;
}

.table-history-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 999px;
  background: rgba(69, 189, 244, 0.08);
  color: var(--muted);
  font-weight: 950;
  line-height: 1.2;
}

.table-history-status.ok {
  border-color: rgba(70, 211, 150, 0.4);
  background: rgba(70, 211, 150, 0.12);
  color: var(--mint);
}

.table-history-status.warn {
  border-color: rgba(255, 121, 108, 0.44);
  background: rgba(255, 121, 108, 0.12);
  color: #ffb9b2;
}

.table-history-row {
  align-items: start;
  border-left: 5px solid rgba(69, 189, 244, 0.65);
}

.table-history-row aside {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 150px;
  color: var(--muted);
  text-align: right;
}

.table-history-row aside b {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.table-history-row aside small {
  white-space: nowrap;
}

.table-history-row aside strong {
  color: var(--mint);
}

.table-history-items {
  display: grid;
  gap: 5px;
  margin: 9px 0 0;
  padding-left: 18px;
  color: var(--ink);
}

.table-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.table-history-meta small {
  padding: 4px 8px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 999px;
  background: rgba(69, 189, 244, 0.08);
  color: var(--muted);
  font-weight: 850;
}

.table-history-payment {
  border-left-color: rgba(70, 211, 150, 0.82);
}

.table-history-fiscal_success {
  border-left-color: rgba(70, 211, 150, 0.82);
}

.table-history-fiscal_error {
  border-left-color: rgba(255, 121, 108, 0.86);
}

.table-history-stock {
  border-left-color: rgba(180, 142, 255, 0.82);
}

@media (max-width: 760px) {
  .table-history-panel .admin-head {
    display: grid;
  }

  .table-history-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-history-filter label:first-child,
  .table-history-filter button {
    grid-column: 1 / -1;
  }

  .table-history-row {
    display: grid;
  }

  .table-history-row aside {
    justify-items: start;
    min-width: 0;
    text-align: left;
  }

  .table-history-log-head {
    display: none;
  }

  .table-history-log-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .table-history-log-row > div::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 950;
    text-transform: uppercase;
  }

  .table-history-amount {
    text-align: left;
  }
}

.product-current-image {
  width: 96px;
  height: 72px;
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.08);
  object-fit: contain;
}

.image-gallery-pwa {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.image-choice {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 10px;
  border: 1px solid rgba(69, 189, 244, 0.18);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.06);
  text-align: center;
}

.image-choice img {
  width: 100px;
  height: 78px;
  object-fit: contain;
}

.image-choice span {
  color: var(--muted);
  font-size: 0.78rem;
}

.image-choice button {
  min-height: 34px;
  border: 1px solid rgba(69, 189, 244, 0.3);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.1);
  color: #9bdfff;
  font-weight: 900;
}

.sale-shell.floor-admin-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.floor-admin {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.floor-admin-side {
  display: grid;
  gap: 10px;
  align-content: start;
  height: 100%;
  min-height: 0;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid rgba(69, 189, 244, 0.18);
}

.floor-admin-size {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.floor-palette-pwa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.floor-palette-pwa button {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 94px;
  padding: 8px;
  border: 1px solid rgba(69, 189, 244, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.floor-palette-pwa button:active,
.floor-palette-pwa button.is-dragging {
  cursor: grabbing;
}

.floor-palette-pwa button.is-dragging {
  opacity: 0.55;
}

.admin-floor-stage.is-drop-target {
  outline: 2px dashed rgba(69, 214, 143, 0.72);
  outline-offset: 6px;
}

.floor-drag-ghost {
  position: fixed;
  z-index: 9999;
  display: grid;
  gap: 5px;
  justify-items: center;
  width: 86px;
  padding: 7px;
  border: 1px solid rgba(69, 214, 143, 0.7);
  border-radius: 8px;
  background: rgba(12, 25, 31, 0.92);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 950;
  pointer-events: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

.floor-drag-ghost img {
  width: 42px;
  height: 34px;
  object-fit: contain;
}

.floor-palette-pwa img {
  width: 48px;
  height: 42px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.floor-background-form {
  gap: 8px;
}

.floor-background-preview {
  width: 100%;
  max-height: 130px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.floor-admin-work {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  overscroll-behavior: contain;
}

.admin-floor-stage {
  margin: 0 auto 14px;
}

.admin-floor-item {
  cursor: grab;
}

.admin-floor-item.is-table-front {
  z-index: 12;
}

.admin-floor-item.is-selected {
  outline: 0;
  z-index: 16;
}

.floor-select-box {
  position: absolute;
  z-index: 18;
  border: 2px dashed rgba(69, 214, 143, 0.9);
  border-radius: 8px;
  background: rgba(69, 214, 143, 0.12);
  pointer-events: none;
}

.floor-context-menu {
  position: absolute;
  z-index: 20;
  display: grid;
  gap: 6px;
  width: 138px;
  padding: 8px;
  border: 1px solid rgba(69, 189, 244, 0.38);
  border-radius: 8px;
  background: rgba(9, 15, 22, 0.96);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.36);
}

.floor-context-menu button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(69, 189, 244, 0.28);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.1);
  color: #bcecff;
  font-size: 0.74rem;
  font-weight: 950;
  text-align: left;
}

.floor-context-menu button:hover {
  border-color: rgba(69, 214, 143, 0.66);
  background: rgba(69, 214, 143, 0.16);
  color: #d8ffe9;
}

.floor-context-menu button.danger-text {
  color: #ff8f8f;
}

.floor-context-number {
  display: grid;
  gap: 4px;
  color: #bcecff;
  font-size: 0.68rem;
  font-weight: 950;
}

.floor-context-number input {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(69, 189, 244, 0.36);
  border-radius: 7px;
  background: rgba(9, 18, 28, 0.95);
  color: #ffffff;
  font: inherit;
}

.floor-context-number input:focus {
  border-color: rgba(69, 214, 143, 0.78);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(69, 214, 143, 0.13);
}

.danger-text {
  color: var(--danger);
}

.report-filter {
  display: grid;
  grid-template-columns: minmax(132px, 160px) minmax(92px, 112px) minmax(132px, 160px) minmax(92px, 112px) auto auto;
  gap: 8px;
  align-items: end;
  justify-content: flex-end;
  min-width: 0;
}

.report-filter label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.report-filter input {
  width: 100%;
  min-height: var(--control-height);
}

.report-filter-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 260px));
  gap: 10px;
  align-items: end;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.report-summary-main {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  width: min(100%, 1060px);
}

.report-summary article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(69, 214, 143, 0.2);
  border-radius: 8px;
  background: rgba(69, 214, 143, 0.08);
}

.report-summary span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.report-summary small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.report-summary strong {
  color: #baf6d2;
  font-size: 1.15rem;
}

.payment-summary-box {
  align-content: start;
}

.payment-summary-lines {
  display: grid;
  gap: 6px;
}

.payment-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(124px, 150px);
  column-gap: 14px;
  align-items: center;
}

.payment-summary-head small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: right;
}

.payment-summary-head small:first-child {
  text-align: left;
}

.payment-summary-lines > div,
.payment-summary-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px minmax(124px, 150px);
  column-gap: 14px;
  align-items: center;
}

.payment-summary-lines b {
  color: #dff6ff;
  font-size: 0.92rem;
  text-align: right;
}

.payment-summary-lines strong {
  font-size: 0.95rem;
}

.payment-summary-total b {
  color: #dff6ff;
  font-size: 1.15rem;
  text-align: right;
}

.payment-summary-lines strong,
.payment-summary-total strong {
  justify-self: end;
}

.payment-summary-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-summary-total small {
  font-size: 0.88rem;
}

.report-table-wrap {
  margin-top: 12px;
}

.stock-count-card-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 10px;
  margin-top: 12px;
}

.stock-count-card-summary article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(69, 214, 143, 0.28);
  border-radius: 8px;
  background: rgba(45, 214, 143, 0.08);
}

.stock-count-card-summary span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.stock-count-card-summary small {
  color: var(--muted);
}

.stock-count-cards-list-table {
  min-width: 860px;
}

.stock-count-card-items-table {
  min-width: 1220px;
  table-layout: fixed;
}

.stock-count-card-items-table th,
.stock-count-card-items-table td {
  padding-inline: 8px;
}

.stock-count-card-items-table th {
  white-space: normal;
  line-height: 1.08;
}

.stock-count-card-items-table th span {
  display: block;
}

.stock-count-card-items-table th:nth-child(1),
.stock-count-card-items-table td:nth-child(1) {
  width: 72px;
}

.stock-count-card-items-table th:nth-child(2),
.stock-count-card-items-table td:nth-child(2) {
  width: 290px;
}

.stock-count-card-items-table th:nth-child(3),
.stock-count-card-items-table td:nth-child(3) {
  width: 58px;
}

.stock-count-card-items-table th:nth-child(4),
.stock-count-card-items-table td:nth-child(4),
.stock-count-card-items-table th:nth-child(6),
.stock-count-card-items-table td:nth-child(6),
.stock-count-card-items-table th:nth-child(7),
.stock-count-card-items-table td:nth-child(7),
.stock-count-card-items-table th:nth-child(8),
.stock-count-card-items-table td:nth-child(8),
.stock-count-card-items-table th:nth-child(11),
.stock-count-card-items-table td:nth-child(11) {
  width: 72px;
}

.stock-count-card-items-table th:nth-child(5),
.stock-count-card-items-table td:nth-child(5),
.stock-count-card-items-table th:nth-child(9),
.stock-count-card-items-table td:nth-child(9),
.stock-count-card-items-table th:nth-child(10),
.stock-count-card-items-table td:nth-child(10),
.stock-count-card-items-table th:nth-child(12),
.stock-count-card-items-table td:nth-child(12),
.stock-count-card-items-table th:nth-child(13),
.stock-count-card-items-table td:nth-child(13),
.stock-count-card-items-table th:nth-child(14),
.stock-count-card-items-table td:nth-child(14) {
  width: 86px;
}

.stock-count-card-machines-table {
  min-width: 760px;
}

.stock-count-inline-edit {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(84, 202, 255, 0.42);
  border-radius: 8px;
  color: #f7fbff;
  background: rgba(21, 68, 91, 0.46);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: right;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.stock-count-inline-edit:hover,
.stock-count-inline-edit:focus-visible {
  border-color: rgba(84, 202, 255, 0.86);
  background: rgba(30, 91, 120, 0.72);
  outline: 0;
}

.stock-count-inline-edit:active {
  transform: translateY(1px);
}

.stock-count-inline-edit strong {
  color: inherit;
}

.stock-count-locked-value {
  display: inline-block;
  min-width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  color: #a9c0ca;
  border: 1px solid rgba(169, 192, 202, 0.22);
  border-radius: 7px;
  background: rgba(169, 192, 202, 0.07);
}

.stock-count-correction-hint {
  display: block;
  margin-top: 3px;
  color: #8fb9cc;
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1.1;
  white-space: normal;
}

.stock-count-correction-hint.is-locked {
  color: #d8a8a8;
}

.stock-count-card-detail-panel {
  margin-top: 12px;
}

.modal .stock-count-card-detail-card {
  width: min(1380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto auto auto minmax(0, 1fr);
  overflow: hidden;
}

.stock-count-card-detail-card .report-tab-panel {
  min-height: 0;
  overflow: auto;
}

.stock-count-card-detail-card .detail-table-wrap {
  max-height: 100%;
}

@media (max-width: 640px) {
  .modal .stock-count-card-detail-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    padding: 10px;
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .stock-count-card-detail-card .admin-head {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
  }

  .stock-count-card-detail-card .admin-head h2 {
    font-size: clamp(1.2rem, 6vw, 1.75rem);
  }

  .stock-count-card-detail-card .admin-head .top-button {
    flex: 0 0 auto;
    min-width: 90px;
    min-height: 40px;
    padding: 8px 12px;
  }

  .stock-count-card-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 9px;
    border: 1px solid rgba(69, 214, 143, 0.28);
    border-radius: 9px;
    background: rgba(45, 214, 143, 0.08);
  }

  .stock-count-card-summary article {
    min-width: 0;
    padding: 5px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .stock-count-card-summary article + article {
    border-left: 1px solid rgba(69, 214, 143, 0.2);
  }

  .stock-count-card-summary span {
    font-size: 0.66rem;
    line-height: 1.05;
  }

  .stock-count-card-summary strong {
    font-size: 0.82rem;
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .stock-count-card-summary small {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .stock-count-card-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stock-count-card-tabs button {
    min-width: 0;
    width: 100%;
  }

  .stock-count-card-detail-card .report-tab-panel {
    overflow: hidden;
  }

  .stock-count-card-detail-card .detail-table-wrap {
    max-height: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .stock-count-card-items-table {
    min-width: 1220px;
  }

  .stock-count-card-machines-table {
    min-width: 760px;
  }

  .stock-count-card-items-table th,
  .stock-count-card-items-table td,
  .stock-count-card-machines-table th,
  .stock-count-card-machines-table td {
    padding: 9px 10px;
    white-space: nowrap;
  }

  .stock-count-card-items-table th,
  .stock-count-card-machines-table th {
    font-size: 0.72rem;
    line-height: 1.08;
  }

  .stock-count-card-items-table td:nth-child(2),
  .stock-count-card-machines-table td:nth-child(2) {
    white-space: normal;
  }
}

.windows-app-version {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.report-tabs button {
  min-height: var(--control-height);
  min-width: 132px;
  padding: 9px 18px;
  border: 1px solid rgba(64, 190, 255, 0.38);
  border-radius: 8px;
  color: #c7edff;
  background: rgba(16, 41, 55, 0.76);
  font-weight: 950;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.report-tabs button:hover {
  border-color: rgba(64, 190, 255, 0.72);
  background: rgba(22, 55, 73, 0.92);
}

.report-tabs button.is-active {
  border-color: rgba(69, 214, 143, 0.72);
  color: #d8ffe8;
  background: rgba(20, 78, 54, 0.88);
}

.report-tab-panel {
  display: none;
}

.report-tab-panel.is-active {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.report-articles-section {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}


.report-tab-panel.report-articles-section,
.report-tab-panel.report-receipts-section {
  display: none;
}

.report-tab-panel.report-articles-section.is-active,
.report-tab-panel.report-receipts-section.is-active {
  display: grid;
}

.section-title-line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.section-title-line h3 {
  margin: 0;
  font-size: 1.05rem;
}

.report-articles-table {
  min-width: 720px;
  table-layout: fixed;
}

.report-articles-table th:nth-child(1),
.report-articles-table td:nth-child(1) {
  width: 120px;
}

.report-articles-table th:nth-child(3),
.report-articles-table td:nth-child(3) {
  width: 90px;
}

.report-articles-table th:nth-child(4),
.report-articles-table td:nth-child(4),
.report-articles-table th:nth-child(5),
.report-articles-table td:nth-child(5) {
  width: 130px;
}

.report-detail-table {
  min-width: 1120px;
  table-layout: fixed;
}

.report-detail-table th:nth-child(1),
.report-detail-table td:nth-child(1) {
  width: 84px;
}

.report-detail-table th:nth-child(2),
.report-detail-table td:nth-child(2) {
  width: 112px;
}

.report-detail-table th:nth-child(3),
.report-detail-table td:nth-child(3) {
  width: 88px;
}

.report-detail-table th:nth-child(4),
.report-detail-table td:nth-child(4) {
  width: 128px;
}

.report-detail-table th:nth-child(7),
.report-detail-table td:nth-child(7),
.report-detail-table th:nth-child(8),
.report-detail-table td:nth-child(8) {
  width: 120px;
}

.report-detail-table th:nth-child(9),
.report-detail-table td:nth-child(9) {
  width: 120px;
}

.report-detail-table th:nth-child(10),
.report-detail-table td:nth-child(10) {
  width: 76px;
}

.report-detail-table th:nth-child(11),
.report-detail-table td:nth-child(11) {
  width: 105px;
}

.report-detail-table th:nth-child(12),
.report-detail-table td:nth-child(12) {
  width: 104px;
}

@media (max-width: 720px) {
  .report-filter-groups,
  .report-summary-main {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .report-receipts-section .report-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .report-receipts-section .report-detail-table {
    min-width: 1180px;
    table-layout: fixed;
  }

  .report-receipts-section .report-detail-table th,
  .report-receipts-section .report-detail-table td {
    padding: 10px 12px;
    font-size: 0.92rem;
    line-height: 1.22;
    white-space: nowrap;
  }

  .report-receipts-section .report-detail-table th {
    font-size: 0.76rem;
  }

  .report-detail-table th:nth-child(5),
  .report-detail-table td:nth-child(5) {
    width: 140px;
  }

  .report-detail-table th:nth-child(6),
  .report-detail-table td:nth-child(6),
  .report-detail-table th:nth-child(7),
  .report-detail-table td:nth-child(7) {
    width: 130px;
  }

  .report-detail-table th:nth-child(8),
  .report-detail-table td:nth-child(8) {
    width: 125px;
  }

  .report-receipts-section .report-detail-table td strong {
    overflow-wrap: normal;
  }

  .report-receipts-section .report-detail-table .actions-cell button {
    min-height: 38px;
  }

  .report-receipts-section .report-table-wrap::after {
    content: 'Pomjerite tabelu lijevo/desno';
    display: block;
    padding: 7px 10px 8px;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: center;
  }
}

.invoice-detail {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 9px;
  background: rgba(17, 24, 33, 0.72);
}

.invoice-detail-card {
  width: min(860px, 100%);
  padding: 16px;
}

.invoice-order {
  display: grid;
  gap: 8px;
}

.invoice-order h3 {
  margin: 0;
  color: var(--accent);
}

.invoice-detail-table-wrap {
  max-height: min(54vh, 520px);
}

.invoice-detail-table {
  min-width: 620px;
}

.invoice-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(69, 189, 244, 0.14);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.05);
}

.invoice-item ul {
  margin: 4px 0 0;
  padding: 0;
  color: #9bdfff;
  font-size: 0.82rem;
  list-style: none;
}

@media (max-width: 900px) {
  .admin-form,
  .product-form,
  .stock-form,
  .movement-filter {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  }

  .admin-head,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-head-actions {
    justify-content: stretch;
  }

  .admin-head-actions > * {
    flex: 1 1 180px;
  }

  .floor-admin {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .floor-admin-side {
    border-right: 0;
    border-bottom: 1px solid rgba(69, 189, 244, 0.18);
  }
}

@media (max-width: 640px) {
  .admin-form,
  .product-form,
  .stock-form,
  .movement-filter,
  .report-filter {
    grid-template-columns: 1fr;
  }

  .report-filter {
    justify-content: stretch;
  }

  .report-filter input,
  .report-filter button {
    width: 100%;
  }
}

.row-actions button {
  min-height: 34px;
  border-color: var(--button-border);
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 900;
}

.error {
  margin: 0;
  color: var(--danger);
  font-weight: 850;
}

.success {
  margin: 0;
  color: var(--good);
  font-weight: 850;
}

.sale-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(69, 189, 244, 0.22);
  background: rgba(7, 10, 14, 0.9);
  backdrop-filter: blur(12px);
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  font-size: 1.18rem;
}

.topbar-user {
  display: block;
  margin-top: 2px;
  color: rgba(215, 220, 229, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.top-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.top-button {
  min-height: 40px;
  padding: 0 10px;
}

.native-update-modal {
  z-index: 1200;
}

.native-update-card {
  width: min(520px, calc(100vw - 28px));
}

.native-update-notes {
  white-space: normal;
}

.native-update-safety {
  margin-top: 14px;
  font-size: 0.85rem;
}

.native-update-progress {
  position: relative;
  display: grid;
  gap: 7px;
  margin: 16px 0 4px;
  padding-top: 8px;
}

.native-update-progress::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(71, 192, 232, 0.16);
}

.native-update-progress span {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  transition: width 180ms ease;
}

.native-update-progress small {
  color: var(--muted);
  font-weight: 800;
}


.top-button.is-active {
  border-color: var(--button-primary-border);
  background: var(--button-primary-bg);
  color: var(--button-primary-ink);
  box-shadow: 0 10px 28px rgba(69, 214, 143, 0.14);
}

.floor-view {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  overscroll-behavior: contain;
}

.floor-scale-frame {
  position: relative;
  flex: 0 0 auto;
}

.floor-stage {
  position: relative;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.sale-floor-stage {
  border: 0;
  transform-origin: top left;
}

@media (max-width: 900px) {
  .sale-shell:not(.has-table) .floor-view {
    position: relative;
    display: block;
    height: 100%;
    padding: 0;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .sale-shell:not(.has-table) .floor-scale-frame {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: top left;
    will-change: transform;
  }
}

.floor-background-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  opacity: 0.62;
}

.floor-item {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #101418;
  font-size: 0.78rem;
  font-weight: 950;
  overflow: visible;
}

.floor-item:disabled {
  cursor: default;
  opacity: 1;
}

.floor-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.floor-item img.floor-media {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--floor-original-w, 100%);
  height: var(--floor-original-h, 100%);
  object-fit: fill;
  transform-origin: center;
}

.floor-label {
  position: absolute;
  left: 50%;
  top: calc(50% - 5px);
  z-index: 5;
  transform: translate(-50%, -50%);
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 32px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(221, 248, 229, 0.93);
  border: 1px solid rgba(69, 214, 143, 0.28);
  color: #101418;
  font-size: 1rem;
  line-height: 0.95;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.floor-item.is-clickable {
  outline: 0;
  z-index: 12;
}

.floor-item.has-open-orders {
  filter: none;
  z-index: 14;
}

.floor-item.has-open-orders .floor-label {
  background: rgba(255, 220, 220, 0.95);
  border-color: rgba(255, 86, 86, 0.42);
}

.admin-floor-item .floor-label {
  top: 50%;
  min-width: 42px;
  min-height: 28px;
  padding: 3px 7px;
  background: rgba(248, 243, 236, 0.9);
  border: 0;
  font-size: 0.78rem;
  line-height: 1;
}

.floor-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: var(--floor-ring-w, 100%);
  height: var(--floor-ring-h, 100%);
  border: 3px solid rgba(255, 218, 121, 0.92);
  border-radius: var(--floor-ring-radius, 10px);
  transform: translate(-50%, -50%) rotate(var(--floor-ring-rotation, 0deg));
  transform-origin: center;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(255, 218, 121, 0.32);
}

.floor-item.is-clickable .floor-ring {
  border-width: 2px;
  border-color: rgba(69, 214, 143, 0.76);
  box-shadow: 0 0 12px rgba(69, 214, 143, 0.22);
}

.floor-item.has-open-orders .floor-ring {
  border-color: rgba(255, 86, 86, 0.98);
  box-shadow: 0 0 14px rgba(255, 86, 86, 0.72), 0 0 28px rgba(255, 86, 86, 0.26);
}

.floor-badge {
  position: absolute;
  left: 50%;
  bottom: 4px;
  z-index: 6;
  transform: translateX(-50%);
  min-width: 44px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(10, 52, 35, 0.96);
  color: #baf6d2;
  font-size: 0.62rem;
  font-weight: 950;
  white-space: nowrap;
}

.floor-shape {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.floor-shape-sank_ravni {
  border-radius: 2px;
  background: linear-gradient(180deg, #a86f3c, #7b4f2b);
  box-shadow: inset 0 0 0 1px rgba(248, 243, 236, 0.14);
}

.floor-shape-sank_ugaoni::before,
.floor-shape-sank_ugaoni::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  background: linear-gradient(180deg, #a86f3c, #7b4f2b);
  box-shadow: inset 0 0 0 1px rgba(248, 243, 236, 0.14);
}

.floor-shape-sank_ugaoni::before {
  left: 0;
  top: 0;
  width: 34%;
  height: 100%;
}

.floor-shape-sank_ugaoni::after {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 34%;
}

.floor-shape-pregrada {
  top: 46%;
  height: 8%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #8a6b4b 12%, #8a6b4b 88%, transparent);
}

.floor-item.is-rotated-box .floor-shape-pregrada {
  left: 46%;
  top: 0;
  width: 8%;
  height: 100%;
  background: linear-gradient(180deg, transparent, #8a6b4b 12%, #8a6b4b 88%, transparent);
}

.floor-shape-pregrada_staklo {
  border: 2px solid rgba(126, 181, 198, 0.66);
  border-radius: 999px;
  background: rgba(126, 181, 198, 0.16);
}

.pos-content {
  min-height: 0;
  padding: 12px;
  padding-bottom: 96px;
  overflow: hidden;
}

.products-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.sale-heading {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.sale-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.group-tabs {
  display: contents;
}

.group-tabs button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(69, 189, 244, 0.28);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.08);
  color: #d7dce5;
  font-size: 0.98rem;
  font-weight: 950;
}

.group-tabs button.is-active {
  border-color: rgba(69, 214, 143, 0.62);
  background: rgba(69, 214, 143, 0.14);
  color: #baf6d2;
}

.mobile-group-picker {
  display: none;
  position: relative;
  z-index: 74;
  min-width: 0;
}

.mobile-group-current {
  position: relative;
  z-index: 77;
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 13px;
  border: 1px solid rgba(69, 189, 244, 0.38);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(69, 189, 244, 0.15), rgba(69, 189, 244, 0.08)),
    rgba(10, 28, 40, 0.95);
  color: #f8f3ec;
  font-size: 0.98rem;
  font-weight: 950;
  text-align: left;
}

.mobile-group-current::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #9bdfff;
  border-bottom: 2px solid #9bdfff;
  transform: translateY(-62%) rotate(45deg);
  transition: transform 180ms ease;
}

.mobile-group-current[aria-expanded="true"]::after {
  transform: translateY(-35%) rotate(225deg);
}

.mobile-group-backdrop {
  position: fixed;
  inset: 0;
  z-index: 72;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.mobile-group-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-group-menu {
  position: fixed;
  top: var(--mobile-group-menu-top, 118px);
  right: max(10px, env(safe-area-inset-right));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(10px, env(safe-area-inset-left));
  z-index: 76;
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: none;
  padding: 10px;
  overflow: auto;
  border: 1px solid rgba(69, 189, 244, 0.42);
  border-radius: 10px;
  background: rgba(8, 18, 28, 0.98);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.56);
  opacity: 0;
  pointer-events: none;
  overscroll-behavior: contain;
  transform: translateY(-22px);
  transform-origin: top center;
  transition: opacity 300ms ease, transform 420ms cubic-bezier(0.18, 0.9, 0.22, 1);
  touch-action: pan-y;
}

.mobile-group-picker.is-side-motion .mobile-group-menu {
  transform: translateX(112%);
}

.mobile-group-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.mobile-group-picker.is-side-motion .mobile-group-menu.is-open {
  transform: translate3d(0, 0, 0);
}

.mobile-group-option {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.08);
  color: #eef8ff;
  font-size: 0.95rem;
  font-weight: 950;
  text-align: left;
}

.mobile-group-option.is-active {
  border-color: rgba(69, 214, 143, 0.68);
  background: rgba(69, 214, 143, 0.18);
  color: #baf6d2;
}

.products-panel.is-sliding-groups .mobile-group-picker {
  display: block;
}

.products-panel.is-sliding-groups .product-grid {
  touch-action: pan-y;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.product-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
  justify-items: center;
  height: 108px;
  min-height: 108px;
  padding: 7px 5px;
  border: 1px solid rgba(69, 189, 244, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
}

button.product-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 34px;
  gap: 6px;
  align-items: center;
  justify-items: center;
  height: 108px;
  min-height: 108px;
  padding: 7px 5px;
  border: 1px solid rgba(69, 189, 244, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.product-card img,
.placeholder {
  width: 100%;
  height: 100%;
  max-width: 104px;
  max-height: 58px;
  object-fit: contain;
}

.placeholder {
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.1);
  color: #9bdfff;
  font-size: 1.3rem;
  font-weight: 950;
}

.product-card.no-image,
button.product-card.no-image {
  grid-template-rows: 1fr;
}

.product-card.no-image > span {
  align-self: center;
  justify-self: center;
  max-width: 100%;
  padding: 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  overflow-wrap: anywhere;
}

.product-card > span {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  max-height: 34px;
  overflow: hidden;
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card.no-image > span {
  max-height: 68px;
  -webkit-line-clamp: 4;
}

.product-card .is-long {
  max-height: 34px;
  overflow: hidden;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.05;
  -webkit-line-clamp: 3;
}

.stock-count-product-card.has-stock-count-qty,
.stock-count-cart-item.is-stock-count-correct {
  border-color: rgba(69, 214, 143, 0.68);
  background: rgba(69, 214, 143, 0.12);
  box-shadow: 0 0 0 1px rgba(69, 214, 143, 0.12), 0 10px 28px rgba(69, 214, 143, 0.08);
}

.stock-count-product-card.is-stock-count-wrong,
.stock-count-cart-item.is-stock-count-wrong {
  border-color: rgba(255, 86, 86, 0.7);
  background: rgba(255, 86, 86, 0.13);
  box-shadow: 0 0 0 1px rgba(255, 86, 86, 0.12), 0 10px 28px rgba(255, 86, 86, 0.08);
}

.stock-count-product-qty {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 3;
  min-width: 30px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(69, 214, 143, 0.92);
  color: #062318;
  font-size: 0.78rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.stock-count-product-card.is-stock-count-wrong .stock-count-product-qty {
  background: rgba(255, 86, 86, 0.94);
  color: #fff4f4;
}

.stock-count-qty-card {
  width: min(420px, 100%);
}

.stock-count-qty-card input[name="kolicina"] {
  min-height: 58px;
  font-size: 1.45rem;
  text-align: center;
}

.stock-count-panel {
  margin: 14px;
}

.stock-count-last-title {
  margin: 14px 0 8px;
}

.stock-count-start-form {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(140px, 180px);
}

.transfer-start-form {
  grid-template-columns: minmax(190px, 240px) minmax(150px, 180px) minmax(190px, 1fr) minmax(190px, 1fr);
}

.transfer-start-form label:nth-child(5),
.transfer-start-form .form-actions {
  grid-column: 1 / -1;
}

.transfer-product-card.has-stock-count-qty {
  border-color: rgba(69, 214, 143, 0.68);
  background: rgba(69, 214, 143, 0.12);
  box-shadow: 0 0 0 1px rgba(69, 214, 143, 0.12), 0 10px 28px rgba(69, 214, 143, 0.08);
}

.transfer-cart-panel header small {
  display: block;
  margin-top: 3px;
  color: #9bdfff;
  font-size: 0.78rem;
  font-weight: 850;
}

.transfer-mobile-footer {
  grid-template-columns: 1fr;
}

.special-exit-header-panel,
.special-exit-types-panel,
.special-exit-list-panel {
  margin: 14px;
}

.special-exit-start-form {
  grid-template-columns: minmax(190px, 240px) minmax(190px, 240px) minmax(180px, 1fr) minmax(180px, 1fr);
}

.special-exit-note,
.special-exit-start-form .form-actions {
  grid-column: 1 / -1;
}

.special-exit-limit-field {
  max-width: 250px;
}

.special-exit-limit-help {
  grid-column: 1 / -1;
  margin: -4px 0 4px;
  color: #9dc4d7;
  font-size: 0.82rem;
  font-weight: 700;
}

.special-exit-error {
  margin: 0 14px;
}

.special-exit-cart-item {
  grid-template-columns: minmax(0, 1fr) auto minmax(72px, auto);
  align-items: center;
}

.special-exit-cart-item > strong {
  justify-self: end;
  white-space: nowrap;
}

.special-exit-cart-footer {
  display: grid;
  gap: 10px;
}

.special-exit-detail {
  display: grid;
  gap: 14px;
}

.admin-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.admin-info-grid article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.18);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.055);
}

.admin-info-grid span {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.admin-info-grid strong {
  color: var(--ink);
  font-size: 1rem;
}

.stock-count-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 12px;
  min-height: 0;
  height: calc(100vh - 74px);
  padding: 12px;
  overflow: hidden;
}

.stock-count-products {
  min-height: 0;
  overflow: hidden;
}

.stock-count-groups {
  display: contents;
}

.stock-count-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.stock-count-cart-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.28);
  border-radius: 8px;
  background: rgba(7, 16, 25, 0.72);
}

.stock-count-cart-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.stock-count-cart-panel > header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.stock-count-cart-panel > header > strong {
  min-width: 46px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(69, 214, 143, 0.16);
  color: #baf6d2;
  text-align: center;
}

.stock-count-cart-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
}

.stock-count-cart-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.stock-count-cart-item small {
  display: block;
  margin-top: 3px;
  color: #9bdfff;
  font-size: 0.76rem;
}

.stock-count-machines-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.28);
  border-radius: 8px;
  background: rgba(7, 16, 25, 0.72);
}

.stock-count-machines-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.stock-count-machines-panel > header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.stock-count-machines-panel > header > strong {
  min-width: 46px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(69, 189, 244, 0.16);
  color: #9bdfff;
  text-align: center;
}

.stock-count-cart-panel.is-headerless,
.stock-count-machines-panel.is-headerless {
  grid-template-rows: minmax(0, 1fr) auto;
}

.stock-count-side-panel {
  align-self: stretch;
  height: calc(100dvh - 92px);
  max-height: calc(100dvh - 92px);
  min-height: 0;
}

.stock-count-machine-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.stock-count-machine-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(69, 189, 244, 0.18);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.055);
}

.stock-count-machine-card h3 {
  margin: 0;
  font-size: 1rem;
}

.stock-count-machine-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.stock-count-machine-fields {
  display: grid;
  gap: 8px;
}

.stock-count-machine-fields label {
  display: grid;
  gap: 5px;
}

.stock-count-machine-fields span {
  color: var(--muted);
  font-weight: 900;
}

.stock-count-side-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.stock-count-side-actions .drawer-action {
  min-height: 52px;
}

.stock-count-mobile-footer,
.stock-count-mobile-sheet {
  display: none;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: none;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
}

.drawer-backdrop.is-visible {
  display: block;
}

.order-drawer {
  position: fixed;
  right: 10px;
  bottom: calc(98px + env(safe-area-inset-bottom));
  left: 10px;
  z-index: 86;
  display: grid;
  gap: 10px;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.28);
  border-radius: 12px 12px 8px 8px;
  background: rgba(13, 18, 25, 0.98);
  box-shadow: 0 -22px 54px rgba(0, 0, 0, 0.46);
  transform: translateY(calc(100% + 110px));
  transition: transform 220ms ease;
}

.order-drawer.is-open {
  transform: translateY(0);
}

.order-drawer header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.order-drawer h2,
.order-drawer p,
.order-drawer h3,
.order-drawer h4 {
  margin: 0;
}

.order-drawer h3,
.order-drawer h4 {
  color: #49cfff;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.drawer-active > h3 {
  display: none;
}

.drawer-active,
.drawer-new {
  display: none;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.active-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.active-tabs button {
  min-height: 34px;
  border: 1px solid rgba(69, 189, 244, 0.3);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.08);
  color: #bcecff;
  font-weight: 950;
}

.active-tabs button.is-active {
  border-color: rgba(69, 214, 143, 0.62);
  background: rgba(69, 214, 143, 0.16);
  color: #d8ffe9;
}

.active-tab-panel {
  display: none;
  min-height: 0;
}

.active-tab-panel.is-active {
  display: grid;
  min-height: 0;
}

.drawer-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.order-drawer.is-active .drawer-active,
.order-drawer.is-new .drawer-new {
  display: grid;
}

.order-drawer.is-active .drawer-active {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.order-drawer.is-new .drawer-new {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.prep-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.28);
  border-radius: 8px;
  background: rgba(9, 13, 18, 0.72);
  overflow: hidden;
}

.prep-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.prep-panel h2,
.prep-panel h3 {
  margin: 0;
}

.prep-panel > header > strong {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 34px;
  border-radius: 999px;
  background: rgba(69, 214, 143, 0.16);
  color: #baf6d2;
}

.prep-list {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
}

.prep-shell.has-location-sale-footer .prep-panel {
  margin-bottom: calc(82px + env(safe-area-inset-bottom));
}

.prep-location-footer {
  position: fixed;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 10px;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.prep-location-footer button {
  min-height: 58px;
  border: 1px solid rgba(69, 189, 244, 0.34);
  border-radius: 8px;
  background: rgba(9, 21, 31, 0.95);
  color: #bfeeff;
  font-size: 1rem;
  font-weight: 950;
}

.prep-location-footer .is-active-blue {
  border-color: rgba(69, 189, 244, 0.8);
  background: rgba(69, 189, 244, 0.24);
  color: #e8f8ff;
}

.prep-location-footer .is-active-green {
  border-color: rgba(69, 214, 143, 0.8);
  background: rgba(69, 214, 143, 0.24);
  color: #e8fff2;
}

.prep-card {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 2px solid rgba(61, 183, 238, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(7, 81, 126, 0.99), rgba(3, 42, 68, 0.99)),
    #043956;
  box-shadow: inset 0 0 0 1px rgba(184, 236, 255, 0.1), 0 10px 28px rgba(0, 0, 0, 0.2);
}

.prep-card.status-naruceno {
  border-color: rgba(65, 196, 255, 0.95);
  background:
    linear-gradient(135deg, rgba(8, 93, 145, 0.99), rgba(4, 52, 83, 0.99)),
    #043d60;
}

.prep-card.status-pripremljeno {
  border-color: rgba(70, 224, 151, 0.96);
  background:
    linear-gradient(135deg, rgba(7, 101, 62, 0.99), rgba(4, 57, 36, 0.99)),
    #04402b;
  box-shadow: inset 0 0 0 1px rgba(205, 255, 226, 0.12), 0 10px 28px rgba(0, 0, 0, 0.2);
}

.prep-card.prep-custom-background {
  background: linear-gradient(135deg, var(--prep-card-color, #07517e), var(--prep-card-color-dark, #043d60));
}

.prep-card.status-naruceno.prep-blinking,
.prep-card.status-pripremljeno.prep-blinking {
  background-image: none;
  background-color: var(--prep-blink-from, #07517e);
  animation: prep-order-color-blink var(--prep-blink-duration, 900ms) ease-in-out infinite alternate;
}

.prep-card.is-new-order:not(.prep-blinking) {
  animation: prep-new-order-outline 1.1s ease-in-out 14;
}

@keyframes prep-order-color-blink {
  from {
    background-color: var(--prep-blink-from, #07517e);
    border-color: var(--prep-blink-from, #45bdf4);
  }
  to {
    background-color: var(--prep-blink-to, #0b7cb3);
    border-color: var(--prep-blink-to, #ffd166);
  }
}

@keyframes prep-new-order-outline {
  0% {
    border-color: #45bdf4;
    box-shadow: 0 0 0 0 rgba(69, 189, 244, 0.25), 0 0 18px rgba(69, 189, 244, 0.18);
  }
  50% {
    border-color: #45d68f;
    box-shadow: 0 0 0 3px rgba(69, 214, 143, 0.2), 0 0 26px rgba(69, 214, 143, 0.28);
  }
  100% {
    border-color: #ffd166;
    box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.24), 0 0 30px rgba(255, 209, 102, 0.24);
  }
}

.prep-card header,
.prep-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prep-card header {
  align-items: flex-start;
}

.prep-card header .eyebrow {
  line-height: 1.28;
}

.prep-waiter-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--user-order-color, #45bdf4);
  font-weight: 950;
}

.prep-waiter-name::before,
.user-color-indicator {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--user-order-color, #45bdf4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 0 9px var(--user-order-color, #45bdf4);
}

.user-color-indicator {
  margin-right: 7px;
  vertical-align: 0.02em;
}

.user-color-field input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 3px;
  cursor: pointer;
}

.user-color-field small {
  color: var(--muted, #9ab0bf);
  font-size: 0.78rem;
}

.prep-visual-settings-panel {
  max-width: 980px;
}

.prep-visual-settings-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(69, 189, 244, 0.42);
  border-radius: 10px;
  background: rgba(8, 39, 61, 0.5);
}

.prep-visual-settings-card h3 {
  margin: 0;
  color: #dff7ff;
}

.prep-visual-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px;
  align-items: end;
}

.prep-visual-settings-grid .check-row {
  min-height: 42px;
}

.prep-color-field input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 3px;
  cursor: pointer;
}

.prep-order-time {
  margin: 3px 0 0;
  color: #ffd166;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
}

.prep-card header > strong {
  min-width: 92px;
  padding-right: 8px;
  text-align: right;
  color: #baf6d2;
  font-size: 0.95rem;
  line-height: 1.25;
}

.prep-order-items {
  display: grid;
  gap: 10px;
}

.prep-order-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.prep-order-line h3 {
  font-size: 1.08rem;
}

.prep-line-qty {
  display: grid;
  grid-template-columns: minmax(28px, auto) minmax(30px, auto);
  align-items: baseline;
  justify-content: end;
  gap: 8px;
  min-width: 76px;
  padding-right: 8px;
}

.prep-line-qty strong {
  color: #baf6d2;
  font-size: 1.2rem;
  text-align: right;
}

.prep-line-qty span {
  color: #9bdfff;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: left;
}

.prep-card ul {
  margin: 0;
  padding-left: 18px;
  color: #9bdfff;
}

.prep-card footer div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.prep-card button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(69, 189, 244, 0.35);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.1);
  color: #bcecff;
  font-weight: 950;
}

.prep-card button[data-prep-status="pripremljeno"] {
  border-color: rgba(69, 214, 143, 0.5);
  background: linear-gradient(180deg, rgba(15, 82, 55, 0.9), rgba(8, 55, 38, 0.9));
  color: #d8ffe7;
}

.prep-card button[data-prep-status="preuzeto"] {
  border-color: rgba(69, 189, 244, 0.5);
  background: linear-gradient(180deg, rgba(14, 71, 105, 0.9), rgba(8, 50, 78, 0.9));
  color: #dcf7ff;
}

.prep-card button[data-prep-status="odbijeno"] {
  border-color: rgba(255, 95, 95, 0.5);
  background: linear-gradient(180deg, rgba(96, 35, 41, 0.9), rgba(68, 25, 31, 0.9));
  color: #ffe1e1;
}

.prep-card button[data-prep-status]:hover,
.prep-card button[data-prep-status]:focus-visible {
  filter: brightness(1.12);
}

.saved-order,
.order-item,
.summary-order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(69, 189, 244, 0.16);
  border-radius: 7px;
  background: rgba(69, 189, 244, 0.06);
}

.summary-order-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 38px;
  padding: 7px 9px;
  background: rgba(69, 214, 143, 0.055);
}

.summary-order-item div {
  min-width: 0;
}

.summary-order-item small {
  display: block;
  margin-top: 2px;
  color: #9bdfff;
  font-size: 0.72rem;
}

.summary-order-item b {
  min-width: 34px;
  color: #baf6d2;
  text-align: center;
}

.saved-order {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  color: #d7dce5;
  font-weight: 900;
}

.saved-order small {
  grid-column: 2;
  grid-row: auto;
  color: #9bdfff;
  font-size: 0.75rem;
  line-height: 1.25;
}

.saved-order > strong {
  grid-column: 3;
  grid-row: 1 / span 3;
  align-self: center;
}

.sale-action-error-details {
  margin: 0;
  padding-left: 1.15rem;
  color: #9bdfff;
}

.order-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.order-item > div:first-child {
  min-width: 0;
}

.order-item > div:first-child > strong {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.18;
}

.order-item > strong {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: -2px;
}

.order-item ul {
  display: grid;
  gap: 2px;
  margin: 4px 0 0;
  padding: 0;
  color: #9bdfff;
  font-size: 0.8rem;
  list-style: none;
}

.order-item em {
  color: #d7dce5;
  font-style: normal;
}

.qty-controls {
  display: grid;
  grid-template-columns: 44px minmax(42px, auto) 44px;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.qty-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(69, 189, 244, 0.32);
  border-radius: 9px;
  background: rgba(69, 189, 244, 0.1);
  color: #9bdfff;
  font-size: 1.35rem;
  font-weight: 950;
}

.qty-controls b {
  min-width: 42px;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(69, 214, 143, 0.12);
  color: #baf6d2;
  text-align: center;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 13px;
  border: 1px solid rgba(69, 214, 143, 0.34);
  border-radius: 7px;
  background: rgba(69, 214, 143, 0.09);
  color: #baf6d2;
  font-weight: 950;
}

.drawer-action {
  min-height: 54px;
  border-color: var(--button-primary-border);
  background: var(--button-primary-bg);
  color: var(--button-primary-ink);
  font-weight: 950;
}

.mobile-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(69, 189, 244, 0.24);
  background: rgba(7, 10, 14, 0.96);
  box-shadow: 0 -16px 34px rgba(0, 0, 0, 0.34);
}

@media (max-width: 900px) {
  .location-sale-modal {
    align-items: stretch;
    place-items: stretch;
    padding: 8px;
  }

  .location-sale-modal-card {
    width: 100%;
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .location-sale-panel {
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
  }

  .location-sale-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .location-sale-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .location-sale-cart {
    min-height: 0;
    max-height: min(48vh, 380px);
    max-height: min(48dvh, 380px);
  }

  .location-report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-report-summary {
    grid-template-columns: 1fr;
  }

  .location-report-table-wrap {
    max-height: 42vh;
  }

  .sale-shell.has-table .order-drawer {
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .sale-shell.has-table .order-drawer.is-open {
    height: min(78vh, calc(100dvh - 120px));
  }

  .sale-shell.has-table .order-drawer.is-active .drawer-active,
  .sale-shell.has-table .order-drawer.is-new .drawer-new {
    min-height: 0;
    overflow: hidden;
  }

  .sale-shell.has-table .order-drawer.is-active .drawer-active,
  .sale-shell.has-table .order-drawer.is-new .drawer-new {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }

  .sale-shell.has-table .active-tab-panel.is-active {
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  .sale-shell.has-table .drawer-list {
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .sale-shell.has-table .total-row,
  .sale-shell.has-table .drawer-action {
    flex: 0 0 auto;
  }

  .sale-shell.has-table .drawer-new .order-item {
    grid-template-columns: minmax(0, 1fr) 108px 48px;
    gap: 6px;
    align-items: center;
    min-height: 44px;
    padding: 7px 8px;
  }

  .sale-shell.has-table .drawer-new .order-item > div:first-child {
    grid-column: 1;
    min-width: 0;
  }

  .sale-shell.has-table .drawer-new .order-item > div:first-child > strong {
    font-size: 0.86rem;
    line-height: 1.15;
  }

  .sale-shell.has-table .drawer-new .qty-controls {
    grid-column: 2;
    grid-template-columns: 32px 28px 32px;
    gap: 4px;
    justify-self: end;
  }

  .sale-shell.has-table .drawer-new .qty-controls button {
    width: 32px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.05rem;
  }

  .sale-shell.has-table .drawer-new .qty-controls b {
    min-width: 28px;
    padding: 6px 3px;
  }

  .sale-shell.has-table .drawer-new .order-item > strong {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    min-width: 44px;
    margin: 0;
    overflow: hidden;
    color: #f8f3ec;
    font-size: 0.82rem;
    line-height: 1.05;
    text-align: right;
    white-space: nowrap;
  }

  .products-panel.is-sliding-groups .sale-heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
  }

  .products-panel.is-sliding-groups .mobile-group-picker {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .prep-location-footer button {
    min-height: 62px;
  }

  .location-sale-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-sale-cart-item {
    grid-template-columns: minmax(0, 1fr) 104px 54px;
    gap: 6px;
  }

  .location-sale-cart-item .qty-controls {
    grid-template-columns: 30px 30px 30px;
    gap: 4px;
  }

  .location-sale-cart-item .qty-controls button {
    width: 30px;
    height: 34px;
  }

  .location-report-filters {
    grid-template-columns: 1fr 1fr;
  }

  .order-item {
    grid-template-columns: minmax(0, 1fr) 136px;
    column-gap: 8px;
  }

  .qty-controls {
    grid-template-columns: 38px minmax(34px, auto) 38px;
    gap: 6px;
  }

  .qty-controls button {
    width: 38px;
    height: 38px;
  }

  .qty-controls b {
    min-width: 34px;
    padding-inline: 6px;
  }

  .sale-shell.has-table .drawer-new .order-item {
    grid-template-columns: minmax(0, 1fr) 98px 40px;
    gap: 5px;
  }

  .sale-shell.has-table .drawer-new .qty-controls {
    grid-template-columns: 29px 28px 29px;
    gap: 3px;
  }

  .sale-shell.has-table .drawer-new .qty-controls button {
    width: 29px;
    height: 33px;
  }

  .sale-shell.has-table .drawer-new .order-item > strong {
    min-width: 38px;
    font-size: 0.78rem;
  }

  .products-panel.is-sliding-groups .sale-heading {
    grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  }

  .products-panel.is-sliding-groups .mobile-group-current {
    min-height: 40px;
    font-size: 0.92rem;
  }
}

.mobile-footer button {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: center;
  min-height: 68px;
  border: 1px solid rgba(69, 189, 244, 0.38);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.11);
  color: #9bdfff;
  font-size: 0.84rem;
  font-weight: 950;
}

.mobile-footer b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8f3ec;
}

.mobile-footer small {
  color: #d7dce5;
  font-size: 0.7rem;
}

.mobile-footer .is-active-green {
  border-color: rgba(69, 214, 143, 0.76);
  background: rgba(69, 214, 143, 0.22);
  color: #d7ffe3;
}

.mobile-footer .is-active-blue {
  border-color: rgba(69, 189, 244, 0.78);
  background: rgba(69, 189, 244, 0.24);
  color: #dff6ff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-card {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(69, 189, 244, 0.3);
  border-radius: 10px;
  background: rgba(13, 18, 25, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.56);
}

.location-sale-modal-card {
  width: min(1180px, 100%);
  height: min(92vh, 920px);
  height: min(92dvh, 920px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.location-sale-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.location-sale-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.location-sale-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  min-height: 0;
  padding-right: 2px;
}

.location-sale-cart {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  max-height: min(42vh, 380px);
  max-height: min(42dvh, 380px);
  padding: 10px;
  border: 1px solid rgba(69, 189, 244, 0.26);
  border-radius: 8px;
  background: rgba(9, 13, 18, 0.72);
  overflow: hidden;
}

.location-sale-cart h3 {
  margin: 0;
}

.location-sale-cart-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.location-sale-cart-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  min-height: 0;
}

.location-sale-cart-footer .total-row,
.location-sale-cart-footer .payment-options {
  grid-column: 1 / -1;
}

.location-sale-cart-footer > .check-row {
  min-height: 40px;
}

.location-sale-cart-footer > button {
  min-height: 52px;
}

.location-sale-cart-footer > button[data-cancel-location-sale] {
  border-color: var(--button-border);
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 950;
}

.location-sale-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.location-sale-options .payment-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.location-sale-options .payment-options[hidden] {
  display: none;
}

.location-sale-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.location-sale-actions > button {
  min-height: 52px;
}

.location-sale-actions > button[data-cancel-location-sale] {
  border-color: var(--button-border);
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 950;
}

.location-sale-cart-item {
  grid-template-columns: minmax(0, 1fr) auto minmax(62px, auto);
  align-items: center;
}

.location-sale-cart-item > strong {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  min-width: 62px;
  margin: 0;
  color: #f8f3ec;
  text-align: right;
  white-space: nowrap;
}

.location-sale-cart-item .qty-controls {
  grid-column: 2;
  grid-row: 1;
}

.location-sale-cart-item > div:first-child {
  grid-column: 1;
  grid-row: 1;
}

.location-report-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  min-height: 0;
}

.location-report-filters {
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  align-items: end;
  align-content: start;
  padding: 10px;
}

.location-report-filters > .form-actions {
  grid-column: auto;
  align-self: end;
}

.location-report-panel.is-compact .location-report-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.location-report-panel.is-compact .location-report-filters > .form-actions {
  grid-column: 1 / -1;
}

.location-report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.location-report-summary article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(40px, auto) minmax(76px, auto);
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid rgba(69, 214, 143, 0.28);
  border-radius: 8px;
  background: rgba(69, 214, 143, 0.08);
}

.location-report-summary span {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.location-report-summary b,
.location-report-summary strong {
  color: #baf6d2;
  font-weight: 950;
  text-align: right;
}

.location-report-summary strong {
  min-width: 76px;
  font-size: 1rem;
}

.location-report-table-wrap {
  width: 100%;
  max-height: min(48vh, 520px);
  overflow: auto;
  border: 1px solid rgba(69, 189, 244, 0.2);
  border-radius: 8px;
  background: rgba(9, 13, 18, 0.64);
}

.location-report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.location-report-table .col-name {
  width: 28%;
}

.location-report-table .col-num {
  width: 12%;
}

.location-report-table th,
.location-report-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(69, 189, 244, 0.13);
  vertical-align: middle;
}

.location-report-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1.16;
  text-align: right;
  text-transform: uppercase;
  background: rgba(16, 24, 33, 0.96);
}

.location-report-table th:first-child,
.location-report-table td:first-child {
  text-align: left;
}

.location-report-table td {
  color: #f8f3ec;
  font-size: 0.92rem;
}

.location-report-table td.num {
  color: #f8f3ec;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.location-report-table tr:last-child td {
  border-bottom: 0;
}

.location-report-table td:first-child strong {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.16;
}

.location-report-table td small {
  display: block;
  margin-top: 3px;
  color: #9fb0c0;
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .location-report-panel {
    gap: 10px;
  }

  .location-report-panel.is-compact .location-report-filters,
  .location-report-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .location-report-panel.is-compact .location-report-filters > .form-actions,
  .location-report-filters > .form-actions {
    grid-column: 1 / -1;
  }

  .location-report-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .location-report-summary article {
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    min-height: 70px;
    padding: 10px;
  }

  .location-report-summary b,
  .location-report-summary strong {
    min-width: 0;
    text-align: right;
  }

  .location-report-table th,
  .location-report-table td {
    padding: 9px 8px;
  }

  .location-report-table th {
    font-size: 0.68rem;
  }

  .location-report-table td {
    font-size: 0.84rem;
  }
}

@media (max-width: 560px) {
  .location-report-panel.is-compact .location-report-filters,
  .location-report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-report-summary {
    grid-template-columns: 1fr;
  }

  .location-report-summary article {
    grid-template-columns: minmax(0, 1fr) minmax(44px, auto) minmax(86px, auto);
    column-gap: 18px;
    min-height: 48px;
  }

  .location-report-summary b {
    min-width: 44px;
  }

  .location-report-summary strong {
    min-width: 86px;
  }

  .location-report-table {
    min-width: 660px;
  }
}

.product-modal-card {
  width: min(980px, 100%);
}

.modal-form {
  max-height: calc(100vh - 170px);
  max-height: calc(100dvh - 170px);
  overflow: auto;
}

.modal-form-actions {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(13, 18, 25, 0), rgba(13, 18, 25, 0.98) 28%);
}

.modal-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-card header button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(69, 189, 244, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 950;
}

.fiscal-error-details {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.22);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.06);
}

.fiscal-error-details span {
  color: #aeb8c8;
  font-size: 0.85rem;
  font-weight: 850;
}

.fiscal-error-details strong {
  color: #eaf7ff;
  font-size: 0.98rem;
  font-weight: 950;
  text-align: right;
}

fieldset {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.18);
  border-radius: 8px;
}

legend {
  padding: 0 6px;
  color: var(--accent);
  font-weight: 950;
}

.addon-row,
.check-row,
.payment-options label,
.field {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #d7dce5;
  font-weight: 900;
}

.modal-card .check-row {
  min-height: 38px;
  line-height: 1.18;
}

.modal-card .check-row input,
.addon-row input[type="checkbox"],
.addon-row input[type="radio"],
.saved-order input[type="checkbox"] {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  accent-color: #45bdf4;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.field select {
  min-height: 46px;
}

.addon-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 58px;
}

.addon-qty {
  min-height: 34px;
  border: 1px solid rgba(69, 214, 143, 0.36);
  border-radius: 7px;
  background: rgba(69, 214, 143, 0.1);
  color: #baf6d2;
  text-align: center;
}

.addon-note-row {
  display: grid;
  gap: 7px;
  padding: 4px 0 8px;
  color: var(--text);
  font-weight: 800;
}

.addon-note-row textarea {
  min-height: 64px;
  resize: vertical;
}

.payment-options {
  display: grid;
  gap: 9px;
  margin-left: 30px;
  padding: 10px 12px;
  border: 1px solid rgba(69, 189, 244, 0.18);
  border-radius: 8px;
  background: rgba(69, 189, 244, 0.06);
}

.payment-options[hidden] {
  display: none;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-actions button {
  min-height: 48px;
  border-color: var(--button-border);
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 950;
}

.modal-actions button[type="submit"] {
  border-color: var(--button-primary-border);
  background: var(--button-primary-bg);
  color: var(--button-primary-ink);
}

.modal-actions.single {
  grid-template-columns: 1fr;
}


.sale-action-overlay {
  z-index: 240;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.sale-action-card,
.sale-action-error-card {
  width: min(500px, 100%);
  border-color: rgba(69, 214, 143, 0.48);
  background: rgba(9, 13, 18, 0.98);
}

.sale-action-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.offline-sync-overlay {
  z-index: 280;
}

.offline-sync-overlay[hidden] {
  display: none;
}

.offline-sync-card {
  width: min(560px, calc(100vw - 28px));
}

.offline-sync-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.offline-sync-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(69, 189, 244, 0.16);
}

.offline-sync-progress span {
  display: block;
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #45bdf4, #45d68f);
  transition: width 180ms ease;
}

.offline-sync-card small {
  color: #9fb0c0;
  font-weight: 850;
}

.offline-sync-overlay[data-phase="done"] .sale-action-spinner {
  border-color: rgba(69, 214, 143, 0.34);
  border-top-color: #45d68f;
}

.offline-sync-overlay[data-phase="error"] .offline-sync-card {
  border-color: rgba(255, 96, 96, 0.55);
}

.offline-sync-overlay[data-phase="error"] .sale-action-spinner {
  animation: none;
  border-color: rgba(255, 96, 96, 0.65);
}

.login-progress-overlay {
  z-index: 300;
}

.login-progress-overlay[hidden] {
  display: none;
}

.login-progress-card {
  border-color: rgba(69, 189, 244, 0.55);
}

.login-progress-bar span {
  width: 38%;
  animation: login-progress-slide 1.25s ease-in-out infinite;
}

.login-progress-overlay[data-phase="done"] .login-progress-bar span {
  width: 100%;
  animation: none;
}

.login-progress-overlay[data-phase="done"] .sale-action-spinner {
  border-color: rgba(69, 214, 143, 0.34);
  border-top-color: #45d68f;
}

@keyframes login-progress-slide {
  0% { transform: translateX(-115%); }
  55% { transform: translateX(85%); }
  100% { transform: translateX(265%); }
}

.sale-action-card h2,
.sale-action-card p,
.sale-action-error-card p {
  margin: 0;
}

.sale-action-card p:not(.eyebrow),
.sale-action-error-card > p {
  color: var(--muted);
  line-height: 1.45;
}

.sale-action-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(69, 189, 244, 0.2);
  border-top-color: rgba(69, 214, 143, 0.95);
  border-radius: 999px;
  animation: sale-action-spin 0.75s linear infinite;
}

.sale-action-error-card {
  border-color: rgba(255, 96, 96, 0.42);
}

.sale-action-error-card .modal-actions button:first-child {
  border-color: rgba(69, 214, 143, 0.62);
  background: rgba(34, 126, 82, 0.46);
  color: #d9ffe7;
}

@keyframes sale-action-spin {
  to {
    transform: rotate(360deg);
  }
}

.ready-popup-card {
  width: min(560px, 100%);
  border-color: rgba(69, 214, 143, 0.42);
}

.ready-popup-list {
  display: grid;
  gap: 10px;
}

.ready-popup-list article {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(69, 214, 143, 0.3);
  border-radius: 8px;
  background: rgba(69, 214, 143, 0.08);
}

.ready-popup-list strong {
  color: #d9ffe8;
}

.ready-popup-list ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ready-popup-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-weight: 850;
}

.ready-popup-list li span {
  color: var(--mint);
}

@media (min-width: 901px) {
  body {
    overflow: auto;
  }

  .sale-shell {
    min-height: 100vh;
    height: auto;
  }

  .sale-shell:not(.dashboard-shell):not(.floor-admin-shell) {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .sale-shell.floor-admin-shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  .sale-shell.has-table {
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .sale-shell.has-prep-panel {
    grid-template-columns: minmax(0, 1fr) 430px;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .sale-shell.has-table .topbar {
    grid-column: 1 / -1;
  }

  .pos-content {
    padding-bottom: 12px;
  }

  .sale-shell.has-table .pos-content {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
  }

  .sale-shell.has-prep-panel .floor-view {
    grid-column: 1;
    grid-row: 2;
  }

  .sale-shell:not(.has-table) .floor-view {
    align-items: center;
    justify-items: center;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .sale-shell:not(.has-table) .floor-scale-frame {
    display: block;
  }

  .sale-shell:not(.has-table) .sale-floor-stage {
    transform-origin: top left;
  }

  .sale-shell.has-prep-panel .prep-panel {
    grid-column: 2;
    grid-row: 2;
    margin: 12px 12px 12px 0;
  }

  .prep-shell {
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .prep-shell .prep-panel {
    margin: 12px;
  }

  .sale-shell.has-table .drawer-backdrop,
  .sale-shell.has-table .mobile-footer {
    display: none;
  }

  .sale-shell.has-table .order-drawer {
    position: static;
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    display: grid;
    grid-template-rows: minmax(0, auto) minmax(0, 1fr);
    align-content: start;
    min-height: 0;
    max-height: none;
    margin: 12px 12px 12px 0;
    padding: 10px;
    border-radius: 8px;
    transform: none;
    transition: none;
    box-shadow: none;
  }

  .sale-shell.has-table .order-drawer > header {
    display: none;
  }

  .sale-shell.has-table .drawer-active,
  .sale-shell.has-table .drawer-new {
    display: grid;
    grid-template-rows: auto minmax(0, auto) auto auto;
    align-content: start;
    min-height: 0;
    overflow: visible;
    padding-right: 2px;
  }

  .sale-shell.has-table .drawer-active > h3 {
    display: none;
  }

  .sale-shell.has-table .drawer-list {
    overflow: auto;
    padding-right: 2px;
  }

  .sale-shell.has-table .drawer-active .active-tab-panel > .drawer-list {
    max-height: none;
    overflow: auto;
  }

  .sale-shell.has-table .order-drawer.is-active {
    grid-template-rows: minmax(0, 1fr);
  }

  .sale-shell.has-table .order-drawer.is-active .drawer-active {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    overflow: hidden;
  }

  .sale-shell.has-table .order-drawer.is-active .active-tab-panel {
    min-height: 0;
  }

  .sale-shell.has-table .order-drawer.is-active .drawer-new {
    display: none;
  }

  .sale-shell.has-table .drawer-new .drawer-list {
    min-height: 0;
    align-content: start;
  }

  .sale-shell.has-table .drawer-new .order-item {
    grid-template-columns: minmax(0, 1fr) 104px 52px;
    gap: 7px;
    align-items: center;
    min-height: 42px;
    padding: 6px 8px;
  }

  .sale-shell.has-table .drawer-new .order-item > strong {
    grid-column: 3;
    justify-self: end;
    margin: 0;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .sale-shell.has-table .drawer-new .qty-controls {
    grid-template-columns: 30px 32px 30px;
    gap: 4px;
  }

  .sale-shell.has-table .drawer-new .qty-controls button {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 1rem;
  }

  .sale-shell.has-table .drawer-new .qty-controls b {
    min-width: 32px;
    padding: 5px 4px;
  }

  .sale-shell.has-table .drawer-new {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 10px;
    padding-top: 10px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, 150px);
    gap: 12px;
    justify-content: start;
  }

  .product-card,
  button.product-card {
    grid-template-rows: 92px 40px;
    width: 150px;
    height: 148px;
    min-height: 148px;
    padding: 9px 7px;
    font-size: 0.78rem;
  }

  .product-card img,
  .placeholder {
    max-width: 126px;
    max-height: 92px;
  }

  .product-card.no-image,
  button.product-card.no-image {
    grid-template-rows: 1fr;
  }

  .product-card.no-image > span {
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1.12;
  }

  .product-card .is-long {
    max-height: 40px;
    font-size: 0.66rem;
  }

  .dashboard-shell .floor-view,
  .floor-admin-shell .floor-view {
    min-height: calc(100vh - 64px);
  }
}


@media (max-width: 640px) {
  .balance-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .balance-filter label {
    min-width: 0;
    gap: 5px;
  }

  .balance-filter label > span {
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .balance-filter input,
  .balance-filter select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    font-size: 0.92rem;
  }

  .balance-filter label:nth-of-type(5),
  .balance-filter .form-actions {
    grid-column: 1 / -1;
  }

  .balance-filter .form-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 2px;
  }

  .balance-filter .form-actions button {
    width: 100%;
    min-height: 42px;
    padding: 8px 6px;
    font-size: 0.82rem;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .balance-filter .form-actions {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 640px) {
  .report-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-content: stretch;
  }

  .report-filter label,
  .report-filter-groups label,
  .movement-filter label,
  .location-report-filters label {
    min-width: 0;
    gap: 5px;
  }

  .report-filter label > span,
  .report-filter-groups label > span,
  .movement-filter label > span,
  .location-report-filters label > span {
    font-size: 0.78rem;
    line-height: 1.15;
  }

  .report-filter input,
  .report-filter select,
  .report-filter button,
  .report-filter-groups input,
  .report-filter-groups select,
  .movement-filter input,
  .movement-filter select,
  .location-report-filters input,
  .location-report-filters select {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    font-size: 0.92rem;
  }

  .report-filter button {
    min-height: 42px;
    padding: 8px 6px;
    font-size: 0.82rem;
    text-align: center;
  }

  .report-filter-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .movement-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .movement-filter label:nth-of-type(2) {
    grid-column: 1 / -1;
    order: 3;
  }

  .movement-filter label:nth-of-type(3) {
    order: 2;
  }

  .location-report-panel.is-compact .location-report-filters,
  .location-report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .location-report-panel.is-compact .location-report-filters label:first-child,
  .location-report-filters label:first-child {
    grid-column: 1 / -1;
  }

  .location-report-panel.is-compact .location-report-filters > .form-actions,
  .location-report-filters > .form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column: 1 / -1;
    gap: 8px;
    margin-top: 2px;
  }

  .location-report-panel.is-compact .location-report-filters > .form-actions button,
  .location-report-filters > .form-actions button {
    width: 100%;
    min-height: 42px;
    padding: 8px 6px;
    font-size: 0.82rem;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .report-filter,
  .report-filter-groups,
  .movement-filter,
  .location-report-panel.is-compact .location-report-filters,
  .location-report-filters {
    gap: 7px;
  }

  .report-filter input,
  .report-filter select,
  .report-filter button,
  .report-filter-groups select,
  .movement-filter select,
  .location-report-filters input,
  .location-report-filters select,
  .location-report-filters button {
    min-height: 40px;
    padding-inline: 9px;
    font-size: 0.86rem;
  }
}


@media (max-width: 640px) {
  .location-report-table-wrap,
  .stock-table-wrap,
  .movement-table-wrap.detail-table-wrap,
  .report-table-wrap.detail-table-wrap {
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
  }

  .location-report-panel {
    grid-template-rows: auto;
    min-height: auto;
  }

  .location-report-table-wrap {
    margin-top: 0;
  }
}


@media (max-width: 900px) {
  .location-sale-modal-card.is-report-mode {
    grid-template-rows: auto auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .location-sale-modal-card.is-report-mode .location-report-panel {
    min-height: auto;
  }
}

.machine-fields {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(69, 189, 244, 0.2);
  border-radius: 8px;
  background: rgba(6, 18, 24, 0.42);
}

.machine-fields-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.machine-fields-head strong {
  color: var(--accent);
  font-weight: 950;
  text-transform: uppercase;
}

.machine-field-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(110px, 140px) minmax(120px, auto) minmax(150px, 190px) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid rgba(69, 189, 244, 0.16);
  border-radius: 8px;
  background: rgba(17, 24, 33, 0.74);
}

.machine-field-articles-cell {
  display: grid;
  gap: 6px;
  align-self: stretch;
}

.machine-field-articles-cell > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.machine-field-articles-cell button {
  min-height: 42px;
}

.machine-field-articles-cell small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(42, 246, 154, 0.16);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 950;
}

.machine-field-products-card {
  max-width: min(720px, calc(100vw - 24px));
}

.machine-field-products-form {
  display: grid;
  gap: 12px;
}

.machine-field-products-search {
  grid-column: 1 / -1;
}

.machine-field-products-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  max-height: min(56vh, 560px);
  overflow: auto;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}

.machine-field-product-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(69, 189, 244, 0.18);
  border-radius: 8px;
  background: rgba(10, 28, 38, 0.7);
}

.machine-field-product-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.machine-field-product-option strong {
  color: var(--text);
  font-weight: 950;
}

.machine-field-product-option small {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 700px) {
  .machine-fields-head,
  .machine-field-row {
    grid-template-columns: 1fr;
  }

  .machine-fields-head {
    align-items: stretch;
  }

  .machine-field-row {
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .special-exit-shell {
    grid-template-rows: auto;
    grid-auto-rows: auto;
    align-content: start;
    overflow: auto;
  }

  .special-exit-shell.is-entry {
    grid-template-rows: auto minmax(0, 1fr);
    grid-auto-rows: initial;
    align-content: stretch;
    overflow: hidden;
  }

  .special-exit-shell > .admin-panel {
    overflow: visible;
  }

  .stock-count-panel {
    margin: 10px;
  }

  .stock-count-start-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .transfer-start-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .special-exit-header-panel,
  .special-exit-types-panel,
  .special-exit-list-panel {
    margin: 10px;
  }

  .special-exit-start-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stock-count-start-form label:first-child,
  .stock-count-start-form .form-actions {
    grid-column: 1 / -1;
  }

  .transfer-start-form label:nth-child(1),
  .transfer-start-form label:nth-child(3),
  .transfer-start-form label:nth-child(4),
  .transfer-start-form label:nth-child(5),
  .transfer-start-form .form-actions {
    grid-column: 1 / -1;
  }

  .special-exit-start-form label:nth-child(1),
  .special-exit-start-form label:nth-child(2),
  .special-exit-start-form label:nth-child(3),
  .special-exit-start-form label:nth-child(4),
  .special-exit-note,
  .special-exit-start-form .form-actions {
    grid-column: 1 / -1;
  }

  .stock-count-entry {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    gap: 8px;
    padding: 8px;
    padding-bottom: 8px;
    overflow: hidden;
  }

  .special-exit-entry {
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    align-content: stretch;
  }

  .special-exit-entry .special-exit-products {
    min-height: 0;
    overflow: hidden;
  }

  .special-exit-entry .special-exit-product-grid {
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .stock-count-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 100%;
    padding-bottom: 8px;
    scroll-padding-bottom: 8px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .stock-count-entry > .stock-count-side-panel,
  .stock-count-entry > .stock-count-cart-panel,
  .stock-count-entry > .stock-count-machines-panel {
    display: none;
  }

  .stock-count-mobile-footer {
    position: static;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .stock-count-mobile-footer button {
    display: grid;
    gap: 3px;
    min-height: 62px;
    padding: 8px;
    border: 1px solid rgba(69, 189, 244, 0.28);
    border-radius: 8px;
    background: rgba(11, 30, 43, 0.95);
    color: #c6d8e8;
    font-weight: 950;
  }

  .stock-count-mobile-footer button.is-active-green {
    border-color: rgba(69, 214, 143, 0.58);
    background: rgba(18, 78, 58, 0.95);
    color: #baf6d2;
  }

  .stock-count-mobile-footer button.is-active-blue {
    border-color: rgba(69, 189, 244, 0.58);
    background: rgba(15, 61, 86, 0.95);
    color: #c8f0ff;
  }

  .stock-count-mobile-footer span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .stock-count-mobile-footer b {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
  }

  .stock-count-mobile-footer small {
    font-size: 0.72rem;
    opacity: 0.78;
  }

  .special-exit-mobile-footer {
    grid-template-columns: 1fr;
  }

  .stock-count-mobile-sheet {
    position: fixed;
    right: 10px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 86;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    max-height: calc(100dvh - 108px);
    padding: 10px;
    border: 1px solid rgba(69, 189, 244, 0.38);
    border-radius: 10px;
    background: rgba(7, 16, 25, 0.96);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.56);
  }

  .stock-count-mobile-sheet > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }

  .stock-count-mobile-sheet > header h2 {
    margin: 0;
    font-size: 1.25rem;
  }

  .stock-count-mobile-sheet > header button {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 8px;
    font-size: 1.45rem;
  }

  .stock-count-mobile-sheet > header > strong {
    display: inline-grid;
    place-items: center;
    min-width: 54px;
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(69, 214, 143, 0.18);
    color: #baf6d2;
    font-weight: 950;
  }

  .special-exit-mobile-sheet > header > strong {
    display: inline-grid;
    place-items: center;
    min-width: 54px;
    height: 44px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(69, 214, 143, 0.18);
    color: #baf6d2;
    font-weight: 950;
  }

  .stock-count-mobile-sheet .stock-count-cart-panel,
  .stock-count-mobile-sheet .stock-count-machines-panel {
    display: grid;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .stock-count-mobile-sheet [data-stock-count-save] {
    display: none;
  }

  .special-exit-mobile-sheet {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .special-exit-mobile-sheet > .drawer-action {
    min-height: 54px;
  }

  .stock-count-cart-panel {
    padding: 10px;
  }

  .stock-count-machines-panel {
    padding: 10px;
  }

  .stock-count-cart-panel > header h2 {
    font-size: 1.08rem;
  }

  .stock-count-machines-panel > header h2 {
    font-size: 1.08rem;
  }

  .stock-count-cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stock-count-cart-item .qty-controls {
    grid-template-columns: 38px minmax(36px, auto) 38px;
    gap: 6px;
  }

  .stock-count-cart-item .qty-controls button {
    width: 38px;
    height: 38px;
  }

  .stock-count-machine-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .stock-count-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
