/* ============================================================
   Restaurant Booking Manager Pro – Staff Panel CSS
   ============================================================ */

#rbm-staff-panel {
  display: flex;
  min-height: 100vh;
  background: var(--rbm-bg, #0f1117);
  color: var(--rbm-text, #e8eaf0);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  position: relative;
  margin: 0 -20px; /* bleed past WP content padding */
}

/* ── Sidebar ─────────────────────────────────────────────── */
.rbm-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--rbm-surface, #1a1d27);
  border-right: 1px solid var(--rbm-border, #2e3347);
  display: flex;
  flex-direction: column;
  transition: width .2s ease, min-width .2s ease;
  overflow: hidden;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.rbm-sidebar.collapsed {
  width: 56px;
  min-width: 56px;
}

.rbm-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  border-bottom: 1px solid var(--rbm-border, #2e3347);
  min-height: 60px;
}

.rbm-sidebar-logo { font-size: 20px; flex-shrink: 0; }

.rbm-sidebar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--rbm-accent, #e8a84c);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .15s;
}
.rbm-sidebar.collapsed .rbm-sidebar-title { opacity: 0; width: 0; }

.rbm-sidebar-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--rbm-muted, #8892a4);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: opacity .15s;
}
.rbm-sidebar.collapsed .rbm-sidebar-toggle { opacity: 0; pointer-events: none; }
.rbm-sidebar-toggle:hover { color: var(--rbm-text, #e8eaf0); }

/* Collapsed open button */
.rbm-sidebar-open-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 12px;
  z-index: 200;
  background: var(--rbm-surface, #1a1d27);
  border: 1px solid var(--rbm-border, #2e3347);
  color: var(--rbm-text, #e8eaf0);
  border-radius: 6px;
  width: 36px; height: 36px;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.rbm-sidebar.collapsed ~ .rbm-sidebar-open-btn { display: flex; }

/* Nav items */
.rbm-sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.rbm-sn-divider {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--rbm-muted, #8892a4);
  padding: 12px 8px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity .15s;
}
.rbm-sidebar.collapsed .rbm-sn-divider { opacity: 0; }

.rbm-sn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--rbm-muted, #8892a4);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 2px;
  text-decoration: none;
}
.rbm-sn-item:hover  { background: var(--rbm-surface2, #242736); color: var(--rbm-text, #e8eaf0); }
.rbm-sn-item.active { background: rgba(232,168,76,.12); color: var(--rbm-accent, #e8a84c); }

.rbm-sn-icon  { font-size: 16px; flex-shrink: 0; }
.rbm-sn-label { font-size: 13px; font-weight: 500; transition: opacity .15s; }
.rbm-sidebar.collapsed .rbm-sn-label { opacity: 0; width: 0; }

.rbm-sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--rbm-border, #2e3347);
  font-size: 12px;
  color: var(--rbm-muted, #8892a4);
  overflow: hidden;
}
.rbm-sidebar.collapsed .rbm-sidebar-footer .rbm-sn-label { opacity: 0; width: 0; }

/* ── Main Panel ──────────────────────────────────────────── */
.rbm-panel-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 24px;
}

.rbm-panel { display: none; }
.rbm-panel.active { display: block; }

.rbm-panel-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.rbm-panel-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--rbm-text, #e8eaf0);
}

/* ── FOH Two-column layout ───────────────────────────────── */
.rbm-foh-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .rbm-foh-layout { grid-template-columns: 1fr; }
  .rbm-foh-right  { order: -1; }
}

/* ── Upcoming bookings list ──────────────────────────────── */
.rbm-upcoming-item {
  padding: 12px;
  border-bottom: 1px solid var(--rbm-border, #2e3347);
  cursor: pointer;
  transition: background .15s;
}
.rbm-upcoming-item:hover { background: rgba(255,255,255,.03); }
.rbm-upcoming-item:last-child { border-bottom: none; }
.rbm-upcoming-time {
  font-size: 15px;
  font-weight: 700;
  color: var(--rbm-accent, #e8a84c);
}
.rbm-upcoming-name { font-size: 13px; font-weight: 600; margin-top: 2px; }
.rbm-upcoming-meta { font-size: 11px; color: var(--rbm-muted, #8892a4); margin-top: 2px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  #rbm-staff-panel { flex-direction: column; margin: 0 -15px; }
  .rbm-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    height: auto;
    position: relative;
  }
  .rbm-sidebar.collapsed { height: 56px; }
  .rbm-sidebar-nav,
  .rbm-sidebar-footer { display: none; }
  .rbm-sidebar.collapsed .rbm-sidebar-nav,
  .rbm-sidebar.collapsed .rbm-sidebar-footer { display: none; }
  .rbm-sidebar:not(.collapsed) .rbm-sidebar-nav,
  .rbm-sidebar:not(.collapsed) .rbm-sidebar-footer { display: flex; flex-direction: column; }
  .rbm-panel-main { padding: 16px; }
  .rbm-sidebar-open-btn { display: none !important; }
  .rbm-sidebar-toggle { opacity: 1 !important; pointer-events: auto !important; }
}

/* ── Ensure admin CSS vars work on frontend ──────────────── */
#rbm-staff-panel *,
#rbm-staff-panel *::before,
#rbm-staff-panel *::after { box-sizing: border-box; }
