:root {
  --orange: #e85b0b;
  --orange-light: #fff1e8;
  --orange-soft: #fff1e8;
  --dark: #1b1a18;
  --gray: #77746f;
  --line: #ebe8e4;
  --background: #f6f5f2;
}

html { min-height: 100%; background: var(--background); }
body {
  min-height: 100vh;
  background: radial-gradient(ellipse at 14% 0%, #fffaf5 0, transparent 34%), var(--background);
  color: var(--dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: -.012em;
}
button, input, select, textarea { font-family: inherit; }
.app {
  width: min(100%, 1380px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 34px 112px;
  background: transparent;
}
.page {
  width: min(100%, 1180px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 12px 36px;
}
.topbar, .page-header {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 8px 0 21px;
  margin-bottom: 19px;
  border-bottom: 1px solid var(--line);
}
.topbar { justify-content: space-between; }
.page-header { justify-content: flex-start; }
.brand-mark {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: contain;
  border: 1px solid #f1e9e3;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 18px #2e1f1309;
}
.topbar h1, .page-header h1 {
  color: var(--dark);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 720;
  letter-spacing: -.055em;
}
.eyebrow { color: var(--orange); letter-spacing: .12em; }
.muted, .instruction, #relative-label, .summary { color: var(--gray); }

.calendar-button, .month-arrow, .online-bookings-button, .agenda-notifications-button {
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  color: #46413b;
  box-shadow: 0 3px 10px #2e1f1306;
}
.agenda-notifications-button { position: relative; display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid var(--line); border-radius: 12px; font-size: 20px; }
.agenda-notification-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid #fff; border-radius: 12px; background: #e85b0b; color: #fff; font-size: 10px; font-weight: 800; line-height: 15px; text-align: center; }
.agenda-notification-count[hidden] { display: none; }
.add-button, .main-button, .orange-button, .today-button {
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  box-shadow: 0 7px 17px #e85b0b20;
}
.add-button { width: 45px; height: 45px; }
.today-button { padding: 10px 17px; }
.green-button { border-radius: 999px; }
.cancel-button, .delete-button { border-radius: 999px; }

.appointment, .client-card, .stat-card, .since-card, .history-item,
.unavailability-card, .online-booking-item {
  border-color: var(--line);
  border-radius: 15px;
  box-shadow: 0 7px 22px #34251808;
}
.appointment { background: #fff; }
.client-card { background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.client-card:hover { transform: translateY(-2px); box-shadow: 0 13px 30px #34251810; }
.client-card-info h2, .client-title h2 { color: var(--dark); letter-spacing: -.035em; }
.client-card-avatar, .client-avatar { border: 1px solid #f0e5dc; background: #fff1e8; color: #bd4b0c; }
.since-card, .stat-card, .history-item { background: #fff; }
.stat-card { border: 1px solid var(--line); }
.history-section { border-top: 1px solid var(--line); }
.search-box {
  border-color: var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 18px #34251806;
}
.search-box:focus-within { border-color: #f2a57d; box-shadow: 0 0 0 4px #e85b0b12; }
.search-box input { color: var(--dark); }
.client-card-avatar, .client-avatar { border-radius: 50%; }
.empty-state { border: 1px dashed #e6ded7; border-radius: 18px; background: #fffaf6; }

.month-header { margin-top: 24px; }
.month-title h2 { color: var(--dark); letter-spacing: -.035em; }
.month-arrow:hover, .calendar-button:hover { border-color: #edc1a8; background: #fff9f5; }
.weekdays { color: #817b74; }
.month-grid {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px #34251807;
}
.month-title .eyebrow { margin-bottom: 5px; }
.day-cell { border: 1px solid transparent; }
.day-cell { border-radius: 12px; }
.day-cell:hover { background: #fff7f1; }
.day-cell.today { border-color: #f0a57d; background: #fff7f1; }
.day-cell.selected { border-color: var(--orange); background: var(--orange-soft); }
.legend { color: var(--gray); }

.bottom-nav {
  right: auto;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  width: min(calc(100% - 28px), 760px);
  transform: translateX(-50%);
  justify-content: space-around;
  gap: 4px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border: 1px solid #ebe8e4;
  border-radius: 20px;
  background: #ffffffed;
  box-shadow: 0 10px 32px #30241a12;
  backdrop-filter: blur(18px);
}
.bottom-nav .nav-link, .nav-link { color: #89847e; }
.bottom-nav .nav-link.active, .nav-link.active { color: var(--orange); }
.bottom-nav .nav-link { min-width: 62px; border-radius: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }

dialog, .calendar-modal, .client-modal, .form-modal, .online-bookings-modal {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px #1b17122b;
}
.agenda-notifications-modal { width: min(94vw, 560px); max-height: 78vh; padding: 22px; overflow: hidden; }
.agenda-notifications-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.agenda-notifications-header h2 { margin: 2px 0 0; font-size: 20px; letter-spacing: -.035em; }
.agenda-notifications-header p { margin: 5px 0 0; color: var(--gray); font-size: 12px; }
.agenda-notifications-actions { display: flex; align-items: center; gap: 8px; }
.agenda-notifications-actions button { min-height: 34px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #625c55; font-size: 11px; font-weight: 700; }
.agenda-notifications-list { max-height: min(55vh, 470px); overflow: auto; }
.agenda-notification-item { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 15px 2px; border-bottom: 1px solid #f0eeeb; }
.agenda-notification-item.unread { border-left: 3px solid var(--orange); padding-left: 11px; }
.agenda-notification-item strong { display: block; color: var(--dark); font-size: 13px; }
.agenda-notification-item p { margin: 4px 0 0; color: var(--gray); font-size: 12px; line-height: 1.45; }
.agenda-notification-item small { display: block; margin-top: 5px; color: #9a948d; font-size: 10px; }
.agenda-notification-item button { border: 0; border-radius: 999px; background: var(--orange-light); color: #bc4809; padding: 8px 11px; font-size: 10px; font-weight: 700; }
.agenda-notifications-empty { padding: 28px 8px; color: var(--gray); text-align: center; font-size: 13px; }
dialog::backdrop { background: #211b1680; backdrop-filter: blur(5px); }
.close-button { border-radius: 50%; background: #f4f1ed; color: #615c56; }

@media (max-width: 760px) {
  .app { padding: 17px 15px 105px; }
  .page { padding: 5px 3px 28px; }
  .topbar, .page-header { gap: 11px; padding-bottom: 16px; margin-bottom: 16px; }
  .brand-mark { width: 43px; height: 43px; flex-basis: 43px; border-radius: 12px; }
  .bottom-nav { width: min(calc(100% - 20px), 620px) !important; padding: 8px 5px calc(8px + env(safe-area-inset-bottom)); border-radius: 18px; }
  .bottom-nav .nav-link { min-width: 48px; }
}
