/* ChemTrust public-page chrome.
 *
 * The authenticated dashboard shell (dark navy sidebar + topbar + footer)
 * lives in layout.css (WP1). What remains here styles the surfaces that do
 * NOT use the shell: the supplier portal's simple topbar page (.ct-app), the
 * login/dev-login standalone pages, and the shared topbar pills they use.
 * The old white-sidebar shell rules were superseded by layout.css and
 * removed. */

html,
body,
#root {
  height: 100%;
}

.ct-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Simple topbar (portal.html) ── */
.ct-header {
  display: flex;
  flex: 0 0 60px;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 var(--space-5);
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.ct-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--header-text);
}

.ct-brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--accent), var(--primary));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ct-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ── Body split ── */
.ct-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

/* ── Main canvas (portal page; the shell's .ct-main is re-specified in
      layout.css with higher specificity: .ct-shell .ct-main) ── */
.ct-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  padding: var(--space-6) var(--space-7);
  background: var(--bg);
}

/* ── Topbar pills (portal lang toggle; base style shared with the shell's
      relocated toggle, which layout.css re-skins in topbar context) ── */
.ct-topbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--header-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}
.ct-topbtn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Language toggle (from i18n/LangToggle) styled to match the topbar. */
.ct-lang-toggle {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--header-text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.ct-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 900px) {
  .ct-main {
    padding: var(--space-5) var(--space-4);
  }
}
