/* ------------------------------------------------------------------ topbar */
.topbar {
  display: flex; align-items: center; gap: 20px;
  min-height: 84px; padding: 16px 32px; margin-left: var(--sidebar-width);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 6px 32px; }
.brand h1 { font-size: 19px; margin: 0 0 2px; letter-spacing: -.5px; }
.brand small { color: var(--fg-dim); font-size: 11px; }
.logo {
  width: 38px; height: 42px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  display: grid; place-items: center; color: var(--accent); flex: none;
}
.tabs { display: flex; flex-direction: column; gap: 6px; }
.tab {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: none; border: 1px solid transparent; padding: 12px; border-radius: 9px;
  color: var(--fg-dim); cursor: pointer; font-size: 13px;
}
.tab:hover { background: var(--bg-3); color: var(--fg); }
.tab.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
/* Submenú: entrada hija de Tablero, con sangría y un conector hacia su padre. */
.tab.sub { position: relative; margin: -2px 0 0 24px; padding: 9px 12px; font-size: 12px; }
.tab.sub::before {
  content: ''; position: absolute; left: -13px; top: -10px; bottom: 50%; width: 11px;
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-bottom-left-radius: 6px;
}
.tab.has-active-child { color: var(--fg); font-weight: 600; }
.tab.sub.collapsed { display: none; }
.tab[aria-expanded]::after { content: '\25b8'; margin-left: auto; font-size: 11px; transition: transform .15s ease; }
.tab[aria-expanded="true"]::after { transform: rotate(90deg); }
body.interproject-dashboard .tab[aria-expanded]::after { display: none; }
@media (max-width: 980px) {
  .tab.sub { margin: 0; }
  .tab.sub::before { display: none; }
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.dashboard-switch { display: grid; gap: 2px; color: var(--fg-dim); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.dashboard-switch select {
  min-width: 190px; max-width: 260px; padding: 7px 10px; border-radius: 7px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--fg); font-size: 12px; text-transform: none;
}
.me { color: var(--fg-dim); font-size: 12px; }

.btn {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--fg);
  padding: 9px 14px; border-radius: 8px; cursor: pointer; text-decoration: none;
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 600; font-size: 12px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--button-hover); border-color: var(--button-hover-line); }
.btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: var(--primary-fg); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-3); }
.btn.danger { color: var(--red); }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* ------------------------------------------------------------------ layout */
main { padding: 28px 32px 64px; margin-left: var(--sidebar-width); min-width: 0; }
.view.hidden, .hidden { display: none !important; }

.banner {
  margin: 10px 18px 0; padding: 10px 14px; border-radius: var(--radius);
  background: #ffebe6; border: 1px solid #ffbdad; color: #bf2600;
}
.banner.info { background: #deebff; border-color: #b3d4ff; color: #0747a6; }
.no-dashboard-notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin: 12px 18px 0; padding: 14px 16px; border: 1px solid #de350b;
  border-radius: var(--radius); background: #ffebe6; color: #ae2a19;
}
.no-dashboard-notice p { margin: 4px 0 0; color: inherit; }
.no-dashboard-notice .btn { flex: 0 0 auto; border-color: #bf2600; background: #bf2600; color: #fff; }
.no-dashboard-notice .btn:hover { background: #a61b00; }
.no-dashboard-notice.hidden { display: none; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type="search"] {
  flex: 0 1 320px; padding: 8px 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg-2);
}
.toolbar input[type="search"]:focus { outline: 2px solid var(--accent-2); outline-offset: -1px; }
.toolbar .group { display: flex; align-items: center; gap: 6px; color: var(--fg-dim); font-size: 12px; }
.toolbar select, .panel select, .panel input, .panel textarea {
  padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-2);
}
.spacer { flex: 1; }
.stats { color: var(--fg-dim); font-size: 12px; }

.board-picker select {
  font-size: 14px; font-weight: 600; color: var(--fg);
  background: var(--bg-2); min-width: 210px;
}
.panel .row select {
  padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--fg); min-width: 220px;
}

