:root {
  --brand: #0f8f8f;
  --brand-dark: #0f6f6f;
  --page: #eef8f8;
  --text: #173131;
  --muted: #5f7f7f;
  --card: #ffffff;
  --danger: #e15f41;
  --warn-bg: #fff8ea;
  --warn-text: #76551d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    linear-gradient(180deg, rgba(15, 143, 143, 0.1), rgba(238, 248, 248, 0) 220px),
    var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

.page {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 22px max(30px, env(safe-area-inset-bottom));
}

.index-page,
.admin-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shop-header,
.admin-header {
  padding: 10px 2px 2px;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  color: #113737;
  letter-spacing: 0;
}

p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.status-card,
.manual-box,
.future-box,
.login-card,
.booking-box {
  padding: 24px 20px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(15, 143, 143, 0.12);
}

.status-card {
  border: 1px solid rgba(15, 143, 143, 0.08);
}

.label,
.small-label {
  font-size: 16px;
  color: #658282;
}

.wait-text {
  margin-top: 16px;
  font-size: 36px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--brand);
  word-break: break-word;
}

.no-wait {
  color: #16825f;
}

.cars-text {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f3fbfb;
  font-size: 22px;
  font-weight: 700;
}

.hint {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.6;
  color: #5e7474;
}

.updated,
.field-tip,
.qr-tip {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #8aa0a0;
}

.primary-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 143, 143, 0.14);
}

.primary-button {
  color: #fff;
  background: var(--brand);
}

.secondary-button {
  color: var(--brand-dark);
  background: #dff5f4;
}

.danger-button {
  color: #fff;
  background: var(--danger);
}

.primary-button:active,
.secondary-button:active,
.danger-button:active,
.admin-link:active {
  transform: translateY(1px);
  opacity: 0.9;
}

.future-note {
  padding: 18px 18px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 15px;
  line-height: 1.6;
}

.booking-box {
  text-align: center;
  border: 1px solid rgba(15, 143, 143, 0.08);
}

.booking-title {
  font-size: 21px;
  font-weight: 800;
  color: #113737;
}

.booking-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 0;
  padding: 0 16px;
  border-radius: 8px;
  background: #dff5f4;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-dark);
}

.booking-hint {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #5e7474;
}

.admin-link {
  display: block;
  width: 100%;
  min-height: 48px;
  line-height: 48px;
  text-align: center;
  text-decoration: none;
  color: var(--brand-dark);
  background: transparent;
  border: 1px solid #98d5d2;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.subtle-link {
  margin: 0;
}

.hidden {
  display: none;
}

.login-card h1 {
  font-size: 28px;
}

.text-input,
.minutes-input {
  width: 100%;
  height: 56px;
  margin-top: 16px;
  padding: 0 14px;
  color: var(--text);
  background: #f3fbfb;
  border: 1px solid #c7e4e4;
  border-radius: 8px;
  font-size: 18px;
  outline: none;
}

.text-input:focus,
.minutes-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 143, 143, 0.12);
}

.login-card .primary-button {
  margin-top: 16px;
}

.error-text {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 14px;
}

.minutes {
  margin-top: 10px;
  font-size: 56px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--brand);
}

.minutes span + span {
  margin-left: 6px;
  font-size: 20px;
  font-weight: 700;
}

.cars {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
}

.manual-title,
.future-title {
  font-size: 18px;
  font-weight: 800;
}

.button-grid,
.stepper-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.stepper-row {
  grid-template-columns: 1fr 110px 1fr;
  align-items: end;
}

.stepper-row .minutes-input {
  margin-top: 0;
  text-align: center;
}

.clear-button {
  margin-top: 12px;
}

.future-item {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: #5b7474;
}

@media (max-width: 360px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .wait-text {
    font-size: 30px;
  }

  .stepper-row {
    grid-template-columns: 1fr;
  }
}
