:root {
  --brand-bg: #f7e6bf;
  --brand-paper: #fffaf0;
  --brand-ink: #8a5a1f;
  --brand-muted: #636363;
  --brand-primary: #fdbe4c;
  --brand-primary-dark: #d79c35;
  --brand-success: #4caf50;
  --brand-border: #e9c97d;
  --shadow-soft: 0 14px 34px rgba(138, 90, 31, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--brand-ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(253, 190, 76, 0.35) 0%, transparent 20%),
    radial-gradient(circle at 90% 20%, rgba(253, 190, 76, 0.35) 0%, transparent 21%),
    linear-gradient(160deg, #fffef9 0%, var(--brand-bg) 85%);
  min-height: 100vh;
}

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 999px;
  border: 3px solid var(--brand-primary);
  box-shadow: var(--shadow-soft);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
  color: var(--brand-muted);
  margin: 0;
  font-size: 0.74rem;
}

.brand-tagline {
  margin: 0.25rem 0 0;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--brand-primary-dark);
}

h1,
h2,
h3 {
  font-family: "Peach Sunday", "Baloo 2", "Trebuchet MS", cursive;
  line-height: 1.1;
}

h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
}

.intro {
  max-width: 60ch;
  color: var(--brand-muted);
}

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.card {
  background: var(--brand-paper);
  border: 1px solid var(--brand-border);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  animation: reveal 500ms ease-out;
}

.card.wide {
  grid-column: span 2;
}

.form-mode {
  margin: 0 0 0.75rem;
  color: var(--brand-muted);
  font-size: 0.92rem;
}

.grid {
  display: grid;
  gap: 0.75rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#availability-card .grid.two {
  grid-template-columns: 1fr;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--brand-ink);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  background: #fffdfb;
  color: var(--brand-ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(201, 111, 58, 0.3);
  border-color: var(--brand-primary);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 0.82rem 1rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand-primary);
  color: #fff;
  transition: transform 140ms ease, background-color 140ms ease;
  min-height: 44px;
}

button:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
}

button.secondary {
  background: #fff2cf;
  color: var(--brand-ink);
  border: 1px solid var(--brand-border);
}

.price-panel {
  margin-top: 0.85rem;
  padding: 0.75rem;
  border-radius: 14px;
  border: 1px dashed var(--brand-border);
  background: #fffbf7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.actions-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.availability-action {
  width: 100%;
  margin-top: 0.15rem;
}

.price-label {
  margin: 0;
  color: var(--brand-muted);
}

.price-value {
  margin: 0.15rem 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
}

.status {
  min-height: 1.5rem;
  font-weight: 700;
}

.status.ok {
  color: var(--brand-success);
}

.status.warn {
  color: #b24826;
}

.blocked-ranges {
  margin: 0.5rem 0 1rem;
  color: var(--brand-muted);
  font-size: 0.93rem;
}

.blocked-ranges ul {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.price-guide {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--brand-muted);
}

.calendar-toolbar {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.calendar-title {
  margin: 0;
  font-weight: 700;
  text-align: center;
}

.availability-calendar {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.calendar-head,
.calendar-day {
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  text-align: center;
}

.calendar-head {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.38rem 0.2rem;
  background: #fff2cf;
  color: var(--brand-ink);
}

.calendar-day {
  min-height: 54px;
  padding: 0.28rem;
  background: #fffdfa;
  font-size: 0.83rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calendar-day.empty {
  background: transparent;
  border-style: dashed;
}

.calendar-day .count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-muted);
  align-self: center;
  min-width: 20px;
  padding: 0.08rem 0.32rem;
  border-radius: 999px;
  background: #fff2cf;
}

.calendar-day.available {
  border-color: #b7ddb8;
}

.calendar-day.limited {
  border-color: #f1c062;
  background: #fff7de;
}

.calendar-day.full {
  border-color: #d58a72;
  background: #fff0eb;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 0.58rem;
  border-bottom: 1px solid var(--brand-border);
}

th {
  color: var(--brand-muted);
  font-size: 0.86rem;
}

.row-actions {
  display: flex;
  gap: 0.4rem;
}

.action-btn {
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  border-radius: 9px;
  border: 1px solid var(--brand-border);
  background: #fff6df;
  color: var(--brand-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.action-btn.delete {
  background: #fff1ed;
  border-color: #f2b9a7;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .card.wide {
    grid-column: auto;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .price-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions-row button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 1.15rem 0.85rem 1rem;
  }

  .layout {
    padding: 0 0.85rem 1.2rem;
    gap: 0.75rem;
  }

  .brand-wrap {
    align-items: flex-start;
  }

  .brand-logo {
    width: 72px;
    height: 72px;
  }

  .card {
    padding: 0.82rem;
    border-radius: 16px;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .price-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .availability-calendar {
    gap: 0.25rem;
  }

  .calendar-head {
    font-size: 0.64rem;
    padding: 0.3rem 0.1rem;
  }

  .calendar-day {
    min-height: 42px;
    font-size: 0.72rem;
    padding: 0.2rem;
  }

  .calendar-day .count {
    font-size: 0.63rem;
    min-width: 16px;
    padding: 0.04rem 0.22rem;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  table {
    min-width: 0;
  }

  tr {
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    margin-bottom: 0.72rem;
    padding: 0.28rem;
    background: #fffef9;
  }

  td {
    border-bottom: 1px dashed var(--brand-border);
    padding: 0.52rem;
    font-size: 0.9rem;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-muted);
    text-transform: uppercase;
    margin-bottom: 0.14rem;
  }

  .row-actions {
    gap: 0.5rem;
  }
}
