* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: linear-gradient(180deg, #f4efe5 0%, #f9f7f2 100%);
  color: #1f2a2e;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hero-card,
.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d6c9b7;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(50, 40, 20, 0.08);
  padding: 24px;
}

.hero-card {
  max-width: 720px;
}

.narrow {
  width: min(100%, 420px);
}

.stack {
  display: grid;
  gap: 12px;
}

.actions,
.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.payment-summary {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #e6dccd;
  border-radius: 16px;
  background: #fffaf1;
}

.price-preview {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e6dccd;
  border-radius: 16px;
  background: #fffaf1;
}

.price-preview__header,
.price-preview__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.price-preview__row span {
  color: #6a6f73;
}

.price-preview__row--total {
  padding-top: 10px;
  border-top: 1px solid #eadfce;
}

.price-preview__note {
  margin: 0;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #233d4d;
  color: #fff;
  font-size: 0.85rem;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.payment-row span {
  color: #6a6f73;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: #233d4d;
  color: #fff;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 17px;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
}

.button-secondary {
  background: #af6f32;
}

.button-small {
  padding: 8px 12px;
}

.icon-button {
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}

.icon-button-danger {
  background: #8d3b2f;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #c7b8a6;
  background: #fffdf8;
  font-size: 16px;
  line-height: 1.3;
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  min-height: 120px;
}

input[type="date"] {
  display: block;
}

.error {
  color: #8d1f1f;
}

.muted {
  color: #5d6468;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: #233d4d;
  cursor: pointer;
  flex: 0 0 auto;
  -webkit-appearance: checkbox;
  appearance: auto;
  background: initial;
  border: initial;
}

.admin-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  padding: 24px;
  background: #233d4d;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.content {
  padding: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #ded8ca;
  display: grid;
  gap: 8px;
}

.stat-card strong {
  font-size: 2rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid #ece7dd;
  text-align: left;
  vertical-align: top;
}

.booking-actions-cell {
  min-width: 210px;
}

.booking-actions {
  display: grid;
  gap: 8px;
}

.booking-action-form {
  margin: 0;
}

.booking-action-form select {
  flex: 1 1 auto;
  margin-top: 0;
  min-width: 0;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 20px;
}

.miniapp-layout {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.service-group + .service-group {
  margin-top: 18px;
}

.service-group h3 {
  margin-bottom: 12px;
}

.service-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid #ece2d3;
}

.service-item:first-child {
  border-top: 1px solid #ece2d3;
}

.service-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.service-name {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1f2a2e;
}

.service-meta {
  display: flex;
  align-items: start;
  justify-content: flex-end;
  text-align: right;
  white-space: nowrap;
}

.service-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #233d4d;
  line-height: 1.3;
}

.service-duration {
  font-size: 0.84rem;
  color: #6a6f73;
  line-height: 1.25;
}

@media (max-width: 900px) {
  .admin-page,
  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .page {
    padding: 12px;
  }

  .service-item {
    gap: 10px;
  }

  .service-name {
    font-size: 0.96rem;
  }

  .service-price {
    font-size: 1rem;
  }

  .service-duration {
    font-size: 0.8rem;
  }
}
