:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --toolbar-height: 74px;
  --screen-padding: 10px;
  --bg-main: #02070c;
  --bg-secondary: #061621;
  --card-bg: rgba(6, 24, 35, 0.84);
  --card-border: rgba(88, 138, 164, 0.23);
  --text-main: #e9f5ff;
  --text-muted: #95aec0;
  --btn-main: linear-gradient(180deg, #49bce2 0%, #2b88b7 100%);
  --btn-main-active: linear-gradient(180deg, #2f92ba 0%, #236d90 100%);
  --btn-neutral: linear-gradient(180deg, #2f4f62 0%, #233c4b 100%);
  --btn-shadow: 0 8px 18px rgba(1, 10, 16, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --page-gradient: radial-gradient(circle at 24% -8%, #10384a 0%, #071926 26%, #030a12 56%, #02070c 100%);
  --work-area-height: calc(100dvh - var(--toolbar-height) - env(safe-area-inset-bottom) - 34px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text-main);
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--page-gradient);
  position: relative;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html {
  min-height: 100%;
  background: var(--page-gradient);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--page-gradient);
}

.app {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: var(--screen-padding) var(--screen-padding)
    calc(var(--toolbar-height) + var(--screen-padding) + env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
  justify-items: center;
  overflow: visible;
}

.app > section {
  width: 100%;
}

@supports (-webkit-touch-callout: none) {
  html,
  body {
    min-height: 100%;
    background: var(--page-gradient);
  }
}

.card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: clamp(8px, 1.4dvh, 14px);
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
  min-width: 0;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

input,
textarea,
select,
button {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #416171;
  padding: 8px 10px;
  font-size: 16px;
}

textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
}

.notes-editor {
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  border: 1px solid #416171;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 23, 31, 0.95);
  overflow: auto;
  line-height: 1.4;
}

.notes-editor:empty::before {
  content: attr(data-placeholder);
  color: #7891a1;
}

.notes-editor img {
  max-width: min(42vw, 220px);
  max-height: 220px;
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 8px 0;
}

button {
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button.primary {
  border: none;
  color: #ecf7fd;
  background: var(--btn-main);
}

button.warn {
  border: none;
  color: #fff;
  background: linear-gradient(180deg, #dd5656 0%, #b93737 100%);
}

.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.badge.online {
  background: #124635;
  color: #77d7ae;
}

.badge.offline {
  background: #4d2424;
  color: #f7a3a3;
}

.muted {
  color: var(--text-muted);
  margin: 0 0 10px;
}

.sale-form {
  display: grid;
  gap: 8px;
}

.sale-screen {
  width: min(100%, 420px);
  max-width: 420px;
  margin: 0 auto;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(4px, 1.2dvh, 14px);
  padding: clamp(3px, 0.9dvh, 10px) 0 clamp(4px, 1dvh, 10px);
  text-align: center;
}

.sale-screen > * {
  margin-left: auto;
  margin-right: auto;
}

.brand-logo-image {
  width: min(100%, 380px);
  max-height: 96px;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  margin-inline: auto;
}

.sale-qr {
  width: clamp(190px, 34dvh, 290px);
  max-width: min(74vw, 290px);
  max-height: min(34dvh, 290px);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  cursor: zoom-in;
}

.sale-total {
  text-align: center;
}

.sale-total-label {
  margin-bottom: 3px;
}

.sale-total strong {
  display: block;
  font-size: clamp(24px, 4.8dvh, 44px);
  line-height: 1.05;
  letter-spacing: 0.5px;
}

.small {
  font-size: 13px;
  margin-top: 4px;
}

.pill-btn {
  width: min(76vw, 330px);
  min-height: clamp(38px, 5.6dvh, 58px);
  border: 1px solid rgba(132, 210, 238, 0.36);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.02) 38%),
    var(--btn-main);
  color: #f3fbff;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(17px, 2.5dvh, 25px);
  font-weight: 650;
  letter-spacing: 0.25px;
  text-align: center;
  box-shadow: var(--btn-shadow);
  transition: transform 120ms ease, filter 120ms ease;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.pill-btn:active {
  transform: translateY(1px);
  background: var(--btn-main-active);
  filter: brightness(0.96);
}

.pill-btn:focus-visible {
  outline: 2px solid #8bd8f5;
  outline-offset: 2px;
}

.amount-btn {
  min-height: clamp(42px, 6.2dvh, 62px);
  font-size: clamp(22px, 3.2dvh, 32px);
  font-weight: 700;
  line-height: 1;
  margin-top: 0 !important;
}

.sale-actions {
  width: 100%;
  max-width: 360px;
  display: grid;
  gap: clamp(8px, 1.2dvh, 12px);
  margin-top: clamp(4px, 0.9dvh, 10px);
  justify-items: center;
}

.ghost-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.01) 46%),
    var(--btn-neutral);
  border-color: rgba(152, 196, 218, 0.24);
  margin-top: 2px;
}

.pay-actions {
  width: min(100%, 360px);
  max-width: 360px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 0;
  justify-content: center;
}

.pay-actions .pill-btn {
  width: 100%;
  min-height: clamp(40px, 5.8dvh, 58px);
  font-size: clamp(17px, 2.4dvh, 24px);
}

.reset-btn {
  width: min(70vw, 300px);
  min-height: clamp(36px, 4.9dvh, 52px);
  margin-top: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.01) 46%),
    linear-gradient(180deg, #3a596d 0%, #274150 100%);
  border-color: rgba(145, 184, 204, 0.22);
  font-size: clamp(16px, 2.2dvh, 22px);
}

