:root {
  --navy: #12304a;
  --navy-2: #1b4568;
  --blue: #2d6a9f;
  --teal: #2f7d7b;
  --cream: #f6f4ef;
  --white: #ffffff;
  --ink: #1c2833;
  --muted: #687580;
  --line: #dce3e8;
  --soft: #eef3f6;
  --warning: #fff6dc;
  --warning-border: #e3bc52;
  --shadow: 0 14px 40px rgba(18, 48, 74, 0.09);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, select, textarea { font: inherit; }

button { cursor: pointer; }

h1, h2, h3, p { margin-top: 0; }

.loginShell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 20%, rgba(47,125,123,.14), transparent 34%),
    radial-gradient(circle at 86% 10%, rgba(45,106,159,.16), transparent 32%),
    var(--cream);
}

.loginCard {
  width: min(760px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 44px;
}

.loginIntro { max-width: 630px; }

.logoMark {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: white;
  font-weight: 800;
  letter-spacing: 1px;
}

.logoMarkSmall {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  margin: 0;
  font-size: 12px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  letter-spacing: 1.4px;
  font-weight: 800;
  margin-bottom: 8px;
}

.loginCard h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  color: var(--navy);
  margin-bottom: 16px;
}

.loginCard p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.loginForm {
  margin-top: 30px;
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

input, select, textarea {
  width: 100%;
  border: 1px solid #cbd6dd;
  border-radius: 11px;
  background: white;
  padding: 13px 14px;
  color: var(--ink);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,106,159,.12);
}

