:root {
  --ff-bg: #f4f7f2;
  --ff-surface: #ffffff;
  --ff-text: #1a2e24;
  --ff-muted: #5a6b62;
  --ff-brand: #2d4a3e;
  --ff-brand-dark: #1e332a;
  --ff-accent: #6b9b4f;
  --ff-accent-hover: #5a8642;
  --ff-gold: #c4a035;
  --ff-border: rgba(45, 74, 62, 0.12);
  --ff-shadow: 0 8px 30px rgba(30, 51, 42, 0.08);
  --ff-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--ff-bg);
  color: var(--ff-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
}

a { color: var(--ff-brand); text-decoration: none; }
a:hover { color: var(--ff-accent); }

.ff-page { min-height: 100vh; display: flex; flex-direction: column; }
.ff-main { flex: 1; }

.container-xl { max-width: 1140px; }

/* Nav */
.ff-nav {
  background: var(--ff-brand-dark);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .65rem 0;
}

.ff-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #fff !important;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  text-decoration: none !important;
}

.ff-brand-accent { color: #a8d48a; }

.ff-nav .navbar-toggler { border-color: rgba(255,255,255,.25); }
.ff-nav .navbar-toggler-icon { filter: invert(1); }

.ff-nav-links .nav-link {
  color: rgba(255,255,255,.78);
  font-weight: 500;
  font-size: .92rem;
  padding: .45rem .85rem;
  border-radius: 999px;
}

.ff-nav-links .nav-link:hover,
.ff-nav-links .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.ff-user-toggle {
  color: rgba(255,255,255,.9) !important;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ff-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn-ff-primary {
  background: var(--ff-accent);
  border-color: var(--ff-accent);
  color: #fff;
  font-weight: 600;
}

.btn-ff-primary:hover {
  background: var(--ff-accent-hover);
  border-color: var(--ff-accent-hover);
  color: #fff;
}

.btn-ff-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.45);
  color: #fff;
  font-weight: 600;
}

.ff-nav-actions .btn-ff-outline {
  border-color: rgba(255,255,255,.35);
  color: #fff;
}

.ff-nav-actions .btn-ff-outline:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.ff-main .btn-ff-outline {
  border-color: var(--ff-border);
  color: var(--ff-brand);
}

.ff-main .btn-ff-outline:hover {
  background: rgba(107, 155, 79, .08);
  border-color: var(--ff-accent);
  color: var(--ff-brand-dark);
}

.text-ff-accent { color: var(--ff-accent) !important; }

/* Hero */
.ff-hero {
  background: linear-gradient(135deg, var(--ff-brand-dark) 0%, #3a5f4c 55%, #4a7358 100%);
  color: #fff;
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.ff-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(168,212,138,.15), transparent 45%);
  pointer-events: none;
}

.ff-hero > .container-xl { position: relative; z-index: 1; }

.ff-badge-live {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  padding: .3rem .75rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.ff-hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}

.ff-hero-title em {
  font-style: normal;
  color: #a8d48a;
}

.ff-hero-lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.82);
  max-width: 540px;
}

.ff-hero-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--ff-radius);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

.ff-hero-stat {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.ff-hero-stat:last-child { border-bottom: none; }

.ff-hero-stat i {
  font-size: 1.35rem;
  color: #a8d48a;
  width: 28px;
}

.ff-hero-stat strong { display: block; font-size: 1.1rem; }
.ff-hero-stat span { font-size: .82rem; color: rgba(255,255,255,.7); }

/* Feature cards */
.ff-feature-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  padding: 1.5rem;
  box-shadow: var(--ff-shadow);
  transition: transform .15s, box-shadow .15s;
}

.ff-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(30, 51, 42, 0.1);
}

.ff-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(107, 155, 79, .12);
  color: var(--ff-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

/* Panels */
.ff-panel {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  box-shadow: var(--ff-shadow);
  overflow: hidden;
}

.ff-panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ff-border);
}

.ff-panel-body { padding: 1.5rem; }

.ff-panel-side { position: sticky; top: 88px; }

.ff-input:focus {
  border-color: var(--ff-accent);
  box-shadow: 0 0 0 .2rem rgba(107, 155, 79, .15);
}

.ff-search-box { position: relative; }

.ff-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: var(--ff-shadow);
  border-radius: .5rem;
}

.ff-suggestions .list-group-item {
  cursor: pointer;
  border-left: none;
  border-right: none;
}

.ff-suggestions .list-group-item:first-child { border-top: none; }

.ff-tip {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  background: rgba(107, 155, 79, .08);
  border: 1px solid rgba(107, 155, 79, .2);
  border-radius: .65rem;
  padding: .85rem;
  font-size: .85rem;
  color: var(--ff-muted);
}

.ff-tip i { color: var(--ff-accent); font-size: 1.1rem; flex-shrink: 0; }

.ff-steps li { margin-bottom: .35rem; }

/* Forecast result card */
.ff-forecast-card {
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  overflow: hidden;
  background: var(--ff-surface);
}

.ff-forecast-card-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, rgba(107,155,79,.08), transparent);
  border-bottom: 1px solid var(--ff-border);
}

.ff-forecast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
  padding: 1rem 1.25rem;
}

.ff-forecast-stat {
  background: var(--ff-bg);
  border-radius: .65rem;
  padding: .75rem;
  font-size: .82rem;
}

.ff-forecast-stat strong {
  display: block;
  font-size: .95rem;
  margin-top: .15rem;
}

.ff-forecast-stat .label {
  color: var(--ff-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Club cards */
.ff-club-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  overflow: hidden;
  box-shadow: var(--ff-shadow);
  display: flex;
  flex-direction: column;
}

.ff-club-card-img {
  height: 160px;
  background: linear-gradient(135deg, #dce8d6, #c5d9bc);
  overflow: hidden;
}

.ff-club-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ff-club-card-img--fallback,
.ff-club-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ff-brand);
  font-size: 2.5rem;
  opacity: .45;
}

.ff-club-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ff-pill {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: var(--ff-bg);
  border: 1px solid var(--ff-border);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  font-weight: 600;
}

.ff-pill-rank {
  background: var(--ff-brand);
  color: #fff;
  cursor: pointer;
}

.ff-pill-rank:hover { background: var(--ff-brand-dark); color: #fff; }

/* Auth */
.ff-auth-wrap {
  max-width: 420px;
  margin: 2rem auto;
}

.ff-auth-card {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  padding: 2rem;
  box-shadow: var(--ff-shadow);
}

/* Footer */
.ff-footer {
  background: var(--ff-brand-dark);
  color: rgba(255,255,255,.85);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}

.ff-footer-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.ff-footer-muted { color: rgba(255,255,255,.6); }

.ff-footer-heading {
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .75rem;
}

.ff-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ff-footer-links a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
}

.ff-footer-links a:hover { color: #fff; }

.ff-footer-links li { margin-bottom: .45rem; }

.ff-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  padding-top: 1rem;
  color: rgba(255,255,255,.5);
}

.ff-alert { border-radius: .65rem; }

/* Legacy admin compat */
.card-nice {
  background: var(--ff-surface);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  padding: 1.25rem;
  box-shadow: var(--ff-shadow);
}

.club-thumb {
  width: 100%;
  max-height: 220px;
  border-radius: .65rem;
  object-fit: cover;
}

.club-thumb-small {
  width: 96px;
  height: 64px;
  border-radius: .5rem;
  object-fit: cover;
}

@media (max-width: 991.98px) {
  .ff-panel-side { position: static; }
  .ff-hero { padding: 2.5rem 0; }
}
