/* GuestHouse Accommodation System - Modern Production Styles */

:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bg-app: #f3f4f6;
  --bg-card: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --border-dark: #d1d5db;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #059669;
  --success-bg: #d1fae5;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --purple: #7c3aed;
  --purple-bg: #ede9fe;
  --slate: #475569;
  
  --bar-confirmed: #fef08a;
  --bar-confirmed-border: #eab308;
  --bar-checkedin: #a7f3d0;
  --bar-checkedin-border: #10b981;
  --bar-allotted: #bae6fd;
  --bar-allotted-border: #0284c7;
  --bar-checkedout: #e2e8f0;
  --bar-checkedout-border: #94a3b8;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-family);
  background: var(--bg-app);
  color: var(--text-main);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

/* TOP HEADER */
.top {
  height: 46px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.brand {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.2px;
}

.brand-icon {
  color: #38bdf8;
}

.brand #headerSub {
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  background: #1e293b;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #334155;
  white-space: nowrap;
}

.brand-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #fff !important;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  height: 100%;
  gap: 4px;
}

.nav-btn svg {
  display: block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
}

.nav-btn:hover {
  color: #f8fafc;
  background: #1e293b;
}

.nav-btn.active {
  color: #38bdf8;
  background: #1e293b;
  border-bottom-color: #38bdf8;
}

/* MAIN VIEW PANELS */
.view-panel {
  display: none;
  height: calc(100vh - 46px);
  padding: 8px;
  flex-direction: column;
}

.view-panel.active {
  display: flex;
}

/* TIMELINE TOOLBAR */
.toolbar {
  height: 44px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 6px;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  flex-shrink: 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.range {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.tool-select, .tool-date {
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
  color: var(--text-main);
  box-sizing: border-box;
}

#timelineRange {
  width: 215px !important;
  min-width: 215px !important;
  max-width: 215px !important;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
}

#filterLocation {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#filterBuilding {
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-select:focus, .tool-date:focus {
  outline: none;
  border-color: var(--primary);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 8px;
  color: var(--text-muted);
}

.search-box input {
  height: 30px;
  width: 210px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 8px 0 26px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  width: 250px;
  transition: width 0.2s ease;
}

/* BUTTONS */
.btn, .toolbar button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-main);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover, .toolbar button:hover {
  background: #f9fafb;
  border-color: var(--border-dark);
}

.btn.primary, .toolbar .primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn.primary:hover, .toolbar .primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn.success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn.danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn.sm {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
}

