:root {
  color-scheme: light;
  --navy: #0b3d2e;
  --blue: #11784f;
  --teal: #0f7b4f;
  --green: #138a4d;
  --amber: #f2c230;
  --red: #bd3434;
  --ink: #1d2838;
  --muted: #667085;
  --line: #d9e5dc;
  --soft: #f5f8f1;
  --pale: #eef8df;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(11, 61, 46, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--soft);
  color: var(--ink);
  font-family: Aptos, Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 28px;
  background: var(--white);
  border-bottom: 3px solid var(--amber);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff7d6;
  font-weight: 900;
}

.brand h1,
.brand p,
.hero h2,
.hero p,
.section-head h3,
.section-head p,
.toolbar h3,
.eyebrow {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
}

.brand p,
.section-head p,
.hero p,
.required-note,
.eyebrow,
.field span,
.metric-card span,
.event-card span,
.event-card small,
.detail-item span {
  color: var(--muted);
}

.nav-tabs {
  display: flex;
  gap: 8px;
}

.nav-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--white);
  color: var(--ink);
  font-weight: 800;
}

.nav-tab.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
  min-height: 360px;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(7, 54, 37, 0.94), rgba(19, 138, 77, 0.8) 62%, rgba(242, 194, 48, 0.45)),
    url("https://images.pexels.com/photos/15920138/pexels-photo-15920138.jpeg?auto=compress&cs=tinysrgb&w=1800") center/cover;
  color: var(--white);
}

.hero-copy {
  display: grid;
  gap: 12px;
  align-content: center;
}

.hero .eyebrow,
.hero p {
  color: rgba(255, 255, 255, 0.82);
}

.hero h2 {
  max-width: 820px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
}

.hero p {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.light-button {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.event-card {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 180px;
  padding: 20px;
  border: 1px solid rgba(242, 194, 48, 0.5);
  border-radius: 8px;
  background: rgba(7, 54, 37, 0.46);
  backdrop-filter: blur(8px);
}

.event-card span,
.event-card small {
  color: rgba(255, 255, 255, 0.78);
}

.event-card strong {
  font-size: 44px;
}

.view {
  display: none;
}

.info-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.info-band div {
  display: grid;
  gap: 5px;
  min-height: 92px;
  align-content: center;
  padding: 16px;
  background: var(--white);
}

.info-band span {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.info-band strong {
  font-size: 16px;
  line-height: 1.35;
}

.view.active {
  display: block;
}

.application-form,
.admin-panel,
.login-card,
.detail-panel,
.google-form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.application-form,
.admin-panel,
.detail-panel,
.google-form-card {
  padding: 22px;
}

.section-head,
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.compact-head {
  margin-top: 24px;
}

.section-head h3,
.toolbar h3 {
  font-size: 22px;
}

.required-note,
.eyebrow,
.field span {
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  text-transform: uppercase;
}

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

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field input,
.field select,
.field textarea,
.search-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(242, 194, 48, 0.24);
}

.check-field {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 18px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.form-actions,
.toolbar-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.danger-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 800;
  white-space: nowrap;
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  background: var(--green);
  color: var(--white);
  border-color: var(--amber);
  box-shadow: 0 8px 20px rgba(19, 138, 77, 0.22);
}

.ghost-button {
  background: var(--white);
  border-color: var(--amber);
  color: var(--green);
}

.danger-button {
  background: #fff4f4;
  border-color: #efc7c7;
  color: var(--red);
}

#applicationStatus,
#loginStatus {
  margin: 0;
  color: var(--teal);
  font-weight: 800;
}

.admin-login {
  display: grid;
  place-items: center;
  min-height: 360px;
}

.login-card {
  width: min(420px, 100%);
  padding: 22px;
}

.login-card h3 {
  margin: 0 0 16px;
}

.hidden {
  display: none;
}

.google-form-frame {
  width: 100%;
  min-height: 1260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact select {
  width: 190px;
}

.search-input {
  width: min(300px, 100%);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--pale);
}

.metric-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
}

.metric-card strong {
  font-size: 34px;
  line-height: 1;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
}

tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
}

.status-pending {
  background: #fff2c2;
  color: #7a5900;
}

.status-approved {
  background: #dcf4e7;
  color: var(--green);
}

.status-more-information-required {
  background: #eff8df;
  color: var(--green);
}

.status-rejected {
  background: #ffe4e4;
  color: var(--red);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 230px;
}

.row-actions button,
.link-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.detail-panel {
  margin-top: 16px;
  box-shadow: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.detail-item {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.detail-item span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
}

.detail-item strong {
  overflow-wrap: anywhere;
}

.empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .site-header,
  .section-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .form-grid,
  .detail-grid,
  .metric-grid,
  .info-band {
    grid-template-columns: 1fr;
  }

  .toolbar-actions,
  .form-actions,
  .nav-tabs {
    width: 100%;
  }

  .nav-tab,
  .primary-button,
  .ghost-button,
  .danger-button,
  .search-input,
  .compact select {
    width: 100%;
  }
}
