/* ============================================================
   The Grand Azure - Complete Design System
   Unique Dark Admin + Luxury Public Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700;800&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Public Site */
  --navy: #1a2332;
  --navy-light: #243044;
  --gold: #c4a35a;
  --gold-light: #d4b76a;
  --gold-dark: #a8893e;
  --cream: #faf8f5;
  --cream-dark: #f0ece4;

  /* Admin Dark Theme */
  --admin-bg: #0b1120;
  --admin-surface: #111827;
  --admin-card: #1a2332;
  --admin-card-hover: #1f2937;
  --admin-border: #1f2937;
  --admin-border-light: #374151;
  --admin-text: #e5e7eb;
  --admin-text-muted: #9ca3af;
  --admin-text-dim: #6b7280;

  /* Accent Colors */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --teal: #14b8a6;
  --teal-glow: rgba(20, 184, 166, 0.15);
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --rose: #f43f5e;
  --emerald: #10b981;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4, h5 { font-family: 'Playfair Display', serif; }
.font-serif { font-family: 'Playfair Display', serif; }
.font-cormorant { font-family: 'Cormorant Garamond', serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse-ring { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 5px var(--accent-glow); } 50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow); } }
@keyframes gradient-x { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-gradient { animation: gradient-x 3s ease infinite; background-size: 200% 200%; }

/* ============================================================
   PUBLIC SITE STYLES
   ============================================================ */

/* Hero */
.hero-section { position: relative; min-height: 100vh; overflow: hidden; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(11,17,32,0.6) 0%, rgba(11,17,32,0.3) 40%, rgba(11,17,32,0.75) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; }

/* Gold Accents */
.gold-line { width: 60px; height: 2px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.gold-line-wide { width: 100px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* Section Label */
.section-label { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

/* Buttons - Public */
.btn-gold { background: var(--gold); color: var(--navy); font-weight: 600; padding: 14px 32px; border: none; letter-spacing: 0.05em; text-transform: uppercase; font-size: 13px; cursor: pointer; transition: all 0.3s ease; display: inline-block; text-decoration: none; text-align: center; }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(196,163,90,0.4); }
.btn-outline { background: transparent; color: #fff; font-weight: 500; padding: 14px 32px; border: 1px solid rgba(255,255,255,0.4); letter-spacing: 0.05em; text-transform: uppercase; font-size: 13px; cursor: pointer; transition: all 0.3s ease; display: inline-block; text-decoration: none; text-align: center; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-navy { background: var(--navy); color: #fff; font-weight: 600; padding: 14px 32px; border: none; letter-spacing: 0.05em; text-transform: uppercase; font-size: 13px; cursor: pointer; transition: all 0.3s ease; display: inline-block; text-decoration: none; text-align: center; }
.btn-navy:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(26,35,50,0.3); }

/* Room Cards */
.room-card { transition: all 0.4s ease; overflow: hidden; }
.room-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.12); }
.room-card:hover .room-card-img { transform: scale(1.05); }
.room-card-img { transition: transform 0.6s ease; }

/* Booking Widget */
.booking-widget { background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,0.15); }

/* Navbar */
.hotel-nav { transition: all 0.3s ease; }
.hotel-nav.scrolled { background: rgba(11,17,32,0.95) !important; backdrop-filter: blur(20px); box-shadow: 0 2px 20px rgba(0,0,0,0.2); }

/* Testimonials */
.testimonial-card { transition: all 0.3s ease; }
.testimonial-card:hover { transform: translateY(-4px); box-shadow: 0 15px 40px rgba(0,0,0,0.08); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 250px); gap: 6px; }
.gallery-grid .gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-item { overflow: hidden; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,17,32,0.4) 0%, transparent 50%); opacity: 0; transition: opacity 0.3s ease; }
.gallery-item:hover::after { opacity: 1; }

.star { color: var(--gold); }

/* ============================================================
   ADMIN DARK THEME
   ============================================================ */

/* Sidebar */
.admin-sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
  width: 280px;
  min-height: 100vh;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid var(--admin-border);
}
.admin-sidebar a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px; margin: 2px 12px; border-radius: 10px;
  color: var(--admin-text-dim); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all 0.2s ease;
}
.admin-sidebar a:hover { color: var(--admin-text); background: rgba(255,255,255,0.04); }
.admin-sidebar a.active { color: var(--accent); background: var(--accent-glow); font-weight: 600; }
.admin-sidebar a.active svg { stroke: var(--accent); }

