/* ============================================================
   Hotel Manager — Dark Theme
   ============================================================ */

:root {
  --bg-base:      #0D0F18;
  --bg-card:      #141728;
  --bg-sidebar:   #0A0C14;
  --border:       #1E2035;
  --text-primary: #E2E2DC;
  --text-muted:   #52546A;
  --gold:         #C9A84C;
  --red:          #E85D5D;
  --blue:         #5A9BE8;
  --green:        #10B981;
  --orange:       #F59E0B;
  --sidebar-w:    240px;
  --topbar-h:     60px;
  --radius:       10px;
  --transition:   0.18s ease;
}

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

body.hm-page {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────────── */
.hm-wrap {
  display: flex;
  min-height: 100vh;
}

.hm-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 24px) 28px 40px;
  min-width: 0;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.hm-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--transition);
}

.hm-sidebar__logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.hm-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.hm-logo-accent { color: var(--gold); }

.hm-nav {
  list-style: none;
  padding: 12px 0;
  flex: 1;
  overflow-y: auto;
}

.hm-nav__item { border-left: 3px solid transparent; }
.hm-nav__item.active { border-left-color: var(--gold); background: rgba(201,168,76,.07); }
.hm-nav__item.active .hm-nav__link { color: var(--gold); }

.hm-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.hm-nav__link:hover { color: var(--text-primary); }
.hm-nav__icon { font-style: normal; width: 20px; text-align: center; font-size: 15px; }

.hm-sidebar__footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hm-user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.hm-user-info__text { display: flex; flex-direction: column; min-width: 0; }
.hm-user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-user-role { font-size: 11px; color: var(--text-muted); }

.hm-logout-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 16px;
  padding: 6px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.hm-logout-btn:hover { color: var(--red); background: rgba(232,93,93,.1); }

.hm-hamburger {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 300;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
}

/* ── Topbar ─────────────────────────────────────────────────── */
.hm-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
  gap: 12px;
}

.hm-topbar__title { font-size: 18px; font-weight: 700; }
.hm-topbar__date  { font-size: 13px; color: var(--text-muted); }

/* ── Avatar ─────────────────────────────────────────────────── */
.hm-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.hm-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.hm-btn--primary { background: var(--gold); color: #0D0F18; border-color: var(--gold); }
.hm-btn--primary:hover { filter: brightness(1.1); }
.hm-btn--success { background: var(--green); color: #0D0F18; border-color: var(--green); }
.hm-btn--success:hover { filter: brightness(1.1); }
.hm-btn--danger  { background: transparent; color: var(--red); border-color: var(--red); }
.hm-btn--danger:hover { background: rgba(232,93,93,.12); }
.hm-btn--ghost   { background: transparent; color: var(--text-muted); border-color: var(--border); }
.hm-btn--ghost:hover { color: var(--text-primary); border-color: var(--text-muted); }
.hm-btn--menage  { font-size: 12px; padding: 5px 10px; }

/* ── Stats grid ─────────────────────────────────────────────── */
.hm-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.hm-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hm-stat-card__value { font-size: 36px; font-weight: 800; line-height: 1; }
.hm-stat-card__label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.hm-stat-card--red    .hm-stat-card__value { color: var(--red); }
.hm-stat-card--blue   .hm-stat-card__value { color: var(--blue); }
.hm-stat-card--orange .hm-stat-card__value { color: var(--orange); }
.hm-stat-card--green  .hm-stat-card__value { color: var(--green); }

/* ── Teams grid ─────────────────────────────────────────────── */
.hm-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.hm-team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--team-color, var(--gold));
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--transition);
}
.hm-team-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.4); }

