/* ==========================================================================
   roommie - High-End Glassmorphic Design System & Interactive Motion
   ========================================================================== */

/* Ambient Mesh Background for Glass Refraction */
body {
  font-family: 'Sarabun', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #FAF8F5;
  background-image: 
    radial-gradient(at 0% 0%, rgba(66, 135, 96, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(217, 203, 183, 0.25) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(50, 109, 77, 0.15) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(244, 239, 230, 0.4) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(100, 164, 128, 0.08) 0px, transparent 60%);
  background-attachment: fixed;
  color: #1E293B;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display {
  font-family: 'Prompt', sans-serif;
}

/* Glassmorphism Core Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 30px -5px rgba(28, 74, 52, 0.05), 0 4px 12px -2px rgba(28, 74, 52, 0.03);
}

.glass-panel-elevated {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 40px -10px rgba(28, 74, 52, 0.08), 0 6px 16px -4px rgba(28, 74, 52, 0.04);
}

.glass-header {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.glass-sidebar {
  background: rgba(15, 33, 24, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-input {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(217, 203, 183, 0.6);
  transition: all 0.2s ease;
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: #326D4D;
  box-shadow: 0 0 0 3px rgba(50, 109, 77, 0.18);
  outline: none;
}

.glass-modal-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 25px 60px -15px rgba(15, 33, 24, 0.22);
  transform-origin: center center;
  animation: modalCardPop 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal Backdrop Smooth Fade In */
div[id$="Modal"] {
  animation: modalFadeIn 0.2s ease-out forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalCardPop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* View & Tab Transitions */
@keyframes viewFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-view-in {
  animation: viewFadeSlideIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Tactile Button Physical Feedback (Active Scale 95%) */
button:not(:disabled),
.btn-glass:not(:disabled),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
.btn-interactive:not(:disabled) {
  transition: transform 0.14s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.14s ease;
  user-select: none;
}

button:active:not(:disabled),
.btn-glass:active:not(:disabled),
input[type="button"]:active:not(:disabled),
input[type="submit"]:active:not(:disabled),
.btn-interactive:active:not(:disabled) {
  transform: scale(0.95) translateY(1px);
}

/* Room Cards with Status Glow & Elevation Lift */
.room-card {
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease, background-color 0.22s ease;
  will-change: transform, box-shadow;
}

.room-card:hover {
  transform: translateY(-4px) scale(1.012);
  background: rgba(255, 255, 255, 0.94);
}

/* 1. Paid Room: Fresh Emerald Glow */
.room-card-paid:hover {
  box-shadow: 0 16px 32px -4px rgba(16, 185, 129, 0.24), 0 6px 14px -2px rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.8) !important;
}

/* 2. Unpaid Room: Urgent Coral Rose Glow */
.room-card-unpaid:hover {
  box-shadow: 0 16px 32px -4px rgba(244, 63, 94, 0.26), 0 6px 14px -2px rgba(244, 63, 94, 0.12);
  border-color: rgba(251, 113, 133, 0.8) !important;
}

/* 3. Pending Slip Room: Attention Amber Glow */
.room-card-pending:hover {
  box-shadow: 0 16px 32px -4px rgba(245, 158, 11, 0.30), 0 6px 14px -2px rgba(245, 158, 11, 0.15);
  border-color: rgba(251, 191, 36, 0.85) !important;
}

/* 4. Vacant / Cleaning Room: Soft Slate Shadow */
.room-card-vacant:hover {
  box-shadow: 0 12px 24px -4px rgba(100, 116, 139, 0.18), 0 4px 10px -2px rgba(100, 116, 139, 0.08);
  border-color: rgba(148, 163, 184, 0.7) !important;
}

/* Beacon Pulse Animations for Alerts */
@keyframes beaconPulseAmber {
  0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.beacon-pulse-amber {
  animation: beaconPulseAmber 1.8s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes beaconPulseRose {
  0% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 7px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.beacon-pulse-rose {
  animation: beaconPulseRose 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Custom Sleek Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(244, 239, 230, 0.6);
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #C2AE92;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #A89274;
}

/* Tab indicator active state */
.tab-active {
  background: #28573E !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 14px rgba(40, 87, 62, 0.3);
}

/* Fast meter entry table inputs */
.meter-input {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.meter-input:focus {
  background-color: #FFFFFF;
  border-color: #326D4D;
  box-shadow: 0 0 0 3px rgba(50, 109, 77, 0.2);
  outline: none;
}

.meter-input-warning {
  border-color: #F59E0B !important;
  background-color: #FEF3C7 !important;
  color: #92400E !important;
}

/* Pulsing Badge for Urgent Items */
@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

.pulse-badge {
  animation: pulse-subtle 2s infinite ease-in-out;
}

/* Subtle Shimmer Effect on Action Buttons */
.btn-glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Print Stylesheet for Official Invoice / Receipt */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  
  body * {
    visibility: hidden;
  }

  #printVoucherSection, #printVoucherSection * {
    visibility: visible;
  }

  #printVoucherSection {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 24px !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    border: none !important;
  }

  .no-print {
    display: none !important;
  }

  tr {
    page-break-inside: avoid;
  }
}
