:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --ink: #142026;
  --muted: #627078;
  --line: #dbe4e2;
  --surface: #ffffff;
  --teal: #0f8b8d;
  --blue: #2867b2;
  --green: #47a36a;
  --coral: #e46f5d;
  --shadow: 0 18px 50px rgba(26, 44, 54, .12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, rgba(15,139,141,.12), transparent 28%), linear-gradient(180deg, #fbfcfb, var(--bg));
}
a { color: inherit; text-decoration: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-logo {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(15, 139, 141, .20);
}
nav { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; color: var(--muted); }
nav a { padding: 8px 10px; border-radius: 8px; }
nav a:hover { background: #edf4f3; color: var(--ink); }
main { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(980px, calc(100% - 32px)); padding: 34px 0; }
.hero {
  position: relative;
  min-height: 500px;
  display: grid;
  align-items: center;
  padding: 42px clamp(18px, 4vw, 56px);
  margin: 18px 0 22px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(246,248,247,.96) 0%, rgba(246,248,247,.86) 32%, rgba(246,248,247,.30) 58%, rgba(246,248,247,.08) 100%),
    url("/assets/portal-hero.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}
.hero-copy { max-width: 620px; }
.eyebrow, .chip {
  display: inline-flex;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
h1 { font-size: clamp(42px, 6vw, 82px); line-height: .95; margin: 16px 0; letter-spacing: 0; }
h2 { font-size: 22px; margin: 0 0 14px; }
h3 { margin: 8px 0; font-size: 19px; }
p { line-height: 1.65; }
.hero p { color: var(--muted); font-size: 19px; max-width: 58ch; }
.search { display: flex; gap: 8px; margin: 22px 0 0; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
button {
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
button:hover { background: var(--blue); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  font-weight: 800;
}
.btn:hover { background: var(--blue); }
.btn.secondary { background: #eaf2f1; color: var(--ink); }
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.portal-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
  padding: 18px 0 48px;
}
.panel, .card, .article, .timeline article {
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(30,45,50,.06);
}
.panel { padding: 18px; margin-bottom: 18px; }
.module-item {
  padding: 10px 0;
  border-bottom: 1px solid #edf2f1;
  color: var(--muted);
}
.feed { min-width: 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.card { padding: 18px; }
.card p, .muted, .row span, footer { color: var(--muted); }
.list { display: grid; gap: 10px; margin: 0 0 24px; }
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article { padding: clamp(22px, 4vw, 42px); }
.stack { display: grid; gap: 10px; }
.poll label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.poll input { width: auto; }
.member-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.member-list div { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.member-list span { display: block; color: var(--muted); }
.timeline { display: grid; gap: 12px; }
.timeline article { padding: 16px; }
.module-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}
.module-admin form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.module-admin input[type="checkbox"] { width: auto; }
.ad { border-left: 4px solid var(--coral); }
.ok { color: var(--green); font-weight: 800; }
.error { color: #b42318; font-weight: 800; }
.login { min-height: 70vh; display: grid; place-items: center; }
footer { padding: 36px 16px; text-align: center; border-top: 1px solid var(--line); }
@media (max-width: 980px) {
  .hero {
    min-height: 520px;
    background:
      linear-gradient(180deg, rgba(246,248,247,.97) 0%, rgba(246,248,247,.84) 48%, rgba(246,248,247,.34) 100%),
      url("/assets/portal-hero.png") center / cover no-repeat;
  }
  .portal-grid { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .row, .search { flex-direction: column; }
}
