/* frontend/styles.css
   Golf-like look & feel (greens + clubhouse cards + subtle turf texture)
   Keeps existing class names AND adds a modern minimal landing page layer.
*/

:root {
  --bg-top: #f3f7f2;
  --bg-bottom: #e9f1ea;

  --green-900: #0b2f1a;
  --green-800: #124027;
  --green-700: #1a5532;
  --green-600: #1f6b3a;
  --green-500: #2b8647;

  --text: #102015;
  --muted: #4a5b50;

  --card: #ffffff;
  --card-2: #f7faf7;

  --border: rgba(16, 32, 21, 0.12);
  --shadow: 0 10px 30px rgba(16, 32, 21, 0.12);
  --shadow-soft: 0 6px 18px rgba(16, 32, 21, 0.10);

  --ring: rgba(43, 134, 71, 0.28);

  --input-bg: #ffffff;
  --input-border: rgba(16, 32, 21, 0.18);
  --input-border-focus: rgba(43, 134, 71, 0.60);

  --chip-bg: rgba(43, 134, 71, 0.10);
  --chip-border: rgba(43, 134, 71, 0.25);

  --radius: 16px;
  --radius-lg: 22px;
}

html, body { height: 100%; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(43,134,71,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(31,107,58,.14), transparent 55%),
    repeating-linear-gradient(
      90deg,
      rgba(16,32,21,.018) 0px,
      rgba(16,32,21,.018) 1px,
      transparent 1px,
      transparent 10px
    ),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.container {
  max-width: 1100px;
  margin: 28px auto;
  padding: 0 16px 36px;
}

h1 {
  margin: 0 0 16px;
  font-size: 42px;
  letter-spacing: -0.02em;
  color: var(--green-900);
}
h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  color: var(--green-900);
}
p { color: var(--muted); }

a {
  color: var(--green-700);
  text-decoration: none;
  font-weight: 650;
}
a:hover {
  color: var(--green-900);
  text-decoration: underline;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-900);
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  box-sizing: border-box;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  box-shadow: 0 1px 0 rgba(16,32,21,.04);
  outline: none;
}

textarea { resize: vertical; }

input:focus, textarea:focus, select:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 4px var(--ring);
}

.full { grid-column: 1 / -1; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

button {
  padding: 10px 14px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  color: #fff;
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(255,255,255,.22), transparent 40%),
    linear-gradient(180deg, var(--green-600), var(--green-800));
  box-shadow: 0 10px 18px rgba(16,32,21,.18);
  transition: transform .06s ease, box-shadow .12s ease, filter .12s ease;
}

button:hover {
  filter: brightness(1.03);
  box-shadow: 0 12px 22px rgba(16,32,21,.20);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 8px 16px rgba(16,32,21,.18);
}

.status {
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--green-900);
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green-600);
  box-shadow: 0 0 0 3px rgba(43,134,71,.12);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.72);
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16,32,21,.08);
}

thead th {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(16,32,21,.75);
  background: rgba(18,64,39,.08);
  border-bottom: 1px solid var(--border);
}

tbody tr:hover {
  background: rgba(43,134,71,.06);
}

tbody tr:last-child td { border-bottom: none; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background:
    radial-gradient(140% 120% at 15% 0%, rgba(43,134,71,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.85), rgba(247,250,247,.95));
  box-shadow: var(--shadow-soft);
}

.summary-label {
  font-size: 0.78rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: rgba(16,32,21,.75);
}

.summary-value {
  font-size: 1.7rem;
  font-weight: 900;
  margin-top: 6px;
  letter-spacing: -0.02em;
  color: var(--green-900);
}

/* ---- Dashboard chart grid ---- */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chart-wrap { height: 220px; }

@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }
}

@media (max-width: 800px) {
  .chart-grid { grid-template-columns: 1fr; }
}

/* =======================================================
   Modern minimal landing page layer (less boxes, more slick)
   Applies only when <body class="landing">
   ======================================================= */

body.landing .container {
  max-width: 1050px;
  padding-bottom: 28px;
}

.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 18px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-name {
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--green-900);
  font-size: 2.0rem;
  line-height: 1;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.9;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}
.landing-link:hover {
  opacity: 1;
  border-bottom-color: rgba(0,0,0,0.18);
}

.landing-hero {
  border-radius: 22px;
  padding: 22px;
  /* LIGHTENED green box */
  background: linear-gradient(
    180deg,
    rgba(44, 132, 86, 0.60),
    rgba(20, 96, 57, 0.68)
  );
  color: #eef7f0;
  box-shadow: 0 18px 42px rgba(0,0,0,0.16);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(900px 280px at 18% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    radial-gradient(700px 260px at 85% 18%, rgba(255, 255, 255, 0.10), transparent 55%);
  pointer-events: none;
}

.landing-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.85rem;
  font-weight: 800;
}

.landing-title {
  margin: 14px 0 10px;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #eef7f0;
}

.landing-accent {
  color: rgba(232, 255, 240, 0.96);
}

.landing-subtitle {
  margin: 0 0 16px;
  color: rgba(238, 247, 240, 0.90);
  max-width: 64ch;
  line-height: 1.5;
}

.landing-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.landing-meta {
  font-size: 0.92rem;
  color: rgba(238, 247, 240, 0.82);
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform .06s ease, filter .12s ease, background .12s ease;
}

.landing-btn--primary {
  background: #e7fff0;
  color: #05311b;
  border-color: rgba(255,255,255,0.10);
}
.landing-btn--primary:hover { filter: brightness(0.98); }

.landing-btn--ghost {
  background: #e7fff0;
  color: #05311b;
  border-color: rgba(255,255,255,0.10);
}

