/* shell.css — header tpf-chrome + layout grid (sidebar | main | sidebar-right opcional).
   Consumido por todos os módulos via TpfShell.mountHeader() em shell.js. */

.tpf-chrome {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  font-family: var(--font-sans);
}

.tpf-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tpf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.tpf-brand img {
  height: 30px;
  max-width: 90px;
  object-fit: contain;
}

.tpf-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.tpf-brand-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

.tpf-brand-sub {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpf-nav {
  display: flex;
  gap: 4px;
  background: #f0f4f8;
  border-radius: var(--radius);
  padding: 3px;
}

.tpf-nav a {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: 0.15s;
  white-space: nowrap;
}

.tpf-nav a:hover {
  background: #fff;
  color: var(--text);
}

.tpf-nav a.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.tpf-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tpf-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
}

.tpf-pill.ok   { border-color: #b8d1fb; color: var(--accent); background: var(--accent-l); }
.tpf-pill.warn { border-color: #ead9b0; color: var(--gold);   background: var(--gold-l); }
.tpf-pill.err  { border-color: #f0b8b8; color: var(--red);    background: var(--red-l); }

.tpf-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.tpf-action {
  border: none;
  background: var(--accent-l);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: var(--radius);
  font: 600 12px var(--font-sans);
  cursor: pointer;
  transition: 0.15s;
}

.tpf-action:hover { background: #dbe8ff; }
.tpf-action.neutral { background: #eef2f6; color: var(--text-2); }
.tpf-action.neutral:hover { background: #e4eaf0; }

/* ── Layout shells ─────────────────────────────────────────── */

.tpf-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.tpf-shell.with-right {
  grid-template-columns: 280px 1fr 320px;
}

.tpf-shell > .tpf-side {
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: calc(100vh - 56px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tpf-shell > .tpf-side-right {
  background: rgba(255, 255, 255, 0.94);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  max-height: calc(100vh - 56px);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tpf-shell > .tpf-main {
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

@media (max-width: 1120px) {
  .tpf-shell, .tpf-shell.with-right {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 56px);
  }
  .tpf-shell > .tpf-side,
  .tpf-shell > .tpf-side-right {
    border: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
  }
}
