:root {
  --ink: #2b2228;
  --muted: #756a70;
  --line: #eadde3;
  --paper: #fff9fb;
  --white: #ffffff;
  --rose: #b24a66;
  --rose-dark: #842d48;
  --gold: #c79b4b;
  --sage: #dce7de;
  --shadow: 0 18px 45px rgba(73, 34, 49, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff7fa 0%, #ffffff 42%, #f8fbf7 100%);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(255, 249, 251, 0.92);
  border-bottom: 1px solid rgba(234, 221, 227, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 800;
}

.logo {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff7fa;
  font-size: 0.85rem;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-nav a {
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 14px;
}

.main-nav a:hover {
  background: var(--sage);
  color: var(--ink);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 8px 11px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: clamp(30px, 5vw, 70px) clamp(18px, 5vw, 70px);
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  font-size: 1.35rem;
}

.hero p:not(.eyebrow) {
  max-width: 520px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.65;
}

.hero-actions,
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  padding: 13px 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--rose);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(178, 74, 102, 0.22);
}

.secondary {
  background: var(--sage);
  color: var(--ink);
}

.whatsapp {
  width: 100%;
  background: #1fae5a;
  color: var(--white);
}

.compact {
  min-height: 38px;
  padding: 9px 12px;
}

.danger {
  background: #ffe3e6;
  color: #9d1c30;
}

.hero-image {
  width: 100%;
  min-height: 420px;
  max-height: 680px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section {
  padding: clamp(34px, 6vw, 76px) clamp(18px, 5vw, 70px);
}

.section-heading {
  margin-bottom: 24px;
}

.filters,
.lookup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(178, 74, 102, 0.12);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.professionals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.service-card,
.appointment-card,
.panel,
.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(73, 34, 49, 0.08);
}

.service-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  border-radius: 999px;
  background: #f5edf1;
  color: var(--rose-dark);
  font-size: 0.9rem;
  font-weight: 900;
  padding: 8px 10px;
}

.booking-section {
  background: linear-gradient(135deg, rgba(220, 231, 222, 0.7), rgba(255, 247, 250, 0.95));
}

.booking-layout,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.panel {
  padding: clamp(18px, 3vw, 28px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.full {
  grid-column: 1 / -1;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
}

.time-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.time-button.selected {
  border-color: var(--rose);
  background: var(--rose);
  color: var(--white);
}

.time-button.occupied {
  cursor: not-allowed;
  background: #f0ecee;
  color: #9c9298;
  text-decoration: line-through;
}

.summary-card {
  position: sticky;
  top: 96px;
}

dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  margin: 20px 0;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
  font-weight: 900;
}

.form-message,
.muted {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.form-message.success {
  color: #197545;
}

.form-message.error {
  color: #b42336;
}

.appointments-list {
  display: grid;
  gap: 14px;
}

.appointment-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}

.appointment-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.admin-main h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(160deg, #fff7fa 0%, #f4e5eb 48%, #dce7de 100%);
}

.login-screen[hidden] {
  display: none;
}

.admin-locked .site-header,
.admin-locked .admin-main {
  display: none;
}

.login-card {
  display: grid;
  width: min(100%, 420px);
  gap: 16px;
}

.login-card .logo {
  width: 62px;
  height: 62px;
}

.login-card h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  padding: 20px;
}

.stat span {
  color: var(--muted);
  font-weight: 800;
}

.stat strong {
  display: block;
  margin-top: 8px;
  color: var(--rose-dark);
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  overflow-wrap: anywhere;
}

.service-ranking {
  margin-top: 18px;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ranking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7fa;
  padding: 12px 14px;
}

.agenda-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.agenda-controls label {
  min-width: 220px;
}

.visual-agenda {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(73, 34, 49, 0.08);
}

.agenda-grid {
  display: grid;
  grid-template-columns: 86px repeat(var(--agenda-days), minmax(170px, 1fr));
  min-width: 1280px;
}

.agenda-corner,
.agenda-day,
.agenda-time,
.agenda-slot {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px;
}

.agenda-corner,
.agenda-day {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff3f7;
  color: var(--rose-dark);
  font-weight: 900;
  text-transform: capitalize;
}

.agenda-time {
  background: #fbf7f9;
  color: var(--muted);
  font-weight: 900;
}

.agenda-slot {
  min-height: 86px;
  background: #fffdfd;
}

.agenda-slot.available {
  color: #8b8187;
  font-size: 0.9rem;
}

.agenda-appointment {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--rose);
  border-radius: 8px;
  background: #fff7fa;
  padding: 10px;
}

.agenda-appointment + .agenda-appointment {
  margin-top: 8px;
}

.agenda-appointment span,
.agenda-appointment small {
  color: var(--muted);
}

.status-select {
  min-width: 138px;
  padding: 9px 10px;
  font-weight: 800;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-actions .whatsapp {
  width: auto;
}

.admin-appointment-cards {
  display: none;
  gap: 12px;
  margin-top: 16px;
}

.admin-mobile-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--rose);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(73, 34, 49, 0.08);
  padding: 16px;
}

.admin-mobile-card h3,
.admin-mobile-card p {
  margin: 7px 0 0;
}

.admin-mobile-card p {
  color: var(--muted);
}

.status-pending,
.status-border-pending {
  border-color: #c79b4b;
}

.status-confirmed,
.status-border-confirmed {
  border-color: var(--rose);
}

.status-attended,
.status-border-attended {
  border-color: #1f8f61;
}

.status-cancelled,
.status-border-cancelled {
  border-color: #a7a0a4;
}

.tab-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-weight: 900;
  padding: 11px 16px;
}

.tab-button.active {
  background: var(--ink);
  color: var(--white);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px;
  text-align: left;
}

th {
  background: #fff3f7;
  color: var(--rose-dark);
}

.editor-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.editor-item {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.editor-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 900px) {
  .hero,
  .booking-layout,
  .admin-grid,
  .filters,
  .lookup {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .professionals-grid,
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-card {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    background: var(--white);
  }

  .hero {
    min-height: auto;
  }

  .hero-image {
    min-height: 300px;
  }

  .services-grid,
  .professionals-grid,
  .form-grid,
  .admin-stats,
  .editor-row {
    grid-template-columns: 1fr;
  }

  .admin-main .section {
    padding: 24px 14px;
  }

  .admin-main h1 {
    font-size: 2.35rem;
  }

  .table-wrap {
    display: none;
  }

  .admin-appointment-cards {
    display: grid;
  }

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

  .quick-actions .btn {
    width: 100%;
  }

  .agenda-grid {
    min-width: 900px;
  }

  .appointment-card {
    grid-template-columns: 1fr;
  }

  dl {
    grid-template-columns: 1fr;
  }
}
