/* ============================================================
   S-PRESSO STAFF DASHBOARD — roomboard.css
   All styles for the Dashboard / Room Board tab only.
   All classes prefixed rb- to avoid collisions.
============================================================ */

/* ============ FILTER BAR (dashboard tab) ============ */
.rb-filter-bar {
  background: white; border-radius: 12px;
  padding: 14px 18px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
}
.rb-filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.rb-filter-label { font-size: 0.63rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.rb-filter-select {
  padding: 8px 11px; border: 1px solid var(--gray-200); border-radius: 8px;
  font-size: 0.84rem; font-family: var(--font-sans);
  background: var(--gray-50); color: var(--navy-800); transition: all 0.2s;
}
.rb-filter-select:focus {
  outline: none; border-color: var(--gold-600);
  background: var(--white); box-shadow: 0 0 0 3px var(--gold-100);
}
.rb-filter-btn {
  padding: 8px 18px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: var(--white); font-size: 0.84rem; font-weight: 600;
  font-family: var(--font-sans); cursor: pointer; transition: all 0.2s;
}
.rb-filter-btn:hover { box-shadow: 0 4px 12px rgba(160,122,34,0.3); }

/* ============ PROPERTY HEADER ROW ============ */
.rb-prop-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
}
.rb-prop-title { font-size: 1.15rem; font-weight: 700; color: var(--navy-800); }

