/* ============================================================
   HospitalitySentry — app.css
   Brand: Dark Green #2D5A1B · Light Brown #C4A882 · Cream #FAF7F2
   ============================================================ */

:root {
  --hs-green:        #2D5A1B;
  --hs-green-dark:   #1e3d12;
  --hs-green-hover:  #3a7022;
  --hs-green-light:  #f0f7ec;
  --hs-brown:        #C4A882;
  --hs-brown-dark:   #a8895e;
  --hs-brown-light:  #faf4ec;
  --hs-cream:        #FAF7F2;
  --hs-sidebar-w:    260px;
  --hs-topbar-h:     56px;

  /* Status colors */
  --status-pending:     #94a3b8;
  --status-inprogress:  #d97706;
  --status-ready:       #2563eb;
  --status-approved:    #16a34a;
  --status-attention:   #dc2626;
  --status-maintenance: #7c3aed;
}

/* ── Base ──────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9rem;
  color: #2d3748;
  background: var(--hs-cream);
}
.tiny { font-size: 0.72rem; }

/* ── Bootstrap overrides ─────────────────────────────────── */
.btn-primary { background: var(--hs-green); border-color: var(--hs-green); }
.btn-primary:hover { background: var(--hs-green-dark); border-color: var(--hs-green-dark); }
.btn-outline-primary { color: var(--hs-green); border-color: var(--hs-green); }
.btn-outline-primary:hover { background: var(--hs-green); border-color: var(--hs-green); color:#fff; }
.bg-primary { background: var(--hs-green) !important; }
.text-primary { color: var(--hs-green) !important; }
.border-primary { border-color: var(--hs-green) !important; }

/* ── Layout ──────────────────────────────────────────────── */
.hs-topbar {
  background: var(--hs-green);
  height: var(--hs-topbar-h);
  position: sticky; top: 0; z-index: 1040;
}
.hs-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────── */
.hs-sidebar {
  width: var(--hs-sidebar-w);
  background: var(--hs-green);
  color: #c8dfc0;
  display: flex;
  flex-direction: column;
  position: fixed; top: 0; left: 0;
  height: 100vh; overflow-y: auto;
  z-index: 1030;
  transition: transform 0.25s ease;
}
.hs-sidebar-brand { background: var(--hs-green-dark); color: #fff; flex-shrink: 0; }
.hs-sidebar-property { color: #c8dfc0; flex-shrink: 0; }
.hs-sidebar-divider { border-color: rgba(255,255,255,0.12); margin: 0.25rem 0; }
.text-muted-sidebar { color: #7aad6a !important; }

.hs-nav .nav-link {
  color: #c8dfc0; border-radius: 6px;
  padding: 0.5rem 0.75rem; font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
}
.hs-nav .nav-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.hs-nav .nav-link.active { background: var(--hs-brown); color: #fff; font-weight: 600; }
.hs-nav-section { color: #7aad6a; font-size: 0.72rem; }
.hs-sidebar-footer { border-top: 1px solid rgba(255,255,255,0.12); flex-shrink: 0; }

/* ── Main ────────────────────────────────────────────────── */
.hs-main { margin-left: var(--hs-sidebar-w); flex: 1; min-width: 0; }
.hs-content { padding: 1.75rem 1.75rem 3rem; max-width: 1280px; }

/* ── Page header ─────────────────────────────────────────── */
.hs-page-title { font-size: 1.6rem; font-weight: 700; color: var(--hs-green); }

/* ── Cards ───────────────────────────────────────────────── */
.hs-card {
  border: 1px solid #e8e0d4;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  background: #fff;
}
.hs-card-header {
  background: #f7f3ee;
  border-bottom: 1px solid #e8e0d4;
  font-weight: 600; color: var(--hs-green);
  font-size: 0.88rem; padding: 0.75rem 1rem;
  border-radius: 10px 10px 0 0 !important;
}

/* ── Room Status Badges ──────────────────────────────────── */
.hs-badge-pending         { background: #e2e8f0; color: #475569; font-size:0.75rem; padding:0.3em 0.6em; border-radius:4px; }
.hs-badge-in_progress     { background: #fef3c7; color: #92400e; font-size:0.75rem; padding:0.3em 0.6em; border-radius:4px; }
.hs-badge-ready_inspect   { background: #dbeafe; color: #1e40af; font-size:0.75rem; padding:0.3em 0.6em; border-radius:4px; }
.hs-badge-approved        { background: #dcfce7; color: #14532d; font-size:0.75rem; padding:0.3em 0.6em; border-radius:4px; }
.hs-badge-needs_attention { background: #fee2e2; color: #991b1b; font-size:0.75rem; padding:0.3em 0.6em; border-radius:4px; }
.hs-badge-maintenance     { background: #ede9fe; color: #4c1d95; font-size:0.75rem; padding:0.3em 0.6em; border-radius:4px; }
.badge.bg-purple          { background: #7c3aed !important; }

/* ── Room Grid Cards ─────────────────────────────────────── */
.hs-room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.hs-room-card {
  border-radius: 10px;
  border: 2px solid #e8e0d4;
  padding: 1rem 0.75rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  background: #fff;
  text-decoration: none;
  display: block;
  color: inherit;
}
.hs-room-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); color: inherit; }

.hs-room-card.status-pending         { border-color: #94a3b8; background: #e2e8f0; color:#475569; border-width:3px; }
.hs-room-card.status-in_progress     { border-color: #f59e0b; background: #fef3c7; color:#92400e; border-width:3px; }
.hs-room-card.status-ready_inspect   { border-color: #2563eb; background: #bfdbfe; color:#1e40af; border-width:3px; }
.hs-room-card.status-approved        { border-color: #16a34a; background: #16a34a; color:#ffffff; border-width:3px; }
.hs-room-card.status-needs_attention { border-color: #ef4444; background: #fef2f2; }
.hs-room-card.status-maintenance     { border-color: #8b5cf6; background: #ede9fe; color:#6b21a8; border-width:3px; }

.hs-room-number {
  font-size: 1.4rem; font-weight: 800;
  color: var(--hs-green); line-height: 1;
}
.hs-room-type { font-size: 0.72rem; color: #64748b; margin-top: 2px; }
.hs-room-hk   { font-size: 0.75rem; color: #475569; margin-top: 6px; }

.hs-room-progress {
  height: 4px; border-radius: 2px;
  background: #e2e8f0; margin-top: 8px; overflow: hidden;
}
.hs-room-progress-bar {
  height: 100%; border-radius: 2px;
  background: var(--hs-green);
  transition: width 0.3s;
}

.hs-rush-indicator {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
}

/* ── Checklist ───────────────────────────────────────────── */
.hs-checklist-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0ebe4;
  transition: background 0.1s;
}
.hs-checklist-item:last-child { border-bottom: none; }
.hs-checklist-item.completed { background: var(--hs-green-light); }
.hs-checklist-item.completed .hs-task-name { text-decoration: line-through; color: #94a3b8; }

.hs-check-circle {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.hs-check-circle.done {
  background: var(--hs-green); border-color: var(--hs-green); color: #fff;
}
.hs-task-name { font-size: 0.9rem; flex-grow: 1; }

.hs-category-header {
  background: var(--hs-brown-light);
  border-left: 3px solid var(--hs-brown);
  padding: 0.4rem 1rem;
  font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--hs-brown-dark);
}

/* ── Progress bar large ──────────────────────────────────── */
.hs-progress-lg {
  height: 12px; border-radius: 6px;
  background: #e8e0d4; overflow: hidden;
}
.hs-progress-lg-bar {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--hs-green), #4a9e2c);
  transition: width 0.4s ease;
}

/* ── Stat cards ──────────────────────────────────────────── */
.hs-stat-card {
  border-radius: 10px; padding: 1.2rem 1rem;
  text-align: center; border: 2px solid transparent;
  transition: transform 0.15s;
}
.hs-stat-card:hover { transform: translateY(-2px); }
.hs-stat-number { font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: 0.25rem; }
.hs-stat-label  { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing:.05em; }

.hs-stat-pending     { background:#f8fafc; border-color:#cbd5e1; color:#475569; }
.hs-stat-progress    { background:#fffbeb; border-color:#fbbf24; color:#92400e; }
.hs-stat-ready       { background:#eff6ff; border-color:#3b82f6; color:#1e40af; }
.hs-stat-approved    { background:#f0fdf4; border-color:#22c55e; color:#14532d; }
.hs-stat-maintenance { background:#f5f3ff; border-color:#8b5cf6; color:#4c1d95; }

/* ── Avatar ──────────────────────────────────────────────── */
.hs-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--hs-brown); color: #fff;
  font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hs-avatar-sm { width: 28px; height: 28px; font-size: 0.72rem; }

/* ── Notes ───────────────────────────────────────────────── */
.hs-note-maint {
  background: #fff7ed;
  border-left: 3px solid #f97316;
}
.hs-note-regular { border-left: 3px solid #e8e0d4; }

/* ── Login ───────────────────────────────────────────────── */
.hs-login-bg {
  background: linear-gradient(135deg, var(--hs-green) 0%, #4a7c2f 60%, #c4a882 100%);
  min-height: 100vh;
}
.hs-login-card {
  background: #fff; border-radius: 16px;
  padding: 2.5rem; width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.hs-login-logo {
  width: 64px; height: 64px;
  background: var(--hs-green); color: var(--hs-brown);
  border-radius: 16px; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}

/* ── Tables ──────────────────────────────────────────────── */
.hs-table thead th {
  background: #f7f3ee; border-bottom: 2px solid #e8e0d4;
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; color: #64748b;
}
.hs-table td { vertical-align: middle; font-size: 0.88rem; }

/* ── Mobile room checklist — BIG tap targets ─────────────── */
.hs-checklist-btn {
  width: 100%; text-align: left;
  padding: 1rem; margin-bottom: 0.5rem;
  border-radius: 10px; border: 2px solid #e8e0d4;
  background: #fff; cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 1rem;
}
.hs-checklist-btn.done {
  background: var(--hs-green-light);
  border-color: var(--hs-green);
  color: var(--hs-green-dark);
}
.hs-checklist-btn .check-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ── Empty state ─────────────────────────────────────────── */
.hs-empty-state { text-align: center; padding: 4rem 2rem; color: #94a3b8; }
.hs-empty-icon  { font-size: 3.5rem; display: block; margin-bottom: 1rem; opacity: 0.25; }

/* ── Floor section header ────────────────────────────────── */
.hs-floor-header {
  background: var(--hs-green);
  color: #fff; padding: 0.5rem 1rem;
  border-radius: 6px; font-weight: 700;
  font-size: 0.85rem; margin-bottom: 0.75rem;
  display: flex; align-items: center; justify-content: space-between;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb { font-size: 0.82rem; }
.breadcrumb-item a { color: var(--hs-brown-dark); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .hs-sidebar {
    transform: translateX(-100%);
    top: var(--hs-topbar-h);
    height: calc(100vh - var(--hs-topbar-h));
  }
  .hs-sidebar.open { transform: translateX(0); }
  .hs-main { margin-left: 0; padding-top: var(--hs-topbar-h); }
  .hs-content { padding: 1rem 0.75rem 3rem; }
  .hs-page-title { font-size: 1.3rem; }
  .hs-room-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .hs-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 1025;
    top: var(--hs-topbar-h);
  }
  .hs-overlay.open { display: block; }
}

@media (max-width: 575.98px) {
  .hs-room-grid { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .hs-room-number { font-size: 1.2rem; }
  .hs-content { padding: 0.75rem 0.5rem 3rem; }
}



/* ── Checklist ───────────────────────────────────────────────── */

.checklist-category { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--hs-brown, #8B6914); padding: 0.75rem 1rem 0.25rem; display: flex; align-items: center; gap: 0.5rem; }

.checklist-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; border-bottom: 1px solid #f0f0f0; transition: background 0.1s; cursor: pointer; }

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

.checklist-item:active { background: #f0f5ee; }

.checklist-item.done { opacity: 0.6; }

.checklist-item.done .task-name { text-decoration: line-through; color: #94a3b8; }

.checklist-checkbox { width: 28px; height: 28px; border-radius: 6px; border: 2px solid #d1d5db; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all 0.15s; background: #fff; }

.checklist-checkbox.checked { background: #1a4731; border-color: #1a4731; }

.checklist-checkbox.checked::after { content: '✓'; color: #fff; font-size: 0.9rem; font-weight: 700; }

.task-name { font-size: 0.95rem; flex-grow: 1; }

.d-contents { display: contents; }

.tiny { font-size: 0.68rem; }

.hs-fab { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 100; }

.hs-fab .btn { border-radius: 50px; padding: 0.75rem 1.5rem; box-shadow: 0 4px 16px rgba(0,0,0,.2); font-weight: 600; }

.hk-room-item { background: #fff; border-radius: 10px; border: 2px solid #e2ead8; margin-bottom: 0.75rem; overflow: hidden; text-decoration: none; color: inherit; display: block; }

.hk-room-number { font-size: 2rem; font-weight: 800; color: #1a4731; line-height: 1; }

.hk-room-meta { font-size: 0.8rem; color: #64748b; }

.hs-status-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }




.hs-room-card.status-clean-maint { border-color: #86efac; background: #dcfce7; color:#166534; border-width:3px; }