.totals {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.list-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.hidden {
  display: none !important;
}

.tab-panel {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  justify-self: center;
  padding-inline: clamp(2px, 1vw, 8px);
}

#shiftWorkSection {
  height: var(--work-area-height);
  min-height: var(--work-area-height);
  width: 100%;
  max-width: 100%;
  padding: 10px;
  display: grid;
  justify-items: center;
  align-items: stretch;
  overflow-x: hidden;
  overflow-y: hidden;
  min-width: 0;
}

#tabSale {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#tabSale .sale-screen {
  min-height: 100%;
  justify-content: flex-start;
  gap: 6px;
}

#tabSale .sale-qr {
  width: min(74vw, 42dvh, 290px);
  max-width: none;
  max-height: none;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 6px 0;
}

#tabSale .sale-total strong {
  font-size: clamp(30px, 5.2dvh, 44px);
}

#tabSale .sale-actions {
  width: min(100%, 380px);
  max-width: 380px;
  gap: 13px;
  margin-top: auto;
}

#tabSale .pill-btn {
  width: min(76vw, 330px);
  min-height: 56px;
  font-size: 27px;
}

#tabSale .amount-btn {
  min-height: 66px;
  font-size: 43px;
}

#tabSale .pay-actions {
  width: min(100%, 380px);
  max-width: 380px;
  gap: 13px;
}

#tabSale .pay-actions .pill-btn {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  font-size: 27px;
}

#tabSale .reset-btn {
  min-height: 54px;
  font-size: 26px;
}

#tabSale.sale-fit-1 .sale-screen {
  gap: 4px;
}

#tabSale.sale-fit-1 .sale-qr {
  width: min(56vw, 27dvh, 180px);
}

#tabSale.sale-fit-1 .pill-btn {
  min-height: 48px;
  font-size: 16px;
}

#tabSale.sale-fit-1 .amount-btn {
  min-height: 56px;
  font-size: 20px;
}

#tabSale.sale-fit-2 .sale-screen {
  gap: 3px;
}

#tabSale.sale-fit-2 .brand-logo-image {
  max-height: 64px;
}

#tabSale.sale-fit-2 .sale-qr {
  width: min(52vw, 24dvh, 155px);
}

#tabSale.sale-fit-2 .sale-total strong {
  font-size: clamp(20px, 3.6dvh, 28px);
}

#tabSale.sale-fit-2 .pill-btn {
  min-height: 42px;
  font-size: 14px;
}