/* LEGEND BAR */
.legend-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-dot.status-confirmed { background: var(--bar-confirmed); border: 1px solid var(--bar-confirmed-border); }
.legend-dot.status-checkedin { background: var(--bar-checkedin); border: 1px solid var(--bar-checkedin-border); }
.legend-dot.status-allotted { background: var(--bar-allotted); border: 1px solid var(--bar-allotted-border); }
.legend-dot.status-checkedout { background: var(--bar-checkedout); border: 1px solid var(--bar-checkedout-border); }
.legend-dot.status-maint { background: #fca5a5; border: 1px solid #ef4444; }
.legend-dot.status-res { background: var(--purple-bg); border: 1px solid var(--purple); }

/* TIMELINE CONTAINER */
.timeline-wrap {
  flex: 1;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: auto;
  position: relative;
}

.timeline {
  width: max-content;
  position: relative;
}

.t-head, .room-row, .bed-row {
  display: flex;
}

.t-head {
  height: 40px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.resource-head {
  background: #f8fafc;
  border-right: 1px solid var(--border-color);
  font-size: 11px;
  font-weight: 700;
  color: var(--slate);
  letter-spacing: 0.5px;
}

.days { display: flex; flex: 0 0 auto; }
.day {
  width: 130px;
  flex: 0 0 130px;
  text-align: center;
  border-right: 1px solid var(--border-color);
  padding: 5px 2px;
  line-height: 15px;
  background: #f8fafc;
}

.day.today {
  background: #eff6ff;
}

.day b {
  display: block;
  font-size: 11px;
  color: var(--text-main);
}

.day small {
  font-size: 10px;
  color: var(--text-muted);
}

/* ROOM & BED ROWS */
.room-row {
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
}

.room-label {
  background: #f1f5f9;
  border-right: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 11px;
  color: #334155;
  display: flex;
  align-items: center;
}

.room-status-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

.room-status-tag.reserved { background: #ede9fe; color: #6d28d9; }
.room-status-tag.restricted { background: #e2e8f0; color: #475569; }
.room-status-tag.maintenance { background: #fee2e2; color: #b91c1c; }
.room-status-tag.unavailable { background: #334155; color: #fff; }

.bed-row {
  border-bottom: 1px solid #f1f5f9;
}

.bed-label {
  background: #fff;
  border-right: 1px solid var(--border-color);
  font-weight: 600;
  font-size: 11px;
  color: var(--slate);
  display: flex;
  align-items: center;
}

.bed-label .mobile-tag {
  font-size: 9px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 1px 4px;
  border-radius: 3px;
}

.canvas {
  position: relative;
  flex: 0 0 auto;
  background: repeating-linear-gradient(to right, #ffffff 0, #ffffff 129px, #e2e8f0 130px);
}

/* ALLOTMENT & BOOKING BARS */
.bar {
  position: absolute;
  top: 4px;
  height: 25px;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--border-dark);
  z-index: 5;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
  z-index: 10;
}

.bar.booking {
  background: var(--bar-confirmed);
  border-color: var(--bar-confirmed-border);
  color: #713f12;
}

.bar.allot {
  background: var(--bar-allotted);
  border-color: var(--bar-allotted-border);
  color: #0369a1;
}

.bar.checked-in {
  background: var(--bar-checkedin);
  border-color: var(--bar-checkedin-border);
  color: #065f46;
}

.bar.checked-out {
  background: var(--bar-checkedout);
  border-color: var(--bar-checkedout-border);
  color: #475569;
  opacity: 0.85;
}

.bar .co-badge {
  font-size: 9px;
  font-weight: 600;
  margin-left: 6px;
  background: rgba(0,0,0,0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

.current-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ef4444;
  z-index: 8;
  pointer-events: none;
}

.current-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
}

/* ROOM MAINTENANCE BLOCK ON CANVAS */
.room-block {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.7;
}

.room-block.reserved { background: rgba(124, 58, 237, 0.15); border-left: 2px solid var(--purple); }
.room-block.restricted { background: rgba(71, 85, 105, 0.15); border-left: 2px solid var(--slate); }
.room-block.maintenance {
  background: repeating-linear-gradient(45deg, #fee2e2, #fee2e2 10px, #fca5a5 10px, #fca5a5 20px);
  border-left: 2px solid var(--danger);
}
.room-block.unavailable { background: rgba(15, 23, 42, 0.25); border-left: 2px solid #0f172a; }

/* OPERATIONS DASHBOARD */
.ops-container {
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  padding: 10px;
  overflow-y: auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border-left: 4px solid var(--primary);
}

.kpi-card.green { border-left-color: var(--success); }
.kpi-card.orange { border-left-color: var(--warning); }
.kpi-card.blue { border-left-color: #0284c7; }

.kpi-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  margin: 4px 0;
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.ops-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ops-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ops-box.full {
  grid-column: 1 / -1;
}

.ops-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge.green { background: var(--success-bg); color: var(--success); }
.badge.orange { background: var(--warning-bg); color: var(--warning); }
.badge.blue { background: #e0f2fe; color: #0284c7; }

.ops-table, .dir-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ops-table th, .ops-table td, .dir-table th, .dir-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.ops-table th, .dir-table th {
  background: #f8fafc;
  color: var(--slate);
  font-weight: 600;
  font-size: 11px;
}

/* BOOKINGS DIRECTORY */
.directory-container {
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.directory-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.dir-search input {
  height: 34px;
  width: 300px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 12px;
  font-family: inherit;
}

.dir-filters select {
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 12px;
  font-family: inherit;
}

.table-wrap {
  flex: 1;
  overflow: auto;
}

/* STATUS PILLS */
.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-pill.draft { background: #fef3c7; color: #92400e; }
.status-pill.confirmed { background: #dbeafe; color: #1e40af; }
.status-pill.checked_in { background: #d1fae5; color: #065f46; }
.status-pill.checked_out { background: #f1f5f9; color: #475569; }
.status-pill.cancelled { background: #fee2e2; color: #991b1b; }

/* MODALS */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hidden { display: none !important; }

.modal-card {
  width: min(720px, 94vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.04);
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.modal-head {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
  font-size: 15px;
  font-weight: 700;
}

.modal-head button {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
}

.modal-head button:hover { background: #e2e8f0; color: var(--text-main); }

/* FORMS */
.form { padding: 16px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 4px;
}

.field input, .field select, .field textarea {
  width: 100%;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
}

.field textarea {
  height: 60px;
  resize: vertical;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.section {
  border-top: 1px solid var(--border-color);
  margin-top: 14px;
  padding-top: 14px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.boarder-box {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
  background: #fafafa;
}

.boarder-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--primary);
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.error-box {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 500;
  margin-bottom: 12px;
  border: 1px solid #fca5a5;
}

/* CONTEXT MENU */
.context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 170px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  padding: 4px;
}

.context-caption {
  padding: 6px 10px 4px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.context-choice {
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.context-choice:hover {
  background: #eff6ff;
  color: var(--primary);
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.2s ease;
}

.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }

@keyframes slideIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* PRINT MEDIA STYLES */
@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
    background: #fff;
    color: #000;
  }
  .print-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }
  .print-header h1 { margin: 0 0 4px; font-size: 20px; }
  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
  }
  .print-table th, .print-table td {
    border: 1px solid #000;
    padding: 8px;
    font-size: 11px;
    text-align: left;
  }
  .print-signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
  }
}

/* Refined data-entry / settings styling */
.quick-strip{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 11px;margin:-2px 0 8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px}
.quick-strip b{display:block;font-size:12px}.quick-strip span{display:block;color:#64748b;font-size:11px;margin-top:2px}.quick-actions{display:flex;gap:6px;flex-shrink:0}
.compact-section{margin-top:8px}.compact-section .section-title{display:flex;justify-content:space-between;align-items:center}
.hint{display:block;color:#64748b;font-size:10px;margin-top:3px}.checkline{font-size:10px!important;display:flex;align-items:center;gap:5px;margin-top:4px}
.pending-boarder{border-style:dashed!important;background:#fffbeb!important}.pending-label{font-size:10px;color:#b45309}.field-wide{grid-column:1/-1}
.previous-picker{position:fixed;inset:0;z-index:10001;background:rgba(15,23,42,.32);display:flex;align-items:center;justify-content:center;padding:20px}
.previous-card{width:min(680px,94vw);max-height:80vh;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 20px 60px rgba(15,23,42,.25);display:flex;flex-direction:column;overflow:hidden}
.previous-head{display:flex;justify-content:space-between;align-items:center;padding:10px 13px;border-bottom:1px solid #e2e8f0}.previous-head button{border:0;background:none;font-size:20px;cursor:pointer;color:#64748b}
.previous-search{display:flex;gap:6px;padding:10px;background:#f8fafc;border-bottom:1px solid #e2e8f0}.previous-search input{flex:1;height:32px;border:1px solid #cbd5e1;border-radius:5px;padding:0 9px;font:inherit}
.previous-results{padding:8px;overflow:auto;display:grid;gap:5px}.previous-result{display:grid;text-align:left;gap:2px;padding:9px 10px;background:#fff;border:1px solid #e2e8f0;border-radius:6px;cursor:pointer}.previous-result:hover{background:#f8fafc;border-color:#94a3b8}.previous-result b{font-size:12px}.previous-result span,.previous-result small{color:#64748b;font-size:10px}
/* Settings gets a deliberate master-data visual language rather than dashboard KPI styling. */
.settings-main{background:#eef2f7!important;padding:12px!important}.settings-head{background:#fff;border:1px solid #dbe2ea;border-radius:8px;padding:11px 13px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.settings-head b{font-size:14px}.settings-grid{align-items:start!important}.settings-grid .panel{border-radius:8px!important;border:1px solid #dbe2ea!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important}.settings-grid .panel h3{font-size:12px!important;letter-spacing:.02em;text-transform:uppercase;color:#334155!important}.settings-grid .table th{background:#f8fafc!important;font-size:10px!important;text-transform:uppercase;color:#64748b}.settings-grid .table td{font-size:11px}.settings-grid .btn{border-radius:5px}
/* FINAL compact operational additions */
.timeline{min-width:100%}
.unallocated-section{font-size:11px}
.unallocated-item{min-height:30px}
.unallocated-item b{min-width:105px}
.bill-compact{font-size:12px;padding:14px 16px}.bill-head{display:flex;justify-content:space-between;border-bottom:1px solid var(--border-color);padding-bottom:8px;margin-bottom:8px}.bill-lines{display:grid;gap:4px}.bill-line{display:flex;justify-content:space-between;gap:12px}.bill-total{display:flex;justify-content:space-between;border-top:1px solid var(--border-color);padding:5px 0}.bill-total.net{font-size:14px;font-weight:700}.bill-actions{display:flex;justify-content:flex-end;gap:7px;padding:10px 16px;border-top:1px solid var(--border-color)}
/* Settings master-data UI */
.settings-main{min-height:calc(100vh - 52px);padding-top:58px!important}
.settings-shell{display:grid;grid-template-columns:178px minmax(0,1fr);gap:12px;max-width:1500px;margin:0 auto}
.settings-nav{position:sticky;top:8px;align-self:start;background:#182230;border:1px solid #263446;border-radius:9px;padding:8px}
.settings-nav-title{padding:8px 9px 10px;color:#94a3b8;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.settings-nav-item{display:block;width:100%;border:0;background:transparent;color:#cbd5e1;text-align:left;border-radius:6px;padding:9px 10px;font:600 11px Inter,sans-serif;cursor:pointer}
.settings-nav-item:hover{background:#263446;color:#fff}.settings-nav-item.active{background:#fff;color:#172033}
.settings-tab{display:none}.settings-tab.active{display:block}
.settings-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.settings-section-head h2{margin:0;font-size:16px;color:#172033}.settings-section-head p{margin:3px 0 0;color:#64748b;font-size:11px}
.settings-cards{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:8px}.setting-card{background:#fff;border:1px solid #dbe2ea;border-radius:8px;padding:11px;display:flex;justify-content:space-between;gap:10px;align-items:end}.setting-card b{font-size:12px;display:block}.setting-card small{display:block;color:#64748b;font-size:10px;line-height:1.35;margin-top:3px}.setting-edit{display:flex;gap:5px;align-items:center}.setting-edit input{width:100px;height:29px;border:1px solid #cbd5e1;border-radius:5px;padding:0 7px;font:11px Inter,sans-serif}
.rate-category-bar{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:7px;margin-bottom:9px}.rate-category{background:#fff;border:1px solid #dbe2ea;border-radius:7px;padding:8px 10px;display:flex;justify-content:space-between;align-items:center}.rate-category b{font-size:11px}.rate-category small{display:block;color:#64748b;font-size:9px;margin-top:2px}.rate-table-wrap{background:#fff;border:1px solid #dbe2ea;border-radius:8px;overflow:auto}.rate-table{min-width:900px;margin:0!important}.rate-table th,.rate-table td{white-space:nowrap}.rate-badge{display:inline-block;padding:3px 6px;border-radius:10px;font-size:8px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}.rate-badge.yes{background:#dcfce7;color:#166534}.rate-badge.no{background:#f1f5f9;color:#64748b}.rate-badge.room-operational{background:#dcfce7;color:#166534}.rate-badge.room-reserved{background:#fef3c7;color:#92400e}.rate-badge.room-restricted{background:#e0e7ff;color:#3730a3}.rate-badge.room-maintenance{background:#fee2e2;color:#991b1b}.rate-badge.room-unavailable{background:#e2e8f0;color:#475569}.actions-cell{width:120px}.rate-note{margin-top:8px;background:#f8fafc;border:1px solid #dbe2ea;border-radius:7px;padding:8px 10px;font-size:10px;color:#475569}.rate-note b{color:#172033;margin-right:7px}
.master-grid{display:grid;grid-template-columns:repeat(2,minmax(300px,1fr));gap:9px}.master-card{background:#fff;border:1px solid #dbe2ea;border-radius:8px;overflow:hidden}.master-wide{grid-column:1/-1}.master-title{padding:9px 10px;border-bottom:1px solid #e5e7eb;display:flex;justify-content:space-between;align-items:center}.master-title b{font-size:12px}.master-title span{font-size:9px;color:#64748b}.master-add{padding:8px;background:#f8fafc;border-bottom:1px solid #e5e7eb;display:flex;gap:5px;flex-wrap:wrap}.master-add input,.master-add select{height:29px;border:1px solid #cbd5e1;border-radius:5px;padding:0 7px;font:10px Inter,sans-serif;min-width:105px}.master-add input[placeholder*="Description"]{min-width:150px;flex:1}.master-list{max-height:260px;overflow:auto}.master-row,.master-list .room-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:7px 10px;border-bottom:1px solid #eef2f7}.master-row:last-child,.master-list .room-row:last-child{border-bottom:0}.master-row b,.master-list .room-row b{font-size:10px}.master-row small,.master-list .room-row small{display:block;color:#64748b;font-size:9px;margin-top:2px}.master-row em{display:block;font-style:normal;color:#94a3b8;font-size:8px;margin-top:2px}.room-list{max-height:420px;overflow:auto}.chip-list{padding:9px;display:flex;flex-wrap:wrap;gap:5px}.master-chip{font-size:9px;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:12px;padding:4px 7px}.master-chip button{border:0;background:transparent;padding:0 0 0 4px;cursor:pointer;color:#64748b}.maintenance-card{background:#fff;border:1px solid #dbe2ea;border-radius:8px;margin-bottom:9px}.empty{padding:15px;text-align:center;color:#94a3b8;font-size:10px}
.settings-modal-card{width:min(880px,95vw)!important}.settings-modal-card .modal-head small{display:block;color:#64748b;font-size:9px;font-weight:400;margin-top:2px}.settings-modal-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.settings-modal-card label{font-size:10px;color:#475569;font-weight:600}.settings-modal-card input,.settings-modal-card select{width:100%;margin-top:4px;height:31px;border:1px solid #cbd5e1;border-radius:5px;padding:0 8px;font:11px Inter,sans-serif}.settings-modal-card .check-field{display:flex;align-items:center;gap:7px;margin-top:20px}.settings-modal-card .check-field input{width:auto;height:auto;margin:0}.modal-note{margin-top:8px;padding:8px;background:#f8fafc;border-radius:6px;color:#64748b;font-size:10px}
@media(max-width:900px){.settings-shell{grid-template-columns:1fr}.settings-nav{position:static;display:flex;overflow:auto}.settings-nav-title{display:none}.settings-nav-item{min-width:120px}.settings-cards,.master-grid{grid-template-columns:1fr}.rate-category-bar{grid-template-columns:1fr}.master-wide{grid-column:auto}}

.settings-head-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.checkout-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:10px}.checkout-summary>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:7px}.checkout-summary span{display:block;color:#64748b;font-size:9px}.checkout-summary b{display:block;font-size:11px;margin-top:3px}.checkout-summary input{width:100%;height:27px;margin-top:3px;border:1px solid #cbd5e1;border-radius:4px;padding:0 5px;font-size:10px}.bill-table-wrap{max-height:230px;overflow:auto;border:1px solid #e2e8f0;border-radius:6px}.bill-detail-table{width:100%;border-collapse:collapse;font-size:10px}.bill-detail-table th,.bill-detail-table td{padding:6px 7px;border-bottom:1px solid #edf0f3;text-align:left;white-space:nowrap}.bill-detail-table th{position:sticky;top:0;background:#f8fafc;font-size:9px;color:#64748b}.checkout-totals{margin:9px 0 4px;display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.checkout-totals>div{padding:7px;background:#f8fafc;border-radius:5px;font-size:10px}.checkout-totals b{display:block;font-size:12px;margin-top:2px}.checkout-totals .net{background:#eef6ff}.checkout-totals .balance{background:#fff7ed}.payment-row{display:grid;grid-template-columns:130px 120px 1fr 1fr auto;gap:6px;margin:6px 0}.payment-row input,.payment-row select{height:30px;border:1px solid #cbd5e1;border-radius:5px;padding:0 7px;font-size:10px}.section-title{font-size:11px;font-weight:700;margin:7px 0}.checkout-bill{font-size:11px}
@media(max-width:800px){.checkout-summary,.checkout-totals{grid-template-columns:repeat(2,1fr)}.payment-row{grid-template-columns:1fr 1fr}.payment-row input{min-width:0}}

/* Booking data-entry refinements */
.checkline{display:inline-flex;align-items:center;gap:7px;margin-top:6px;font-size:12px;line-height:1.2;cursor:pointer;white-space:nowrap}
.checkline input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--primary);vertical-align:middle}
.boarder-box .bed-mode-select,.boarder-box .mobile-bed-select{min-width:92px}
.boarder-box .room-select{min-width:190px}

/* Compact party-first booking form */
.accommodation-request-row{display:grid;grid-template-columns:110px minmax(260px,1.8fr) 130px 120px;gap:10px;align-items:start;margin-top:10px;padding:10px 12px;border:1px solid #dfe5ec;border-radius:8px;background:#f8fafc}
.accommodation-request-row .field{margin:0}.accommodation-request-row .people-field input{font-weight:700}.room-request-field select{font-weight:600}.distribution-hint{margin-top:8px;padding:7px 10px;border-left:3px solid #64748b;background:#f1f5f9;color:#475569;font-size:12px;border-radius:4px}
.boarder-box{margin:6px 0;border:1px solid #e1e6ed;border-radius:7px;background:#fff;overflow:hidden}.boarder-box summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;padding:9px 11px;font-size:13px}.boarder-box summary::-webkit-details-marker{display:none}.boarder-box summary:hover{background:#f7f9fb}.boarder-box summary em{font-style:normal;font-size:10px;padding:2px 5px;border-radius:4px;background:#eef2f7;color:#52606d;margin-left:5px}.boarder-summary{font-size:11px;color:#7a8794}.expand-mark{display:inline-block;margin-left:5px;font-size:15px;line-height:10px}.boarder-box[open] .expand-mark{transform:rotate(45deg)}.boarder-details{padding:2px 11px 11px;border-top:1px solid #edf0f3}.pending-boarder summary b{color:#64748b}.pending-boarder .boarder-summary{color:#94a3b8}
@media(max-width:900px){.accommodation-request-row{grid-template-columns:1fr 2fr 1fr 1fr}}
/* Compact room-wise boarder assignment */
.boarder-assignment{display:grid;grid-template-columns:minmax(180px,1fr) 110px 110px;gap:8px;align-items:end;padding:8px 10px;margin:0 0 8px;border-bottom:1px solid #e7ebf0;background:#fafbfd}
.boarder-assignment .field{margin:0}.boarder-assignment label{font-size:11px;margin-bottom:3px}.boarder-assignment select{height:32px;font-size:12px}.boarder-assignment .mobile-inline{max-width:110px}
@media(max-width:760px){.boarder-assignment{grid-template-columns:1fr 1fr}.boarder-assignment .mobile-inline{max-width:none}}

/* 2026-09-16 booking/group workflow */
.form-grid.two-col{grid-template-columns:repeat(2,minmax(0,1fr));}
.room-requirement-card{border:1px solid var(--border-color);border-radius:6px;background:#fff;margin:7px 0;padding:8px;box-shadow:0 1px 2px rgba(0,0,0,.03)}
.room-req-head,.subsection-head,.room-group-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.room-req-actions{display:flex;gap:5px}.room-group-boarders{margin-top:8px;border-top:1px solid var(--border-color);padding-top:7px}.group-boarder{padding:7px 0;border-bottom:1px dashed var(--border-color)}
.available-room-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:45vh;overflow:auto;margin:10px 0}.available-room-card{display:flex;gap:8px;align-items:flex-start;border:1px solid var(--border-color);border-radius:6px;padding:8px;background:#fff;cursor:pointer}.available-room-card.disabled{opacity:.48;cursor:not-allowed}.available-room-card input{margin-top:2px}.available-room-card small{display:block;color:var(--text-muted);margin-top:2px}.group-assign-summary{padding:8px;border-radius:5px;background:#f8fafc;border:1px solid var(--border-color)}.group-assign-tools{display:flex;align-items:center;gap:8px;margin:8px 0}.field-inline{display:flex;align-items:center;gap:6px;flex:1}.field-inline select{height:30px;flex:1;border:1px solid var(--border-color);border-radius:4px;padding:0 7px}
.draft-row{background:#fffbeb}.unallocated-item.draft{border-left:3px solid var(--warning)}
@media(max-width:700px){.form-grid.two-col,.available-room-list{grid-template-columns:1fr}.group-assign-tools{align-items:stretch;flex-direction:column}.field-inline{width:100%}}

/* Location → Building → Floor → Room → Bed resource tree */
.tree-location,.tree-building,.tree-floor,.tree-room-block{display:block}
.tree-label{height:25px;display:flex;align-items:center;gap:5px;position:sticky;left:0;z-index:18;border-bottom:1px solid #dbe2ea;font-size:10px}
.level-location{background:#0f172a;color:#f8fafc;padding-left:8px!important}
.level-building{background:#1e293b;color:#e2e8f0;padding-left:8px!important}
.level-floor{background:#334155;color:#cbd5e1;padding-left:8px!important}
.level-room{padding-left:8px!important}
.tree-toggle{width:17px;height:17px;padding:0;border:1px solid #cbd5e1;background:#fff;border-radius:3px;font-size:12px;line-height:14px;color:#334155;cursor:pointer;flex:0 0 17px}
.tree-toggle:hover{background:#eef2f7}
.level-bed{padding-left:8px!important}
.tree-branch{color:#94a3b8;font-size:10px;margin-right:1px}
.header-now-marker{position:absolute;top:0;bottom:0;width:0;border-left:2px solid #dc2626;z-index:40;pointer-events:none}
.header-now-marker span{position:absolute;top:2px;left:4px;white-space:nowrap;background:#dc2626;color:#fff;border-radius:3px;padding:2px 5px;font-size:8px;font-weight:800;line-height:11px;box-shadow:0 1px 3px rgba(0,0,0,.18)}
.current-line{width:2px!important;background:#dc2626!important;box-shadow:0 0 0 1px rgba(220,38,38,.08);z-index:20}
.current-line::before{width:8px!important;height:8px!important;left:-3px!important;top:-1px!important;background:#dc2626!important;box-shadow:0 0 0 2px rgba(255,255,255,.85)}
/* Room requirements: compact two-column choice layout */
.room-type-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.room-type-choice{display:flex;align-items:center;gap:7px;padding:7px 8px;border:1px solid #dbe2ea;border-radius:5px;background:#f8fafc;font-size:11px}
.room-type-choice input{width:15px;height:15px;margin:0}
.room-type-choice .choice-name{font-weight:700;flex:1}
.room-type-choice input:checked + .choice-name{color:#1d4ed8}
.room-type-choice .choice-qty{width:58px;height:27px;border:1px solid #cbd5e1;border-radius:4px;padding:0 5px;font-size:11px}
@media(max-width:700px){.room-type-choice-grid{grid-template-columns:1fr}}

/* 2026-09-19 AUTHORITATIVE TIMELINE BOARD LAYOUT & SCROLL ARCHITECTURE */
.view-panel {
  display: none;
  height: calc(100vh - 46px);
  padding: 8px;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.view-panel.active {
  display: flex;
}

.board-workspace {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.board-canvas-area {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.timeline-wrap {
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: auto !important; /* Single scroll authority for horizontal & vertical scrolling */
  position: relative !important;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
}

.timeline {
  position: relative !important;
  width: max-content !important;
  min-width: 100% !important;
  background: #ffffff;
  isolation: isolate;
}

/* FIXED & STICKY DATE HEADER (NEVER HIDES ON VERTICAL SCROLL) */
.t-head {
  height: 52px !important;
  display: flex !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #cbd5e1 !important;
  box-sizing: border-box !important;
}

.resource-head {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 150 !important;
  background: #f8fafc !important;
  border-right: 1px solid #cbd5e1 !important;
  box-sizing: border-box !important;
}

/* DETERMINISTIC 3-COLUMN RESOURCE PANE (Room No | [Type] | Bed Count) */
.tree-location,
.tree-building,
.tree-floor,
.tree-room-block {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-sizing: border-box !important;
}

.t-head,
.room-row,
.bed-row {
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  box-sizing: border-box !important;
}

.resource-head,
.tree-label,
.room-label,
.bed-label {
  width: var(--resource-width, 290px) !important;
  min-width: var(--resource-width, 290px) !important;
  max-width: var(--resource-width, 290px) !important;
  flex: 0 0 var(--resource-width, 290px) !important;
  box-sizing: border-box !important;
  border-right: 1px solid #cbd5e1 !important;
  border-left: 0 !important;
  border-top: 0 !important;
  position: sticky !important;
  left: 0 !important;
  margin: 0 !important;
  padding: 0 8px !important;
}

.resource-head {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 4px 8px !important;
  height: 52px !important;
}

.resource-head-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 24px;
}

.resource-cols {
  display: flex !important;
  align-items: center !important;
  width: 100%;
  height: 18px;
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.3px;
  border-top: 1px solid #e2e8f0;
  padding-top: 2px;
}

.col-room {
  width: 75px !important;
  min-width: 75px !important;
  max-width: 75px !important;
  flex: 0 0 75px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.col-type {
  width: 135px !important;
  min-width: 135px !important;
  max-width: 135px !important;
  flex: 0 0 135px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
  box-sizing: border-box;
}

.col-beds {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  flex: 0 0 64px !important;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

/* ROOM & BED ROWS: ALIGNED COLUMNS */
.room-row {
  height: 34px !important;
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
}

.room-label {
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 8px !important;
  background: #e8edf2 !important;
  border-bottom: 1px solid #cbd5e1;
  z-index: 60 !important;
  cursor: default;
}

.room-label .col-room strong {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.room-label .col-type {
  font-size: 11px;
  color: #334155;
  font-weight: 500;
}

.room-label .col-beds {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.bed-row {
  height: 36px !important;
  display: flex !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  border-bottom: 1px solid #eef2f6;
  border-top: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  background: #ffffff;
}

.bed-label {
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 8px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #eef2f6;
  z-index: 55 !important;
  cursor: default;
}

.bed-label .col-room {
  font-size: 11px;
  color: #334155;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
}

.bed-bullet {
  color: #94a3b8;
  font-size: 12px;
}

.bed-label .col-type {
  font-size: 10.5px;
  color: #64748b;
}

.bed-type-dim {
  color: #94a3b8;
}

.bed-label .col-beds {
  font-size: 10px;
  color: #64748b;
}

.bed-stat-count {
  font-size: 9.5px;
  color: #64748b;
}

/* TREE HIERARCHY HEADERS (SPANS FULL RESOURCE WIDTH) */
.tree-label {
  height: 26px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 8px !important;
  z-index: 70 !important;
  cursor: default;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.level-location {
  background: #0f172a !important;
  color: #f8fafc !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.level-building {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  font-size: 10.5px;
  font-weight: 600;
}

.level-floor {
  background: #334155 !important;
  color: #cbd5e1 !important;
  font-size: 10px;
  font-weight: 600;
}

.tree-badge {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  margin-right: 6px;
  letter-spacing: 0.5px;
}

/* CANVASES & DATE HEADERS — SUBPIXEL ACCURATE GRID ALIGNMENT */
.days {
  position: relative;
  height: 52px;
  display: flex;
  flex: 0 0 auto;
}

.day {
  height: 52px;
  box-sizing: border-box !important;
  padding: 6px 2px 4px;
  border-right: 1px solid #cbd5e1 !important;
  text-align: center;
  background: #f8fafc;
  line-height: 15px;
}

.day.today {
  background: #eff6ff !important;
  border-right: 1px solid #cbd5e1 !important;
  box-shadow: inset 2px 0 #60a5fa, inset -2px 0 #60a5fa;
}

.day b {
  font-size: 11px;
  display: block;
  color: var(--text-main);
}

.day small {
  font-size: 10px;
  color: #64748b;
  display: block;
}

.today-badge {
  font-size: 7.5px !important;
  line-height: 10px !important;
  color: #2563eb;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: block;
}

/* Grid lines match .day borders exactly via linear-gradient tile */
.canvas {
  height: 36px;
  position: relative;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-sizing: border-box !important;
  background-color: #ffffff;
  background-image: linear-gradient(to right, transparent calc(var(--px-day, 130px) - 1px), #cbd5e1 calc(var(--px-day, 130px) - 1px), #cbd5e1 var(--px-day, 130px));
  background-size: var(--px-day, 130px) 100%;
  background-repeat: repeat-x;
  cursor: default;
}

.room-band {
  height: 34px;
  position: relative;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-sizing: border-box !important;
  background-color: #f1f5f9;
  background-image: linear-gradient(to right, transparent calc(var(--px-day, 130px) - 1px), #cbd5e1 calc(var(--px-day, 130px) - 1px), #cbd5e1 var(--px-day, 130px));
  background-size: var(--px-day, 130px) 100%;
  background-repeat: repeat-x;
  cursor: default;
}

.t-head, .room-group-head, .bed-row {
  width: var(--timeline-width) !important;
  min-width: var(--timeline-width) !important;
  max-width: none !important;
}

.tree-toggle, .tree-branch, .bed-tree-line {
  display: none !important;
}

/* Clickable elements */
.bar {
  z-index: 8;
  top: 4px;
  height: 26px;
  box-sizing: border-box;
  cursor: pointer !important;
}

.draft-card, .btn, .resource-nav-btn, .nav-btn, .room-block.maintenance {
  cursor: pointer !important;
}

.header-now-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dc2626;
  z-index: 130;
  pointer-events: none;
}

.header-now-marker span {
  position: absolute;
  top: 3px;
  left: 5px;
  background: #dc2626;
  color: #fff;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 8px;
  font-weight: 800;
  line-height: 12px;
  white-space: nowrap;
}

.global-now-line {
  position: absolute;
  top: 52px;
  bottom: 0;
  width: 2px;
  background: #dc2626;
  z-index: 90;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(220,38,38,.08);
}

.global-now-line:before {
  content: '';
  position: absolute;
  top: -3px;
  left: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid #fff;
  box-sizing: border-box;
}

.global-now-line span {
  position: absolute;
  top: -20px;
  left: 5px;
  background: #dc2626;
  color: #fff;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 8px;
  font-weight: 800;
  line-height: 12px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}

@media(max-width:700px) {
  .resource-head, .tree-label, .room-label, .bed-label {
    width: 240px !important;
    min-width: 240px !important;
    max-width: 240px !important;
    flex: 0 0 240px !important;
  }
  .col-room { width: 65px !important; min-width: 65px !important; max-width: 65px !important; flex: 0 0 65px !important; }
  .col-type { width: 110px !important; min-width: 110px !important; max-width: 110px !important; flex: 0 0 110px !important; }
  .col-beds { width: 55px !important; min-width: 55px !important; max-width: 55px !important; flex: 0 0 55px !important; }
}

/* 2026-09-18 ROOM REQUIREMENT WORKSPACE — assignment-first form */
.booking-form-v2 .room-requirement-workspace{overflow:hidden}
.assignment-mode{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
.assignment-mode-card{display:flex;align-items:flex-start;gap:9px;border:1px solid #d7dde5;border-radius:8px;padding:10px 12px;background:#fff;cursor:pointer;transition:.12s ease}
.assignment-mode-card input{margin-top:3px;accent-color:#2563eb}
.assignment-mode-card.active{border-color:#2563eb;background:#f5f8ff;box-shadow:0 0 0 1px #2563eb inset}
.assignment-mode-card b{display:block;font-size:12px}.assignment-mode-card small{display:block;margin-top:2px;color:#64748b;font-size:10px;line-height:14px}
.assignment-panel{border-top:1px solid #e5e7eb;padding-top:10px}
.requirement-later-grid{display:grid;grid-template-columns:180px 180px minmax(240px,1fr);gap:10px;align-items:start}
.requirement-later-grid textarea{resize:vertical;min-height:58px}.requirement-help{margin-top:7px;color:#64748b;font-size:10px}
.assign-now-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:9px;padding:8px 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:7px}
.assign-now-toolbar b{display:block;font-size:12px}.assign-now-toolbar small{display:block;color:#64748b;font-size:10px;margin-top:2px}
.category-input-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:7px;margin-bottom:10px}
.category-quantity{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #dce2e8;border-radius:6px;padding:7px 9px;background:#fff;font-size:11px;font-weight:700}
.category-quantity input{width:52px;text-align:center;font-weight:700}
.room-category-group{border:1px solid #d6dde5;border-radius:8px;margin:9px 0;background:#fff;overflow:hidden}
.room-category-head{display:flex;justify-content:space-between;align-items:center;padding:9px 11px;background:#f3f6f9;border-bottom:1px solid #dfe5eb}.room-category-head b{font-size:12px}.room-category-head small{display:block;color:#64748b;font-size:10px;margin-top:2px}.category-progress{font-size:10px;color:#475569;font-weight:700}
.room-allocation-group{margin:8px;border:1px solid #e0e5eb;border-radius:7px;overflow:hidden;background:#fff}.room-group-head-v2{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;background:#fafbfc;border-bottom:1px solid #e7ebef}.room-group-head-v2 b{font-size:11px}.room-group-head-v2 small{display:block;color:#64748b;font-size:9px;margin-top:2px}.room-group-actions{display:flex;gap:5px}
.live-vacancy{padding:7px 9px}.subsection-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}.subsection-head b{font-size:10px}.availability-state{font-size:9px;color:#64748b}.vacancy-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:5px}
.vacancy-room{display:flex;justify-content:space-between;align-items:center;text-align:left;gap:8px;border:1px solid #cfd7e0;background:#fff;border-radius:6px;padding:6px 8px;cursor:pointer}.vacancy-room:hover{border-color:#2563eb;background:#f8fbff}.vacancy-room.selected{border-color:#2563eb;background:#eff6ff;box-shadow:0 0 0 1px #2563eb inset}.vacancy-room.unavailable{opacity:.52;cursor:not-allowed;background:#f8fafc}.vacancy-room b{display:block;font-size:10px}.vacancy-room small{display:block;color:#64748b;font-size:8px;margin-top:2px}.vacancy-room strong{font-size:8px;white-space:nowrap}.selected-room-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 9px 8px;padding:6px 8px;border-radius:5px;background:#f1f5f9;font-size:9px}
.boarder-group-v2{border-top:1px solid #e6eaf0;padding:8px 9px}.boarder-subform{border:1px solid #dbe1e7;border-radius:6px;padding:7px;margin:5px 0;background:#fcfdff}.boarder-subform-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.boarder-subform-head b{font-size:10px}.boarder-subform .field label{font-size:9px}.boarder-subform input,.boarder-subform select{font-size:10px;padding:5px 6px}.empty-state{padding:16px;text-align:center;color:#64748b;font-size:10px;border:1px dashed #cbd5e1;border-radius:7px;background:#fafafa}
.error-inline{padding:7px;color:#b91c1c;background:#fef2f2;border-radius:5px;font-size:9px}
@media(max-width:700px){.assignment-mode{grid-template-columns:1fr}.requirement-later-grid{grid-template-columns:1fr 1fr}.requirement-later-grid .field-wide{grid-column:1/-1}.category-input-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.vacancy-list{grid-template-columns:1fr}.room-group-head-v2{align-items:flex-start}.assign-now-toolbar{align-items:flex-start;flex-direction:column}}

/* 2026-09-18 ROOM GROUP CONTROLS + COLLAPSIBLE BOARDER DETAILS */
.room-group-inputs{display:grid;grid-template-columns:repeat(2,minmax(150px,220px));gap:8px;padding:8px 9px;background:#f8fafc;border-bottom:1px solid #e6eaf0}
.field-inline{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:10px;font-weight:700;color:#334155}
.field-inline label{font-size:10px;white-space:nowrap}.field-inline input{width:58px;min-width:58px;text-align:center;font-size:11px;padding:5px 6px}
.boarder-count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e2e8f0;color:#334155;font-size:9px;margin-left:3px}
.boarder-toggle{display:flex;align-items:center;gap:5px;min-width:0;border:0;background:transparent;padding:3px 0;cursor:pointer;text-align:left;color:inherit}
.boarder-toggle b{font-size:10px;white-space:nowrap}.boarder-toggle small{font-size:9px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}.boarder-chevron{width:12px;font-size:11px;color:#475569}
.boarder-details{padding-top:5px}.boarder-subform:not(.is-expanded) .boarder-subform-head{margin-bottom:0}
@media(max-width:700px){.room-group-inputs{grid-template-columns:1fr 1fr}.boarder-toggle small{max-width:150px}}

/* Resource navigator */
.resource-nav-btn{appearance:none;border:0;background:transparent;color:var(--text-main);font:700 10px/1 Inter,Arial,sans-serif;letter-spacing:.02em;padding:5px 7px;border-radius:4px;cursor:pointer;text-align:left}
.resource-nav-btn:hover{background:#eef2f7;color:var(--primary)}
.resource-navigator{padding:10px}
.resource-nav-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.resource-nav-grid .field-wide{grid-column:1/-1}
.resource-nav-grid label{display:block;font-size:10px;color:#475569;font-weight:700;margin-bottom:4px}
.resource-nav-grid select{width:100%;height:32px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;padding:0 8px;font:11px Inter,Arial,sans-serif;color:#0f172a}
.resource-nav-grid select:disabled{background:#f8fafc;color:#94a3b8}
.resource-nav-path{margin-top:10px;padding:8px 9px;border:1px solid #e2e8f0;border-radius:5px;background:#f8fafc;color:#475569;font-size:10px;line-height:1.5}
.resource-nav-highlight{outline:2px solid #38bdf8!important;outline-offset:-2px;background:#eff6ff!important}
@media(max-width:600px){.resource-nav-grid{grid-template-columns:1fr}.resource-nav-grid .field-wide{grid-column:auto}}

/* Contextual payment fields */
.payment-row{grid-template-columns:120px 110px minmax(150px,1fr) 28px;align-items:end}
.payment-extra-wrap{min-width:0}.payment-extra{display:block}.payment-extra label{display:block;font-size:9px;color:#64748b;margin:0 0 2px}.payment-extra input{width:100%;height:30px;border:1px solid #cbd5e1;border-radius:5px;padding:0 7px;font-size:10px}
.payment-row>.remove-pay{height:30px;padding:0 7px}
@media(max-width:800px){.payment-row{grid-template-columns:1fr 1fr}.payment-row>.payment-extra-wrap{grid-column:1/-1}.payment-row>.remove-pay{justify-self:end}}

/* Accommodation status modal opened from LOCATION → BED */
.board-status-modal{padding:10px;min-width:min(360px,82vw)}
.board-status-head{display:flex;align-items:center;justify-content:space-between;padding:2px 2px 9px;border-bottom:1px solid #e5e7eb}
.board-status-head b{display:block;font-size:12px;color:#172033}.board-status-head small{display:block;margin-top:2px;font-size:9px;color:#64748b}.board-status-rate{font-size:18px;font-weight:800;color:#172033}
.board-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}
.board-status-card{padding:8px 7px;border:1px solid #e5e7eb;border-radius:6px;background:#fff}.board-status-card span{display:block;font-size:9px;color:#64748b}.board-status-card b{display:block;margin-top:2px;font-size:15px;color:#172033}
.board-summary-title{margin:10px 0 5px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#64748b}.board-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.board-summary-grid>div{display:flex;align-items:center;justify-content:space-between;padding:7px 8px;border:1px solid #e5e7eb;border-radius:6px;background:#f8fafc}.board-summary-grid span{font-size:9px;color:#64748b}.board-summary-grid b{font-size:12px;color:#172033}
@media(max-width:420px){.board-status-grid,.board-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.board-status-modal{min-width:0}}

/* Layout Interactive Click Styles & Feedback */
.canvas, .room-band { cursor: default; }
.day { cursor: default; }
.room-label, .bed-label { cursor: default; }
.room-block.maintenance { cursor: pointer; }
.draft-card, .bar, .resource-nav-btn { cursor: pointer; }
.context-menu { box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18), 0 4px 10px rgba(15, 23, 42, 0.08); border-color: #cbd5e1; }
.context-choice { appearance: none; border: 0; background: transparent; width: 100%; text-align: left; }

/* Child boarder styles */
.badge.child, .badge-child {
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-free {
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}
.child-checkbox-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #3730a3;
  background: #eef2ff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #c7d2fe;
  cursor: pointer;
}

/* ==========================================================================
   AUTHENTICATION & ACCESS CONTROL STYLING
   ========================================================================== */

/* Top header user navigation widget */
.user-nav-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1e293b;
  border: 1px solid #334155;
  padding: 3px 10px 3px 4px;
  border-radius: 20px;
  color: #f8fafc;
}
.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.user-fullname {
  font-size: 11px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
}
.user-role-tag {
  font-size: 9.5px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}
.btn-logout-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-logout-nav:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Standalone Login Screen */
body.login-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 20%, #1e293b 0%, #0f172a 100%);
  font-family: var(--font-family);
  color: #0f172a;
}
.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}
.login-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  padding: 32px 28px;
}
.login-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.login-emblem {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.login-titles h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}
.login-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.login-alert-danger {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 20px;
}
.login-form .form-group {
  margin-bottom: 16px;
}
.login-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon svg {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}
.input-with-icon .form-control {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.15s ease;
}
.input-with-icon .form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.login-btn {
  width: 100%;
  height: 42px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s ease;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}
.login-btn:hover {
  background: #1d4ed8;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}
.login-footer {
  margin-top: 24px;
  border-top: 1px solid #f1f5f9;
  padding-top: 18px;
}
.demo-creds-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.demo-creds-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  margin-bottom: 6px;
}
.demo-creds-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 12px;
  color: #334155;
  margin-bottom: 8px;
}
.demo-creds-box .btn-ghost {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: #2563eb;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
}
.demo-creds-box .btn-ghost:hover {
  background: #eef2ff;
  border-color: #93c5fd;
}

/* Permission Matrix and Role Styling */
.role-name-cell {
  color: #0f172a;
  font-size: 13px;
}
.count-pill {
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.permission-tags-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 480px;
}
.perm-tag {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.perm-tag.all {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}
.perm-matrix-wrap {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
}
.perm-matrix-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: wrap;
}
.perm-matrix-head b {
  font-size: 13px;
  color: #0f172a;
}
.perm-matrix-head small {
  color: #64748b;
  font-size: 11px;
}
.permission-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}
.perm-group {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.perm-group:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.perm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f5f9;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  user-select: none;
}
.perm-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  flex: 1;
}
.perm-section-label.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.perm-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.2px;
}
.perm-section-badge {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.perm-section-badge.badge-full {
  background: #dcfce7;
  color: #15803d;
}
.perm-group-items {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.perm-checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.perm-checkbox-item:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.perm-checkbox-item:has(input[type="checkbox"]:checked) {
  background: #f0f7ff;
  border-color: #bfdbfe;
}
.perm-checkbox-item.disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.perm-checkbox-item input[type="checkbox"],
.perm-section-toggle {
  width: 15px;
  height: 15px;
  accent-color: #2563eb;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}
.perm-section-toggle:indeterminate {
  accent-color: #f59e0b;
}
.perm-info {
  display: flex;
  flex-direction: column;
}
.perm-info strong {
  font-size: 12px;
  color: #1e293b;
  font-weight: 600;
}
.perm-info small {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.3;
}
.input-readonly {
  background: #f1f5f9 !important;
  color: #64748b !important;
  cursor: not-allowed;
}

/* VIP Reserved Room Submodal Prompt */
.submodal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.15s ease-out;
}
.submodal-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 440px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  animation: popIn 0.15s ease-out;
}
.submodal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.submodal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.submodal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}
.submodal-close:hover {
  color: #0f172a;
}
.submodal-content {
  padding: 20px;
}
.submodal-desc {
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}
.submodal-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  margin-top: 6px;
  font-family: inherit;
}
.submodal-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.submodal-error {
  color: #dc2626;
  font-size: 13px;
  margin-top: 6px;
  font-weight: 500;
}
.submodal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* Unlock Reserved Button */
.btn-unlock-reserved {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
  font-weight: 600 !important;
}
.btn-unlock-reserved:hover {
  background: #fde68a !important;
}
.btn-unlocked-reserved {
  background: #dcfce7 !important;
  color: #166534 !important;
  border-color: #bbf7d0 !important;
  font-weight: 600 !important;
}
.btn-unlocked-reserved:hover {
  background: #bbf7d0 !important;
}

/* Reserved room badge & vacancy styling */
.vacancy-room.reserved-room {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
}
.vacancy-room.reserved-room:hover:not(:disabled) {
  background: #fef3c7 !important;
  border-color: #d97706 !important;
}
.vacancy-room.reserved-room.selected {
  background: #fef3c7 !important;
  border-color: #b45309 !important;
}
.badge-reserved-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fde68a;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Fixed application chrome */
.top{position:fixed;top:0;left:0;right:0;z-index:9000;}
.view-panel{height:calc(100vh - 46px);margin-top:46px;min-height:0;}

/* Explicit canvas status filter */
#filterStatus{width:180px!important;min-width:180px!important;max-width:180px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* A4 portrait bill: two A5 copies stacked, with tear line + Booking No. at the tear */
.a4-portrait-sheet{width:210mm;height:297mm;background:#fff;color:#000;position:relative;font-family:Arial,Helvetica,sans-serif;display:flex;flex-direction:column}
.a5-copy{width:210mm;height:148.5mm;min-height:148.5mm;padding:6mm 8mm 5mm;position:relative;overflow:hidden}
.a5-copy .copy-tag{position:absolute;top:3mm;right:6mm;font-size:8px;font-weight:700;letter-spacing:.8px}
.booking-tear{font-size:24px;line-height:1;font-weight:900;letter-spacing:1.5px;text-align:center;border:2px solid #111;padding:2.5mm 2mm;margin:1.5mm 0 3mm}
.print-meta{width:100%;border-collapse:collapse;font-size:8px;margin-bottom:2mm}.print-meta td{border:1px solid #222;padding:1.6mm;vertical-align:top}
.print-totals{display:grid;grid-template-columns:1fr 1fr;gap:1mm 4mm;font-size:8px;margin:1.5mm 0}.print-totals>div{display:flex;justify-content:space-between;border-bottom:1px dotted #aaa;padding:.8mm 0}.print-totals .due{font-size:10px;font-weight:700;border-bottom:2px solid #111}
.payment-print{font-size:7px!important}.payment-print th,.payment-print td{padding:1.2mm!important}
.a5-copy .print-header{padding-bottom:1.5mm;margin-bottom:1.5mm;border-bottom:1px solid #111}.a5-copy .print-header h1{font-size:13px}.a5-copy .print-header p{font-size:8px;margin:0}
.a5-copy .print-table{width:100%;border-collapse:collapse;margin:1.5mm 0}.a5-copy .print-table th,.a5-copy .print-table td{border:1px solid #222;padding:1.2mm;font-size:7px}.a5-copy .print-table th{font-weight:700}
.a5-copy .print-signatures{position:absolute;left:8mm;right:8mm;bottom:5mm;display:flex;justify-content:space-between;gap:12mm;margin:0}.a5-copy .print-signatures>div{width:45%;border-top:1px solid #111;padding-top:1.5mm;text-align:center;font-size:7px;min-height:9mm}
.tear-divider{height:0;position:relative;border-top:2px dashed #111;margin:0;z-index:5}.tear-divider .tear-label{position:absolute;left:50%;top:0;transform:translate(-50%,-50%);background:#fff;border:1px dashed #555;padding:1.2mm 3mm;font-size:7px;font-weight:700;letter-spacing:.8px;white-space:nowrap}.tear-divider .tear-booking{position:absolute;left:50%;top:0;transform:translate(-50%,-50%);background:#fff;border:2px solid #111;padding:1.5mm 5mm;font-size:15px;font-weight:900;letter-spacing:1.2px;white-space:nowrap;line-height:1}
@media print{ @page{size:A4 portrait;margin:0} html,body{width:210mm;height:297mm;margin:0!important;padding:0!important;background:#fff}.top,.view-panel,#modal,#contextMenu,#toastContainer{display:none!important}.print-only{display:block!important;position:fixed!important;inset:0!important;width:210mm!important;height:297mm!important;padding:0!important;margin:0!important}.a4-portrait-sheet{width:210mm;height:297mm}.a5-copy{height:148.5mm;min-height:148.5mm}.tear-divider{height:0}.print-header{visibility:visible!important}}


/* Responsive application chrome: viewport-sized, with fixed header/footer. */
html,body{width:100vw;min-width:100%;min-height:100vh;margin:0;padding:0;box-sizing:border-box}
*,*::before,*::after{box-sizing:border-box}
body{min-height:100vh;overflow-x:hidden;padding-bottom:24px}
.top{top:0;left:0;right:0;width:100vw;min-height:46px}
.view-panel{width:100vw;max-width:100vw;min-height:calc(100vh - 70px);height:calc(100vh - 70px);padding-bottom:4px}
.site-footer{position:fixed;left:0;right:0;bottom:0;width:100vw;height:20px;min-height:20px;z-index:8999;background:#fff;border-top:1px solid #e5e7eb;text-align:center;font-size:8px;line-height:19px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.site-footer a{color:inherit;text-decoration:none}.site-footer a:hover{text-decoration:underline}
.brand{min-width:0}.brand-title{font-weight:800;white-space:nowrap}.brand-logo{width:24px;height:24px;object-fit:contain;display:block;flex:0 0 auto}.brand-icon-text{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;font-size:10px;font-weight:900;border:1px solid currentColor;border-radius:4px}
#filterLocation,#filterBuilding,#filterStatus,.toolbar-filters .tool-select{font-size:10px!important}
.password-field{position:relative;display:flex;align-items:stretch;width:100%}.password-field>input{padding-right:48px!important;flex:1;min-width:0}.password-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);border:0;background:transparent;padding:2px 5px;font-size:10px;color:#475569;cursor:pointer;line-height:1}.password-toggle:hover{color:#0f172a}
.password-main{width:100vw;min-height:calc(100vh - 66px);padding:70px 16px 28px;display:flex;align-items:flex-start;justify-content:center}.password-card{width:min(460px,92vw);background:#fff;border:1px solid #dbe2ea;border-radius:8px;padding:20px;box-shadow:0 4px 16px rgba(0,0,0,.06)}.password-card h2{margin:0 0 5px}.password-card p{margin:0 0 18px;color:#64748b;font-size:12px}.password-card form{display:grid;gap:13px}.password-card label{font-size:12px;font-weight:600}.password-card label>.password-field{margin-top:5px}.password-card .actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}.login-site-footer{position:fixed}
.login-logo{width:52px;height:52px;object-fit:contain;display:block}
@media(max-width:900px){.top{min-height:52px}.nav-tabs{gap:2px}.nav-btn{padding:6px 7px;font-size:10px}.user-details{display:none}.view-panel{height:calc(100vh - 76px);min-height:calc(100vh - 76px);margin-top:52px}.toolbar{height:auto;min-height:44px;flex-wrap:wrap;padding:5px 7px}.toolbar-left{flex-wrap:wrap;gap:5px}.toolbar-filters{gap:4px}.tool-select{height:28px}.site-footer{height:18px;line-height:17px}}
@media(max-width:600px){.top{min-height:56px}.brand #headerSub{display:none}.brand-title{font-size:11px}.nav-tabs{overflow-x:auto;max-width:52vw}.nav-btn{white-space:nowrap}.btn-logout-nav span{display:none}.view-panel{margin-top:56px;height:calc(100vh - 80px);min-height:calc(100vh - 80px)}.toolbar-left,.toolbar-right{width:100%}.toolbar-right{justify-content:flex-end}.toolbar-filters{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar-filters .tool-select{width:100%!important;min-width:0!important;max-width:none!important}.range{width:100%}#timelineRange{flex:1;width:auto!important;min-width:0!important;max-width:none!important}.site-footer{font-size:7px}}
/* Bills directory */
.bill-summary-strip{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:8px 0;padding:8px 10px;border:1px solid var(--border,#d9dde3);border-radius:8px;background:var(--surface,#fff);font-size:11px}
.bill-summary-strip>div{display:flex;gap:5px;align-items:baseline}.bill-summary-strip>div b{font-size:13px}.bill-summary-strip>div span{color:#6b7280}.bill-summary-strip small{margin-left:auto;color:#6b7280;font-size:10px}
.booking-no-cell{font-variant-numeric:tabular-nums;white-space:nowrap}
.status-pill.booked{background:#e0f2fe;color:#075985}.status-pill.allotted{background:#fef3c7;color:#92400e}.status-pill.checked_in{background:#dcfce7;color:#166534}.status-pill.checked_out{background:#e5e7eb;color:#374151}.status-pill.paid{background:#bbf7d0;color:#14532d}.status-pill.partially_paid{background:#fef3c7;color:#854d0e}.status-pill.unpaid{background:#fee2e2;color:#991b1b}.status-pill.waived{background:#e5e7eb;color:#4b5563}
@media(max-width:700px){.bill-summary-strip{gap:8px}.bill-summary-strip small{width:100%;margin-left:0}.bill-summary-strip>div b{font-size:12px}.bill-summary-strip>div span{font-size:10px}}
.custom-print-preview-overlay{position:fixed;inset:0;z-index:20000;background:rgba(15,23,42,.78);display:flex;flex-direction:column}.custom-print-preview{display:flex;flex-direction:column;width:100%;height:100%;background:#eef1f5}.custom-print-toolbar{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 10px;background:#fff;border-bottom:1px solid #d7dce3}.custom-print-title{display:flex;gap:10px;align-items:baseline;min-width:0}.custom-print-title b{font-size:13px}.custom-print-title span{font-size:10px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.custom-print-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.custom-print-controls label{font-size:10px;color:#475569}.custom-print-controls select{height:28px;font-size:10px}.custom-print-stage{flex:1;overflow:auto;padding:18px;display:flex;justify-content:center;align-items:flex-start}.custom-print-page{--cp-scale:.9;transform:scale(var(--cp-scale));transform-origin:top center;background:#fff;box-shadow:0 8px 28px rgba(0,0,0,.25);flex:0 0 auto;overflow:hidden}.custom-print-page.portrait{width:210mm;height:297mm}.custom-print-page.landscape{width:297mm;height:210mm}.custom-print-page .a4-portrait-sheet{width:100%!important;height:100%!important}.custom-print-page.landscape .a4-portrait-sheet{flex-direction:row!important}.custom-print-page.landscape .a5-copy{width:50%!important;height:100%!important;min-width:50%!important;min-height:100%!important}.custom-print-page.landscape .tear-divider{height:auto!important;width:0!important;border-top:0!important;border-left:1px dashed #111!important}.custom-print-page.landscape .tear-divider .tear-booking{left:0!important;top:50%!important;transform:translate(-50%,-50%) rotate(-90deg)!important}@media(max-width:800px){.custom-print-toolbar{align-items:flex-start;flex-direction:column}.custom-print-controls{width:100%}.custom-print-stage{padding:10px}.custom-print-page{transform-origin:top left}}

/* Production user/access modal: stay above fixed header and remain fully visible on touch/desktop. */
.modal{z-index:20000!important;align-items:flex-start;padding:calc(var(--header-height,56px) + 10px) 12px 28px;overflow:auto;}
.modal-card{max-height:calc(100vh - var(--header-height,56px) - 38px);}
.location-access-box{grid-column:1/-1;border:1px solid #dbe3ec;border-radius:7px;padding:8px;background:#f8fafc;}
.location-access-box b{display:block;font-size:11px;color:#0f172a}.location-access-box small{display:block;color:#64748b;font-size:9px;margin:2px 0 7px}.location-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px;max-height:150px;overflow:auto}.location-check-grid label{font-size:10px!important;font-weight:500!important;display:flex;align-items:center;gap:5px}.location-check-grid input{width:auto!important;height:auto!important;margin:0!important;}
@media(max-width:600px){.modal{padding:62px 7px 24px}.modal-card{width:calc(100vw - 14px);max-height:calc(100vh - 86px)}.location-check-grid{grid-template-columns:1fr;max-height:180px}}

:root{--header-height:56px}
.modal{z-index:20000!important;align-items:flex-start!important;padding:calc(var(--header-height) + 10px) 12px 28px!important;overflow:auto!important}
.modal-card{max-height:calc(100vh - var(--header-height) - 38px)!important}
.location-access-box{grid-column:1/-1;border:1px solid #dbe3ec;border-radius:7px;padding:8px;background:#f8fafc}.location-access-box b{display:block;font-size:11px;color:#0f172a}.location-access-box small{display:block;color:#64748b;font-size:9px;margin:2px 0 7px}.location-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px;max-height:150px;overflow:auto}.location-check-grid label{font-size:10px!important;font-weight:500!important;display:flex;align-items:center;gap:5px}.location-check-grid input{width:auto!important;height:auto!important;margin:0!important}@media(max-width:900px){:root{--header-height:52px}}@media(max-width:600px){:root{--header-height:56px}.modal{padding:62px 7px 24px!important}.modal-card{width:calc(100vw - 14px)!important;max-height:calc(100vh - 86px)!important}.location-check-grid{grid-template-columns:1fr;max-height:180px}}


/* Final mobile/login/accessibility pass */
.login-body{min-height:100svh;min-height:100dvh;display:flex;flex-direction:column;overflow-x:hidden;background:#f5f7fa}
.login-wrapper{width:100%;flex:1;display:flex;align-items:center;justify-content:center;padding:24px 14px 44px;box-sizing:border-box}
.login-card{width:min(430px,100%);max-height:none;box-sizing:border-box}
.login-form input,.login-form button{min-height:44px;box-sizing:border-box}
.login-alert-danger{word-break:break-word}
.login-site-footer{position:fixed!important;bottom:0;left:0;right:0}
@media(max-width:600px){
 .login-wrapper{align-items:flex-start;padding:18px 10px 42px}
 .login-card{width:100%;border-radius:8px;padding:16px}
 .login-header{gap:10px}
 .login-logo,.login-emblem{width:44px;height:44px}
 .login-titles h1{font-size:18px;line-height:1.2}
 .login-subtitle{font-size:10px}
 .login-form{gap:11px}
 .login-form label{font-size:11px}
 .login-btn{width:100%;min-height:46px}
}
@media(max-width:380px){
 .login-wrapper{padding-left:7px;padding-right:7px}
 .login-card{padding:13px}
 .login-titles h1{font-size:16px}
}

/* Fixed header clearance for Settings content */
.settings-main{padding-top:58px!important}
@media(max-width:900px){.settings-main{padding-top:64px!important}}
@media(max-width:600px){.settings-main{padding-top:68px!important}}