.hm-team-card__header { display: flex; align-items: center; gap: 8px; }
.hm-team-card__members { margin-left: auto; font-size: 11px; color: var(--text-muted); }
.hm-team-card__stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.hm-team-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Progress bar ─────────────────────────────────────────────── */
.hm-progress {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.hm-progress--labeled { height: 8px; border-radius: 4px; }
.hm-progress--sm { height: 4px; }
.hm-progress__bar {
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
}
.hm-progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.hm-progress-wrap .hm-progress { flex: 1; }
.hm-progress-label, .hm-progress__label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ── Rooms grid ─────────────────────────────────────────────── */
.hm-floor-section { margin-bottom: 32px; }
.hm-floor-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.hm-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.hm-rooms-grid--equipe { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.hm-room-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.hm-room-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.5); }
.hm-room-card.hm-status-depart  { border-top: 3px solid var(--red); }
.hm-room-card.hm-status-arrivee { border-top: 3px solid var(--blue); }
.hm-room-card.hm-status-occupe  { border-top: 3px solid var(--gold); }
.hm-room-card.hm-status-libre   { border-top: 3px solid var(--text-muted); }

.hm-room-flag {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(232,93,93,.15);
  color: var(--orange);
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(232,93,93,.3);
}
.hm-room-flag--attention {
  font-size: 12px;
  font-weight: 600;
  background: rgba(245,158,11,.12);
  color: var(--orange);
  border-color: rgba(245,158,11,.3);
}

.hm-room-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.hm-room-number { font-size: 22px; font-weight: 800; line-height: 1; }
.hm-room-card__body { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.hm-room-card__footer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }

.hm-room-validated { font-size: 11px; color: var(--green); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.hm-room-validated svg { width: 11px; height: 11px; }
.hm-room-team      { font-size: 11px; font-weight: 600; }

/* ── Status badges ─────────────────────────────────────────────── */
.hm-room-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.hm-room-status-badge--depart  { background: rgba(232,93,93,.15);  color: var(--red);        }
.hm-room-status-badge--arrivee { background: rgba(90,155,232,.15); color: var(--blue);       }
.hm-room-status-badge--occupe  { background: rgba(201,168,76,.15); color: var(--gold);       }
.hm-room-status-badge--libre   { background: rgba(107,114,128,.15); color: #9CA3AF;          }

.hm-menage-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
}
.hm-menage-badge--a-faire  { background: rgba(232,93,93,.15);  color: var(--red);    }
.hm-menage-badge--en-cours { background: rgba(245,158,11,.15); color: var(--orange); }
.hm-menage-badge--fait     { background: rgba(16,185,129,.15); color: var(--green);  }

.hm-role-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: rgba(255,255,255,.06); }
.hm-role-badge--administrator { background: rgba(201,168,76,.15); color: var(--gold); }
.hm-role-badge--hm_gouvernant { background: rgba(90,155,232,.15); color: var(--blue); }
.hm-role-badge--hm_equipe     { background: rgba(16,185,129,.15); color: var(--green); }

/* ── Filters ─────────────────────────────────────────────────── */
.hm-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.hm-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hm-filter-btn:hover, .hm-filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,168,76,.08);
}
.hm-badge {
  background: var(--border);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
}