.sidebar-section { padding: 0 24px; margin-top: 24px; margin-bottom: 8px; }
.sidebar-section span { font-size: 10px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: var(--admin-text-dim); }

/* Admin Cards */
.admin-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
}
.admin-card:hover { border-color: var(--admin-border-light); }

.admin-card-glass {
  background: linear-gradient(135deg, rgba(26,35,50,0.8), rgba(17,24,39,0.9));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 24px;
}

/* Stat Cards - Unique gradient borders */
.stat-card-admin {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.stat-card-admin::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}
.stat-card-admin:hover { transform: translateY(-2px); border-color: var(--admin-border-light); }
.stat-card-admin.amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card-admin.teal::before { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.stat-card-admin.blue::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stat-card-admin.rose::before { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.stat-card-admin.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card-admin.emerald::before { background: linear-gradient(90deg, #10b981, #34d399); }

/* Admin Top Bar */
.admin-topbar {
  background: rgba(11,17,32,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--admin-border);
}

/* Admin Tables */
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.admin-table thead th {
  background: rgba(255,255,255,0.02);
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-dim);
  border-bottom: 1px solid var(--admin-border);
}
.admin-table tbody td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--admin-text);
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.admin-table tbody tr { transition: background 0.15s ease; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Status Badges - Admin */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 8px;
  font-size: 11px; font-weight: 600;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge.green { background: rgba(16,185,129,0.1); color: #34d399; }
.badge.green::before { background: #10b981; }
.badge.blue { background: rgba(59,130,246,0.1); color: #60a5fa; }
.badge.blue::before { background: #3b82f6; }
.badge.amber { background: rgba(245,158,11,0.1); color: #fbbf24; }
.badge.amber::before { background: #f59e0b; }
.badge.red { background: rgba(244,63,94,0.1); color: #fb7185; }
.badge.red::before { background: #f43f5e; }
.badge.purple { background: rgba(139,92,246,0.1); color: #a78bfa; }
.badge.purple::before { background: #8b5cf6; }
.badge.gray { background: rgba(107,114,128,0.1); color: #9ca3af; }
.badge.gray::before { background: #6b7280; }
.badge.teal { background: rgba(20,184,166,0.1); color: #2dd4bf; }
.badge.teal::before { background: #14b8a6; }

/* Admin Buttons */
.btn-admin {
  padding: 8px 16px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-admin.primary { background: var(--accent); color: #0b1120; }
.btn-admin.primary:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 4px 12px var(--accent-glow); }
.btn-admin.secondary { background: rgba(255,255,255,0.06); color: var(--admin-text); border: 1px solid var(--admin-border); }
.btn-admin.secondary:hover { background: rgba(255,255,255,0.1); border-color: var(--admin-border-light); }
.btn-admin.danger { background: rgba(244,63,94,0.1); color: #fb7185; }
.btn-admin.danger:hover { background: rgba(244,63,94,0.2); }

/* Admin Form Inputs */
.admin-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--admin-text);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}
.admin-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.admin-input::placeholder { color: var(--admin-text-dim); }

/* Fix select/option colors on dark admin theme (scoped to admin pages only) */
body.bg-admin-bg select,
body.bg-admin-bg select option {
  background-color: var(--admin-card, #1a2332);
  color: var(--admin-text, #e5e7eb);
}
body.bg-admin-bg select option:checked {
  background-color: var(--accent-glow, rgba(245, 158, 11, 0.15));
}
body.bg-admin-bg select option[value=""] {
  color: var(--admin-text-dim, #6b7280);
}

/* Unique Avatar Ring */
.avatar-ring {
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--teal));
}
.avatar-ring img, .avatar-ring .avatar-inner {
  border-radius: 50%;
  border: 2px solid var(--admin-bg);
}

/* Progress Bars */
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* Pulse dot */
.pulse-dot { position: relative; }
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  animation: pulse-ring 1.5s ease-out infinite;
}
.pulse-dot.green::after { border: 2px solid #10b981; }
.pulse-dot.amber::after { border: 2px solid #f59e0b; }
.pulse-dot.red::after { border: 2px solid #f43f5e; }

/* Scrollbar - Admin */
.admin-scroll::-webkit-scrollbar { width: 6px; }
.admin-scroll::-webkit-scrollbar-track { background: transparent; }
.admin-scroll::-webkit-scrollbar-thumb { background: var(--admin-border); border-radius: 3px; }
.admin-scroll::-webkit-scrollbar-thumb:hover { background: var(--admin-border-light); }

/* Public Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 4px; }

/* ============================================================
   LOADING SKELETONS
   ============================================================ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.skeleton {
  background: linear-gradient(90deg, #1a2332 25%, #243044 50%, #1a2332 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 8px;
}
.skeleton-text { height: 12px; margin-bottom: 8px; }
.skeleton-text.sm { height: 10px; width: 60%; }
.skeleton-text.lg { height: 16px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 12px; }
.skeleton-card {
  background: #1a2332;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}
.skeleton-row { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.03); }

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 16px; opacity: 0.3; }
.empty-state h3 { color: #e5e7eb; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.empty-state p { color: #6b7280; font-size: 12px; }

/* ============================================================
   CONFIRMATION DIALOG
   ============================================================ */
.confirm-dialog {
  background: #1a2332;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Mobile Admin Sidebar Overlay ---- */
.admin-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 49;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.admin-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile hamburger in topbar */
.mobile-menu-btn { display: none; }

/* Scrollbar hide utility */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

@media (max-width: 1023px) {
  /* Admin sidebar: off-screen by default on mobile */
  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 280px !important;
  }
  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }
  /* Always show labels when mobile sidebar is open */
  .admin-sidebar.mobile-open a span,
  .admin-sidebar.mobile-open .sidebar-section { display: block !important; }

  /* Main content: no left margin on mobile */
  .admin-main-content {
    margin-left: 0 !important;
  }

  /* Show mobile hamburger */
  .mobile-menu-btn { display: flex !important; }

  /* Admin topbar: less padding */
  .admin-topbar { padding-left: 1rem !important; padding-right: 1rem !important; }

  /* Notification dropdown: max width to fit screen */
  .admin-notif-dropdown {
    position: fixed !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    width: auto !important;
    max-width: none !important;
  }

  /* Admin content padding */
  .admin-content-padding { padding: 1rem !important; }
}

@media (max-width: 768px) {
  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 180px); }
  .gallery-grid .gallery-item:first-child { grid-column: span 2; grid-row: span 1; }

  /* Public site hero text */
  .hero-section h1 { font-size: 2.5rem !important; line-height: 1.1; }

  /* Booking widget: tighter padding */
  .booking-widget { padding: 1.25rem !important; }

  /* Stat cards in admin */
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Section headings */
  .section-heading-responsive { font-size: 1.75rem !important; }
}

@media (max-width: 640px) {
  /* Gallery single column */
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: auto; gap: 8px; }
  .gallery-grid .gallery-item:first-child { grid-column: span 1; }
  .gallery-grid .gallery-item { height: 200px; }

  /* Admin stat cards single column on very small screens */
  .admin-stat-grid { grid-template-columns: 1fr !important; }

  /* Hero adjustments */
  .hero-section h1 { font-size: 2rem !important; }

  /* Buttons - more touch-friendly */
  .btn-gold, .btn-outline, .btn-navy { padding: 12px 24px; font-size: 12px; min-height: 44px; }

  /* Room cards */
  .room-card .p-6 { padding: 1rem; }

  /* Footer grid */
  .footer-grid { grid-template-columns: 1fr !important; }

  /* Disable hover lift on mobile (prevents sticky hover on touch) */
  .room-card:hover { transform: none; }
  .testimonial-card:hover { transform: none; }
  .stat-card-admin:hover { transform: none; }
}

/* Touch-friendly: minimum tap targets on touch devices */
@media (pointer: coarse) {
  .btn-gold, .btn-outline, .btn-navy { min-height: 44px; }
  input, select, textarea { min-height: 44px; font-size: 16px; /* prevents iOS zoom on focus */ }
}
