/* =========================
   Global Reset & Base
   ========================= */

:root {
  --content-max-width: 1400px;
  --content-padding: clamp(1rem, 3vw, 2rem);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #e6eae6;
  background-color: #0f1a14;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================
   Header / Navigation
   ========================= */

header {
  background-color: #13251c;
  color: #e6f2ea;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1f3a2c;
}

header > * {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 1rem var(--content-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.7rem;
  font-weight: 700;
}

nav a {
  margin-left: 1.5rem;
  font-weight: 600;
  color: #cfe6da;
  transition: color 0.25s ease;
}

nav a:hover {
  color: #9fe0b8;
}

/* =========================
   Sections (layout contract)
   ========================= */

section {
  width: 100%;
  padding: var(--content-padding);
  display: flex;
  justify-content: center;
}

section > * {
  width: 100%;
  max-width: var(--content-max-width);
}

section h2 {
  color: #e6f2ea;
}

/* =========================
   Hero Section
   ========================= */

.hero {
  min-height: 70vh;
  background: linear-gradient(
    135deg,
    #305841 0%,
    #183528 50%,
    #1f4735 100%
  );
  color: #e9f4ee;
  text-align: center;
  display: flex;
  align-items: center;
}

.hero > * {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h2 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin-bottom: 2.2rem;
  color: #cfe6da;
}

.hero a,
.hero button {
  padding: 0.85rem 1.7rem;
  background-color: #2f6f4e;
  color: #e9f4ee;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.hero a:hover,
.hero button:hover {
  background-color: #3e8b63;
  transform: translateY(-2px);
}

/* =========================
   Features
   ========================= */

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.feature-card {
  background-color: #367e5e;
  color: #e9f4ee;
  border-radius: 14px;
  padding: 2rem;
  flex: 1 1 260px;
  border: 1px solid #2f6f4e;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* =========================
   Dashboard
   ========================= */

#dashboard-section > * {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.chart-container,
#table-container {
  flex: 1 1 48%;
  min-width: 300px;
  background-color: #769c63;
  padding: 20px;
  border-radius: 1rem;
  border: 1px solid #678a67;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  max-height: 60vh;
}

.chart-container canvas {
  flex: 1;
  width: 100% !important;
  height: 100% !important;
}

/* Table */
#table-container {
  overflow-y: auto;
}

/* =========================
   Tables
   ========================= */

table {
  width: 100%;
  border-collapse: collapse;
}

table, th, td {
  border: 1px solid #ccc;
}

th, td {
  padding: 8px;
  text-align: center;
}

th {
  background-color: #c8e6c9;
}

/* =========================
   Footer
   ========================= */

footer {
  background-color: #13251c;
  color: #cfe6da;
  text-align: center;
  padding: 2rem var(--content-padding);
  border-top: 1px solid #1f3a2c;
  margin-top: 4rem;
}

footer a {
  color: #9fe0b8;
}

footer a:hover {
  text-decoration: underline;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 800px) {
  #dashboard-section > * {
    flex-direction: column;
  }

  .chart-container,
  #table-container {
    max-height: 50vh;
    padding: 12px;
  }

  .feature-card {
    flex: 1 1 100%;
  }
}



/* =========================
   Signup Form Styling
   ========================= */

/* Signup Form Container */
#signup-section form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;            /* full width */
  max-width: 100%;        /* remove max-width cap */
  padding: 0;             /* optional, spacing handled by container */
}

/* Inputs, select, textarea */
#signup-section input,
#signup-section select,
#signup-section textarea {
  width: 100%;             /* stretch to full form width */
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid #2f6f4e;
  background-color: #1b2f25;
  color: #e6f2ea;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  box-sizing: border-box;  /* ensures padding included in width */
}

/* Select dropdown styling */
#signup-section select {
  appearance: none;
  padding-right: 2.5rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #9fe0b8 50%),
    linear-gradient(135deg, #9fe0b8 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Focus states */
#signup-section input:focus,
#signup-section select:focus,
#signup-section textarea:focus {
  outline: none;
  border-color: #9fe0b8;
  background-color: #213b2e;
  box-shadow: 0 0 0 3px rgba(159, 224, 184, 0.25);
}

/* Textarea resize */
#signup-section textarea {
  resize: vertical;
  min-height: 120px;
}

/* Submit Button */
#signup-section button[type="submit"] {
  width: 100%;
  padding: 0.75rem 0.9rem;  /* same vertical padding as inputs */
  font-size: 1rem;           /* same as inputs */
  line-height: 1;            /* key: prevents extra height */
  font-weight: 600;
  background-color: #2f6f4e;
  color: #e9f4ee;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
#signup-section button[type="submit"]:hover {
  background-color: #3e8b63;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* Disabled state */
#signup-section button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Status message */
#signupMessage {
  margin-top: 1rem;
  font-weight: 500;
}
