/* ==========================================================================
   BOOKING WEBAPP - MODERN & PROFESSIONAL LUXURY DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Brand Luxury Palette */
  --brand-deep: #0f241a;
  --brand-primary: #183d2d;
  --brand-hover: #22513c;
  --brand-light: #f0f7f3;
  --brand-glow: rgba(24, 61, 45, 0.15);

  /* Gold / Sartorial Accents */
  --gold-primary: #c59b27;
  --gold-light: #fef9c3;
  --gold-border: #fef08a;
  --gold-dark: #854d0e;

  /* Neutrals */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-muted: #e2e8f0;
  --ink-primary: #0f172a;
  --ink-secondary: #334155;
  --ink-muted: #64748b;
  --border-light: #e2e8f0;
  --border-focus: #183d2d;

  /* Feedback Colors */
  --color-success: #15803d;
  --color-success-bg: #dcfce7;
  --color-success-border: #bbf7d0;
  --color-warn: #b45309;
  --color-warn-bg: #fef3c7;
  --color-danger: #b91c1c;
  --color-danger-bg: #fee2e2;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-brand: 'Cinzel', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 20px 30px -10px rgba(15, 36, 26, 0.07);

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-ui);
  color: var(--ink-primary);
  background-color: var(--bg-main);
  line-height: 1.5;
}

body.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ink-primary);
  line-height: 1.25;
}

.muted { color: var(--ink-muted); }
.link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.link:hover { color: var(--brand-hover); text-decoration: underline; }

/* Layout Containers */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px;
  width: 100%;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 16px 0;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Grid Systems */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

@media (max-width: 860px) {
  .grid, .grid-3, .grid-4, .row, .row3, .row4 {
    grid-template-columns: 1fr;
  }
}

/* Buttons & Controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-primary);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 61, 45, 0.2);
}

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

.btn.secondary {
  background: var(--bg-surface);
  color: var(--ink-secondary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn.secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
  color: var(--ink-primary);
  box-shadow: var(--shadow-md);
}

.btn.danger {
  background: #fff;
  color: var(--color-danger);
  border: 1px solid #fecaca;
}

.btn.danger:hover {
  background: var(--color-danger-bg);
  border-color: #fca5a5;
}

/* Forms & Inputs */
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.form input, .form textarea, select,
input[type="date"], input[type="time"], input[type="password"], input[type="email"], input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.form input:focus, .form textarea:focus, select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.form textarea {
  resize: vertical;
  min-height: 80px;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-light);
  color: var(--brand-primary);
  border: 1px solid rgba(24, 61, 45, 0.15);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge.gold {
  background: var(--gold-light);
  color: var(--gold-dark);
  border-color: var(--gold-border);
}

.badge.success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border-color: var(--color-success-border);
}

.badge.danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: #fca5a5;
}

/* Navigation Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--ink-secondary);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.tab:hover {
  background: var(--bg-subtle);
  color: var(--ink-primary);
  border-color: #cbd5e1;
}

.tab.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(24, 61, 45, 0.2);
}

/* Modern Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.table th {
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--ink-primary);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: #f8fafc;
}

/* Informational Boxes */
.info {
  background: var(--brand-light);
  border: 1px solid rgba(24, 61, 45, 0.15);
  color: var(--brand-deep);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
  font-size: 14px;
}

.success {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success);
  border-radius: var(--radius-md);
  padding: 16px;
  animation: fadeIn 0.3s ease-out;
}

.hidden { display: none !important; }

/* Stat Cards */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--brand-light);
  color: var(--brand-primary);
}

.stat-val {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-ui);
  color: var(--ink-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* ==========================================================================
   FRONTEND BOOKING EXPERIENCE (Calendly / Sartorial Luxury Look)
   ========================================================================== */

.booking-page {
  margin: 0;
  background: #f8fafc;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: var(--font-ui);
}

.booking-shell {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  min-height: 680px;
  width: 100%;
  max-width: 1200px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  animation: modalPop 0.4s var(--transition-smooth);
}

/* Left Pane: Brand & Location Summary */
.pane-left {
  background: #fafbfa;
  border-right: 1px solid var(--border-light);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
}

.brand-logo {
  margin-bottom: 12px;
}

.brand-logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.logo-fallback .logo-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--brand-primary);
  background: linear-gradient(135deg, #183d2d 0%, #0f241a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-primary);
  font-size: 20px;
  font-family: var(--font-brand);
  letter-spacing: 1.5px;
  box-shadow: 0 4px 14px rgba(24, 61, 45, 0.2);
  position: relative;
}

