/* Shared colours and surfaces derived from the 8D portal. */
:root {
  color-scheme: dark;
  --portal-surface: rgba(12, 24, 48, .88);
  --portal-border: rgba(255, 255, 255, .18);
  --portal-text: #f5f7ff;
  --portal-link: #8cc9ff;
}

body {
  background: linear-gradient(135deg, #2b2b2b, #00235c) fixed;
  color: var(--portal-text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--portal-link); }

.app-header,
.page-header,
.card,
.surface-panel,
.panel {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: .75rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .35);
}

.app-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: .5rem 1.25rem;
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header-section.center { justify-content: center; text-align: center; }
.app-header-section.right { justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }
.app-header-section { display: flex; align-items: center; }
.header-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.user-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  padding: .45rem .75rem;
  border: 2px solid #fb7185;
  border-radius: .75rem;
  background: #9f1239;
  color: #fff;
}
.app-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.brand-logo-watermann { max-height: 80px; }
.quality-page { padding: 0; }
body.quality-page > header.app-header {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  position: static;
  top: auto;
  left: auto;
  right: auto;
  padding: 4px 22px;
}
.quality-page .app-header .brand-logo-watermann { max-height: 90px; }
.quality-page .app-header .user-meta { font-size: 1.05rem; }
.quality-page .app-header .header-nav { gap: .5rem; }
.quality-page .app-header .header-nav .btn { margin: 0; }
.quality-page .layout-shell { max-width: 1200px; padding: 24px; }
.page-header { padding: 1rem; }

.header-nav .btn,
.page-header__nav .btn {
  display: inline-flex;
  align-items: center;
  padding: .5rem .75rem;
  margin: .15rem;
  border: 1px solid #607799;
  border-radius: .6rem;
  background: #223b60;
  color: #f5f7ff;
  text-decoration: none;
  font-weight: 600;
}

.header-nav .btn:hover,
.page-header__nav .btn:hover {
  background: #32679f;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #8cc9ff;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .app-header { grid-template-columns: 1fr; }
  .app-header-section.center, .app-header-section.right { justify-content: flex-start; }
}
