/* ===== GLASS THEME FOUNDATION ===== */
/* Deep dark background, glassmorphism, soft glows, luxury micro-interactions */

:root {
  /* Color Palette */
  --bg-primary: #0B0F1A;
  --bg-secondary: #111827;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Accent Colors (soft, luxury) */
  --blue-soft: #3B82F6;
  --pink-soft: #F87171;
  --amber-soft: #FBBF24;
  --purple-accent: #A78BFA;

  /* Opacity Levels */
  --glass-blur: 20px;
  --glow-radius: 30px;
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.3);
  --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.1);

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GLOBAL BACKGROUND ===== */
body {
  background-color: var(--bg-primary);
  background: linear-gradient(135deg, var(--bg-primary) 0%, #0D1425 100%);
  color: rgba(255, 255, 255, 0.9);
  transition: all var(--transition-normal);
}

/* ===== GLASS CARD STYLE (All Interactive Elements) ===== */
.glass-card {
  border-radius: 16px;
  backdrop-filter: blur(var(--glass-blur));
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft), var(--shadow-inset);
  transition: all var(--transition-normal);
  position: relative;
}

.glass-card:hover {
  transform: scale(1.02) translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 30px 80px rgba(59, 130, 246, 0.2), var(--shadow-inset);
}

/* ===== GLASS CARD GLOW (Hover) ===== */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle 300px at var(--cursor-x, 50%) var(--cursor-y, 50%), rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
  border-radius: 16px;
}

.glass-card:hover::before {
  opacity: 1;
}

/* ===== BUTTON STYLES ===== */
button, .btn, a.btn {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(167, 139, 250, 0.15) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #fff;
  padding: 12px 24px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

button:hover, .btn:hover, a.btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(167, 139, 250, 0.25) 100%);
  border-color: rgba(59, 130, 246, 0.5);
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
}

button:active, .btn:active, a.btn:active {
  transform: scale(0.98);
}

/* ===== INPUT FIELDS ===== */
input, textarea, select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  padding: 12px 16px;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  font-size: 1rem;
  position: relative;
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(59, 130, 246, 0.5);
  border-bottom-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1), 0 -2px 8px rgba(59, 130, 246, 0.1);
}

/* ===== FORM FIELD ERROR STATE ===== */
input.error, textarea.error, select.error {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
  border-bottom-color: rgba(248, 113, 113, 0.5);
}

input.error:focus, textarea.error:focus, select.error:focus {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.1), 0 -2px 8px rgba(248, 113, 113, 0.1);
}

/* ===== FORM FIELD SUCCESS STATE ===== */
input.success, textarea.success, select.success {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
  border-bottom-color: rgba(34, 197, 94, 0.5);
}

input.success:focus, textarea.success:focus, select.success:focus {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1), 0 -2px 8px rgba(34, 197, 94, 0.1);
}

/* ===== UNDERLINE GRADIENT ANIMATION (Focus State) ===== */
input::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #3B82F6 0%, #A78BFA 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

input:focus::after {
  transform: scaleX(1);
}

/* ===== ROOM CARD STATES ===== */
.room-card {
  padding: 20px;
  position: relative;
}

.room-card.available {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

.room-card.available:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.room-card.occupied {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.2);
}

.room-card.occupied:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.4);
}

.room-card.reserved {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.2);
}

.room-card.reserved:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.08) 0%,
    rgba(59, 130, 246, 0.15) 50%,
    rgba(59, 130, 246, 0.08) 100%
  );
  background-size: 200% 100%;
  border-radius: 8px;
  height: 12px;
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-short {
  width: 40px;
}

.skeleton-text {
  width: 100%;
  height: 14px;
}

.skeleton-row td {
  padding: 12px 8px;
}

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

@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: rgba(59, 130, 246, 0.08);
  }
}

/* ===== ANIMATE ROW (Stagger Targets) ===== */
.animate-row {
  opacity: 0;
  transform: translateY(12px);
}

.animate-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GLOW PULSE (Real-time Updates) ===== */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1);
  }
}

.glow-pulse {
  animation: glow-pulse 2s ease-in-out;
}

/* ===== SMOOTH TRANSITIONS ===== */
.fade-in {
  animation: fade-in 300ms ease-in-out forwards;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slide-up 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-left {
  animation: slide-left 300ms ease-out forwards;
}

@keyframes slide-left {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-from-right {
  animation: slide-from-right 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slide-from-right {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== PRESS ANIMATION ===== */
.press-feedback {
  animation: press 100ms ease-out;
}

@keyframes press {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

/* ===== FORM LABELS ===== */
label {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 8px;
  transition: color var(--transition-fast);
}

input:focus + label, textarea:focus + label, select:focus + label {
  color: #fff;
}

/* ===== FORM MESSAGES ===== */
.form-message {
  font-size: 0.85rem;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  animation: message-slide-in 300ms ease-out forwards;
}

.form-message.error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #F87171;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22C55E;
}

@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== TEXT STYLES ===== */
h1, h2, h3, h4, h5, h6 {
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.5px;
}

p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

a {
  color: #3B82F6;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #A78BFA;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== ROOM MANAGEMENT CARDS ===== */
/* Soft color states for room status */
.room-card-available {
  background: rgba(59, 130, 246, 0.08) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}

.room-card-available:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1), 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.room-card-occupied {
  background: rgba(248, 113, 113, 0.08) !important;
  border-color: rgba(248, 113, 113, 0.2) !important;
}

.room-card-occupied:hover {
  background: rgba(248, 113, 113, 0.15) !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
  box-shadow: 0 0 0 8px rgba(248, 113, 113, 0.1), 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.room-card-reserved {
  background: rgba(251, 191, 36, 0.08) !important;
  border-color: rgba(251, 191, 36, 0.2) !important;
}

.room-card-reserved:hover {
  background: rgba(251, 191, 36, 0.15) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
  box-shadow: 0 0 0 8px rgba(251, 191, 36, 0.1), 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.room-card-pulse {
  animation: room-pulse 2s ease-in-out;
}

@keyframes room-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1);
  }
}

/* ===== FRONT DESK CARDS ===== */
.kiosk-card {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px 40px;
  max-width: 520px;
  transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kiosk-card.expanded {
  max-width: 720px;
  transform: scale(1.02);
}

.kiosk-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  padding: 16px 20px;
  font-size: 1.1rem;
  transition: all 300ms ease;
  backdrop-filter: blur(10px);
}

.kiosk-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), inset 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.kiosk-btn-lg {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(167, 139, 250, 0.2) 100%);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #fff;
  padding: 14px 32px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 200ms ease;
  backdrop-filter: blur(10px);
}

.kiosk-btn-lg:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(167, 139, 250, 0.3) 100%);
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.kiosk-btn-lg:active {
  transform: scale(0.98);
}