#tabSale.sale-fit-2 .amount-btn {
  min-height: 50px;
  font-size: 18px;
}

#tabNotes,
#tabSummary {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
  justify-self: center;
}

#tabSummary {
  width: 100%;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  gap: clamp(4px, 0.9dvh, 10px);
  align-content: start;
  overflow: visible;
}

#tabSummary .muted {
  margin-bottom: 2px;
}

#shiftMeta {
  font-size: clamp(19px, 1.9vh, 22px);
  line-height: 1.28;
  padding-right: 190px;
}

#tabNotes {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 8px;
  overflow: visible;
  min-width: 0;
}

.tab-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notes-clear-btn {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #5e2f2f;
  background: linear-gradient(180deg, #572626 0%, #3d1d1d 100%);
  color: #ffdede;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.notes-layout {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.notes-label {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  width: 100%;
  min-width: 0;
  margin-bottom: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}

.notes-photo-label {
  margin-bottom: 0;
  align-self: end;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.notes-photo-label input[type="file"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  font-size: 14px;
}

.summary-head {
  position: relative;
  padding-right: 190px;
  min-height: clamp(40px, 4.8dvh, 48px);
  margin-bottom: 2px;
}

.summary-head-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  gap: 10px;
  justify-items: end;
}

.summary-head .warn {
  min-height: clamp(36px, 4.6dvh, 44px);
  padding: 6px 10px;
  font-size: clamp(17px, 2vh, 20px);
}

.summary-edit-btn {
  min-height: 36px;
  min-width: 148px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #3f6473;
  background: linear-gradient(180deg, #19394b 0%, #102737 100%);
  color: #deeff8;
  font-size: 15px;
  font-weight: 600;
  justify-self: end;
}

.summary-day-links {
  width: max-content;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  justify-self: end;
}

.summary-day-btn {
  min-height: 36px;
  min-width: 148px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #3f6473;
  background: linear-gradient(180deg, #19394b 0%, #102737 100%);
  color: #deeff8;
  font-size: 15px;
  font-weight: 600;
}

#tabSummary .tab-title {
  display: block;
  margin: 0;
  line-height: 1.15;
}

.summary-metrics {
  display: grid;
  gap: clamp(2px, 0.5dvh, 6px);
  margin: 2px 0 4px;
}

.summary-metrics p {
  margin: 0;
  font-size: clamp(19px, 1.95vh, 23px);
  line-height: 1.22;
}

.summary-to-hand,
.summary-to-hand strong {
  color: #ef4444;
}

.summary-table-wrap {
  margin-top: 2px;
  border: 1px solid #355462;
  border-radius: 10px;
  overflow: auto;
  min-height: 0;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
  table-layout: fixed;
}

.summary-table th,
.summary-table td {
  padding: clamp(6px, 1.1dvh, 10px);
  border-bottom: 1px solid #274654;
  text-align: left;
  font-size: clamp(17px, 1.7vh, 20px);
}

.summary-table .sale-row-excluded td:not(:last-child) {
  text-decoration: line-through;
  opacity: 0.62;
}

.sale-toggle-btn {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #406272;
  background: linear-gradient(180deg, #1a3545 0%, #122735 100%);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 8px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}

.photo-grid img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.bottom-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: #071926;
  border-top: none;
  min-height: var(--toolbar-height);
}

.toolbar-btn {
  min-height: 46px;
  border: 1px solid #355462;
  background: linear-gradient(180deg, #122b39 0%, #0f2230 100%);
  color: #d3e8f2;
  font-weight: 600;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.toolbar-btn.active {
  color: #effbff;
  background: var(--btn-main);
  border-color: #3d9bb9;
}

@media (max-width: 460px) {
  :root {
    --screen-padding: 8px;
  }

  .app {
    gap: 8px;
  }

  .brand-logo-image {
    width: min(100%, 330px);
    max-height: 76px;
  }

  .pill-btn {
    min-height: clamp(44px, 6.1dvh, 54px);
    font-size: clamp(19px, 2.6dvh, 22px);
  }

  .amount-btn {
    min-height: clamp(48px, 6.7dvh, 58px);
    font-size: clamp(24px, 3.4dvh, 28px);
    margin-top: auto;
  }

  .ghost-btn {
    font-size: clamp(21px, 3dvh, 24px);
  }

  .sale-qr {
    width: clamp(180px, 32dvh, 250px);
    max-width: min(72vw, 250px);
    max-height: min(32dvh, 250px);
  }

  .tab-title {
    font-size: 26px;
  }

  .summary-head {
    padding-right: 162px;
  }

  #tabNotes {
    height: 100%;
  }

  #tabSummary {
    gap: 5px;
  }

  #shiftMeta {
    font-size: 17px;
    line-height: 1.24;
    padding-right: 162px;
  }

  .summary-metrics p {
    font-size: 17px;
    line-height: 1.2;
  }

  .summary-head .warn {
    font-size: 16px;
    min-height: 34px;
    padding: 6px 8px;
  }

  .summary-edit-btn,
  .summary-day-btn {
    min-height: 34px;
    min-width: 140px;
    padding: 6px 10px;
    font-size: 14px;
  }

  .summary-table th,
  .summary-table td {
    font-size: 16px;
    padding: 7px 8px;
  }

  .pay-actions {
    width: 100%;
    max-width: 330px;
    gap: 8px;
    margin-top: 4px;
  }

  .reset-btn {
    margin-top: 2px;
  }
}

@media (max-height: 820px) {
  :root {
    --screen-padding: 6px;
    --toolbar-height: 68px;
  }

  #shiftWorkSection {
    padding: 6px;
  }

  .sale-screen {
    gap: 8px;
    padding: 2px 0;
  }

  .brand-logo-image {
    width: min(100%, 300px);
    max-height: 72px;
  }

  .sale-qr {
    width: clamp(165px, 30dvh, 225px);
    max-width: min(68vw, 225px);
    max-height: min(30dvh, 225px);
    border-radius: 14px;
  }

  .sale-total strong {
    font-size: clamp(24px, 4.4dvh, 34px);
  }

  .small {
    font-size: 12px;
  }

  .pill-btn {
    min-height: 46px;
    font-size: clamp(18px, 2.6dvh, 22px);
  }

  .amount-btn {
    min-height: 48px;
    font-size: clamp(24px, 3.3dvh, 28px);
    margin-top: auto;
  }

  .pay-actions {
    max-width: 320px;
    gap: 8px;
    margin-top: 4px;
  }

  .pay-actions .pill-btn {
    min-height: 46px;
    font-size: clamp(18px, 2.6dvh, 22px);
  }

  .reset-btn {
    min-height: 42px;
    font-size: clamp(17px, 2.4dvh, 20px);
    margin-top: 2px;
  }

  .tab-title {
    font-size: 24px;
  }

  #shiftMeta,
  .summary-metrics p {
    font-size: 16px;
  }

  .summary-head .warn {
    min-height: 34px;
    font-size: 15px;
    padding: 4px 8px;
  }

  .summary-edit-btn,
  .summary-day-btn {
    min-height: 34px;
    min-width: 132px;
    padding: 4px 8px;
    font-size: 13px;
  }

  .summary-table th,
  .summary-table td {
    font-size: 15px;
    padding: 6px 7px;
  }
}

@media (max-height: 700px) {
  :root {
    --screen-padding: 4px;
    --toolbar-height: 64px;
  }

  #shiftWorkSection {
    padding: 4px;
  }

  .sale-screen {
    gap: 6px;
  }

  .brand-logo-image {
    width: min(100%, 255px);
    max-height: 60px;
  }

  .sale-qr {
    width: clamp(145px, 27dvh, 190px);
    max-width: min(62vw, 190px);
    max-height: min(27dvh, 190px);
    border-radius: 12px;
  }

  .sale-total strong {
    font-size: clamp(20px, 4dvh, 30px);
  }

  .pill-btn {
    min-height: 40px;
    font-size: clamp(16px, 2.3dvh, 19px);
  }

  .amount-btn {
    min-height: 42px;
    font-size: clamp(20px, 2.9dvh, 24px);
  }

  .pay-actions {
    max-width: 290px;
    gap: 6px;
    margin-top: 2px;
  }

  .pay-actions .pill-btn {
    min-height: 40px;
    font-size: clamp(16px, 2.3dvh, 19px);
  }

  .reset-btn {
    min-height: 38px;
    font-size: clamp(15px, 2.1dvh, 17px);
    margin-top: 0;
  }

  .tab-title {
    font-size: 21px;
  }

  #shiftMeta,
  .summary-metrics p,
  .summary-table th,
  .summary-table td {
    font-size: 14px;
  }
}

