/* ==========================================================================
   RESERVE VIP • Clean Light Design
   White canvas, rich saturated accents, real photography
   ========================================================================== */

:root {
  /* Canvas */
  --bg-page: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-muted: #F5F6F8;
  --bg-elevated: #FFFFFF;
  --bg-overlay: rgba(0, 0, 0, 0.45);

  /* Borders */
  --border-light: #E8EAED;
  --border-medium: #D1D5DB;
  --border-strong: #9CA3AF;
  --border-focus: #2563EB;

  /* Text */
  --text-pure: #111827;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-on-dark: #FFFFFF;
  --text-on-accent: #FFFFFF;

  /* Accent */
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-light: #EFF6FF;
  --accent-border: #BFDBFE;

  /* Status */
  --available: #059669;
  --available-bg: #ECFDF5;
  --available-border: #A7F3D0;
  --busy: #DC2626;
  --busy-bg: #FEF2F2;
  --busy-border: #FECACA;

  /* Messenger Brands */
  --wa-green: #25D366;
  --wa-bg: #075E54;
  --tg-blue: #229ED9;
  --tg-bg: #0088CC;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --shadow-card-hover: 0 12px 28px rgba(0,0,0,0.12);

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: all 0.15s var(--ease);
  --t-smooth: all 0.25s var(--ease);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 20px;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-monogram {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.3px;
}

.brand-text-group { display: flex; flex-direction: column; }

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-pure);
  line-height: 1.2;
}

.brand-meta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.sync-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: var(--available-bg);
  border: 1px solid var(--available-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--available);
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--available);
  animation: breathe 3s infinite ease-in-out;
}

@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px 28px;
  width: 100%;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-headline {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-pure);
  line-height: 1.2;
  max-width: 600px;
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  .hero-headline { font-size: 38px; }
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.6;
}

/* Trust Grid */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

@media (min-width: 680px) {
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
}

.trust-item {
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
}

.trust-number {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.trust-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-pure);
  margin-bottom: 4px;
}

.trust-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Filter & Container
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px 56px;
  flex: 1;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-group {
  display: inline-flex;
  background: var(--bg-muted);
  padding: 3px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-light);
}

.filter-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: var(--t-fast);
}

.filter-btn:hover { color: var(--text-pure); }

.filter-btn.active {
  background: white;
  color: var(--text-pure);
  box-shadow: var(--shadow-sm);
}

.table-count-badge {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ==========================================================================
   Tables Grid & Photo Cards
   ========================================================================== */

.tables-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 680px) {
  .tables-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .tables-grid { grid-template-columns: repeat(3, 1fr); }
}

.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--t-smooth);
}

.table-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-medium);
}

.table-card.is-busy { opacity: 0.75; }
.table-card.is-busy:hover { transform: none; box-shadow: none; }

/* Card Photo */
.card-photo {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
  background: var(--bg-muted);
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.table-card:hover .card-photo img {
  transform: scale(1.04);
}

.card-photo-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card-photo-badge.free {
  background: rgba(5, 150, 105, 0.85);
  color: white;
}

.card-photo-badge.busy {
  background: rgba(220, 38, 38, 0.85);
  color: white;
}

/* Card Body */
.card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.card-title-wrap { display: flex; flex-direction: column; }

.card-room-number {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 2px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-pure);
}

/* Status Badge */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-indicator.free {
  background: var(--available-bg);
  border: 1px solid var(--available-border);
  color: var(--available);
}

.status-indicator.busy {
  background: var(--busy-bg);
  border: 1px solid var(--busy-border);
  color: var(--busy);
}

.status-dot-mini {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* Room Specs (Feature Chips) */
.room-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.spec-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.room-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
}

/* Price Row */
.card-price-panel {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  margin-bottom: 14px;
}