/* ===== KPI CARDS ===== */
.kpi-card {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpi-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.kpi-meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ===== KPI CARD SKELETON ===== */
.kpi-card-skeleton {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft), var(--shadow-inset);
}

.skeleton-title {
  height: 14px;
  width: 60%;
  margin-bottom: 4px;
}

.skeleton-value {
  height: 48px;
  width: 100%;
}

.skeleton-small {
  height: 12px;
  width: 70%;
}

/* ===== SKELETON TEXT ELEMENTS ===== */
.skeleton-text {
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.08) 0%,
    rgba(59, 130, 246, 0.15) 50%,
    rgba(59, 130, 246, 0.08) 100%
  );
  background-size: 200% 100%;
  border-radius: 8px;
  animation: shimmer 1.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-text {
    animation: none;
    background: rgba(59, 130, 246, 0.08);
  }
}

/* ===== BILLING & CHECKOUT MODAL (Slide-up Panel, Apple Wallet style) ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
}

.modal-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(11, 15, 26, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px 24px 0 0;
  padding: 32px 28px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  backdrop-filter: blur(20px);
  animation: modal-slide-up 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 -20px 60px rgba(59, 130, 246, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

@keyframes modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MODAL SUMMARY (Breakdown items with stagger animation) ===== */
.modal-summary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 20px;
}

.modal-summary div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: breakdown-item-fade 400ms ease-in-out forwards;
}

.modal-summary div:last-child {
  border-bottom: none;
}

.modal-summary div:nth-child(1) { animation-delay: 100ms; }
.modal-summary div:nth-child(2) { animation-delay: 200ms; }
.modal-summary div:nth-child(3) { animation-delay: 300ms; }
.modal-summary div:nth-child(4) { animation-delay: 400ms; }
.modal-summary div:nth-child(5) { animation-delay: 500ms; }
.modal-summary div:nth-child(6) { animation-delay: 600ms; }
.modal-summary div:nth-child(7) { animation-delay: 700ms; }
.modal-summary div:nth-child(8) { animation-delay: 800ms; }
.modal-summary div:nth-child(9) { animation-delay: 900ms; }
.modal-summary div:nth-child(10) { animation-delay: 1000ms; }

@keyframes breakdown-item-fade {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.modal-summary strong {
  color: #fff;
  font-weight: 600;
}

.modal-summary .total-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid rgba(59, 130, 246, 0.3) !important;
}

/* ===== CASH SUMMARY CARDS (Minimal floating aesthetic) ===== */
.cash-summary-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(20px);
  transition: all 300ms ease;
}

.cash-summary-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.1);
}

.cash-summary-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-weight: 500;
}

.cash-summary-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.5px;
}

/* ===== FLOATING SUMMARY PANEL (Minimal cash handover) ===== */
.floating-panel {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(11, 15, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 280px;
  animation: panel-slide-up 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  z-index: 500;
}

@keyframes panel-slide-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SUCCESS TOAST (Slide-in notification) ===== */
.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  color: #fff;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toast-slide-up 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  z-index: 2000;
}

@keyframes toast-slide-up {
  from {
    opacity: 0;
    transform: translateY(100px) translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0);
  }
}

.toast-notification.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ===== TAB TRANSITION ANIMATION ===== */
.admin-panel {
  opacity: 1;
  transition: opacity 300ms ease-out;
}

@keyframes panel-fade-slide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BUTTON GROUP POLISH ===== */
.admin-tabs button.admin-tab {
  transition: all var(--transition-normal);
  position: relative;
}

.admin-tabs button.admin-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #3B82F6 0%, #A78BFA 100%);
  transition: width var(--transition-normal);
}

.admin-tabs button.admin-tab.active::after {
  width: 100%;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .glass-card:hover {
    transform: none;
  }

  button:hover {
    transform: none;
  }

  @keyframes overlay-fade-in,
  @keyframes modal-slide-up,
  @keyframes breakdown-item-fade,
  @keyframes panel-slide-up,
  @keyframes toast-slide-up {
    from, to {
      opacity: 1;
      transform: none;
      backdrop-filter: none;
    }
  }
}
