:root {
  /* Primary Colors - โทนหลักเรียบๆ */
  --primary-color: #1e40af;
  --primary-light: #3b82f6;
  --primary-lighter: #60a5fa;
  --primary-lightest: #93c5fd;
  --primary-pale: #dbeafe;

  /* Secondary Colors */
  --secondary-color: #0f766e;
  --secondary-light: #14b8a6;

  /* Surfaces */
  --app-bg: #ffffff;
  --surface-elevated: #ffffff;
  --surface-muted: #f9fafb;
  --divider-color: #e5e7eb;

  /* Text Colors */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-white: #ffffff;
  --text-black: #000000;

  /* Backgrounds */
  --bg-white: #ffffff;
  --bg-light: #f5f5f5;
  --bg-gray: #f8f9fa;
  --bg-dark: #333333;

  /* Borders */
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;

  /* Status */
  --status-available-bg: #d1fae5;
  --status-available-text: #065f46;
  --status-available-border: #6ee7b7;

  --status-booked-bg: #fef3c7;
  --status-booked-text: #92400e;
  --status-booked-border: #fcd34d;

  --status-sold-bg: #fee2e2;
  --status-sold-text: #991b1b;
  --status-sold-border: #fca5a5;

  /* Alert / Ribbon */
  --ribbon-bg: #dc2626;

  /* Skeleton / Empty */
  --skeleton-bg: #e5e7eb;
  --skeleton-shimmer: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  --empty-state-bg: #f9fafb;
  --empty-state-text: #9ca3af;

  /* Shadows - แบบมินิมอล เบาๆ */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 10px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 14px 35px rgba(15, 23, 42, 0.16);

  /* Overlays */
  --overlay-dark: rgba(0, 0, 0, 0.55);
  --overlay-light: rgba(255, 255, 255, 0.9);
  --overlay-primary: rgba(30, 64, 175, 0.85);

  /* Hover / Focus */
  --hover-bg: #f3f4f6;
  --active-bg: #e5e7eb;
  /* สำหรับโค้ดเดิมที่อาจอ้างถึง gradient-overlay ให้เป็น overlay แบนๆ แทน */
  --gradient-overlay: rgba(0, 0, 0, 0.35);

  /* Focus ring เดียว (ลบตัวซ้ำออก) */
  --focus-ring: 0 0 0 3px rgba(30, 64, 175, 0.18);
  --focus-ring-inset: inset 0 0 0 2px var(--primary-color);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 15px;
  --radius-circle: 50%;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Font Sizes */
  --text-xs: 0.8rem;
  --text-sm: 0.95rem;
  --text-base: 1.05rem;
  --text-lg: 1.2rem;
  --text-xl: 1.4rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2rem;

  /* Line Heights */
  --leading-tight: 1.3;
  --leading-normal: 1.6;
  --leading-loose: 1.8;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* =========================================
   UTILITIES – SPACING
   ========================================= */

.mt-1 {
  margin-top: var(--spacing-xs);
}
.mt-2 {
  margin-top: var(--spacing-sm);
}
.mt-3 {
  margin-top: var(--spacing-md);
}
.mt-4 {
  margin-top: var(--spacing-lg);
}

.mb-1 {
  margin-bottom: var(--spacing-xs);
}
.mb-2 {
  margin-bottom: var(--spacing-sm);
}
.mb-3 {
  margin-bottom: var(--spacing-md);
}
.mb-4 {
  margin-bottom: var(--spacing-lg);
}

.p-1 {
  padding: var(--spacing-xs);
}
.p-2 {
  padding: var(--spacing-sm);
}
.p-3 {
  padding: var(--spacing-md);
}
.p-4 {
  padding: var(--spacing-lg);
}

/* =========================================
   UTILITIES – TYPOGRAPHY
   ========================================= */

.text-xs {
  font-size: var(--text-xs);
}
.text-sm {
  font-size: var(--text-sm);
}
.text-base {
  font-size: var(--text-base);
}
.text-lg {
  font-size: var(--text-lg);
}
.text-xl {
  font-size: var(--text-xl);
}
.text-2xl {
  font-size: var(--text-2xl);
}
.text-3xl {
  font-size: var(--text-3xl);
}

.font-normal {
  font-weight: var(--font-normal);
}
.font-medium {
  font-weight: var(--font-medium);
}
.font-semibold {
  font-weight: var(--font-semibold);
}
.font-bold {
  font-weight: var(--font-bold);
}

.text-primary {
  color: var(--text-primary);
}
.text-secondary {
  color: var(--text-secondary);
}
.text-tertiary {
  color: var(--text-tertiary);
}

.leading-tight {
  line-height: var(--leading-tight);
}
.leading-normal {
  line-height: var(--leading-normal);
}
.leading-loose {
  line-height: var(--leading-loose);
}

/* =========================================
   SKELETON LOADING
   ========================================= */

.skeleton {
  background: var(--skeleton-bg);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: var(--skeleton-shimmer);
  animation: skeleton-shimmer 1.4s infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.75;
  }
}

@keyframes skeleton-shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* =========================================
   EMPTY STATE
   ========================================= */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-md);
  background: var(--empty-state-bg);
  border-radius: var(--radius-lg);
  text-align: center;
  min-height: 260px;
}

.empty-state-icon {
  font-size: 3.5rem;
  color: var(--empty-state-text);
  margin-bottom: var(--spacing-md);
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.empty-state-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 400px;
}

/* =========================================
   MODAL / DIALOG
   ========================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  animation: modal-fade-in 0.18s ease-out;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-scale-in 0.22s ease-out;
}

.modal-header {
  padding: var(--spacing-md) var(--spacing-lg);
  border-bottom: 1px solid var(--divider-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: var(--spacing-lg);
}

.modal-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  border-top: 1px solid var(--divider-color);
  display: flex;
  gap: var(--spacing-sm);
  justify-content: flex-end;
}

@keyframes modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-scale-in {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================================
   ACCESSIBILITY
   ========================================= */

*:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-color: #000000;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