@media (max-height: 760px) {
  .sale-screen {
    gap: 4px;
    padding-bottom: 2px;
  }

  .sale-qr {
    width: clamp(140px, 24dvh, 180px);
    max-width: min(60vw, 180px);
    max-height: min(24dvh, 180px);
  }

  .amount-btn {
    margin-top: auto;
  }

  .pill-btn {
    min-height: 36px;
    font-size: clamp(15px, 2.1dvh, 18px);
  }

  .amount-btn {
    min-height: 40px;
    font-size: clamp(19px, 2.7dvh, 24px);
  }

  .pay-actions .pill-btn {
    min-height: 36px;
    font-size: clamp(15px, 2.1dvh, 18px);
  }

  .reset-btn {
    min-height: 34px;
    font-size: clamp(14px, 1.9dvh, 16px);
  }
}

@media (max-height: 660px) {
  .brand-logo-image {
    max-height: 52px;
  }

  .sale-qr {
    width: clamp(120px, 21dvh, 155px);
    max-width: min(54vw, 155px);
    max-height: min(21dvh, 155px);
  }

  .sale-total strong {
    font-size: clamp(18px, 3.6dvh, 24px);
  }

  .small {
    font-size: 11px;
    margin-top: 2px;
  }

  .pill-btn {
    min-height: 32px;
    font-size: clamp(13px, 1.8dvh, 16px);
  }

  .amount-btn {
    min-height: 35px;
    font-size: clamp(17px, 2.4dvh, 21px);
  }

  .pay-actions .pill-btn {
    min-height: 32px;
    font-size: clamp(13px, 1.8dvh, 16px);
  }

  .reset-btn {
    min-height: 30px;
    font-size: clamp(12px, 1.7dvh, 14px);
  }
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.52);
  z-index: 20;
}

