.stp-app {
  max-width: 980px;
  margin: 0 auto;
  color: #222;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.stp-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid #d9d9d9;
}

.stp-toolbar button,
.stp-app button {
  border: 1px solid #1f5d77;
  background: #fff;
  color: #1f5d77;
  cursor: pointer;
  font-weight: 650;
  padding: 10px 14px;
}

.stp-toolbar button.is-active,
.stp-app button[type="submit"],
.stp-result button {
  background: #1f5d77;
  color: #fff;
}

.stp-panel {
  display: none;
}

.stp-panel.is-active {
  display: block;
}

.stp-search-row,
.stp-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
}

.stp-app label {
  display: grid;
  gap: 5px;
  font-weight: 650;
}

.stp-app input,
.stp-app textarea {
  border: 1px solid #b8c0c4;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

.stp-app textarea {
  min-height: 96px;
  resize: vertical;
}

.stp-app fieldset {
  border: 1px solid #d9d9d9;
  margin: 18px 0;
  padding: 14px;
}

.stp-seva-option,
.stp-result {
  align-items: center;
  border-bottom: 1px solid #ececec;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr auto;
  padding: 10px 0;
}

.stp-result {
  grid-template-columns: 1fr auto;
}

.stp-result span {
  display: inline-block;
  margin-right: 12px;
}

.stp-result-meta {
  color: #4d5960;
  margin-top: 3px;
}

.stp-result-seva {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.stp-result-seva span {
  margin-right: 0;
}

.stp-result-printed {
  color: #9a3412;
  font-weight: 700;
  margin-top: 6px;
}

.stp-status {
  margin: 12px 0;
  min-height: 24px;
}

.stp-profile-status {
  color: #1f5d77;
  font-weight: 650;
  margin-top: 10px;
  min-height: 22px;
}

.stp-total {
  font-size: 1.15rem;
  margin: 16px 0;
}

.stp-payment-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 6px 0 12px;
}

.stp-app .stp-payment-options label {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  line-height: 1.2;
  margin: 0;
  min-height: 32px;
  white-space: nowrap;
}

.stp-payment-options input[type="radio"] {
  margin: 0;
  min-height: auto;
  padding: 0;
}

.stp-square-card {
  border: 1px solid #b8c0c4;
  margin: 10px 0;
  min-height: 90px;
  padding: 10px;
}

.stp-terminal-note {
  background: #fff7e0;
  border-left: 4px solid #a96f00;
  margin: 10px 0;
  padding: 10px 12px;
}

.stp-ticket-host {
  display: none;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  .stp-ticket-host,
  .stp-ticket-host * {
    visibility: visible !important;
  }

  .stp-ticket-host {
    display: block;
    left: 0;
    position: absolute;
    top: 0;
    width: 80mm;
  }

  .stp-ticket {
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.2;
    padding: 2mm;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    width: 76mm;
  }

  .stp-ticket h1,
  .stp-ticket h2 {
    color: #000 !important;
    font-size: 16px;
    font-weight: 900;
    margin: 0;
    text-align: center;
    text-shadow: 0.25px 0 #000, -0.25px 0 #000, 0 0.25px #000;
  }

  .stp-ticket h2 {
    border-bottom: 1px dashed #000;
    margin-bottom: 1.5mm;
    padding-bottom: 1.5mm;
  }

  .stp-ticket dl {
    display: grid;
    gap: 1mm 2mm;
    grid-template-columns: 18mm 1fr;
    margin: 0;
  }

  .stp-ticket dt {
    font-weight: 800;
  }

  .stp-ticket dd {
    margin: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
  }

  .stp-ticket p {
    font-weight: 800;
    margin: 2mm 0 0;
    text-align: center;
  }

  .stp-ticket-footer {
    border-top: 1px dashed #000;
    font-size: 10px;
    line-height: 1.25;
    margin-top: 1.5mm;
    overflow-wrap: anywhere;
    padding-top: 1.5mm;
  }

  @page {
    margin: 0;
    size: 80mm auto;
  }
}