/* ── Team tabs ─────────────────────────────────────────────────── */
.hm-team-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.hm-team-tab {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hm-team-tab.active,
.hm-team-tab:hover {
  border-color: var(--team-color, var(--gold));
  color: var(--team-color, var(--gold));
  background: rgba(255,255,255,.04);
}

.hm-tasks-panel { display: none; }
.hm-tasks-panel.active { display: block; }

/* ── Task list ─────────────────────────────────────────────────── */
.hm-task-list { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.hm-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: opacity var(--transition);
}
.hm-task-item.is-done { opacity: .5; }
.hm-task-item.is-done .hm-task-text { text-decoration: line-through; color: var(--text-muted); }

.hm-task-toggle {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  color: var(--green);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.hm-task-item.is-done .hm-task-toggle { border-color: var(--green); background: rgba(16,185,129,.15); }
.hm-task-toggle:hover { border-color: var(--green); }

.hm-task-text { flex: 1; }
.hm-task-done-by { font-size: 11px; color: var(--text-muted); }
.hm-task-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
}
.hm-task-item:hover .hm-task-delete { opacity: 1; }
.hm-task-delete:hover { color: var(--red); }
.hm-task-empty { color: var(--text-muted); font-style: italic; padding: 10px 0; }

.hm-tasks-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hm-tasks-header .hm-progress { flex: 1; }
.hm-tasks-progress-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ── Form inline (add task) ─────────────────────────────────────── */
.hm-form-inline { display: flex; gap: 8px; align-items: stretch; }
.hm-form-inline .hm-input { flex: 1; }

/* ── Forms ─────────────────────────────────────────────────────── */
.hm-form { display: flex; flex-direction: column; gap: 14px; }
.hm-form-group { display: flex; flex-direction: column; gap: 5px; }
.hm-form-group label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
.hm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hm-form-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

.hm-input {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 14px;
  width: 100%;
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.hm-input:focus { border-color: var(--gold); }
.hm-input option { background: var(--bg-card); }
select.hm-input[multiple] { padding: 4px; }
select.hm-input[multiple] option { padding: 5px 8px; border-radius: 4px; }
textarea.hm-input { resize: vertical; min-height: 70px; }
.hm-hint { font-size: 11px; color: var(--text-muted); }

/* ── Table ─────────────────────────────────────────────────────── */
.hm-table-wrap { overflow-x: auto; }
.hm-table { width: 100%; border-collapse: collapse; }
.hm-table th, .hm-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.hm-table th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); background: var(--bg-card); }
.hm-table tr:hover td { background: rgba(255,255,255,.02); }
.hm-table td { display: table-cell; align-items: center; gap: 8px; }

