/* Manrope keeps Vietnamese labels crisp while giving the dashboard more character. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg-primary: #f2f4ef;
  --bg-card: #fffefb;
  --text-main: #20312d;
  --text-muted: #70807b;
  --border-color: #dce4df;
  
  /* Status Colors (KiotViet & Modern palettes) */
  --color-available: #2f806a;
  --color-available-bg: #f1f8f4;
  --color-occupied: #4075a4;
  --color-occupied-bg: #f2f6fa;
  --color-booked: #b47a2c;
  --color-booked-bg: #fbf7ef;
  --color-dirty: #a9534d;
  --color-dirty-bg: #fbf3f2;
  
  /* Brand colors */
  --primary: #176b5b;
  --primary-hover: #115448;
  --primary-light: #dcefe9;
  
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #06b6d4;
  
  /* Layout specifications */
  --sidebar-width: 280px;
  --header-height: 70px;
  --shadow-sm: 0 8px 24px rgba(32, 49, 45, 0.06);
  --shadow-md: 0 16px 36px rgba(32, 49, 45, 0.12);
  --shadow-lg: 0 28px 70px rgba(24, 51, 44, 0.2);
  --radius: 16px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100dvh;
  display: flex;
  overflow: hidden;
}

/* App Container Layout */
.app-container {
  display: flex;
  width: 100%;
  height: 100dvh;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
  z-index: 10;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* Search Box */
.search-box {
  position: relative;
  margin-bottom: 15px;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Quick Filter Tags */
.filter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.filter-item:hover {
  background-color: var(--bg-primary);
}

.filter-item.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: rgba(0, 139, 68, 0.2);
}

.filter-count {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: var(--border-color);
  color: var(--text-main);
  font-weight: 600;
}

.filter-item.active .filter-count {
  background-color: var(--primary);
  color: white;
}

/* Status Color Badges for Filter list */
.filter-item[data-status="all"]::before { content: '🏨'; margin-right: 8px; }
.filter-item[data-status="available"]::before { content: '🟢'; margin-right: 8px; }
.filter-item[data-status="occupied"]::before { content: '🔵'; margin-right: 8px; }
.filter-item[data-status="booked"]::before { content: '🟡'; margin-right: 8px; }
.filter-item[data-status="dirty"]::before { content: '🔴'; margin-right: 8px; }

/* Main Workspace */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* Top Header Bar */
.top-header {
  height: var(--header-height);
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  flex-shrink: 0;
}

.header-title-section h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.header-title-section p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Dashboard Summary Indicators on Top Header */
.status-indicators {
  display: flex;
  gap: 15px;
  margin-right: 20px;
}

.indicator-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.indicator-dot.available { background-color: var(--color-available); }
.indicator-dot.occupied { background-color: var(--color-occupied); }
.indicator-dot.booked { background-color: var(--color-booked); }
.indicator-dot.dirty { background-color: var(--color-dirty); }

.schedule-toolbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px auto;
  align-items: center;
  gap: 10px;
  padding: 12px clamp(18px, 3vw, 38px);
  border-bottom: 1px solid rgba(23, 107, 91, 0.1);
  background: rgba(247, 249, 245, 0.9);
}

.schedule-date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(56px, 1fr));
  gap: 6px;
  min-width: 0;
  touch-action: pan-y;
}

.schedule-day,
.date-nav-btn,
.today-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  cursor: pointer;
  transition: var(--transition);
}

