@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;700&family=Nunito:wght@400;600;700&display=swap');

:root {
  --bg: #062915;
  --bg-2: #0d3f22;
  --panel: rgba(255, 255, 255, 0.95);
  --text: #102314;
  --muted: #53645a;
  --brand: #2da860;
  --brand-dark: #1f7b45;
  --accent: #f2c84b;
  --danger: #b24141;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #1a6a3a 0%, var(--bg) 45%, #041c0f 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url('/images/pitch-bg.svg') center/cover no-repeat;
  opacity: 0.35;
}

.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  background: rgba(4, 20, 11, 0.88);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #f6fff9;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.04em;
  font-size: 1.3rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-title {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  font-family: "Nunito", sans-serif;
  font-size: 0.66rem;
  opacity: 0.9;
  letter-spacing: 0.02em;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.topnav-center {
  justify-content: center;
  flex: 1;
}

.topnav-right {
  display: flex;
  justify-content: flex-end;
  min-width: 3rem;
}

.links a,
.ghost-btn,
.primary-btn {
  text-decoration: none;
  border: none;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-family: "Nunito", sans-serif;
}

.nav-icon {
  display: inline-block;
  min-width: 1.1rem;
  text-align: center;
  margin-right: 0.25rem;
}

.links a {
  color: #f4fff7;
  background: rgba(255, 255, 255, 0.1);
}

.ghost-btn {
  color: #123822;
  background: #e8f5ec;
  border: 1px solid #c7dfcf;
}

.ghost-btn:hover {
  background: #d9efdf;
}

.topnav .ghost-btn {
  color: #f4fff7;
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}

.topnav-right .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  color: white;
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
}

.container {
  max-width: 1180px;
  margin: 1.2rem auto 2rem;
  padding: 0 1rem;
}

.hero-home {
  border: 1px solid rgba(45, 168, 96, 0.2);
}

.card-highlight {
  background: linear-gradient(160deg, #effaf2, #d8f0e0);
}

.feature-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.45rem;
}

.home-note-card {
  border: 1px solid rgba(45, 168, 96, 0.24);
}

.home-note-logo {
  display: block;
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
  margin: 0.35rem 0 0.6rem;
  border: 1px solid rgba(45, 168, 96, 0.28);
}

.hero {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(228, 243, 233, 0.95));
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  animation: rise 0.5s ease-out;
}

.hero h1,
h2,
h3 {
  margin: 0 0 0.6rem;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.02em;
}

.hero-grid,
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.hero,
.grid,
.grid > *,
.card,
form {
  min-width: 0;
}

.card {
  background: var(--panel);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  animation: rise 0.6s ease-out;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.report-attendance-form {
  grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr) minmax(200px, 2fr) auto;
  gap: 0.4rem;
  align-items: end;
}

.filters-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
  align-items: end;
}

.filters-grid > div {
  min-width: 0;
}

.filters-grid input,
.filters-grid select,
.filters-grid textarea {
  min-width: 0;
  max-width: 100%;
}

.filters-grid input[type="date"],
.filters-grid input[type="datetime-local"] {
  width: 100%;
  min-width: 0;
}

.role-menu {
  position: sticky;
  top: 66px;
  z-index: 8;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 1rem;
}

.role-menu-toggle {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: 0 0 14px 14px;
  background: rgba(6, 30, 17, 0.92);
  color: #f4fff7;
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
}

.role-menu-links {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem;
  background: rgba(245, 255, 248, 0.97);
  border-radius: 0 0 16px 16px;
  padding: 0.55rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.role-menu-links.open {
  display: grid;
}

.role-menu-links a {
  text-decoration: none;
  color: #123822;
  background: #e8f5ec;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  font-weight: 700;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 14px;
  overflow: hidden;
}

td input,
td select,
td textarea {
  max-width: 100%;
  min-width: 0;
}

.calendar-date {
  display: inline-block;
  font-weight: 700;
  color: #123822;
  white-space: nowrap;
}

.icon-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #e8f5ec;
  color: #123822;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.icon-action-link:hover {
  background: #d9efdf;
  transform: translateY(-1px);
}

th,
td {
  padding: 0.7rem;
  text-align: left;
  border-bottom: 1px solid #dbe7de;
}

th {
  background: #e8f5ec;
}

form.inline {
  display: inline;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.6rem;
  margin: 0.3rem 0 0.8rem;
  border-radius: 10px;
  border: 1px solid #bfd4c5;
  font-family: inherit;
}

.badge {
  display: inline-block;
  background: #e4f6ea;
  color: #14562f;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.badge.danger {
  background: #fce6e6;
  color: var(--danger);
}

.muted {
  color: var(--muted);
}

.block-spacer-top {
  margin-top: 1rem;
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .hero-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .topnav {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .topnav-center {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    flex-wrap: nowrap;
  }

  .topnav-right {
    width: 100%;
    justify-content: flex-end;
  }

  .links a,
  .ghost-btn,
  .primary-btn {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .role-menu {
    top: 110px;
  }

  .role-menu-links {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.9rem;
  }

  .brand {
    font-size: 1.1rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-subtitle {
    font-size: 0.6rem;
  }

  .hero {
    padding: 1.2rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .hero-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .report-attendance-form {
    grid-template-columns: 1fr;
  }
}
