/* ====================================================================
   PBI Service-like shell
   Replica del header + sub-tabs + sidebar de Power BI Service.
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lobster&family=Pacifico&display=swap');

:root {
  --pbi-red:        #c8102e;  /* rojo institucional Pingüino (saturado tipo PBI Service) */
  --pbi-red-dark:   #a71d20;
  --pbi-subbar:     #3b3b3b;
  --pbi-sidebar-bg: #1f1f1f;
  --pbi-sidebar-hover: rgba(255,255,255,0.06);
  --pbi-sidebar-active: rgba(255,255,255,0.10);
  --pbi-text-light: #e0e0e0;
}

/* ---- Top bar ---- */
.pbi-topbar {
  background: var(--pbi-red);
  color: #fff;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 12px;
  gap: 4px;
  font-family: 'Segoe UI', Segoe, Tahoma, sans-serif;
}
.pbi-icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  cursor: pointer;
  border-radius: 2px;
}
.pbi-icon-btn:hover { background: rgba(255,255,255,0.14); }
.pbi-icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

.pbi-logo-text {
  font-family: 'Lobster', 'Pacifico', 'Segoe Script', 'Brush Script MT', cursive;
  font-size: 28px;
  font-weight: 400;
  color: #fff;
  margin: 0 12px 0 8px;
  line-height: 1;
  position: relative;
  top: -1px;
  letter-spacing: 0.5px;
}
/* Logo como imagen: filter blanquea el logo rojo del cliente sobre el header rojo */
.pbi-logo-img {
  height: 26px;
  width: auto;
  margin: 0 14px 0 10px;
  display: block;
  /* convierte el rojo institucional del PNG en blanco */
  filter: brightness(0) invert(1);
}

.pbi-bread {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
}
.pbi-bread:hover { background: rgba(255,255,255,0.12); }
.pbi-bread .pbi-bread-icon { font-size: 13px; }
.pbi-bread .pbi-bread-arrow { font-size: 9px; opacity: 0.9; }

.pbi-bread-sep {
  width: 1px; height: 18px; background: rgba(255,255,255,0.3); margin: 0 4px;
}

.pbi-search {
  flex: 1;
  max-width: 660px;
  margin: 0 14px 0 auto;
  background: rgba(255,255,255,0.22);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  height: 30px;
}
.pbi-search:focus-within { background: #fff; }
.pbi-search:focus-within .pbi-search-icon { color: #666; }
.pbi-search:focus-within input { color: #333; }
.pbi-search:focus-within input::placeholder { color: #999; }
.pbi-search-icon { color: #fff; font-size: 13px; margin-right: 6px; }
.pbi-search input {
  border: none;
  background: transparent;
  outline: none;
  color: #fff;
  height: 100%;
  width: 100%;
  font-size: 13px;
  font-family: inherit;
}
.pbi-search input::placeholder { color: rgba(255,255,255,0.85); }

.pbi-topbar-right { display: flex; align-items: center; gap: 0; margin-left: auto; }

.pbi-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #f4d03f;
  color: #5d4108;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  margin-left: 6px;
}

/* ---- Sub bar (tabs + actions) ---- */
.pbi-subbar {
  background: var(--pbi-subbar);
  color: #fff;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  font-family: 'Segoe UI', Segoe, Tahoma, sans-serif;
}
.pbi-subtab {
  padding: 8px 12px;
  font-size: 13px;
  color: #fff;
  cursor: pointer;
  position: relative;
  height: 36px;
  display: flex; align-items: center;
}
.pbi-subtab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 2px;
  background: #fff;
}
.pbi-subtab:not(.active) { opacity: 0.7; }
.pbi-subtab:hover { opacity: 1; }

.pbi-subbar-divider {
  width: 1px; height: 20px; background: rgba(255,255,255,0.18); margin: 0 12px;
}
.pbi-subbar-spacer { flex: 1; }
.pbi-subbar-actions { display: flex; align-items: center; gap: 0; }
.pbi-subbar-action {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  border-radius: 2px;
  font-family: inherit;
}
.pbi-subbar-action:hover { background: rgba(255,255,255,0.10); }
.pbi-subbar-action-icon { font-size: 13px; }

/* ---- Sidebar ---- */
.pbi-sidebar {
  background: var(--pbi-sidebar-bg);
  color: var(--pbi-text-light);
  width: 240px;
  flex-shrink: 0;
  transition: width 0.2s ease;
  overflow-y: auto;
  overflow-x: hidden;
  font-family: 'Segoe UI', Segoe, Tahoma, sans-serif;
  border-right: 1px solid rgba(0,0,0,0.3);
}
.pbi-sidebar.collapsed { width: 48px; }
.pbi-sidebar.collapsed .pbi-sidebar-org,
.pbi-sidebar.collapsed .pbi-sidebar-section,
.pbi-sidebar.collapsed .pbi-sidebar-collapse {
  display: none;
}
.pbi-sidebar.collapsed .pbi-sidebar-header {
  justify-content: center;
  padding: 12px 0;
}

.pbi-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.pbi-sidebar-app-logo {
  width: 28px; height: 28px;
  background: #fff;
  color: var(--pbi-red);
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.pbi-sidebar-app-logo:hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.15);
}
.pbi-sidebar-org {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pbi-sidebar-collapse {
  background: transparent; border: none; color: #fff;
  cursor: pointer;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  font-size: 14px;
  flex-shrink: 0;
}
.pbi-sidebar-collapse:hover { background: rgba(255,255,255,0.10); }

.pbi-sidebar-section { padding: 2px 0; }

.pbi-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: #fff;
  font-weight: 600;
  user-select: none;
}
.pbi-section-title:hover { background: var(--pbi-sidebar-hover); }
.pbi-section-title-text { display: flex; align-items: center; gap: 8px; }
.pbi-section-arrow {
  font-size: 10px;
  transition: transform 0.2s;
}
.pbi-section-title.collapsed .pbi-section-arrow { transform: rotate(-90deg); }

.pbi-section-items { display: flex; flex-direction: column; }
.pbi-section-title.collapsed + .pbi-section-items { display: none; }

.pbi-nav-item {
  display: block;
  padding: 9px 14px 9px 38px;
  font-size: 13px;
  color: #d0d0d0;
  text-decoration: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pbi-nav-item:hover { background: var(--pbi-sidebar-hover); color: #fff; }
.pbi-nav-item.active {
  background: var(--pbi-sidebar-active);
  color: #fff;
  border-left-color: var(--pbi-red);
  font-weight: 600;
}

/* ---- App container ---- */
.pbi-app {
  display: flex;
  height: calc(100vh - 84px); /* 48 topbar + 36 subbar */
  overflow: hidden;
}
.pbi-main {
  flex: 1;
  overflow-y: auto;
  background: var(--beige-dash, #efede9);
  padding: 22px 28px;
}
