/* ============================================================
   HOTEL MANAGEMENT SYSTEM - Global Styles
   Design: Dark Mode + Premium Thai Hospitality Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* === CSS Variables === */
:root {
  /* Color Palette */
  --bg-primary:    #0d1117;
  --bg-secondary:  #161b22;
  --bg-card:       #1c2230;
  --bg-card-hover: #212d3d;
  --bg-modal:      #1a2235;

  --accent-gold:   #f0b429;
  --accent-gold-2: #ffcf56;
  --accent-blue:   #3b82f6;
  --accent-blue-2: #60a5fa;

  /* Status Colors */
  --status-vacant:     #16a34a;  /* Green */
  --status-vacant-bg:  #052e16;
  --status-occupied:   #dc2626;  /* Red */
  --status-occupied-bg:#450a0a;
  --status-carry:      #ca8a04;  /* Yellow */
  --status-carry-bg:   #422006;
  --status-clean:      #7c3aed;  /* Purple */
  --status-clean-bg:   #2e1065;

  /* Text */
  --text-primary:  #f0f6fc;
  --text-secondary:#8b949e;
  --text-muted:    #484f58;

  /* Borders */
  --border:        #30363d;
  --border-light:  #21262d;

  /* Input */
  --input-bg:      #0d1117;
  --input-border:  #30363d;
  --input-focus:   #3b82f6;

  /* Sizes */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-gold: 0 0 20px rgba(240,180,41,0.2);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans Thai', 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent-blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }

button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* === Top Navigation Bar === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
  background: rgba(22, 27, 34, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.3px;
}

.navbar-brand .hotel-icon {
  font-size: 1.4rem;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  text-decoration: none;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.navbar-nav a.active {
  color: var(--accent-gold);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-display {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* === Layout === */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-content {
  padding: 24px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* === Page Header === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title .icon {
  font-size: 1.6rem;
}

/* === Cards === */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.btn-gold:hover:not(:disabled) {
  background: linear-gradient(135deg, #b45309, #92400e);
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #15803d, #166534);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

/* === Form Controls === */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

select.form-control option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* === Search Bar === */
.search-container {
  position: relative;
}

.search-container .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.search-container .form-control {
  padding-left: 38px;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-light);
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover {
  background: var(--bg-card-hover);
}

.search-result-item .result-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.search-result-item .result-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.badge-regular {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.badge-new {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* === Status Badges === */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-vacant {
  background: var(--status-vacant-bg);
  color: #4ade80;
  border: 1px solid var(--status-vacant);
}

.status-occupied {
  background: var(--status-occupied-bg);
  color: #f87171;
  border: 1px solid var(--status-occupied);
}

.status-carry {
  background: var(--status-carry-bg);
  color: #fbbf24;
  border: 1px solid var(--status-carry);
}

/* === Room Grid === */
.rooms-section {
  margin-bottom: 28px;
}

.rooms-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rooms-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

/* === Room Card === */
.room-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.room-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s;
  border-radius: calc(var(--radius-lg) - 2px);
}

.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Vacant */
.room-card.vacant {
  border-color: var(--status-vacant);
  background: linear-gradient(145deg, var(--bg-card), #0a1f0e);
}
.room-card.vacant::before {
  background: radial-gradient(ellipse at top left, rgba(22,163,74,0.12), transparent);
  opacity: 1;
}

/* Occupied */
.room-card.occupied {
  border-color: var(--status-occupied);
  background: linear-gradient(145deg, var(--bg-card), #1f0a0a);
}
.room-card.occupied::before {
  background: radial-gradient(ellipse at top left, rgba(220,38,38,0.12), transparent);
  opacity: 1;
}

/* Carry-over */
.room-card.carry-over {
  border-color: var(--status-carry);
  background: linear-gradient(145deg, var(--bg-card), #1f1200);
}
.room-card.carry-over::before {
  background: radial-gradient(ellipse at top left, rgba(202,138,4,0.12), transparent);
  opacity: 1;
}

.room-number {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}

.room-card.vacant .room-number   { color: #4ade80; }
.room-card.occupied .room-number { color: #f87171; }
.room-card.carry-over .room-number { color: #fbbf24; }

.room-type-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.room-status-indicator {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.room-card.vacant .room-status-indicator   { background: var(--status-vacant); box-shadow: 0 0 6px var(--status-vacant); animation: pulse-green 2s infinite; }
.room-card.occupied .room-status-indicator { background: var(--status-occupied); box-shadow: 0 0 6px var(--status-occupied); animation: pulse-red 2s infinite; }
.room-card.carry-over .room-status-indicator { background: var(--status-carry); box-shadow: 0 0 6px var(--status-carry); animation: pulse-yellow 2s infinite; }

@keyframes pulse-green  { 0%,100%{box-shadow: 0 0 6px var(--status-vacant);} 50%{box-shadow: 0 0 12px var(--status-vacant);} }
@keyframes pulse-red    { 0%,100%{box-shadow: 0 0 6px var(--status-occupied);} 50%{box-shadow: 0 0 12px var(--status-occupied);} }
@keyframes pulse-yellow { 0%,100%{box-shadow: 0 0 6px var(--status-carry);} 50%{box-shadow: 0 0 12px var(--status-carry);} }

.room-guest-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 8px;
}

.room-checkin-time {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.room-carry-label {
  font-size: 0.7rem;
  color: var(--status-carry);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

.room-actions {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}

.room-actions .btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.72rem;
}

/* === Summary Stats === */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
  transition: all 0.2s;
}

.stat-card:hover { border-color: var(--accent-gold); }

.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.stat-card.green  .stat-value { color: #4ade80; }
.stat-card.red    .stat-value { color: #f87171; }
.stat-card.yellow .stat-value { color: #fbbf24; }
.stat-card.gold   .stat-value { color: var(--accent-gold); }
.stat-card.blue   .stat-value { color: var(--accent-blue-2); }

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  cursor: pointer;
  line-height: 1;
}

.btn-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* === Alert / Notice Boxes === */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.alert-info    { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }
.alert-warning { background: rgba(217,119,6,0.1);  border: 1px solid rgba(217,119,6,0.3);  color: #fbbf24; }
.alert-success { background: rgba(22,163,74,0.1);  border: 1px solid rgba(22,163,74,0.3);  color: #4ade80; }
.alert-danger  { background: rgba(220,38,38,0.1);  border: 1px solid rgba(220,38,38,0.3);  color: #f87171; }

/* === Form Grid === */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

/* === Toggle Switch === */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.toggle-row:last-child { border-bottom: none; }

.toggle-label {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.toggle-sublabel {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider { background: var(--accent-blue); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

/* === Table === */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

thead th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-card-hover); }

tbody td {
  padding: 10px 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: var(--radius-md);
  width: fit-content;
}

.tab-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* === Toast Notification === */
#toast-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease, fadeOut 0.4s ease 3.6s forwards;
  pointer-events: auto;
}

.toast.success { border-left: 3px solid var(--status-vacant); }
.toast.error   { border-left: 3px solid var(--status-occupied); }
.toast.warning { border-left: 3px solid var(--status-carry); }
.toast.info    { border-left: 3px solid var(--accent-blue); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(40px); }
}

/* === Loading Spinner === */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === Money Amount Display === */
.amount-display {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  font-variant-numeric: tabular-nums;
}

.amount-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* === Section Divider === */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 16px 0;
}

/* === Carry-over Banner === */
.carry-banner {
  background: rgba(202, 138, 4, 0.1);
  border: 1px solid rgba(202, 138, 4, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.83rem;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* === Early Check-in Banner === */
.early-checkin-banner {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.83rem;
  color: #c4b5fd;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* === Price Tag === */
.price-breakdown {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.88rem;
}

.price-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.price-row .label { color: var(--text-secondary); }
.price-row .value { font-weight: 600; }

/* === Minimart Items === */
.minimart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.minimart-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.minimart-item:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.minimart-item .item-emoji { font-size: 1.8rem; margin-bottom: 6px; }
.minimart-item .item-name  { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); }
.minimart-item .item-price { font-size: 0.85rem; font-weight: 700; color: var(--accent-gold); margin-top: 2px; }

/* === File Upload === */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
}

.file-upload-area:hover {
  border-color: var(--accent-gold);
  background: rgba(240, 180, 41, 0.03);
  color: var(--text-secondary);
}

.file-upload-area .upload-icon { font-size: 2rem; margin-bottom: 8px; }
.file-upload-area p { font-size: 0.82rem; }

/* === Settlement Summary === */
.settlement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.settlement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.settlement-card.highlight {
  border-color: var(--accent-gold);
  background: linear-gradient(145deg, var(--bg-card), #1a1500);
  box-shadow: var(--shadow-gold);
}

.settlement-card .amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin: 8px 0;
}

.settlement-card .label-sm {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.settlement-card.blue .amount  { color: var(--accent-blue-2); }
.settlement-card.green .amount { color: #4ade80; }
.settlement-card.red .amount   { color: #f87171; }

/* === Slip Image Gallery === */
.slip-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.slip-thumb {
  aspect-ratio: 2/3;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}

.slip-thumb:hover { border-color: var(--accent-gold); }
.slip-thumb img   { width: 100%; height: 100%; object-fit: cover; }

/* === Responsive === */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .room-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .settlement-grid { grid-template-columns: 1fr 1fr; }
  .modal { max-width: 100%; }

  /* Mobile bottom nav */
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(22, 27, 34, 0.97);
    border-top: 1px solid var(--border);
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 100;
  }

  .mobile-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
  }

  .mobile-nav a .nav-icon { font-size: 1.25rem; }
  .mobile-nav a.active, .mobile-nav a:hover { color: var(--accent-gold); }

  body { padding-bottom: 70px; }
}

@media (min-width: 769px) {
  .mobile-nav { display: none; }
}

/* === Animations === */
.fade-in {
  animation: fadeIn 0.3s ease;
}

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

/* === Google Sign In Button === */
.google-signin-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  background: var(--bg-primary);
}

.google-signin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.hotel-logo-big {
  font-size: 3rem;
  margin-bottom: 12px;
}

.hotel-name-signin {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.hotel-subtitle-signin {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* === Quantity Stepper (qty-btn) === */
.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--accent-gold);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
  line-height: 1;
}
.qty-btn:hover {
  background: rgba(240,180,41,0.15);
  border-color: var(--accent-gold);
  transform: scale(1.1);
}
.qty-btn:active { transform: scale(0.95); }

/* === Divider === */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* === Price Summary Panel (checkin) === */
.price-live {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: sticky;
  top: 80px;
}

.price-breakdown {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 12px 0;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}
.price-row:last-child { border-bottom: none; }
.price-row .label { color: var(--text-secondary); }
.price-row .value { font-weight: 600; }
.price-row.total {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-gold);
  border-top: 1px solid var(--border);
  border-bottom: none;
  padding-top: 8px;
  margin-top: 4px;
}

.price-total-big {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  text-align: center;
  margin: 16px 0 4px;
  letter-spacing: -1px;
}

.price-total-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

/* === Early Check-in Banner === */
.early-checkin-banner {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #c4b5fd;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === Carry-Over Banner === */
.carry-banner {
  background: rgba(202,138,4,0.1);
  border: 1px solid rgba(202,138,4,0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #fbbf24;
  margin-bottom: 14px;
}

/* === Deposit Toggle === */
.deposit-toggle-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 14px;
}

.toggle-label    { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.toggle-sublabel { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  transition: all 0.25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 2px; top: 1px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.25s;
}
.toggle input:checked + .toggle-slider { background: rgba(22,163,74,0.2); border-color: #16a34a; }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: #4ade80; }

/* === Scan Bar === */
.scan-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-scan {
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1.5px solid;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-scan.barcode { background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.4); color: #c4b5fd; }
.btn-scan.barcode:hover { background: rgba(124,58,237,0.2); }
.btn-scan.ocr    { background: rgba(8,145,178,0.1);  border-color: rgba(8,145,178,0.4);  color: #38bdf8; }
.btn-scan.ocr:hover    { background: rgba(8,145,178,0.2); }
.btn-scan.photo  { background: rgba(22,163,74,0.1);  border-color: rgba(22,163,74,0.4);  color: #4ade80; }
.btn-scan.photo:hover  { background: rgba(22,163,74,0.2); }

/* === Spinner === */
.spinner {
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  width: 20px; height: 20px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Amount label (used in modals) === */
.amount-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