.modal-card {
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  color: #0f172a;
}

.city-buttons {
  display: grid;
  gap: 10px;
}

.modal-card h2,
.modal-card p,
.modal-card label {
  color: #0f172a;
}

.modal-card .muted {
  color: #334155;
}

.modal-card input {
  color: #0f172a;
  background: #ffffff;
  border-color: #cbd5e1;
}

.modal-card select {
  color: #0f172a;
  background: #ffffff;
  border-color: #cbd5e1;
}

.modal-card button:not(.primary):not(.warn) {
  color: #0f172a;
  background: #e2e8f0;
  border: 1px solid #94a3b8;
}

.auth-error {
  color: #dc2626;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #ef4444;
  border-radius: 10px;
  background: #fee2e2;
  font-weight: 700;
  line-height: 1.3;
}

.modal-actions {
  display: flex;
  gap: 8px;
}

#startModal .city-buttons + .modal-actions {
  margin-top: 12px;
}

.modal-actions > * {
  flex: 1;
}

.qr-preview-content {
  width: min(92vw, 520px);
  max-height: 88dvh;
  display: grid;
  place-items: center;
  gap: 12px;
}

#qrPreviewModal {
  background: rgba(4, 10, 16, 0.46);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.qr-preview-image {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42);
  background: #fff;
}

.qr-capture-btn {
  width: min(88vw, 360px);
  min-height: 48px;
  border-radius: 999px;
  font-size: 19px;
  font-weight: 700;
}
