/* ============================================
   RESORT APP DESIGN SYSTEM
   Apple-Style Glassmorphism
   Adapted from Evolving AI Systems
   visionOS / iOS / macOS material language
   ============================================ */

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

:root {
  /* Atmospheric background deeper warm tone */
  --canvas: #DDD5CA;

  /* ── Liquid glass material ── */
  --glass-bg: rgba(255, 255, 255, 0.38);
  --glass-bg-hover: rgba(255, 255, 255, 0.52);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-highlight: rgba(255, 255, 255, 0.8);
  --glass-blur: 40px;
  --glass-saturate: 1.5;

  /* Liquid element colors */
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-tint: rgba(37, 99, 235, 0.1);
  --accent-glow: rgba(37, 99, 235, 0.3);

  /* Secondary liquid tones */
  --cyan: #0891B2;
  --sky: #0EA5E9;
  --orange: #EA580C;
  --coral: #DC2626;
  --blue: #2563EB;
  --green: #16A34A;

  /* Text hierarchy dark on light */
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-quaternary: #CBD5E1;
  /* Meta / supporting lines on frosted glass (readability between secondary & tertiary) */
  --text-meta-on-glass: #64748b;

  /* Liquid glass shadows soft depth */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.14), 0 6px 16px rgba(0, 0, 0, 0.08);
  
  /* Inner glow simulates glass thickness on light */
  --inner-glow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4),
    inset 1px 0 0 rgba(255, 255, 255, 0.5),
    inset -1px 0 0 rgba(255, 255, 255, 0.5);

  /* Layout */
  --max-w: 960px;
  --max-w-sm: 640px;
  --radius: 20px;
  --radius-s: 14px;
  --radius-xs: 10px;
  --pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.3s;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter',
    'Helvetica Neue', sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--canvas);
  position: relative;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ============================================
   BACKGROUND MESH ambient colour visible
   through the glass cards
   ============================================ */

.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh-gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
  opacity: 1;
}

.mesh-1 {
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5) 0%, rgba(37, 99, 235, 0.2) 35%, transparent 65%);
  top: -30%; left: -20%;
  animation: drift 32s ease-in-out infinite;
}

.mesh-2 {
  width: 65vw; height: 65vw;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.45) 0%, rgba(234, 88, 12, 0.15) 35%, transparent 60%);
  top: 40%; right: -25%;
  animation: drift 38s ease-in-out infinite reverse;
}

.mesh-3 {
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.35) 0%, rgba(220, 38, 38, 0.12) 35%, transparent 65%);
  bottom: -20%; left: 5%;
  animation: drift 42s ease-in-out infinite;
  animation-delay: -10s;
}

.mesh-4 {
  width: 55vw; height: 55vw;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, rgba(14, 165, 233, 0.12) 35%, transparent 65%);
  bottom: 10%; right: 0%;
  animation: drift 36s ease-in-out infinite reverse;
  animation-delay: -18s;
}

.mesh-5 {
  width: 50vw; height: 50vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.08) 40%, transparent 60%);
  top: 15%; left: 25%;
  animation: drift 44s ease-in-out infinite;
  animation-delay: -6s;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.97); }
  75% { transform: translate(15px, 10px) scale(1.03); }
}

/* ============================================
   GLASS MATERIAL
   ============================================ */

.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border-radius: var(--radius);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 8px 32px rgba(37, 99, 235, 0.08),
    0 4px 16px rgba(251, 146, 60, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    inset 0 0 12px rgba(255, 255, 255, 0.15);
  transition: all var(--dur) var(--ease);
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.08) 25%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 1;
}

.glass-card::after {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(251, 146, 60, 0.05) 0%,
    transparent 25%,
    transparent 55%,
    rgba(59, 130, 246, 0.04) 75%,
    rgba(6, 182, 212, 0.05) 100%
  );
  pointer-events: none;
  z-index: 0;
}

@media (hover: hover) and (pointer: fine) {
  .glass-card:hover {
    background: var(--glass-bg-hover);
    box-shadow:
      0 12px 40px rgba(37, 99, 235, 0.12),
      0 6px 20px rgba(251, 146, 60, 0.08),
      0 4px 10px rgba(0, 0, 0, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      inset 0 -1px 0 rgba(0, 0, 0, 0.04),
      inset 0 0 16px rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
  }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text-primary);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 15px;
}

p { color: var(--text-secondary); line-height: 1.65; }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 11px 22px;
  border-radius: var(--pill);
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  border: none;
}

