:root {
  --bg-color: #fbf5ee;
  --surface-color: #ffffff;
  --surface-muted: #f4e8da;
  --primary: #c9a16b;
  --primary-strong: #b18346;
  --text-color: #2f2a24;
  --text-muted: #7c736a;
  --border-color: #ead9c5;
  --shadow: 0 16px 40px rgba(92, 73, 46, 0.08);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

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

#root {
  display: flex;
  justify-content: center;
  padding: 32px 24px 64px;
}

.app-shell {
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.top-bar {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.top-bar__left,
.top-bar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar__notifications {
  position: relative;
}

.top-bar__logout {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(201, 161, 107, 0.12);
  font-weight: 600;
  color: var(--primary-strong);
  transition: background 0.2s ease;
}

.top-bar__logout:hover {
  background: rgba(201, 161, 107, 0.22);
}

.ghost-button {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(201, 161, 107, 0.35);
  background: transparent;
  color: var(--primary-strong);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  background: rgba(201, 161, 107, 0.12);
  outline: none;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(201, 161, 107, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(201, 161, 107, 0.28);
  outline: none;
}

.icon-bell::before {
  content: '';
  width: 18px;
  height: 20px;
  display: block;
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 24 24" stroke="%23c9a16b" stroke-width="1.6"%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" d="M10.8 4.1a1.2 1.2 0 012.4 0 7.5 7.5 0 015.3 7.2v2.7l1.3 2.2a.9.9 0 01-.8 1.4H5a.9.9 0 01-.8-1.4l1.3-2.2v-2.7a7.5 7.5 0 015.3-7.2z"/%3E%3Cpath stroke-linecap="round" stroke-linejoin="round" d="M9.3 18.5a2.7 2.7 0 005.4 0"/%3E%3C/svg%3E') center / contain no-repeat;
  background-color: var(--primary-strong);
}

.notifications-panel {
  position: absolute;
  top: 60px;
  inset-inline-end: 0;
  background: var(--surface-color);
  border-radius: 20px;
  box-shadow: var(--shadow);
  width: min(320px, calc(100vw - 32px));
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}

.notifications-panel.is-open {
  display: flex;
}

.notification-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(201, 161, 107, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notification-item strong {
  font-weight: 700;
}

.notification-item time {
  font-size: 13px;
  color: var(--text-muted);
}

.platform-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.platform-info__title {
  font-weight: 700;
  font-size: 16px;
}

.platform-info__greeting {
  color: var(--text-muted);
  font-size: 14px;
}

.platform-info__identifier {
  font-size: 13px;
  color: var(--text-muted);
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(201, 161, 107, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-strong);
}

.page-tabs {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 10px;
  display: flex;
  gap: 12px;
  box-shadow: var(--shadow);
}

.page-tab {
  flex: 1;
  text-align: center;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-tab.is-active {
  background: linear-gradient(135deg, #c9a16b, #bb8c4c);
  color: #fff;
  box-shadow: 0 10px 20px rgba(187, 140, 76, 0.25);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.page-subtitle {
  margin: 0;
  color: var(--text-muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.dashboard-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-card h2 {
  margin: 0;
  font-size: 20px;
}

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

.cta-button {
  align-self: flex-start;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #c9a16b, #b18346);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 14px 24px rgba(193, 143, 85, 0.25);
  transition: transform 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
}

.faq-section {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  min-height: 220px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: var(--radius-md);
  background: rgba(201, 161, 107, 0.08);
  padding: 18px 20px;
}

.faq-item strong {
  display: block;
  margin-bottom: 8px;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
}

.booking-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.booking-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.booking-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.booking-card h2 {
  margin: 0;
  font-size: 20px;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.date-option-list {
  display: grid;
  gap: 12px;
}

.date-option {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(201, 161, 107, 0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.2s ease, border 0.2s ease;
}

.date-option small {
  color: var(--text-muted);
}

.date-option.is-active {
  border-color: var(--primary);
  background: rgba(201, 161, 107, 0.18);
}

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

.time-option {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 161, 107, 0.2);
  background: rgba(201, 161, 107, 0.05);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease;
}

.time-option.is-active {
  background: rgba(201, 161, 107, 0.2);
  border-color: var(--primary-strong);
  color: var(--primary-strong);
  font-weight: 700;
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.form-field select,
.form-field textarea,
.form-field input[type='file'],
.form-field input[type='text'],
.form-field input[type='tel'],
.form-field input[type='email'] {
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.85);
}

.primary-button {
  border: none;
  border-radius: 999px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #c9a16b, #b18346);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.small-text {
  font-size: 12px;
}

.appointments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.appointment-card {
  border-radius: var(--radius-lg);
  background: var(--surface-color);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appointment-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.status-chip {
  border-radius: 999px;
  background: rgba(201, 161, 107, 0.18);
  color: var(--primary-strong);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
}

.appointment-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.appointment-card__actions {
  display: flex;
  gap: 12px;
}

.secondary-button {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(201, 161, 107, 0.08);
  cursor: pointer;
  font-weight: 600;
}

.placeholder-card {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--text-muted);
}

#toast-container {
  position: fixed;
  bottom: 32px;
  inset-inline: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 33, 23, 0.55);
  backdrop-filter: blur(4px);
  z-index: 30;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 40;
}

.auth-modal__content {
  width: min(420px, 100%);
  background: var(--surface-color);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-modal__header h2 {
  margin: 0;
  font-size: 24px;
}

.auth-modal__header p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: rgba(201, 161, 107, 0.12);
  border-radius: 999px;
  padding: 4px;
}

.auth-toggle__button {
  border: none;
  border-radius: 999px;
  background: transparent;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.auth-toggle__button.is-active {
  background: linear-gradient(135deg, #c9a16b, #b18346);
  color: #fff;
  box-shadow: 0 8px 16px rgba(193, 143, 85, 0.25);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.toast {
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(39, 174, 96, 0.92);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 18px 30px rgba(39, 174, 96, 0.3);
  animation: fade-in-out 4s ease forwards;
}

.toast--error {
  background: rgba(235, 87, 87, 0.92);
  box-shadow: 0 18px 30px rgba(235, 87, 87, 0.3);
}

@keyframes fade-in-out {
  0% {
    opacity: 0;
    transform: translateY(24px);
  }
  10%,
  90% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(24px);
  }
}

[data-empty-text]:empty::after {
  content: attr(data-empty-text);
  display: block;
  text-align: center;
  color: var(--text-muted);
  padding: 32px 12px;
  border-radius: var(--radius-md);
  background: rgba(201, 161, 107, 0.08);
  font-weight: 600;
}

@media (max-width: 960px) {
  #root {
    padding: 24px 16px 48px;
  }

  .booking-wrapper {
    grid-template-columns: 1fr;
  }

  .top-bar__left {
    flex-wrap: wrap;
  }

  .top-bar {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .page-tabs {
    flex-wrap: wrap;
  }

  .page-tab {
    flex: 0 0 calc(50% - 6px);
  }
}

@media (max-width: 600px) {
  .page-tab {
    flex: 1 1 100%;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
