/* ============================
   DESIGN TOKENS
============================ */
:root {
  --color-bg: #FBF7EF;
  --color-surface: #FFFFFF;
  --color-surface-soft: #F6EFDF;
  --color-primary: #1F3A3B;
  --color-primary-soft: #2E4F4F;
  --color-accent: #BD9440;
  --color-accent-soft: #E7D6AC;
  --color-danger: #B3492E;
  --color-danger-soft: #F3DCD4;
  --color-text: #23302E;
  --color-text-muted: #6C7A73;
  --color-border: #E7DFCC;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --shadow-soft: 0 10px 30px rgba(31, 58, 59, 0.08);
  --shadow-lift: 0 16px 40px rgba(31, 58, 59, 0.14);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* GLOBAL / RESET */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

button, input, select {
  font-family: inherit;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* UTILITY */
.hidden {
  display: none !important;
}

/* ============================
   TOP BAR
============================ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-img {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(31, 58, 59, 0.12);
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.logo-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 4vw, 23px);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.logo-address {
  font-size: 11.5px;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-size: 14px;
}

.language-selector select {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  background: var(--color-surface-soft);
  color: var(--color-text);
  cursor: pointer;
}

@media (max-width: 640px) {
  .top-bar {
    justify-content: center;
    text-align: center;
  }
  .logo {
    justify-content: center;
    width: 100%;
  }
  .top-right {
    width: 100%;
    justify-content: center;
  }
}

/* ============================
   BUTTONS
============================ */
.tab-button,
.icon-button,
.primary-button,
.secondary-button,
.danger-button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 9px 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}

.tab-button {
  background: var(--color-surface-soft);
  color: var(--color-primary);
}

.tab-button.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.tab-button:hover {
  transform: translateY(-1px);
  background: var(--color-accent-soft);
}

.primary-button {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  padding: 12px 26px;
  box-shadow: var(--shadow-soft);
}

.primary-button:hover {
  background: var(--color-primary-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.primary-button:active {
  transform: translateY(0);
}

.secondary-button {
  background: var(--color-accent-soft);
  color: var(--color-primary);
}

.secondary-button:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-1px);
}

.danger-button {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  font-weight: 600;
  padding: 11px 22px;
}

.danger-button:hover {
  background: var(--color-danger);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.icon-button {
  background: transparent;
  color: var(--color-primary);
  padding: 8px 11px;
  flex-shrink: 0;
}

.icon-button:hover {
  background: var(--color-surface-soft);
}

/* ============================
   HERO
============================ */
.hero {
  position: relative;
  padding: clamp(48px, 9vw, 88px) 20px clamp(40px, 7vw, 76px);
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #F1E9D6 0%, var(--color-bg) 72%);
}

.hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-decor::before,
.hero-decor::after {
  content: "";
  position: absolute;
  width: clamp(240px, 45vw, 480px);
  height: clamp(240px, 45vw, 480px);
  border-radius: 62% 38% 55% 45% / 45% 55% 45% 55%;
  filter: blur(2px);
  opacity: 0.55;
}

.hero-decor::before {
  top: -18vw;
  left: -12vw;
  background: radial-gradient(circle at 30% 30%, var(--color-accent-soft), transparent 70%);
}

.hero-decor::after {
  bottom: -20vw;
  right: -12vw;
  border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%;
  background: radial-gradient(circle at 70% 70%, rgba(31, 58, 59, 0.14), transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 4px;
}

.hero-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(30px, 6vw, 46px);
  color: var(--color-primary);
  line-height: 1.15;
}

.hero-address {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
}

.hero-hours {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.hero-text {
  margin: 20px 0 28px;
  color: var(--color-text-muted);
  font-size: clamp(14px, 2.2vw, 17px);
  max-width: 480px;
}

/* ============================
   PANEL
============================ */
.panel {
  max-width: 1100px;
  margin: clamp(20px, 4vw, 34px) auto;
  margin-left: 16px;
  margin-right: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 4vw, 30px);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

@media (min-width: 1132px) {
  .panel {
    margin-left: auto;
    margin-right: auto;
  }
}

.panel-title {
  font-size: clamp(21px, 4vw, 26px);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 12px;
}

.panel-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: var(--color-accent);
}

.panel-body {
  display: block;
  min-width: 0;
}

/* ============================
   BOOKING LAYOUT
============================ */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  min-width: 0;
}

@media (max-width: 900px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }
}