.landing-btn--text {
  background: transparent;
  color: rgba(238, 247, 240, 0.92);
  border-color: rgba(255,255,255,0.16);
}
.landing-btn--text:hover { background: rgba(255,255,255,0.10); }

.landing-features {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.16);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.landing-feature {
  padding: 10px 10px;
  border-radius: 14px;
  /* LIGHTENED feature tiles */
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
}

.landing-feature-title {
  font-weight: 900;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.landing-feature-text {
  color: rgba(238, 247, 240, 0.86);
  font-size: 0.92rem;
}

.landing-value {
  margin-top: 18px;
  padding: 18px 4px 0;
}

.landing-value-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.landing-value-text {
  margin: 0;
  color: rgba(20, 30, 24, 0.72);
  max-width: 88ch;
  line-height: 1.6;
}

.landing-footer {
  margin-top: 20px;
  padding: 14px 0 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(20, 30, 24, 0.62);
  border-top: 1px solid rgba(0,0,0,0.08);
}

.landing-footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .landing-features { grid-template-columns: 1fr 1fr; }
  .landing-title { font-size: 1.85rem; }
  .landing-footer { flex-direction: column; }
}

@media (max-width: 600px) {
  .landing-features { grid-template-columns: 1fr; }
}

/* ---- Date range / dashboard controls ---- */

.range-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.range-left .range-title {
  font-weight: 900;
  color: var(--green-900);
  margin-bottom: 4px;
}

.range-left .range-sub {
  color: rgba(20, 30, 24, 0.72);
  font-size: 0.95rem;
}

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

.range-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--green-900);
  min-width: 160px;
}

/* Fix: buttons were blending into the light card background */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(16,32,21,.16);
  background: rgba(255,255,255,0.92);
  color: var(--green-900);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 32, 21, 0.10);
}

.btn:hover { background: #ffffff; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--green-900);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.55);
}

/* Optional: make Apply feel slightly primary */
.btn-apply {
  background: rgba(231, 255, 240, 0.95);
  border-color: rgba(43, 134, 71, 0.25);
}
.btn-apply:hover { filter: brightness(0.99); }

.muted {
  color: rgba(20, 30, 24, 0.62);
}

/* If you wrap the inputs/buttons in .date-controls, this guarantees readable buttons too */
.date-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.date-controls button,
.date-controls .btn {
  color: var(--green-900);
}

/* Custom green hero box for landing page */
.hero-green {
  background: linear-gradient(180deg, rgba(44, 132, 86, 0.88), rgba(20, 96, 57, 0.88));
  color: #eef7f0;
  box-shadow: 0 18px 42px rgba(0,0,0,0.16);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.14);
}

.hero-green .btn-outline-light {
  border-color: rgba(255,255,255,0.85);
  color: rgba(255,255,255,0.95);
}

.hero-green .btn-outline-light:hover {
  background-color: rgba(255,255,255,0.95);
  color: #226c45;
}

.hero-green .btn.btn-light {
  background: #eef7f0;
  color: #124027;
  font-weight: 800;
}

.hero-green h2 {
  color: #ffffff;
}

.hero-green .text-success {
  color: #baf2d8 !important;
}

.hero-green .bg-light {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero-green .bg-light h5,
.hero-green .bg-light p {
  color: #f0fdf7 !important;
}

.btn.btn-primary,
button.btn.btn-primary,
input.btn.btn-primary[type="submit"] {
  background-color: #e7fff0 !important;  /* light green */
  border-color: rgba(16, 32, 21, 0.16) !important;
  color: #05311b !important;            /* dark text */
  font-weight: 900;
}

/* Hover: keep exactly the same colours */
.btn.btn-primary:hover,
button.btn.btn-primary:hover,
input.btn.btn-primary[type="submit"]:hover {
  background-color: #e7fff0 !important;
  border-color: rgba(16, 32, 21, 0.16) !important;
  color: #05311b !important;
  filter: none !important;
}

/* Focus (keyboard) - optional but recommended */
.btn.btn-primary:focus,
.btn.btn-primary:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(43, 134, 71, 0.28) !important;
}

/* Active/pressed - optional (keeps it feeling clickable without colour change) */
.btn.btn-primary:active {
  transform: translateY(1px);
}

.btn.btn-outline-primary {
  background-color: #e7fff0 !important;   /* light green */
  border-color: rgba(16, 32, 21, 0.16) !important;
  color: #05311b !important;              /* dark green text */
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16, 32, 21, 0.10);
}

/* Hover: keep identical */
.btn.btn-outline-primary:hover {
  background-color: #e7fff0 !important;
  border-color: rgba(16, 32, 21, 0.16) !important;
  color: #05311b !important;
  filter: none !important;
}

/* Focus (keyboard accessibility) */
.btn.btn-outline-primary:focus,
.btn.btn-outline-primary:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(43, 134, 71, 0.28) !important;
}

/* Active / pressed feedback */
.btn.btn-outline-primary:active {
  transform: translateY(1px);
}

.btn.btn-outline-secondary {
  background-color: #e7fff0 !important;   /* light green */
  border-color: rgba(16, 32, 21, 0.16) !important;
  color: #05311b !important;              /* dark green text */
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(16, 32, 21, 0.10);
}

/* Hover: keep identical */
.btn.btn-outline-secondary:hover {
  background-color: #e7fff0 !important;
  border-color: rgba(16, 32, 21, 0.16) !important;
  color: #05311b !important;
  filter: none !important;
}

/* Focus (keyboard accessibility) */
.btn.btn-outline-secondary:focus,
.btn.btn-outline-secondary:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(43, 134, 71, 0.28) !important;
}

/* Active / pressed feedback */
.btn.btn-outline-secondary:active {
  transform: translateY(1px);
}