.primaryButton, .secondaryButton, .ghostButton, .smallButton, .resourceButton {
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

.primaryButton {
  background: var(--navy);
  color: white;
  padding: 14px 18px;
}

.primaryButton:hover { background: var(--navy-2); }

.secondaryButton {
  background: #e9f1f6;
  color: var(--navy);
  padding: 11px 14px;
}

.ghostButton {
  background: transparent;
  color: var(--navy);
  padding: 10px 12px;
}

.smallButton {
  background: var(--soft);
  color: var(--navy);
  padding: 8px 10px;
}

.formMessage, .adminMessage {
  margin-top: 8px;
  background: #edf7f4;
  border: 1px solid #bdded4;
  color: #1f5c4f;
  border-radius: 10px;
  padding: 12px 14px;
}

.loginNotice {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}

.loginNotice strong { color: var(--navy); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbarBrand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbarTitle {
  font-weight: 800;
  color: var(--navy);
  font-size: 17px;
}

.topbarActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profileChip {
  display: grid;
  text-align: right;
  font-size: 12px;
}

.profileChip strong { color: var(--navy); }
.profileChip span { color: var(--muted); }

.dashboardShell, .adminShell {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.heroPanel {
  background: linear-gradient(120deg, var(--navy), var(--navy-2));
  color: white;
  border-radius: 22px;
  padding: clamp(28px, 4vw, 50px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  box-shadow: var(--shadow);
}

.heroPanel .eyebrow { color: #9dd6d4; }
.heroPanel h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 12px; }
.heroPanel p { max-width: 740px; line-height: 1.6; color: #d7e4ee; margin-bottom: 0; }

.heroBadge {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 12px 18px;
  white-space: nowrap;
  font-weight: 800;
}

.searchPanel {
  margin: 24px 0 34px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18,48,74,.06);
  display: flex;
  align-items: center;
  padding: 8px 14px;
}

.searchPanel input {
  border: 0;
  box-shadow: none;
  font-size: 16px;
  padding: 14px 10px;
}

.searchIcon {
  font-size: 26px;
  color: var(--blue);
}

.sectionHeading {
  margin: 30px 0 15px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.sectionHeading h2 { color: var(--navy); margin-bottom: 0; }

.areaGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.areaCard {
  min-height: 128px;
  text-align: left;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 8px;
  transition: .18s ease;
}

.areaCard:hover {
  transform: translateY(-2px);
  border-color: #a9c1d2;
  box-shadow: 0 10px 22px rgba(18,48,74,.07);
}

.areaCardActive {
  background: #edf5fa;
  border-color: var(--blue);
}

.safetyCard {
  background: var(--warning);
  border-color: #e8d293;
}

.areaTitle {
  color: var(--navy);
  font-weight: 800;
  font-size: 17px;
}

.areaDesc {
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.soonPanel {
  margin-top: 30px;
  background: #edf7f4;
  border: 1px solid #c6e0d9;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.soonPanel h3 { color: var(--navy); margin-bottom: 8px; }
.soonPanel p { color: var(--muted); margin: 0; max-width: 850px; line-height: 1.5; }

.soonPill {
  white-space: nowrap;
  background: white;
  border: 1px solid #c6e0d9;
  padding: 8px 12px;
  border-radius: 999px;
  color: #2e6f60;
  font-weight: 800;
  font-size: 12px;
}

.resourceCount { color: var(--muted); font-size: 13px; }

.resourceGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.resourceCard {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.resourceMeta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.resourceMeta span {
  background: var(--soft);
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
}

.resourceCard h3 { color: var(--navy); }
.resourceCard p { color: var(--muted); line-height: 1.55; }

.resourceFooter {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.resourceFooter > div { display: grid; gap: 3px; color: var(--muted); }

.resourceButton {
  background: var(--navy);
  color: white;
  padding: 9px 12px;
}

.databaseOnly {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.emptyState {
  text-align: center;
  border: 1px dashed #b9c5cc;
  border-radius: 16px;
  padding: 42px;
  color: var(--muted);
}

.safetyPanel {
  margin-top: 28px;
  background: var(--warning);
  border: 1px solid var(--warning-border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  gap: 15px;
}

.safetyIcon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d6a827;
  color: white;
  font-weight: 900;
}

.safetyPanel strong { color: #664d08; }
.safetyPanel p { margin: 4px 0 0; color: #725d25; line-height: 1.5; }

.centerScreen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--navy);
}

.adminHero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.adminHero h1 { color: var(--navy); margin-bottom: 8px; }
.adminHero p { color: var(--muted); }

.tabBar {
  margin: 24px 0;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.tabBar button {
  border: 0;
  background: transparent;
  padding: 12px 16px;
  color: var(--muted);
  font-weight: 800;
  border-bottom: 3px solid transparent;
}

.tabBar .tabActive {
  color: var(--navy);
  border-bottom-color: var(--teal);
}

.adminColumns {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: start;
}

.adminCard {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}

.adminCard h2 { color: var(--navy); }

.formCard { display: grid; gap: 14px; }

.formRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.formHint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.adminList {
  display: grid;
  gap: 10px;
}

.adminListItem {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adminListItem > div { display: grid; gap: 4px; }
.adminListItem strong { color: var(--navy); }
.adminListItem span { color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .areaGrid { grid-template-columns: repeat(2, 1fr); }
  .resourceGrid, .adminColumns { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .topbarActions { flex-wrap: wrap; justify-content: flex-end; }
  .profileChip { display: none; }
}

@media (max-width: 620px) {
  .loginCard { padding: 28px 22px; }
  .dashboardShell, .adminShell { width: min(100% - 22px, 1240px); padding-top: 18px; }
  .heroPanel, .soonPanel, .adminHero { align-items: flex-start; flex-direction: column; }
  .areaGrid { grid-template-columns: 1fr; }
  .formRow { grid-template-columns: 1fr; }
  .topbarTitle { font-size: 14px; }
  .topbarBrand .eyebrow { display: none; }
}

/* Native in-hub resource pages */
.nativeBack {
  margin: 0 0 14px;
  padding-left: 0;
}

.nativeResource {
  max-width: 920px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 46px);
  box-shadow: var(--shadow);
}

.nativeTitle {
  color: var(--navy);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  margin: 14px 0;
}

.nativeDescription {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 780px;
}

.nativeDivider {
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}

.nativeContent {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}

.nativeContent h1 {
  color: var(--navy);
  font-size: 30px;
  margin: 0 0 20px;
}

.nativeContent h2 {
  color: var(--navy);
  margin: 34px 0 12px;
  font-size: 23px;
}

.nativeContent h3 {
  color: var(--navy);
  margin: 26px 0 10px;
  font-size: 19px;
}

.nativeContent p {
  margin: 0 0 15px;
}

.nativeList {
  margin: 8px 0 22px;
  padding-left: 25px;
}

.nativeList li {
  margin-bottom: 8px;
}

.nativeFooter {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: var(--muted);
  font-size: 12px;
}
