:root {
  --green-dark: #0B5D1E;
  --green-main: #4F9A45;
  --green-soft: #BFE8C8;
  --green-pale: #F1FAEF;
  --flower: #FFDF65;
  --ink: #162026;
  --white: #FFFFFF;
  --danger: #A12B2B;
  --shadow: 0 14px 30px rgba(11, 93, 30, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 223, 101, 0.55), transparent 30%),
    linear-gradient(180deg, #f7fcf4 0%, var(--green-pale) 100%);
}

body.has-mobile-nav {
  padding-bottom: 6.5rem;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: rgba(241, 250, 239, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(79, 154, 69, 0.15);
}

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

.brand-logo,
.hero-logo {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid rgba(11, 93, 30, 0.08);
}

.hero-logo {
  width: 132px;
  height: 132px;
  margin: 0 auto 0.8rem;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.brand-subtitle,
.meta,
.helper-text {
  color: rgba(22, 32, 38, 0.78);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.page-content {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.site-footer {
  margin-top: auto;
  padding: 1rem 1rem 2rem;
}

.footer-stack {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  border: 1px solid rgba(79, 154, 69, 0.12);
}

.footer-copy {
  margin-top: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.hero {
  display: grid;
  gap: 1rem;
}

.hero-card,
.install-box,
.feature-card,
.item-card,
.notice-card,
.card-form,
.dashboard-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(79, 154, 69, 0.15);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.4rem;
  text-align: center;
}

.install-box,
.feature-card,
.item-card,
.notice-card,
.card-form,
.dashboard-card {
  padding: 1.1rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  margin: 0 0 0.5rem;
  border-radius: 999px;
  background: var(--green-soft);
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin-top: 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.15rem;
}

.lead {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-dark);
}

.hero-text,
.section-header p,
.item-card p,
.feature-card p,
.notice-card p,
.card-form p {
  font-size: 1rem;
  line-height: 1.55;
}

.stack-actions,
.stack-form,
.list-stack,
.content-block,
.form-page,
.footer-stack {
  display: grid;
  gap: 1rem;
}

.content-block {
  margin-top: 1.25rem;
}

.feature-grid,
.dashboard-grid {
  display: grid;
  gap: 1rem;
}

.dashboard-card {
  text-decoration: none;
  display: grid;
  gap: 0.8rem;
  align-content: start;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-card:hover,
.dashboard-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(11, 93, 30, 0.12);
  border-color: rgba(79, 154, 69, 0.32);
}

.card-icon {
  width: 3.4rem;
  height: 3.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, var(--green-soft), #dff5d6);
  color: var(--green-dark);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(79, 154, 69, 0.12);
}

.card-icon-svg {
  width: 1.7rem;
  height: 1.7rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-card strong {
  color: var(--green-dark);
}

.admin-overview-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stat-card {
  gap: 0.45rem;
}

.admin-stat-card strong {
  font-size: 1.8rem;
}

.admin-stat-label {
  margin: 0;
  font-weight: 800;
}

.email-board {
  min-height: 120px;
  font-size: 0.95rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.92);
}

.table-shell {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(79, 154, 69, 0.15);
  box-shadow: var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.data-table th,
.data-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(79, 154, 69, 0.12);
  vertical-align: top;
}

.data-table th {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--green-dark);
  background: rgba(191, 232, 200, 0.32);
}

.data-table tr:last-child td {
  border-bottom: none;
}

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

.btn {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
}

.btn-primary {
  background: var(--green-main);
  color: var(--white);
}

.btn-secondary {
  background: var(--green-dark);
  color: var(--white);
}

.btn-accent {
  background: var(--flower);
  color: var(--ink);
}

.btn-facebook {
  background: #e6f4ff;
  color: #124572;
}

.btn-danger {
  background: #ffe7e7;
  color: var(--danger);
}

.btn-ghost,
.btn-small,
.btn-disabled {
  background: rgba(191, 232, 200, 0.45);
  color: var(--green-dark);
}

.btn-small {
  min-height: 48px;
  padding: 0.75rem 0.9rem;
}

.btn-disabled,
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.text-link {
  color: var(--green-dark);
  font-weight: 700;
  text-decoration-thickness: 3px;
}

.strong-link {
  text-underline-offset: 3px;
}

.section-header {
  margin-bottom: 1rem;
}

.inline-error,
.flash {
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  margin-bottom: 1rem;
}

.inline-error,
.flash-error {
  background: #ffe7e7;
  color: #7a1f1f;
}

.flash-success {
  background: #e2f6e2;
  color: var(--green-dark);
}

.flash-info {
  background: #e7f3ff;
  color: #124572;
}

.flash-warning {
  background: #fff4d1;
  color: #7a5c00;
}

form {
  margin: 0;
}

label {
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 56px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 2px solid rgba(79, 154, 69, 0.28);
  background: var(--white);
  color: var(--ink);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
.btn:focus {
  outline: 3px solid rgba(255, 223, 101, 0.9);
  outline-offset: 2px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem;
}

.checkbox-row input {
  width: 1.35rem;
  min-height: 1.35rem;
  margin-top: 0.2rem;
}

.inline-form,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.8rem;
}

.simple-list,
.number-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.empty-state {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-md);
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  padding: 0.65rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(11, 93, 30, 0.96);
  box-shadow: 0 -10px 25px rgba(11, 93, 30, 0.2);
}

.mobile-nav-link {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  padding: 0.55rem 0.3rem;
  border-radius: 1rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.mobile-nav-icon {
  width: 1.2rem;
  height: 1.2rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-nav-emoji {
  font-size: 1.15rem;
  line-height: 1;
  display: block;
}

.mobile-nav-link.is-active {
  background: rgba(255, 255, 255, 0.16);
}

.legal-page .item-card h2 {
  margin-bottom: 0.75rem;
}

@media (min-width: 760px) {
  .hero,
  .feature-grid,
  .dashboard-grid,
  .admin-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header {
    padding-inline: max(1rem, calc((100vw - 860px) / 2));
  }

  .mobile-nav {
    left: 50%;
    right: auto;
    width: min(100%, 760px);
    transform: translateX(-50%);
    border-radius: 1.25rem 1.25rem 0 0;
  }
}

@media (min-width: 1080px) {
  .admin-overview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
