/* ==========================================================================
   Coral Shores Fishing Club Network — style.css
   Palette: deep-water navy, tide cyan, tournament gold.
   One type family (Barlow) in two widths: condensed for headings, normal for text.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600&display=swap');

:root {
  --abyss: #06121f;
  --deep: #0d2237;
  --shelf: #16395a;
  --line: #1b3f62;
  --foam: #e9f2f8;
  --mist: #9db4c6;
  --tide: #3ec1e0;
  --tide-dark: #1a93b3;
  --sun: #f0a63c;
  --kelp: #34a97c;
  --coral: #e0574a;

  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(2, 10, 20, .45);
  --maxw: 1140px;

  --sans: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cond: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(62, 193, 224, .10), transparent 60%),
    linear-gradient(180deg, var(--abyss), #050e18 70%);
  background-attachment: fixed;
  color: var(--foam);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, .brand, .stat-value, .rank {
  font-family: var(--cond);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.1;
  margin: 0 0 .4em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; max-width: 72ch; }
a { color: var(--tide); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--tide);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page { padding: 28px 0 80px; }
.muted { color: var(--mist); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 18, 31, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { font-size: 1.35rem; display: flex; align-items: center; gap: 10px; color: var(--foam); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  background: linear-gradient(140deg, var(--tide), var(--tide-dark));
  display: grid; place-items: center; color: #04131d; font-size: 16px;
}
.brand span.sub { color: var(--mist); font-weight: 500; }
.nav-toggle {
  margin-left: auto; display: none; background: transparent; color: var(--foam);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 1rem; cursor: pointer;
}
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: var(--foam); padding: 8px 12px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: .95rem;
}
.nav-links a:hover { background: var(--deep); text-decoration: none; }
.nav-links a.active { background: var(--shelf); }
.nav-user { color: var(--mist); font-size: .9rem; padding-left: 8px; border-left: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 12px 20px; min-height: 46px;
  border-radius: var(--radius); border: 1px solid transparent;
  background: var(--tide); color: #04121a; cursor: pointer;
  transition: filter .15s ease, background .15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { filter: brightness(.94); }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; border-color: var(--shelf); color: var(--foam); }
.btn-ghost:hover { background: var(--deep); }
.btn-danger { background: var(--coral); color: #fff; }
.btn-gold { background: var(--sun); color: #2a1804; }
.btn-sm { padding: 7px 12px; min-height: 34px; font-size: .875rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* ---------- Cards, panels ---------- */
.card {
  background: linear-gradient(180deg, rgba(19, 46, 74, .75), rgba(11, 30, 49, .75));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-sidebar { grid-template-columns: 2fr 1fr; align-items: start; }

.stat { background: var(--deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat-value { font-size: 2.1rem; color: var(--tide); }
.stat-label { color: var(--mist); font-size: .9rem; }

/* ---------- Tags / badges ---------- */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; border: 1px solid var(--shelf); color: var(--mist);
  background: rgba(10, 26, 42, .8);
}
.tag-approved { color: #b6f0d6; border-color: rgba(52, 169, 124, .6); background: rgba(52, 169, 124, .16); }
.tag-pending { color: #ffd9a1; border-color: rgba(240, 166, 60, .6); background: rgba(240, 166, 60, .16); }
.tag-denied { color: #ffc4be; border-color: rgba(224, 87, 74, .6); background: rgba(224, 87, 74, .16); }
.tag-active { color: #bdf0fb; border-color: rgba(62, 193, 224, .6); background: rgba(62, 193, 224, .16); }
.tag-locked { color: #ffd9a1; border-color: rgba(240, 166, 60, .6); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .95rem; }
input, select, textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--foam);
  background: #0a1c2d; border: 1px solid var(--shelf); border-radius: var(--radius-sm);
  padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox] { width: auto; min-height: 0; margin-right: 8px; accent-color: var(--tide); }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check-line { display: flex; align-items: flex-start; gap: 4px; font-weight: 500; }
.check-line input { margin-top: 4px; }
.form-hint { color: var(--mist); font-size: .85rem; margin-top: 6px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; }
legend { font-family: var(--cond); font-size: 1.1rem; padding: 0 6px; }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 460px; margin: 60px auto; }
.auth-wrap .card { padding: 28px; }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: .95rem; }
th { font-family: var(--cond); font-size: 1.02rem; color: var(--mist); font-weight: 600; }
tbody tr:hover { background: rgba(28, 66, 102, .35); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font-size: 1.15rem; color: var(--tide); }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  padding: 14px 0; border-bottom: 1px solid var(--line);
  display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
}
.list li:last-child { border-bottom: 0; }
.item-title { font-family: var(--cond); font-size: 1.15rem; margin: 0 0 2px; }

/* ---------- States ---------- */
.state { padding: 28px 16px; text-align: center; color: var(--mist); }
.state-title { font-family: var(--cond); font-size: 1.2rem; color: var(--foam); margin-bottom: 4px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%;
  border: 3px solid var(--shelf); border-top-color: var(--tide);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.alert { border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--shelf); background: var(--deep); margin-bottom: 14px; }
.alert-error { border-color: rgba(224, 87, 74, .7); background: rgba(224, 87, 74, .14); }
.alert-ok { border-color: rgba(52, 169, 124, .7); background: rgba(52, 169, 124, .14); }
.alert-warn { border-color: rgba(240, 166, 60, .7); background: rgba(240, 166, 60, .12); }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, 90vw); }
.toast { background: var(--deep); border: 1px solid var(--shelf); border-left-width: 4px; border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.toast-error { border-left-color: var(--coral); }
.toast-ok { border-left-color: var(--kelp); }
.toast-info { border-left-color: var(--tide); }

/* ---------- Landing ---------- */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); max-width: 16ch; }
.hero p.lede { font-size: 1.2rem; color: var(--mist); max-width: 56ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.wave {
  display: block; width: 100%; height: 70px; color: var(--deep);
}
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.feature { background: var(--deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { color: var(--foam); }
.feature p { color: var(--mist); margin: 0; font-size: .95rem; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 12px 0; border: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  font-family: var(--cond); font-size: 1.3rem; color: var(--tide);
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--shelf);
  display: grid; place-items: center;
}

/* ---------- Club tabs ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 22px; padding-bottom: 2px; }
.tabs button {
  background: transparent; border: 0; border-bottom: 3px solid transparent;
  color: var(--mist); font-family: var(--cond); font-size: 1.12rem; font-weight: 600;
  padding: 10px 14px; cursor: pointer; white-space: nowrap; min-height: 44px;
}
.tabs button:hover { color: var(--foam); }
.tabs button.active { color: var(--foam); border-bottom-color: var(--tide); }

/* ---------- Chat ---------- */
.chat-log {
  height: 420px; overflow-y: auto; padding: 8px 4px;
  display: flex; flex-direction: column; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(5, 16, 27, .6);
}
.msg { padding: 8px 12px; border-radius: var(--radius); background: var(--deep); border: 1px solid var(--line); }
.msg-meta { font-size: .8rem; color: var(--mist); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.msg-author { font-weight: 600; color: var(--tide); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-mine { border-color: var(--tide-dark); }
.chat-form { display: flex; gap: 10px; margin-top: 12px; }
.chat-form input { flex: 1; }

/* ---------- Photos ---------- */
.photo-preview { max-width: 100%; border-radius: var(--radius); border: 1px solid var(--shelf); display: block; }
.photo-thumb { width: 100%; max-width: 260px; border-radius: var(--radius-sm); border: 1px solid var(--shelf); cursor: zoom-in; }
.req-list { list-style: none; padding: 0; margin: 0 0 12px; }
.req-list li { border: 0; padding: 3px 0; display: block; color: var(--foam); }
.req-list li::before { content: '✓'; color: var(--kelp); margin-right: 8px; font-weight: 700; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(3, 10, 18, .8); z-index: 150;
  display: grid; place-items: center; padding: 18px;
}
.modal { background: var(--deep); border: 1px solid var(--shelf); border-radius: var(--radius-lg); padding: 22px; width: min(620px, 100%); max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--mist); font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  h1 { font-size: 2rem; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    padding: 10px 0 16px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
  .nav-user { border-left: 0; padding-left: 12px; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 32px; }
  .btn { width: 100%; }
  .btn-sm, .row-gap .btn { width: auto; }
  .chat-log { height: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