.price-sub {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

.price-amount {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.price-currency {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  user-select: none;
  transition: var(--t-fast);
}

.btn:active:not(:disabled) { transform: scale(0.985); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-disabled {
  background: var(--bg-muted);
  color: var(--text-tertiary);
  border: 1px solid var(--border-light);
  cursor: not-allowed;
}

.btn-whatsapp {
  background: var(--wa-bg);
  color: white;
}

.btn-whatsapp:hover { background: #064E3B; }

.btn-telegram {
  background: var(--tg-bg);
  color: white;
}

.btn-telegram:hover { background: #006699; }

.btn-secondary {
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-light);
}

/* ==========================================================================
   Booking Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: white;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 20px 20px 32px;
  box-shadow: var(--shadow-xl);
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  max-height: 92vh;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal-card {
    border-radius: var(--r-xl);
    transform: translateY(20px) scale(0.97);
  }
  .modal-backdrop.is-open .modal-card {
    transform: translateY(0) scale(1);
  }
}

.modal-backdrop.is-open .modal-card { transform: translateY(0); }

.sheet-notch {
  width: 40px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--border-medium);
  margin: 0 auto 14px;
}

@media (min-width: 640px) { .sheet-notch { display: none; } }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-headline {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-pure);
}

.modal-deposit-tag {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.modal-deposit-tag strong {
  color: var(--accent);
  font-weight: 700;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--t-fast);
}

.modal-close-btn:hover { background: var(--border-light); color: var(--text-pure); }

/* Quick Date & Time Chips */
.quick-chips-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-chip {
  flex: 1;
  padding: 9px 10px;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--t-fast);
}

.quick-chip:hover { color: var(--text-pure); border-color: var(--border-medium); }

.quick-chip.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.time-chips-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.time-chip {
  padding: 9px 4px;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xs);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: var(--t-fast);
  font-variant-numeric: tabular-nums;
}

.time-chip:hover { color: var(--text-pure); border-color: var(--border-medium); }

.time-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Form Controls */
.form-group { margin-bottom: 14px; }

.form-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--r-sm);
  color: var(--text-pure);
  font-size: 15px;
  font-family: inherit;
  transition: var(--t-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: white;
}

.form-input::placeholder { color: var(--text-tertiary); }

input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }

/* Preview Box */
.preview-box {
  margin: 16px 0;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
}

.preview-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.preview-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
}

.preview-text {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: all;
}

.modal-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 92%;
  max-width: 380px;
}

.toast {
  background: var(--text-pure);
  color: white;
  border-radius: var(--r-full);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: all 0.22s var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-muted);
  padding: 32px 20px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-contact { display: flex; flex-direction: column; gap: 3px; }

.footer-phone {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-pure);
  text-decoration: none;
}

.footer-phone:hover { color: var(--accent); }

.footer-note {
  font-size: 12px;
  color: var(--text-secondary);
}

.footer-admin-link {
  font-size: 12px;
  color: var(--text-tertiary);
  text-decoration: none;
}

.footer-admin-link:hover { color: var(--text-secondary); }

/* ==========================================================================
   Admin Styles
   ========================================================================== */

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  background: white;
}

.admin-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  width: 100%;
}

.auth-card {
  max-width: 400px;
  margin: 48px auto;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-lg);
}

.auth-icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.code-field {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 6px;
  font-variant-numeric: tabular-nums;
}

.admin-table-row {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--t-fast);
}

.admin-table-row:hover { border-color: var(--border-medium); }

@media (min-width: 640px) {
  .admin-table-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .admin-table-controls {
    display: flex;
    align-items: center;
    gap: 14px;
  }
}

.price-input-wrap {
  position: relative;
  width: 100%;
  max-width: 200px;
}

.price-input-wrap .currency-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 13px;
  pointer-events: none;
}

.price-input-wrap input { padding-right: 32px; }

.status-toggle-group {
  display: inline-flex;
  background: var(--bg-muted);
  border-radius: var(--r-full);
  padding: 3px;
  border: 1px solid var(--border-light);
}

.status-toggle-btn {
  padding: 7px 15px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: var(--t-fast);
}

.status-toggle-btn.active.free { background: var(--available); color: white; }
.status-toggle-btn.active.busy { background: var(--busy); color: white; }

.save-bar {
  position: sticky;
  bottom: 20px;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-medium);
  border-radius: var(--r-lg);
  padding: 14px 20px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.alert-banner {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: var(--busy-bg);
  border: 1px solid var(--busy-border);
  color: var(--busy);
}

.alert-success {
  background: var(--available-bg);
  border: 1px solid var(--available-border);
  color: var(--available);
}

.alert-warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
}

/* Diagnostic Panel */
.diag-panel {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #92400E;
  line-height: 1.5;
}

.diag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.diag-ok { color: var(--available); }
.diag-fail { color: var(--busy); font-weight: 700; }