/* ============ STATS PILLS ROW ============ */
.rb-stats-row {
  display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap;
}
.rb-stat-pill {
  background: white; border-radius: 10px; padding: 9px 14px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.rb-stat-num { font-size: 1.25rem; font-weight: 700; }
.rb-stat-lbl { color: var(--gray-500); font-size: 0.68rem; line-height: 1.4; }

/* ============ ROOM GRID ============ */
.rb-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

/* ============ ROOM CARD ============ */
.rb-card {
  background: white; border-radius: 12px; padding: 11px;
  cursor: pointer; border: 2px solid var(--gray-200);
  position: relative; min-height: 115px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s;
}
.rb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.rb-room-num { font-size: 1.25rem; font-weight: 800; color: var(--navy-800); line-height: 1; }

/* Badge inside card */
.rb-badge { display: inline-flex; padding: 3px 7px; border-radius: 20px; font-size: 0.6rem; font-weight: 700; margin-top: 3px; }
.rb-badge-yellow { background:#fef08a; color:#854d0e; }
.rb-badge-amber  { background:#fde68a; color:#92400e; }
.rb-badge-green  { background:#bbf7d0; color:#14532d; }
.rb-badge-pink   { background:#fbcfe8; color:#9d174d; }
.rb-badge-blue   { background:#bfdbfe; color:#1e3a8a; }
.rb-badge-red    { background:#fecaca; color:#7f1d1d; }
.rb-badge-gray   { background:#e5e7eb; color:#374151; }

/* Room info text */
.rb-room-info { font-size: 0.66rem; color: var(--gray-500); margin-top: 5px; line-height: 1.5; }
.rb-dates     { font-weight: 600; color: #475569; }

/* Flag badges */
.rb-flags { display: flex; gap: 3px; margin-top: 5px; flex-wrap: wrap; }
.rb-flag  { font-size: 0.58rem; padding: 2px 5px; border-radius: 4px; font-weight: 600; }
.rb-flag-late    { background:#fef3c7; color:#92400e; }
.rb-flag-early   { background:#dbeafe; color:#1e40af; }
.rb-flag-inspect { background:#d1fae5; color:#065f46; }
.rb-flag-block     { background:#fee2e2; color:#991b1b; }
.rb-flag-stayclean { background:#fce7f3; color:#9d174d; }

/* Magnet dots — top right corner */
.rb-magnets { position: absolute; top: 9px; right: 9px; display: flex; gap: 4px; align-items: center; }
.rb-magnet  { width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.28); }

/* ============ ROOM STATUS MODAL ============ */
.rb-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 200;
  align-items: center; justify-content: center;
}
.rb-modal-overlay.rb-modal-open { display: flex; }

.rb-modal {
  background: white; border-radius: 16px; padding: 22px;
  width: 340px; max-width: 92vw;
  max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); position: relative;
}
.rb-modal-close   { position: absolute; top: 11px; right: 14px; background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--gray-400); }
.rb-modal-title   { font-size: 1.05rem; font-weight: 700; margin-bottom: 3px; }
.rb-modal-sub     { font-size: 0.78rem; color: var(--gray-500); margin-bottom: 14px; }
.rb-section-label { font-size: 0.72rem; font-weight: 700; color: var(--gray-500); margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.5px; }

.rb-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 14px; }
.rb-modal-btn {
  padding: 9px; border-radius: 9px; border: 2px solid var(--gray-200);
  font-size: 0.76rem; font-weight: 600; cursor: pointer;
  background: white; transition: all 0.15s; font-family: var(--font-sans);
}
.rb-modal-btn:hover { border-color: var(--gold-600); color: var(--gold-600); }
.rb-btn-selected    { border-color: var(--gold-600) !important; background: var(--gold-100) !important; color: var(--gold-600) !important; }

.rb-modal-flags { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.rb-flag-row    { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; }

/* Toggle switch */
.rb-toggle { width: 36px; height: 20px; background: var(--gray-200); border-radius: 10px; cursor: pointer; position: relative; transition: background 0.2s; flex-shrink: 0; }
.rb-toggle.rb-on { background: var(--gold-600); }
.rb-toggle::after { content:''; position: absolute; width: 16px; height: 16px; background: white; border-radius: 50%; top: 2px; left: 2px; transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.rb-toggle.rb-on::after { left: 18px; }

.rb-modal-save {
  width: 100%; padding: 10px;
  background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
  color: white; border: none; border-radius: 10px;
  font-weight: 700; cursor: pointer; font-size: 0.9rem;
  font-family: var(--font-sans); margin-top: 4px;
  position: sticky; bottom: 0;
  box-shadow: 0 -8px 12px -4px rgba(255,255,255,0.9);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .rb-filter-bar { flex-direction: column; }
  .rb-filter-group { min-width: 100%; }
  .rb-prop-header { flex-direction: column; align-items: flex-start; }
}

/* ── Notes in Room Modal ───────────────────────────────── */
#rb-note-section { margin-top: 14px; }
.rb-note-textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 8px 10px; font-size: 0.82rem;
  font-family: inherit; resize: vertical;
  min-height: 58px; margin-bottom: 8px;
  color: #1a365d; display: block;
}
.rb-note-save-btn {
  display: block; margin-left: auto; margin-bottom: 14px;
  padding: 5px 14px;
  background: transparent; color: #1a365d;
  border: 1.5px solid #1a365d; border-radius: 8px;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.rb-note-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── note_entries (per-entry list with author/date stamp) ── */
#rb-note-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; max-height: 180px; overflow-y: auto; }
.rb-note-entry { display: flex; align-items: flex-start; gap: 6px; padding: 7px 10px; background: var(--gray-100, #f3f4f6); border: 1px solid var(--gray-200, #e5e7eb); border-radius: 6px; font-size: 0.82rem; line-height: 1.4; }
.rb-note-entry-text { flex: 1; word-break: break-word; }
.rb-note-entry-stamp { color: var(--gray-500, #6b7280); font-weight: 600; margin-right: 4px; }
.rb-note-entry-del { flex: 0 0 auto; background: none; border: none; color: var(--gray-500, #6b7280); cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 0 5px; border-radius: 4px; }
.rb-note-entry-del:hover { background: var(--error-bg, #fee2e2); color: var(--error, #991b1b); }
.rb-note-empty { text-align: center; color: var(--gray-500, #6b7280); font-size: 0.78rem; font-style: italic; padding: 8px; }
.rb-note-input-row { display: flex; gap: 6px; }
.rb-note-input { flex: 1; padding: 6px 10px; border: 1px solid var(--gray-300, #d1d5db); border-radius: 6px; font-size: 0.85rem; font-family: inherit; }
.rb-note-input:focus { outline: none; border-color: var(--gold-600, #a07a22); }
.rb-note-add-btn { padding: 6px 14px; background: var(--gold-600, #a07a22); color: var(--white, #fff); border: none; border-radius: 6px; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.rb-note-add-btn:hover { box-shadow: 0 2px 8px rgba(160,122,34,0.25); }
.rb-note-add-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.rb-note-indicator {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.85rem; color: #a07a22; margin-top: 4px;
}

/* ── Room Photos ─────────────────────────────────────────── */
#rb-photo-section { margin-top: 14px; }
.rb-photo-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; min-height: 110px; align-content: flex-start; }

.rb-photo-thumb {
  width: 76px; cursor: pointer;
}
.rb-photo-thumb-img {
  width: 76px; height: 76px; border-radius: 8px;
  border: 0.5px solid #e2e8f0; object-fit: cover;
  background: #f1f5f9;
}
.rb-photo-thumb-label {
  font-size: 0.65rem; color: #475569;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3px;
}
.rb-photo-thumb-date { font-size: 0.6rem; color: #94a3b8; }
.rb-photo-delete {
  color: #dc2626; cursor: pointer; font-size: 0.7rem;
  background: none; border: none; padding: 0; line-height: 1;
}

.rb-photo-add-btn {
  width: 76px; height: 76px; border-radius: 8px;
  border: 1.5px dashed #94a3b8;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; gap: 4px; background: none;
  font-size: 0.62rem; color: #94a3b8;
}

.rb-photo-upload-panel {
  background: #f8fafc; border-radius: 8px;
  padding: 10px; margin-bottom: 10px;
  border: 0.5px solid #e2e8f0;
}
.rb-photo-labels { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rb-photo-label {
  font-size: 0.65rem; padding: 3px 8px; border-radius: 20px;
  border: 0.5px solid #94a3b8; color: #475569; cursor: pointer;
}
.rb-photo-label.selected {
  background: #1a365d; color: white; border-color: #1a365d;
}
.rb-photo-input { display: none; }
.rb-photo-pickers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.rb-photo-pick-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px;
  background: #fff; color: var(--navy-800, #1e3a5f);
  border: 1.5px solid var(--gray-200, #e2e8f0); border-radius: 9px;
  font-size: 0.85rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.rb-photo-pick-btn:hover { border-color: var(--gold-600); color: var(--gold-600); }
.rb-photo-pick-btn:active { transform: scale(0.98); }
.rb-photo-pick-btn svg { flex-shrink: 0; }
.rb-photo-chip {
  display: inline-block;
  padding: 5px 10px;
  background: #ecfdf5; color: #059669;
  border: 1px solid #a7f3d0; border-radius: 6px;
  font-size: 0.78rem; font-weight: 600;
  margin-bottom: 8px; word-break: break-all;
}
.rb-photo-upload-btn {
  width: 100%; padding: 7px; border-radius: 8px;
  background: #1a365d; color: white; border: none;
  font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.rb-photo-upload-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Lightbox ────────────────────────────────────────────── */
.rb-lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.85); z-index: 300;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
}
.rb-lightbox.rb-lightbox-open { display: flex; }
.rb-lightbox-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 420px; padding: 0 12px; box-sizing: border-box;
}
.rb-lightbox-label { font-size: 0.85rem; font-weight: 600; color: #fff; }
.rb-lightbox-meta  { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-left: 10px; }
.rb-lightbox-close { font-size: 1.2rem; color: rgba(255,255,255,0.7); cursor: pointer; background: none; border: none; }
.rb-lightbox-img {
  max-width: 92vw; max-height: 60vh;
  border-radius: 10px; object-fit: contain;
}
.rb-lightbox-nav { display: flex; gap: 16px; align-items: center; }
.rb-lightbox-nav button {
  background: none; border: none; color: rgba(255,255,255,0.7);
  font-size: 0.85rem; cursor: pointer; padding: 4px 8px;
}
.rb-lightbox-counter { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.rb-lightbox-actions { display: flex; gap: 10px; }
.rb-lightbox-drive-btn {
  font-size: 0.75rem; padding: 6px 14px; border-radius: 8px;
  background: transparent; border: 0.5px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8); cursor: pointer;
}
.rb-lightbox-delete-btn {
  font-size: 0.75rem; padding: 6px 14px; border-radius: 8px;
  background: transparent; border: 0.5px solid rgba(220,50,50,0.5);
  color: #f08080; cursor: pointer;
}

/* ============ ROOM BOARD LEGEND ============ */
.rb-legend {
  margin-top: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
}
.rb-legend-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a365d;
  text-align: left;
  transition: background 0.15s;
}
.rb-legend-toggle:hover { background: #f9fafb; }
.rb-legend-chev {
  font-size: 1rem;
  transition: transform 0.2s;
  color: #64748b;
}
.rb-legend-toggle.rb-legend-open .rb-legend-chev { transform: rotate(180deg); }
.rb-legend-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 0 solid transparent;
}
.rb-legend-body.rb-legend-open {
  max-height: 2000px;
  border-top: 1px solid #e5e7eb;
  padding: 20px;
}
.rb-legend-section { margin-bottom: 22px; }
.rb-legend-section:last-child { margin-bottom: 0; }
.rb-legend-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #a07a22;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f2f5;
}
.rb-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px 18px;
}
.rb-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
}
.rb-legend-row b {
  color: #1a365d;
  font-weight: 700;
  min-width: 130px;
  flex-shrink: 0;
}
.rb-legend-row span:last-child {
  flex: 1;
  color: #64748b;
}
.rb-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}


/* Roomboard note indicator SVG — white */
.rb-note-indicator svg {
  color: var(--navy-800);
}
