/* ═══════════════════════════════════════════════════
   RESTAURANT v4.0 — Sidebar + sub-tab layout
   ═══════════════════════════════════════════════════ */

/* ── Restaurant biz mode: hide app sidebar ───────── */
body.rest-biz-mode #sidebar           { display: none !important; }
body.rest-biz-mode .main-content      { margin-left: 0 !important; }
body.rest-biz-mode .page-container    { padding: 0 !important; }
body.rest-biz-mode .bottom-nav-web    { display: none !important; }
body.rest-biz-mode .mobile-header     { display: none !important; }

/* ── Main layout ─────────────────────────────────── */
.rest3-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar — mirrors .sidebar exactly ──────────── */
.rest3-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  position: relative;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

/* Brand — mirrors .sidebar-logo */
.rest3-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 18px var(--space-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rest3-brand__icon {
  width: 34px; height: 34px;
  background: var(--grad);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.rest3-brand__name {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 800;
  color: var(--text);
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rest3-brand__tag {
  font-size: 9px; font-weight: 800;
  letter-spacing: .1em;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 2px;
}

/* Nav list */
.rest3-nav {
  flex: 1;
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Nav item — mirrors .nav-item */
.rest3-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 10px var(--space-4);
  border-radius: var(--radius-md);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  font-family: var(--font-body);
  text-align: left;
  transition: background .12s, color .12s;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.rest3-nav-item:hover {
  background: var(--surface-2);
  color: var(--text-2);
}
.rest3-nav-item.active {
  background: rgba(138,100,255,.1);
  color: var(--text);
  font-weight: 600;
}
.rest3-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--violet);
  border-radius: 0 3px 3px 0;
}
.rest3-nav-item__icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  line-height: 1;
}
.rest3-nav-item__label {
  flex: 1;
  font-size: 13px;
}
.rest3-nav-item__arrow {
  font-size: 16px;
  color: var(--text-4);
  margin-left: auto;
  line-height: 1;
}

/* Administration pinned at bottom */
.rest3-nav-admin {
  padding: var(--space-2);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Footer clock — mirrors .sidebar-footer */
.rest3-footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.rest3-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: rest3-pulse 2.5s ease-in-out infinite;
}
@keyframes rest3-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}
.rest3-clock {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-3);
}

/* ── Right side ──────────────────────────────────── */
.rest3-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--bg);
}

/* Sub-tabs — mirrors .hotel-tabs */
.rest3-subtabs {
  display: flex;
  gap: 6px;
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.rest3-subtabs::-webkit-scrollbar { display: none; }

.rest3-subtab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  font-family: var(--font-body);
  flex-shrink: 0;
}
.rest3-subtab:hover {
  border-color: var(--border-3);
  color: var(--text-2);
}
.rest3-subtab.active {
  background: rgba(138,100,255,.15);
  border-color: var(--violet);
  color: var(--violet);
}

/* Body — scrollable content */
.rest3-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-5) var(--space-6);
}

/* Loading */
.rest3-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
}
.rest3-spinner {
  width: 28px; height: 28px;
  border: 2.5px solid var(--border-2);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: rest3-spin .55s linear infinite;
}
@keyframes rest3-spin { to { transform: rotate(360deg); } }

/* ── Light theme fixes ───────────────────────────── */
[data-theme="light"] .rest3-nav-item:hover { background: rgba(0,0,0,.04); }
[data-theme="light"] .rest3-nav-item.active { background: rgba(138,100,255,.1); }
[data-theme="light"] .rest3-subtab { background: rgba(0,0,0,.04); }
[data-theme="light"] .rest3-subtab:hover { background: rgba(0,0,0,.07); }
[data-theme="light"] .rest3-subtab.active { background: rgba(138,100,255,.12); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .rest3-sidebar { display: none; }
  .rest3-body { padding: var(--space-4); }
  body.rest-biz-mode .mobile-header { display: flex !important; }
}