.btn-primary {
  position: relative;
  background: radial-gradient(ellipse at 50% 30%, rgba(96, 165, 250, 1) 0%, var(--accent) 60%, var(--accent-hover) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 4px 14px var(--accent-glow),
    0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset -2px -3px 6px rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
  background: radial-gradient(ellipse at 50% 35%, rgba(96, 165, 250, 1) 0%, var(--accent-hover) 65%, #1e40af 100%);
  box-shadow: 
    0 6px 24px var(--accent-glow),
    0 2px 6px rgba(0, 0, 0, 0.14),
    inset 0 1px 1px rgba(255, 255, 255, 0.4),
    inset -2px -3px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  background: radial-gradient(ellipse at 50% 50%, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: 
    0 1px 4px var(--accent-glow),
    inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled {
  background: var(--text-quaternary);
  border-color: rgba(0, 0, 0, 0.04);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.3);
  color: var(--text-secondary);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 
    var(--shadow-sm),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 3px rgba(0, 0, 0, 0.04);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-primary);
  box-shadow: 
    var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 4px rgba(0, 0, 0, 0.06);
}

.btn-lg { padding: 14px 32px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ============================================
   FORM INPUTS
   ============================================ */

.glass-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-xs);
  outline: none;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.06),
    inset 0 0 2px rgba(0, 0, 0, 0.03),
    0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all var(--dur) var(--ease);
}

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

.glass-input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--accent);
  box-shadow: 
    0 0 0 3px var(--accent-tint),
    inset 0 1px 2px rgba(0, 0, 0, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

.glass-input.error {
  border-color: var(--coral);
  box-shadow:
    0 0 0 3px rgba(220, 38, 38, 0.15),
    inset 0 2px 4px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.5);
}

textarea.glass-input { 
  resize: vertical; 
  min-height: 80px; 
  font-family: inherit; 
}

select.glass-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Neumorphic logout (index / guest; admin uses .btn-ghost) */
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--pill);
  cursor: pointer;
  color: #4a5568;
  background: #ebebe8;
  box-shadow:
    5px 5px 12px rgba(201, 201, 196, 0.9),
    -5px -5px 12px rgba(255, 255, 255, 0.95);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.logout-btn:hover {
  box-shadow:
    6px 6px 14px rgba(190, 190, 185, 0.95),
    -6px -6px 14px rgba(255, 255, 255, 1);
  transform: translateY(-1px);
}

.logout-btn:active {
  box-shadow:
    inset 4px 4px 10px rgba(190, 190, 185, 0.65),
    inset -4px -4px 10px rgba(255, 255, 255, 0.85);
  transform: translateY(0);
}

/* ============================================
   TABLES
   ============================================ */

.glass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.glass-table thead {
  background: rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.glass-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
}

.glass-table td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.glass-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================
   BADGES & STATUS
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--pill);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
}

.badge-success {
  background: rgba(22, 163, 74, 0.15);
  color: var(--green);
  border-color: rgba(22, 163, 74, 0.3);
}

.badge-warning {
  background: rgba(234, 88, 12, 0.15);
  color: var(--orange);
  border-color: rgba(234, 88, 12, 0.3);
}

.badge-error {
  background: rgba(220, 38, 38, 0.15);
  color: var(--coral);
  border-color: rgba(220, 38, 38, 0.3);
}

.badge-info {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent);
  border-color: rgba(37, 99, 235, 0.3);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { opacity: 0; animation: fadeUp 0.6s var(--ease-out) forwards; }
.fade-up-d1 { animation-delay: 0.06s; }
.fade-up-d2 { animation-delay: 0.12s; }
.fade-up-d3 { animation-delay: 0.18s; }
.fade-up-d4 { animation-delay: 0.24s; }

/* ============================================
   HEADER (Fixed Glass Pill)
   ============================================ */

.glass-header {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: var(--max-w);
  height: 48px;
  z-index: 1000;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.04),
    inset 1px 0 0 rgba(255, 255, 255, 0.25),
    inset -1px 0 0 rgba(255, 255, 255, 0.25);
}

.glass-header-inner {
  max-width: 100%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

/* ============================================
   CONTAINER
   ============================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

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

@media (max-width: 768px) {
  .glass-header {
    width: calc(100% - 24px);
  }
  
  .container {
    padding: 0 16px;
  }
}

/* Full-width opt-in — applied selectively; does not affect inline/icon/header buttons */
@media (max-width: 480px) {
  .btn-block-mobile {
    width: 100%;
    justify-content: center;
  }
}

/* ── Mobile mesh performance: reduce blur, drop one blob ── */
@media (max-width: 768px) {
  .mesh-gradient {
    filter: blur(60px);
  }

  .mesh-5 {
    display: none;
  }
}