.calendar-container,
.booking-form-container {
  background: var(--color-surface-soft);
  border-radius: var(--radius-md);
  padding: clamp(14px, 3vw, 22px);
  border: 1px solid var(--color-border);
  min-width: 0;
}

.calendar-container h3,
.calendar-container h4,
.booking-form-container h3 {
  color: var(--color-primary);
  margin-bottom: 12px;
  font-size: 18px;
}

.time-slots,
.treatments {
  margin-top: 22px;
}

.date-input {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
}

/* ============================
   TIME SLOTS
============================ */
.time-slots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.time-slot-pill {
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  cursor: pointer;
  font-size: 13px;
  font-family: var(--font-body);
  transition: all .18s ease;
}

.time-slot-pill:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.time-slot-pill.selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.time-slot-pill.disabled {
  background: #EDE7D8;
  border-color: #EDE7D8;
  color: #A9AA9C;
  cursor: not-allowed;
}

/* ============================
   TREATMENTS
============================ */
.treatments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.treatment-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 14px rgba(31, 58, 59, 0.05);
  flex: 1 1 100%;
  min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}

@media (min-width: 560px) {
  .treatment-item {
    flex: 1 1 calc(50% - 6px);
  }
}

.treatment-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.treatment-item-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.treatment-item-icon i {
  font-size: 17px;
  color: var(--color-primary);
}

.treatment-item-text {
  min-width: 0;
}

.treatment-item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--color-primary);
  word-break: break-word;
}

.treatment-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.treatment-item-duration i {
  margin-right: 3px;
}

.treatment-item-price {
  font-weight: 600;
  color: var(--color-accent);
}

.treatment-item-desc {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* ============================
   FORM
============================ */
.form-group {
  margin-bottom: 16px;
  min-width: 0;
}

.form-group label {
  font-size: 13.5px;
  margin-bottom: 5px;
  display: block;
  color: var(--color-primary);
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  transition: border-color .15s ease;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--color-accent);
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.form-inline label {
  font-size: 13.5px;
  color: var(--color-primary);
  font-weight: 500;
  flex-shrink: 0;
}

.form-inline input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 14px;
  font-family: var(--font-body);
}

@media (max-width: 480px) {
  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }
  .form-inline label {
    margin-bottom: -4px;
  }
  .form-inline input,
  .form-inline button {
    width: 100%;
  }
}

/* CHECKBOX */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.checkbox-group input {
  margin-top: 3px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  width: auto;
}

.checkbox-group label {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ERRORS */
.error {
  color: #B3492E;
  font-size: 12px;
  margin-top: 5px;
  min-height: 14px;
}

/* SUCCESS */
.success-message {
  margin-top: 14px;
  font-size: 14px;
  color: #2E6B4F;
  font-weight: 500;
}

/* ============================
   MY BOOKINGS LIST
============================ */
.bookings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.booking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  flex-wrap: wrap;
}

.booking-item-main {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--color-primary);
  min-width: 0;
}

.booking-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================
   ADMIN MODAL
   Nyugodtabb, animált megjelenés: halványabb háttér,
   finom felúszó-beúszó átmenet ahelyett hogy egyből
   teljes erővel rávágódna a képernyőre.
============================ */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 38, 37, 0.4);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  animation: overlayFadeIn .2s ease;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  padding: clamp(18px, 4vw, 28px);
  box-shadow: var(--shadow-lift);
  max-height: 88vh;
  overflow-y: auto;
  animation: modalPopIn .22s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 14px;
  gap: 10px;
}

.modal-header h3 {
  color: var(--color-primary);
  font-size: 20px;
}

.modal-body h4,
.modal-body h5 {
  color: var(--color-primary);
  margin-bottom: 10px;
  font-size: 16px;
}

.admin-block {
  margin-top: 22px;
}

.admin-block:first-child {
  margin-top: 0;
}

.admin-block-danger {
  border-top: 1px dashed var(--color-danger-soft);
  padding-top: 18px;
}

.admin-hint {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.admin-pill {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 6px 0 0;
  font-size: 13px;
  color: var(--color-primary);
  max-width: 100%;
  word-break: break-word;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.admin-form-grid input {
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 14px;
  font-family: var(--font-body);
}

.admin-form-grid button {
  grid-column: 1 / -1;
  justify-self: start;
}

@media (max-width: 600px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .modal-overlay {
    padding: 10px;
  }
  .modal {
    padding: 18px;
    border-radius: var(--radius-md);
  }
}