.schedule-day {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  place-content: center;
  column-gap: 4px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.schedule-weekday {
  grid-column: 1 / -1;
  text-transform: capitalize;
}

.schedule-day strong {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1;
}

.schedule-day:hover {
  background: #edf3ef;
}

.schedule-day.today:not(.active) {
  border-color: rgba(23, 107, 91, 0.22);
}

.schedule-day.active {
  background: var(--primary);
  color: rgba(255,255,255,0.72);
  box-shadow: 0 8px 18px rgba(23, 107, 91, 0.2);
}

.schedule-day.active strong { color: white; }

.date-nav-btn {
  width: 42px;
  height: 42px;
  border-color: var(--border-color);
  border-radius: 10px;
  background: var(--bg-card);
  font-size: 1.45rem;
}

.date-nav-btn:hover,
.today-btn:hover {
  border-color: rgba(23, 107, 91, 0.24);
  background: var(--primary-light);
}

.today-btn {
  min-height: 42px;
  padding-inline: 14px;
  border-color: var(--border-color);
  border-radius: 9px;
  background: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 700;
}

.today-short { display: none; }

.availability-copy {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.room-footer-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Buttons */
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover {
  background-color: var(--bg-primary);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-text-danger {
  min-height: 36px;
  padding-block: 7px;
  background: transparent;
  color: #91463f;
  font-size: 0.78rem;
}

.btn-text-danger:hover {
  background: #f7ecea;
  color: #743730;
}

.btn-warning {
  background-color: var(--warning);
  color: white;
}

.btn-warning:hover {
  background-color: #d97706;
}

/* Floor Grid Section */
.grid-container {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.floor-section {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.floor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.floor-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.floor-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* Room Card Design */
.room-card {
  border-radius: 10px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 16px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.room-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
}

.room-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Room Card States Styling */
.room-card.available::after { background-color: var(--color-available); }
.room-card.available:hover { border-color: var(--color-available); }
.room-card.available { background-color: var(--color-available-bg); }

.room-card.occupied::after { background-color: var(--color-occupied); }
.room-card.occupied:hover { border-color: var(--color-occupied); }
.room-card.occupied { background-color: var(--color-occupied-bg); }

.room-card.booked::after { background-color: var(--color-booked); }
.room-card.booked:hover { border-color: var(--color-booked); }
.room-card.booked { background-color: var(--color-booked-bg); }

.room-card.dirty::after { background-color: var(--color-dirty); }
.room-card.dirty:hover { border-color: var(--color-dirty); }
.room-card.dirty { background-color: var(--color-dirty-bg); }

/* Room Info Elements */
.room-header-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.room-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
}

.room-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.room-card.available .room-status-badge {
  background-color: var(--color-available);
  color: white;
}
.room-card.occupied .room-status-badge {
  background-color: var(--color-occupied);
  color: white;
}
.room-card.booked .room-status-badge {
  background-color: var(--color-booked);
  color: white;
}
.room-card.dirty .room-status-badge {
  background-color: var(--color-dirty);
  color: white;
}

.room-body-info {
  margin: 12px 0;
  flex-grow: 1;
}

.guest-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stay-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.room-footer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed rgba(0,0,0,0.06);
  padding-top: 8px;
  font-size: 0.8rem;
}

.bill-amount {
  font-weight: 700;
  color: #e11d48;
}

/* Modals Overlay and Box */
.modal-overlay {
  position: fixed;
  top: var(--visual-viewport-top, 0px);
  left: 0;
  width: 100vw;
  height: var(--visual-viewport-height, 100dvh);
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}

.modal-box > form {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--danger);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: #f8fafc;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  position: sticky;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  box-shadow: 0 -10px 24px rgba(21, 39, 34, 0.08);
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

html,
body {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

.form-help {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.checkout-plan {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.checkout-plan.upcoming { color: var(--primary); }
.checkout-plan.due-soon { color: var(--warning); }
.checkout-plan.overdue { color: var(--danger); }

.future-booking-note {
  margin-top: 6px;
  color: var(--color-booked);
  font-size: 0.72rem;
  font-weight: 700;
}

.selected-day-empty-copy {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.selected-date-available {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--color-available-bg);
  color: var(--color-available);
  font-weight: 700;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #475569;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.date-time-input-wrap {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.date-input-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
}

.date-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.date-input-wrap input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  cursor: pointer;
}

.date-display {
  position: absolute;
  inset: 0 40px 0 12px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--text-main);
  font-size: 0.875rem;
  white-space: nowrap;
  pointer-events: none;
}

.date-display.is-empty {
  color: var(--text-muted);
}

.date-time-input-wrap > input[type="time"] {
  width: 112px;
  min-width: 112px;
}

@media (max-width: 640px) {
  .modal-overlay {
    padding: 10px;
  }

  .modal-box {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .modal-body {
    padding: 18px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  select,
  textarea {
    font-size: 16px; /* Safari iOS không tự zoom khi focus */
  }

  .date-input-wrap {
    min-height: 44px;
  }

  .date-display {
    font-size: 16px;
  }
}

/* Service Selection Styling inside Service Modal */
.service-list-container {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
}

.service-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.service-item-row:last-child {
  border-bottom: none;
}

.service-info {
  display: flex;
  flex-direction: column;
}

.service-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.service-price {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.service-quantity-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qty-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.qty-val {
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

/* Active Bill / Service Summary in checkout */
.checkout-summary {
  background-color: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 15px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.875rem;
}

.summary-row:last-child {
  margin-bottom: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  font-weight: 700;
  font-size: 1rem;
}

.summary-row.total-row {
  color: #e11d48;
}

.selected-services-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.service-badge {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* History log styling */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  background-color: white;
  font-size: 0.8rem;
}

.history-card-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.history-card-footer {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #f1f5f9;
}

.history-price {
  font-weight: 700;
  color: var(--primary);
}

/* Custom Notification Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-left: 4px solid var(--color-available);
}

.toast-info {
  border-left: 4px solid var(--color-occupied);
}

/* 2026 interface refresh */
body {
  background:
    radial-gradient(circle at 82% 5%, rgba(23, 107, 91, 0.08), transparent 25rem),
    var(--bg-primary);
}

.sidebar {
  background: rgba(255, 254, 251, 0.96);
  border-right-color: rgba(23, 107, 91, 0.12);
  box-shadow: 12px 0 40px rgba(32, 49, 45, 0.04);
}

.sidebar-header {
  min-height: 82px;
  padding-inline: 22px;
}

.sidebar-header h2 {
  color: var(--text-main);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.sidebar-section-title {
  color: #82908b;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.filter-item {
  min-height: 42px;
  border-radius: 10px;
}

.filter-item.active {
  border-color: rgba(23, 107, 91, 0.14);
  box-shadow: inset 3px 0 0 var(--primary);
}

.top-header {
  height: 82px;
  padding-inline: clamp(18px, 3vw, 38px);
  background: rgba(255, 254, 251, 0.86);
  border-bottom-color: rgba(23, 107, 91, 0.1);
  backdrop-filter: blur(16px);
}

.header-title-section h1 {
  color: var(--text-main);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.indicator-card {
  border: 0;
  border-radius: 9px;
  background: #f5f7f3;
  font-variant-numeric: tabular-nums;
}

.grid-container {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 38px);
}

.floor-section {
  padding: 0;
  margin-bottom: 34px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.floor-header {
  margin-bottom: 14px;
  padding: 0 2px 11px;
  border-bottom-color: rgba(23, 107, 91, 0.12);
}

.floor-title {
  color: var(--text-main);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

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

.room-card {
  min-height: 158px;
  padding: 18px 18px 16px 20px;
  border-color: rgba(32, 49, 45, 0.08);
  border-radius: 14px 14px 14px 5px;
  box-shadow: var(--shadow-sm);
}

.room-card::after {
  inset: 0 auto 0 0;
  width: 4px;
  height: 100%;
}

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

.room-number {
  color: var(--text-main);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.room-status-badge {
  border-radius: 6px;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.guest-name,
.bill-amount,
.room-footer-info {
  font-variant-numeric: tabular-nums;
}

.btn {
  min-height: 42px;
  border-radius: 9px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.btn:focus-visible,
.filter-item:focus-visible,
.room-card:focus-visible {
  outline: 3px solid rgba(23, 107, 91, 0.24);
  outline-offset: 2px;
}

.modal-overlay {
  background: rgba(21, 39, 34, 0.54);
  backdrop-filter: blur(8px);
}

.modal-box {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px 20px 20px 7px;
}

.modal-header h3 {
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.modal-footer {
  background: #f7f8f5;
}

#action-room-details {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f5f7f3;
}

.mobile-filter-btn,
.sidebar-close-btn,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .status-indicators { gap: 7px; margin-right: 0; }
  .indicator-card { padding-inline: 9px; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    z-index: 120;
    transform: translateX(-105%);
    transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .sidebar.mobile-open { transform: translateX(0); }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    border: 0;
    background: rgba(21, 39, 34, 0.48);
    backdrop-filter: blur(3px);
  }

  .sidebar-backdrop.active { display: block; }

  .sidebar-close-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: 0;
    border-radius: 9px;
    background: var(--bg-primary);
    color: var(--text-main);
    font-size: 1.4rem;
  }

  .mobile-filter-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--primary);
    font-size: 1.1rem;
  }

  .main-content { width: 100%; }
  .top-header { gap: 12px; }
  .header-actions { margin-left: auto; }
  .status-indicators { display: none; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-toolbar {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    padding: 9px 12px;
  }
  .today-btn {
    grid-column: 1 / -1;
    min-height: 32px;
  }
  .schedule-date-strip {
    grid-template-columns: repeat(5, minmax(50px, 1fr));
  }
  .schedule-day:nth-child(1),
  .schedule-day:nth-child(7) { display: none; }
}

@media (max-width: 560px) {
  .top-header { height: 66px; padding-inline: 9px; }
  .mobile-filter-btn { width: 38px; height: 38px; flex-basis: 38px; }
  .header-title-section h1 { font-size: 0.96rem; }
  .header-title-section p { font-size: 0.61rem; white-space: nowrap; }
  .grid-container { padding: 10px 8px 22px; }
  .schedule-toolbar {
    grid-template-columns: 34px minmax(0, 1fr) 34px 40px;
    gap: 5px;
    padding: 6px 8px;
  }
  .date-nav-btn { width: 34px; height: 38px; font-size: 1.2rem; }
  .today-btn {
    grid-column: auto;
    min-height: 38px;
    padding-inline: 5px;
    font-size: 0.68rem;
  }
  .today-full { display: none; }
  .today-short { display: inline; }
  .schedule-day { min-height: 44px; border-radius: 8px; }
  .schedule-day strong { font-size: 0.92rem; }
  .schedule-weekday { font-size: 0.58rem; }
  .schedule-date-strip {
    grid-template-columns: repeat(3, minmax(44px, 1fr));
    gap: 3px;
  }
  .schedule-day:nth-child(2),
  .schedule-day:nth-child(6) { display: none; }
  .floor-section { margin-bottom: 10px; }
  .floor-header {
    min-height: 25px;
    margin-bottom: 6px;
    padding: 0 2px 5px;
  }
  .floor-title { font-size: 0.78rem; gap: 4px; }
  .floor-stats { display: none; }
  .room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .room-card {
    height: 80px;
    min-height: 80px;
    padding: 9px 9px 8px 12px;
    border-radius: 10px 10px 10px 4px;
    overflow: hidden;
  }
  .room-card::after { width: 3px; }
  .room-number { font-size: 1.05rem; }
  .room-status-badge {
    padding: 2px 5px;
    border-radius: 5px;
    font-size: 0.52rem;
    letter-spacing: 0.03em;
  }
  .room-body-info { margin: 3px 0; min-height: 0; }
  .room-card.available:not(.has-future-booking) .room-body-info { display: none; }
  .room-card.available:not(.has-future-booking) .room-footer-info { display: none; }
  .room-card.dirty .room-body-info,
  .room-card.dirty .room-footer-info { display: none; }
  .availability-copy { display: none; }
  .guest-name {
    font-size: 0.7rem;
    line-height: 1.2;
  }
  .room-card.occupied .stay-time,
  .room-card.occupied .checkout-plan { display: none; }
  .room-card.booked .stay-time {
    max-width: 100%;
    margin-top: 2px;
    overflow: hidden;
    font-size: 0.58rem;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .future-booking-note {
    margin-top: 2px;
    overflow: hidden;
    font-size: 0.58rem;
    line-height: 1.15;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .selected-day-empty-copy { display: none; }
  .room-footer-info {
    min-height: 18px;
    padding-top: 3px;
    gap: 4px;
    border-top: 0;
    font-size: 0.61rem;
    white-space: nowrap;
  }
  .room-footer-label { display: none; }
  .room-footer-value,
  .bill-amount { margin-left: auto; }
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
    overflow: hidden;
  }
  .modal-box {
    width: 100%;
    max-height: calc(var(--visual-viewport-height, 100dvh) - 8px);
    min-height: 0;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
    transform: translateY(24px);
  }
  #checkin-modal .modal-box,
  #book-modal .modal-box,
  #service-modal .modal-box,
  #checkout-modal .modal-box {
    height: calc(var(--visual-viewport-height, 100dvh) - 8px);
  }
  .modal-overlay.active .modal-box { transform: translateY(0); }
  .modal-footer { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}

/* Print Invoice Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #print-area, #print-area * {
    visibility: visible;
  }
  #print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background-color: white;
    color: black;
    padding: 20px;
  }
  .no-print {
    display: none !important;
  }
}

/* Printable Bill Container (hidden by default) */
#print-area {
  display: none;
}
