:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #647087;
  --paper: #f6f8fb;
  --panel: #ffffff;
  --line: #dce3ee;
  --navy: #153b6f;
  --blue: #1d74d8;
  --gold: #f5b82e;
  --green: #178864;
  --red: #c95353;
  --shadow: 0 18px 45px rgba(29, 46, 76, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(245, 184, 46, 0.18), transparent 32rem),
    linear-gradient(135deg, #eef4fb 0%, #f8fafc 48%, #f4f6fb 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell > * {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.5rem;
  background: #102a50;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: #102a50;
  font-weight: 900;
  font-size: 1.45rem;
}

.brand h1,
.topbar h2,
.hero-copy h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 1.35rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: inherit;
  opacity: 0.72;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.nav-list {
  display: grid;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.8rem 0.9rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 750;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sidebar-note {
  margin-top: auto;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note span {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

main {
  min-width: 0;
  padding: 1.25rem;
}

.topbar {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.25rem 1.25rem;
}

.topbar h2 {
  font-size: clamp(1.45rem, 4vw, 2.15rem);
}

.topbar-actions,
menu {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 2.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-button {
  padding: 0 1rem;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 116, 216, 0.24);
}

.secondary-button {
  padding: 0 0.9rem;
  border-color: var(--line);
  background: #f8fbff;
  color: var(--navy);
}

.ghost-button {
  padding: 0 0.85rem;
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.icon-button {
  width: 2.6rem;
  background: #eef5ff;
  border-color: #d8e7fb;
  color: var(--blue);
  font-size: 1.25rem;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.85fr);
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(16, 42, 80, 0.94), rgba(21, 59, 111, 0.88)),
    linear-gradient(90deg, var(--navy), var(--blue));
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy {
  min-width: 0;
  max-width: 48rem;
}

.hero-copy h2 {
  max-width: 46rem;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.98;
}

.hero-copy p:not(.eyebrow) {
  max-width: 39rem;
  margin: 1.1rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.hero-metrics {
  display: grid;
  gap: 0.75rem;
  align-content: end;
}

.hero-metrics div {
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-metrics span {
  display: block;
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 900;
}

.hero-metrics p {
  margin: 0.2rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 750;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  gap: 1rem;
  margin-top: 1rem;
}

.panel {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(220, 227, 238, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(29, 46, 76, 0.08);
}

.wide-panel {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel h3 {
  font-size: 1.1rem;
}

.status-pill {
  white-space: nowrap;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  background: #eaf8f1;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.announcement-list,
.member-list,
.event-list,
.activity-list,
.resource-list {
  display: grid;
  gap: 0.75rem;
}

.announcement-item,
.member-item,
.event-item,
.activity-item,
.resource-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.announcement-item {
  padding: 0.85rem;
  border-left: 4px solid var(--gold);
}

.announcement-item h4,
.event-item h4 {
  margin: 0;
  font-size: 0.98rem;
}

.announcement-item p,
.event-item p,
.activity-item p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.tag {
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: #eef3f8;
  color: #4d5b70;
  font-size: 0.75rem;
  font-weight: 800;
}

.member-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem;
}

.member-name {
  margin: 0;
  font-weight: 850;
}

.progress-track {
  height: 0.5rem;
  margin-top: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.hours-number {
  color: var(--navy);
  font-weight: 950;
}

.event-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-item {
  padding: 0.9rem;
}

.event-date {
  display: inline-flex;
  margin-bottom: 0.75rem;
  padding: 0.38rem 0.5rem;
  border-radius: 8px;
  background: #fff4cf;
  color: #7a5510;
  font-size: 0.78rem;
  font-weight: 900;
}

.activity-item {
  padding: 0.75rem;
}

.activity-item strong {
  color: var(--ink);
}

.resource-list a {
  padding: 0.82rem;
  color: var(--navy);
  font-weight: 850;
}

.resource-list a:hover {
  border-color: #b8d2f0;
  background: #f5f9ff;
}

dialog {
  width: min(34rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(11, 22, 38, 0.45);
}

.dialog-card {
  padding: 1rem;
}

.dialog-fields {
  display: grid;
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  color: var(--ink);
  background: #fff;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

menu {
  justify-content: end;
  padding: 0;
  margin: 1rem 0 0;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav-list {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
  }

  .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .sidebar-note {
    display: none;
  }

  .hero-section,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .event-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main {
    padding: 0.85rem;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .topbar-actions button {
    width: 100%;
  }

  .hero-copy h2 {
    font-size: 2.3rem;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: flex-start;
  }

}
