:root {
  --blue: #005da3;
  --blue-dark: #00467a;
  --blue-soft: #e7f3ff;
  --white: #ffffff;
  --gray-50: #f6f8fb;
  --gray-100: #edf1f5;
  --gray-300: #c8d2dc;
  --gray-500: #687789;
  --gray-900: #102033;
  --success: #17865b;
  --danger: #bd2f2f;
  --shadow: 0 10px 24px rgba(16, 32, 51, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--gray-50);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--gray-900);
  font-family: Inter, Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(0, 93, 163, 0.1), transparent 260px),
    var(--gray-50);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 118px;
}

.topbar {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-logo-link,
.brand-copy {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-side {
  display: grid;
  justify-items: start;
  gap: 9px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 92px;
  height: 92px;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 93, 163, 0.26);
  object-fit: cover;
  flex: 0 0 auto;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  line-height: 1.05;
}

.brand-copy {
  display: block;
}

.brand-copy strong {
  font-size: 1.28rem;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 600;
}

.room-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 20px rgba(16, 32, 51, 0.06);
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 700;
}

.room-chip strong {
  color: var(--blue);
  font-size: 1rem;
}

.headline {
  margin-bottom: 18px;
}

.headline p {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.headline h1 {
  margin: 0;
  font-size: 2.35rem;
  line-height: 0.98;
}

.notice,
.loading,
.empty-state {
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
  color: var(--gray-500);
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.05);
}

.product-list {
  display: grid;
  gap: 10px;
}

.product-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(16, 32, 51, 0.06);
}

.product-card h2 {
  margin: 0 0 7px;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.product-card p {
  margin: 0;
  color: var(--blue);
  font-weight: 800;
}

.product-room-stock {
  display: inline-flex;
  min-height: 24px;
  margin-top: 8px;
  align-items: center;
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 800;
}

.quantity-control {
  display: grid;
  grid-template-columns: 36px 44px 36px;
  align-items: center;
  height: 40px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--gray-50);
  overflow: hidden;
}

.quantity-button {
  width: 36px;
  height: 40px;
  border: 0;
  color: var(--blue);
  background: var(--white);
  font-size: 1.05rem;
  font-weight: 800;
}

.quantity-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.quantity-input {
  width: 44px;
  height: 40px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--gray-900);
  text-align: center;
  font-weight: 800;
  appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.summary-bar {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: 732px;
  min-height: 74px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(200, 210, 220, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.summary-bar span,
.payment-row span,
.pix-box span {
  display: block;
  margin-bottom: 3px;
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 700;
}

.summary-bar strong {
  color: var(--gray-900);
  font-size: 1.25rem;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 93, 163, 0.18);
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-button {
  padding: 0 16px;
  color: var(--white);
  background: var(--blue);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.primary-button:not(:disabled):hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:not(:disabled):active,
.secondary-button:active,
.ghost-button:active {
  transform: translateY(0);
}

.payment-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--gray-100);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}

.payment-row strong {
  font-size: 1.2rem;
}

.room-highlight {
  display: inline-grid;
  min-width: 54px;
  min-height: 44px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue);
}

.pix-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.pix-box strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.secondary-button {
  width: 100%;
  color: var(--blue);
  background: var(--white);
}

.payment-instruction {
  margin: 0;
  color: var(--gray-900);
  font-weight: 700;
}

.payment-items {
  display: grid;
  gap: 8px;
}

.payment-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-500);
  font-size: 0.9rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 14px;
  background: rgba(16, 32, 51, 0.54);
  backdrop-filter: blur(8px);
}

.modal-card {
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(237, 241, 245, 0.9);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(16, 32, 51, 0.28);
}

.modal-heading p {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.modal-heading h2 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.modal-room {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.modal-room span,
.confirm-total span {
  color: var(--gray-500);
  font-size: 0.82rem;
  font-weight: 800;
}

.modal-room strong {
  display: inline-grid;
  min-width: 50px;
  min-height: 38px;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: var(--blue);
}

.checkout-fields {
  display: grid;
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  color: var(--gray-500);
  font-size: 0.82rem;
  font-weight: 800;
}

.form-field .payment-receipt-label {
  color: var(--danger);
  font-size: 1.05rem;
  font-weight: 900;
}

.form-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
  background: var(--white);
  color: var(--gray-900);
}

.form-field input[type="file"] {
  padding: 10px 12px;
}

.form-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.98rem;
  font-weight: 900;
}

.form-field input[type="file"]::-webkit-file-upload-button {
  margin-right: 10px;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.98rem;
  font-weight: 900;
}

.form-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 93, 163, 0.12);
}

.receipt-note {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 8px;
  background: var(--blue-soft);
}

.receipt-note p {
  margin: 0;
  color: var(--gray-900);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.receipt-note strong {
  white-space: nowrap;
}

.compact-copy {
  min-height: 38px;
}

.confirm-items {
  display: grid;
  gap: 8px;
}

.confirm-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-100);
}

.confirm-item strong,
.confirm-item span {
  display: block;
}

.confirm-item span {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 0.86rem;
  font-weight: 700;
}

.confirm-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--gray-50);
}

.confirm-total strong {
  color: var(--blue);
  font-size: 1.28rem;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.modal-actions .ghost-button {
  margin-top: 0;
}

.ghost-button {
  width: 100%;
  margin-top: 14px;
  color: var(--blue);
  background: var(--white);
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 102px;
  left: 14px;
  z-index: 20;
  max-width: 732px;
  margin: 0 auto;
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--white);
  background: var(--gray-900);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

@media (min-width: 720px) {
  .app-shell {
    padding: 28px 14px 132px;
  }

  .brand-logo {
    width: 104px;
    height: 104px;
  }

  .topbar {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .brand-copy strong {
    font-size: 1.45rem;
  }

  .headline h1 {
    font-size: 3.4rem;
  }

  .summary-bar {
    right: 0;
    left: 0;
  }

  .modal-backdrop {
    place-items: center;
  }

  .modal-actions {
    grid-template-columns: 1fr 1fr;
  }
}
