/* === FALUB — layout.css === */

/* ── TOPBAR ─────────────────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #B8001A;
  background: linear-gradient(135deg, #C8001F 0%, #A0001A 100%);
  box-shadow: 0 2px 16px rgba(0,0,0,0.22);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* ---- Nav central ---- */
.topbar-nav {
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.20);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px;
  padding: 3px;
}

.tab-btn {
  padding: 6px 22px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.18s;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
}

.tab-btn:hover:not(.active) {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}

/* ---- Carrinho ---- */
.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s;
}

.cart-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
}

.cart-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: #ffffff;
  color: var(--accent);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
}

/* ---- Direita da topbar ---- */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.92);
  font-size: 13px;
  font-weight: 600;
}

.role-badge {
  padding: 2px 9px;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.logout-btn {
  padding: 6px 14px;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.18s;
}

.logout-btn:hover {
  background: rgba(0,0,0,0.30);
  color: #fff;
  border-color: rgba(255,255,255,0.38);
}

/* ── SELETOR DE LOJA (TOPBAR) ────────────────────────────────────────── */
.select-loja-topbar {
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  max-width: 180px;
}

.select-loja-topbar option {
  background: #fff;
  color: var(--text);
}

.loja-badge-wrap { display: flex; align-items: center; }

.loja-badge {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  padding: 4px 10px;
  background: rgba(0,0,0,0.16);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── PÁGINAS ─────────────────────────────────────────────────────────── */
.page {
  display: none;
  padding-top: var(--topbar-h);
  min-height: 100vh;
}

.page.active { display: block; }

/* ── ADMIN LAYOUT ────────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--topbar-h));
}

/* ---- Sidebar ---- */
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}

.sidebar-brand {
  padding: 0 18px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-item:hover {
  background: var(--surface2);
  color: var(--text);
}

.sidebar-item.active {
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-item .icon { font-size: 16px; }

/* ---- Conteúdo principal ---- */
.admin-main {
  padding: 32px 36px;
  overflow-y: auto;
  background: var(--bg);
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.1px;
  color: var(--text);
}

.table-section-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text3);
  text-transform: uppercase;
  margin-bottom: 14px;
}