/* ── Team row ─────────────────────────────────────────────────── */
.hm-team-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}
.hm-team-row__color   { width: 4px; min-height: 48px; border-radius: 3px; flex-shrink: 0; align-self: stretch; }
.hm-team-row__info    { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hm-team-row__headline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-team-row__name    { font-weight: 700; font-size: 15px; white-space: nowrap; }
.hm-team-row__members { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.hm-team-row__right   { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.hm-team-row__stats   { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.hm-team-row__actions { display: flex; gap: 6px; }
.hm-team-row .hm-progress { width: 140px; }

/* ── Alerts ─────────────────────────────────────────────────────── */
.hm-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.hm-alert--warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: var(--orange); }
.hm-alert--danger  { background: rgba(232,93,93,.1); border: 1px solid rgba(232,93,93,.3); color: var(--red); }
.hm-alert--info    { background: rgba(90,155,232,.1); border: 1px solid rgba(90,155,232,.3); color: var(--blue); }

/* ── Color palette ─────────────────────────────────────────────── */
.hm-color-palette { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.hm-color-swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}
.hm-color-swatch:hover     { transform: scale(1.15); }
.hm-color-swatch.selected  { border-color: #fff; transform: scale(1.1); }

/* ── Team badge ─────────────────────────────────────────────────── */
.hm-team-badge {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: .3px;
}

/* ── Side panel ─────────────────────────────────────────────────── */
.hm-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 400;
  backdrop-filter: blur(2px);
}
.hm-panel-overlay.active { display: block; }

.hm-panel {
  position: fixed;
  top: 0; right: -420px;
  width: 420px; height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 401;
  display: flex;
  flex-direction: column;
  transition: right 0.25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.hm-panel.open { right: 0; }

.hm-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.hm-panel__header h2 { font-size: 16px; font-weight: 700; }
.hm-panel__close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: color var(--transition);
}
.hm-panel__close:hover { color: var(--text-primary); }

.hm-panel__tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.hm-tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.hm-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.hm-panel__content { flex: 1; overflow-y: auto; padding: 16px 20px; }
.hm-tab-content { display: none; }
.hm-tab-content.active { display: block; }

/* ── Annotations ─────────────────────────────────────────────────── */
.hm-annotations-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.hm-annotation-item {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.hm-annotation-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.hm-annotation-author { font-size: 11px; font-weight: 700; color: var(--gold); }
.hm-annotation-time   { font-size: 10px; color: var(--text-muted); }
.hm-annotation-text   { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.hm-annotation-form   { margin-top: 8px; }

/* ── Modal ─────────────────────────────────────────────────────── */
.hm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.hm-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 480px;
  max-width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: hm-modal-in .18s ease;
}
@keyframes hm-modal-in { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hm-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.hm-modal__header h3 { font-size: 16px; font-weight: 700; }
.hm-modal__close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.hm-modal__close:hover { color: var(--text-primary); }
.hm-modal .hm-form { padding: 20px; }

/* ── Notifications bell ─────────────────────────────────────────── */
.hm-notif-bell {
  position: relative;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 18px;
  border: none;
  background: transparent;
  transition: color var(--transition);
}
.hm-notif-bell:hover { color: var(--text-primary); }
.hm-notif-count {
  position: absolute;
  top: 0; right: 0;
  width: 16px; height: 16px;
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(30%, -30%);
}

.hm-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  z-index: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  overflow: hidden;
  display: none;
}
.hm-notif-dropdown.open { display: block; }
.hm-notif-dropdown__header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}
.hm-notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.hm-notif-item:hover { background: rgba(255,255,255,.03); }
.hm-notif-item.unread { border-left: 3px solid var(--orange); }
.hm-notif-item__room { font-weight: 700; color: var(--orange); margin-bottom: 2px; }
.hm-notif-item__text { color: var(--text-muted); }
.hm-notif-empty { padding: 16px; text-align: center; color: var(--text-muted); font-size: 12px; }

/* ── Section title ─────────────────────────────────────────────── */
.hm-section-title { font-size: 14px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }

/* ── Misc ─────────────────────────────────────────────────────── */
.hm-text-green { color: var(--green); }
.hm-text-muted { color: var(--text-muted); }
.hm-empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ── Toast ─────────────────────────────────────────────────────── */
#hm-toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}
.hm-toast {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  min-width: 220px;
  animation: hm-toast-in .2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.hm-toast--success { background: var(--green); color: #fff; }
.hm-toast--error   { background: var(--red);   color: #fff; }
.hm-toast--info    { background: var(--blue);  color: #fff; }
@keyframes hm-toast-in { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.hm-toast.fadeout { animation: hm-toast-out .3s ease forwards; }
@keyframes hm-toast-out { to { transform: translateX(100px); opacity: 0; } }

/* ── Login page ─────────────────────────────────────────────────── */
body.login {
  background: linear-gradient(135deg, #0A0C14 0%, #141728 60%, #0D0F18 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
body.login #login {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 12px 48px rgba(0,0,0,.6);
  width: 380px;
  max-width: 96vw;
}
body.login h1 a {
  background-image: none !important;
  text-indent: 0 !important;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  height: auto;
  line-height: 1.2;
  display: block;
  text-align: center;
  margin-bottom: 4px;
}
body.login h1 a::before { content: 'Hotel'; color: var(--text-primary); }
body.login h1 a::after  { content: 'Manager'; color: var(--gold); display: block; margin-top: -2px; }
body.login form { margin-top: 0; }
body.login label { color: var(--text-muted) !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: .4px; }
body.login input[type=text],
body.login input[type=password] {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  box-shadow: none !important;
  transition: border-color var(--transition);
  width: 100% !important;
  margin-bottom: 4px;
}
body.login input[type=text]:focus,
body.login input[type=password]:focus {
  border-color: var(--gold) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(201,168,76,.2) !important;
}
body.login input[type=submit] {
  background: var(--gold) !important;
  border: none !important;
  border-radius: 8px !important;
  color: #0D0F18 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 10px !important;
  width: 100% !important;
  cursor: pointer;
  transition: filter var(--transition);
  box-shadow: none !important;
  text-shadow: none !important;
  letter-spacing: .3px;
}
body.login input[type=submit]:hover { filter: brightness(1.1); }
body.login .message, body.login .notice, body.login #login_error {
  background: rgba(232,93,93,.08) !important;
  border-left-color: var(--red) !important;
  color: var(--red) !important;
  border-radius: 6px;
  box-shadow: none !important;
}
body.login #nav a, body.login #backtoblog a { color: var(--text-muted) !important; font-size: 12px; }
body.login #nav a:hover, body.login #backtoblog a:hover { color: var(--gold) !important; }
#login_error a { color: var(--red) !important; }

/* ── Responsive ─────────────────────────────────────────────────── */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  :root { --sidebar-w: 200px; }
  .hm-rooms-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  :root { --sidebar-w: 240px; }

  /* Sidebar: slide in */
  .hm-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w);
    z-index: 250;
    transition: transform .25s cubic-bezier(.4,0,.2,1);
  }
  .hm-sidebar.open { transform: translateX(0); }

  /* Overlay when sidebar open */
  .hm-sidebar.open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: -1;
  }

  .hm-hamburger { display: flex; }

  /* Main content full width */
  .hm-main {
    margin-left: 0;
    padding: calc(var(--topbar-h) + 16px) 14px 40px;
  }

  /* Topbar */
  .hm-topbar {
    left: 0;
    padding: 0 14px 0 58px;
    gap: 8px;
  }
  .hm-topbar__title { font-size: 16px; }
  .hm-topbar__date  { display: none; }

  /* Stats */
  .hm-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hm-stat-card  { padding: 14px; }
  .hm-stat-card__value { font-size: 28px; }

  /* Teams grid */
  .hm-teams-grid { grid-template-columns: 1fr; }

  /* Rooms grid */
  .hm-rooms-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .hm-room-number { font-size: 18px; }
  .hm-room-card   { padding: 10px; }

  /* Building tabs: scrollable */
  .hm-building-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; gap: 0; }
  .hm-building-tab  { padding: 10px 20px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }

  /* Filters: scrollable */
  .hm-filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .hm-filter-btn { white-space: nowrap; flex-shrink: 0; }

  /* Panel: full screen */
  .hm-panel { width: 100%; right: -100%; }
  .hm-panel__content { padding: 14px 16px; }

  /* Forms */
  .hm-form-row { grid-template-columns: 1fr; }

  /* Team rows */
  .hm-team-row { flex-wrap: wrap; gap: 10px; }
  .hm-team-row__right { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; }
  .hm-team-row .hm-progress { width: 100%; }
  .hm-team-row__stats { flex-wrap: wrap; gap: 8px; }
  .hm-team-row__actions { margin-left: auto; }

  /* Modal */
  .hm-modal { width: calc(100vw - 20px); max-height: 95vh; border-radius: 10px; }

  /* Table: scroll */
  .hm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hm-table { min-width: 500px; }

  /* Toast: bottom full width on mobile */
  #hm-toast-container {
    bottom: 16px; right: 10px; left: 10px;
  }
  .hm-toast { min-width: 0; width: 100%; }

  /* Notification dropdown */
  .hm-notif-dropdown { width: calc(100vw - 28px); right: -60px; }

  /* Building checkboxes stack */
  .hm-building-checkboxes { flex-direction: column; gap: 10px; }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .hm-main { padding: calc(var(--topbar-h) + 12px) 10px 30px; }
  .hm-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .hm-stat-card__value { font-size: 24px; }
  .hm-rooms-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
  .hm-room-card  { padding: 8px; gap: 6px; }
  .hm-room-number { font-size: 16px; }
  .hm-topbar { padding: 0 8px 0 52px; }
  .hm-section-title { font-size: 12px; }
  .hm-btn { padding: 6px 10px; font-size: 12px; }
  .hm-btn--primary, .hm-btn--ghost { font-size: 12px; }
  .hm-building-tab { padding: 8px 14px; font-size: 12px; }
  .hm-filter-btn { padding: 5px 10px; font-size: 12px; }
  .hm-validate-row { flex-wrap: wrap; gap: 6px; }
  .hm-task-item { padding: 8px 10px; gap: 8px; }
}

/* ── Form section titles ─────────────────────────────────────────────────── */
.hm-form-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin: 14px 0 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.hm-form-section-title:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* ── Room dates ──────────────────────────────────────────────────────────── */
.hm-room-card__dates {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hm-date {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.hm-date--in  { background: rgba(90,155,232,.15); color: var(--blue); }
.hm-date--out { background: rgba(232,93,93,.15);  color: var(--red); }

/* ── Room delete button ──────────────────────────────────────────────────── */
.hm-room-card { overflow: visible; }
.hm-room-delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition), border-color var(--transition);
  z-index: 10;
}
.hm-room-card:hover .hm-room-delete-btn { opacity: 1; }
.hm-room-delete-btn:hover {
  color: var(--red);
  border-color: var(--red);
  background: rgba(232,93,93,.1);
}

/* ── Panel delete button in header ──────────────────────────────────────── */
#hm-panel-delete-btn { font-size: 12px; padding: 5px 10px; }

/* ── Notification dropdown position ─────────────────────────────────────── */
#hm-notif-dropdown { right: 0; }

/* ── SVG icon sizing ─────────────────────────────────────────────────────── */
.hm-nav__icon { display: flex; align-items: center; justify-content: center; }
.hm-nav__icon svg { width: 16px; height: 16px; display: block; flex-shrink: 0; }

.hm-logout-btn { display: flex; align-items: center; justify-content: center; }
.hm-logout-btn svg { width: 16px; height: 16px; display: block; }

.hm-hamburger svg { width: 20px; height: 20px; display: block; }

.hm-panel__close { display: flex; align-items: center; justify-content: center; line-height: 1; }
.hm-panel__close svg { width: 16px; height: 16px; display: block; }

.hm-modal__close { display: flex; align-items: center; justify-content: center; }
.hm-modal__close svg { width: 16px; height: 16px; display: block; }

.hm-task-toggle svg { width: 11px; height: 11px; display: block; }
.hm-task-delete svg  { width: 13px; height: 13px; display: block; }
.hm-room-delete-btn svg { width: 11px; height: 11px; display: block; }

.hm-alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.hm-room-flag svg { width: 14px; height: 14px; display: block; }

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

/* ── Task toggle SVG state ───────────────────────────────────────────────── */
.hm-task-toggle--done {
  border-color: var(--green);
  background: rgba(16,185,129,.15);
  color: var(--green);
}

/* ── Section title with icon ─────────────────────────────────────────────── */
.hm-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}
.hm-section-title svg { width: 16px; height: 16px; flex-shrink: 0; }
.hm-badge--orange {
  background: rgba(245,158,11,.2);
  color: var(--orange);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

/* ── Validation overview (dashboard) ────────────────────────────────────── */
.hm-all-validated {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
.hm-all-validated svg { width: 16px; height: 16px; flex-shrink: 0; }

.hm-validate-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.hm-validate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--orange);
  border-radius: 8px;
  flex-wrap: wrap;
}
.hm-validate-room  { font-weight: 700; font-size: 14px; min-width: 80px; }
.hm-validate-floor { font-size: 12px; color: var(--text-muted); }
.hm-validate-team  { font-size: 12px; font-weight: 600; }

.hm-btn--xs { font-size: 11px; padding: 3px 8px; border-radius: 5px; margin-left: auto; }
.hm-btn--xs svg { width: 12px; height: 12px; }

/* ── Team card tasks section (dashboard) ─────────────────────────────────── */
.hm-team-card__tasks {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.hm-team-card__tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hm-task-ratio { font-size: 12px; color: var(--text-muted); }
.hm-team-tasks-mini {
  list-style: none;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hm-team-tasks-mini li {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 0;
  padding-left: 10px;
  position: relative;
}
.hm-team-tasks-mini li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* ── Building badges (team row) ─────────────────────────────────────── */
.hm-team-building-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.hm-building-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(201,168,76,.15);
  color: var(--gold);
  letter-spacing: .3px;
}

/* ── Building checkboxes (team form) ────────────────────────────────── */
.hm-building-checkboxes { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 4px; }
.hm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}
.hm-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ── Building tabs ─────────────────────────────────────────────────── */
.hm-building-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.hm-building-tab {
  padding: 11px 28px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .3px;
  margin-bottom: -2px;
}
.hm-building-tab:hover { color: var(--text); }
.hm-building-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.hm-building-section { min-height: 60px; }

