/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:  #1a3d2b;
  --green-mid:   #2d6a4f;
  --green-light: #52b788;
  --gold:        #c9a84c;
  --gold-light:  #e8c97a;
  --white:       #ffffff;
  --off-white:   #f7f8f5;
  --grey-light:  #e8ebe4;
  --grey-mid:    #9aab96;
  --text-dark:   #1a2318;
  --text-mid:    #3d4f3a;
  --text-light:  #6b7f67;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
  --radius:      8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Georgia, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--green-mid); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

/* ── Header / Nav ── */
header {
  background: var(--green-dark);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-badge {
  width: 48px;
  height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--green-dark);
  flex-shrink: 0;
}

.logo-text { line-height: 1.2; }
.logo-text .club-name { font-size: 1.1rem; font-weight: 700; color: var(--white); }
.logo-text .portal-name { font-size: 0.75rem; color: var(--gold-light); letter-spacing: 0.05em; text-transform: uppercase; }

.header-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--grey-mid);
}

.btn-signout {
  padding: 0.35rem 0.85rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 5px;
  color: var(--white);
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.btn-signout:hover { background: rgba(255,255,255,0.1); }

nav.main-nav {
  display: flex;
  gap: 0;
  padding: 0 2rem;
}

nav.main-nav a {
  color: rgba(255,255,255,0.75);
  padding: 0.75rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--white);
  border-bottom-color: var(--gold);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.hero p  { font-size: 1.05rem; color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 1.5rem; }

.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

/* ── Main content ── */
main { flex: 1; }
.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-top: 3px solid var(--green-light);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 1rem; color: var(--green-dark); margin-bottom: 0.4rem; }
.card p  { font-size: 0.875rem; color: var(--text-light); line-height: 1.5; }
.card a.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-mid);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--green-mid); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--green-dark); }
.btn-gold:hover { background: var(--gold-light); color: var(--green-dark); text-decoration: none; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--green-mid);
  color: var(--green-mid);
}
.btn-outline:hover { background: var(--green-mid); color: var(--white); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Section headings ── */
.section-title {
  font-size: 1.3rem;
  color: var(--green-dark);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.section-sub {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}
.divider {
  border: none;
  border-top: 1px solid var(--grey-light);
  margin: 2rem 0;
}

/* ── Document list ── */
.doc-list {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.doc-item {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--grey-light);
  gap: 0.85rem;
  transition: background 0.15s;
}
.doc-item:last-child { border-bottom: none; }
.doc-item:hover { background: var(--off-white); }

.doc-icon { font-size: 1.5rem; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 0.95rem; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.doc-meta { font-size: 0.78rem; color: var(--text-light); margin-top: 0.15rem; }

.doc-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.doc-actions button {
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  border: 1px solid var(--grey-light);
  background: var(--white);
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-mid);
  transition: background 0.15s;
}
.doc-actions button:hover { background: var(--off-white); }
.doc-actions .delete-btn { color: #dc2626; border-color: #fca5a5; }
.doc-actions .delete-btn:hover { background: #fef2f2; }

/* ── Upload toolbar ── */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.progress-bar {
  height: 4px;
  background: var(--green-light);
  width: 0%;
  transition: width 0.3s;
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* ── Auth form ── */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 2rem 1rem;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-card .logo { justify-content: center; margin-bottom: 1.5rem; }
.auth-card h2 { font-size: 1.3rem; color: var(--green-dark); margin-bottom: 0.25rem; }
.auth-card p.sub { font-size: 0.875rem; color: var(--text-light); margin-bottom: 1.5rem; }

label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--text-mid); margin-bottom: 0.3rem; }

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--grey-light);
  border-radius: 6px;
  font-size: 0.93rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  transition: border-color 0.2s;
}
input:focus { outline: none; border-color: var(--green-mid); }

.error-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 0.83rem;
  margin-bottom: 1rem;
  display: none;
}

.toggle-link { text-align: center; margin-top: 1rem; font-size: 0.83rem; color: var(--text-light); }
.toggle-link a { color: var(--green-mid); cursor: pointer; font-weight: 600; }
.toggle-link a:hover { text-decoration: underline; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--green-dark);
  color: var(--white);
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 999;
  border-left: 3px solid var(--gold);
}
.toast.show { opacity: 1; }

/* ── Empty state ── */
.empty { text-align: center; padding: 3rem; color: var(--grey-mid); font-size: 0.93rem; }

/* ── Footer ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 1.25rem;
  font-size: 0.8rem;
  margin-top: auto;
}
footer a { color: var(--gold-light); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .header-top { padding: 0.75rem 1rem; }
  nav.main-nav { padding: 0 1rem; overflow-x: auto; }
  .hero h1 { font-size: 1.6rem; }
  .container { padding: 1.5rem 1rem; }
  .doc-actions { flex-direction: column; }
}
