/* ==========================================================================
   layout.css — app shell, top bar, view container, generic grids
   ========================================================================== */

#app {
  display: none;
  height: 100vh;
  flex-direction: row;
}

#mn {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* === Top bar === */

.tb {
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 64px;
  background: var(--bg);
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}

.tb-title {
  font-family: var(--fh);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

#tb-greeting {
  font-size: 11px;
  color: var(--text-d);
  font-weight: 300;
  margin-top: 2px;
}

.tb-badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--fm);
}

/* === App header (BEM additions for v2 restructure) ====================== */
/* Sits inside the existing .tb element — keeps current height/padding. */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.app-header__title-block {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-header__title {
  font-family: var(--fh);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.app-header__subtitle {
  font-size: 11px;
  color: var(--text-d);
  font-weight: 300;
  line-height: 1.3;
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.app-header__logout {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-m);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  padding: 0;
  flex-shrink: 0;
}

.app-header__logout svg {
  width: 14px;
  height: 14px;
}

.app-header__logout:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border-m);
}

@media (max-width: 900px) {
  .app-header__actions { gap: 6px; }
}

/* === View container === */

.view {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.view.active {
  display: block;
  animation: fadeIn 0.18s ease;
}

/* === Generic grids === */

.mg4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.ow {
  /* Onboarding/wizard wrapper. 900px gives the keyword-chip field
     room to breathe (chips wrap naturally without odd line breaks). */
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}
