/* ==========================================================================
   Layout — header + 3-column dashboard, responsive
   ========================================================================== */

.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-header__brand { display: flex; align-items: center; gap: 12px; }
.app-header__mark { width: 36px; height: 36px; flex-shrink: 0; }
.app-header__title { font-size: 18px; letter-spacing: -0.01em; }
.app-header__subtitle { font-size: 12.5px; color: var(--color-text-muted); margin: 0; }

.tool-tabs {
  display: flex;
  gap: 4px;
  margin-left: 12px;
  background: var(--color-bg);
  padding: 4px;
  border-radius: 999px;
  flex-shrink: 0;
}

.tool-tab {
  border: none;
  background: transparent;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}
.tool-tab.is-active { background: var(--color-primary); color: #fff; }

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

.privacy-pill {
  font-size: 12px;
  color: var(--color-success);
  background: #E9F6EF;
  border: 1px solid #CBEBD9;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.dashboard {
  display: grid;
  grid-template-columns: var(--panel-controls-w) 1fr var(--panel-results-w);
  gap: 18px;
  padding: 18px 24px 40px;
  align-items: start;
  max-width: 1720px;
  margin: 0 auto;
}

.panel { min-width: 0; }

.panel--controls, .panel--results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 18px);
  max-height: calc(100vh - var(--header-h) - 36px);
  overflow-y: auto;
  padding-right: 2px;
}

.panel--preview { display: flex; flex-direction: column; gap: 18px; min-height: 60vh; }

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .panel--controls, .panel--results {
    position: static;
    max-height: none;
  }
  .app-header__subtitle { display: none; }
}

@media (max-width: 640px) {
  .app-header { flex-wrap: wrap; height: auto; padding: 12px; gap: 10px; }
  .tool-tabs { order: 3; width: 100%; }
  .privacy-pill { display: none; }
  .dashboard { padding: 12px; }
}