.logo-ring::after {
  content: '✂';
  position: absolute;
  bottom: -4px;
  right: -2px;
  font-size: 14px;
  background: var(--gold-primary);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.company-name {
  font-family: var(--font-brand);
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-top: 14px;
  font-weight: 600;
}

.booking-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand-deep);
  margin: 8px 0 16px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin: 6px 0;
  font-weight: 500;
}

.meta-row .ico {
  color: var(--brand-primary);
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.location-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-light);
}

.left-foot {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--ink-muted);
}

.left-foot a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.left-foot a:hover {
  color: var(--brand-primary);
}

/* Center Pane: Calendar */
.pane-center {
  padding: 32px 36px;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.pane-heading {
  font-family: var(--font-heading);
  font-size: 20px;
  text-align: center;
  margin-bottom: 12px;
  color: var(--ink-primary);
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 12px 0 16px;
}

.nav-arrow {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-primary);
  transition: all var(--transition-fast);
}

.nav-arrow:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
  transform: scale(1.05);
}

.month-label {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  min-width: 160px;
  text-align: center;
  color: var(--ink-primary);
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  flex: 1;
}

.cday {
  padding: 6px 2px;
  border-radius: var(--radius-md);
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: all var(--transition-fast);
}

.cday .dnum {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  position: relative;
  transition: all var(--transition-fast);
}

.cday.clickable {
  cursor: pointer;
}

.cday.clickable:hover .dnum {
  background: var(--brand-light);
  color: var(--brand-primary);
  transform: scale(1.08);
}

.cday.has-slots .dnum {
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(24, 61, 45, 0.25);
}

.cday.has-slots .dnum::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-primary);
  border: 2px solid #ffffff;
}

.cday.selected .dnum {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--gold-primary);
  background: var(--brand-hover);
}

.cday .sub {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-top: 3px;
  line-height: 1.15;
  min-height: 18px;
  text-transform: uppercase;
}

.cday.dim {
  opacity: 0.35;
}

.tz-row {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.tz-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

/* Right Pane: Slots & Booking Form */
.pane-right {
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow-y: auto;
  max-height: 720px;
}

.day-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink-primary);
}

.slots-banner {
  background: var(--gold-light);
  color: var(--gold-dark);
  border: 1px solid var(--gold-border);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  animation: fadeIn 0.25s ease-out;
}

.slots-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.slot-btn {
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--brand-primary);
  background: var(--brand-light);
  transform: translateX(2px);
}

.slot-btn.selected {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(24, 61, 45, 0.2);
}

.slot-btn.booked {
  background: var(--bg-subtle);
  color: var(--ink-muted);
  border-color: var(--border-light);
  cursor: not-allowed;
  opacity: 0.6;
}

.slot-btn.booked .t { text-decoration: line-through; }
.slot-btn.booked .b { font-size: 10px; color: var(--color-danger); font-weight: 700; }

.book-form {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  animation: slideDown 0.3s ease-out;
}

.book-form h4 {
  font-size: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-book {
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 14px;
  box-shadow: 0 4px 14px rgba(24, 61, 45, 0.25);
  transition: all var(--transition-fast);
}

.btn-book:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

.cancel-box {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-light);
  font-size: 13px;
  color: var(--ink-secondary);
}

.cancel-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-muted);
}

.cancel-box summary:hover {
  color: var(--ink-primary);
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-primary);
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease;
}

.toast.success { border-left: 4px solid var(--color-success); }
.toast.error { border-left: 4px solid var(--color-danger); }
.toast.info { border-left: 4px solid var(--brand-primary); }

/* ==========================================================================
   ANIMATIONS & SKELETONS
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.97) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */

@media (max-width: 1060px) {
  .booking-shell {
    grid-template-columns: 280px 1fr 300px;
    max-width: 100%;
  }
}

@media (max-width: 920px) {
  .booking-page {
    padding: 12px 8px;
    align-items: flex-start;
  }

  .booking-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: var(--radius-lg);
  }

  .pane-left {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 24px 20px;
  }

  .pane-center {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 24px 20px;
  }

  .pane-right {
    padding: 24px 20px;
    max-height: none;
  }

  .cal-grid {
    gap: 2px;
  }

  .cday {
    min-height: 56px;
  }

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

@media (max-width: 480px) {
  .month-label {
    min-width: 120px;
    font-size: 15px;
  }

  .cday .dnum {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}
