/* Golf De Palingbeek — brand styling
   Palette taken from the club crest:
     forest green shield  #2a4124
     parchment / cream    #f3ead6
     poppy red accent     #c0392b           */

:root {
  --green: #2a4124;
  --green-dark: #1e2f1a;
  --green-light: #3c5a33;
  --cream: #f3ead6;
  --cream-soft: #faf5e9;
  --poppy: #c0392b;
  --poppy-dark: #9c2c20;
  --ink: #23291f;
  --muted: #6b7263;
  --border: #ddd5c1;
  --shadow: 0 2px 10px rgba(30, 47, 26, 0.12);
  --radius: 10px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream-soft);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--green); }

/* ---------- Header ---------- */
.site-header {
  background: var(--green);
  color: var(--cream);
  border-bottom: 4px solid var(--poppy);
}
.site-header .bar {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
}
.site-header .brand img { height: 48px; width: 48px; }
.site-header .brand .title { font-size: 1.05rem; font-weight: 700; letter-spacing: .5px; }
.site-header .brand .sub { font-size: .72rem; opacity: .8; letter-spacing: 2px; text-transform: uppercase; }
.site-header nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.site-header nav a {
  color: var(--cream);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: .92rem;
}
.site-header nav a:hover, .site-header nav a.active { background: rgba(255,255,255,.12); }
.site-header nav .who { opacity: .8; font-size: .82rem; }

/* ---------- Layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 1.6rem; color: var(--green); }
.muted { color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card h2 { margin-top: 0; color: var(--green); font-size: 1.15rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 7px;
  text-decoration: none;
  transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: var(--green-light); }
.btn-accent { background: var(--poppy); color: #fff; }
.btn-accent:hover { background: var(--poppy-dark); }
.btn-ghost { background: transparent; color: var(--green); border: 1px solid var(--green); }
.btn-ghost:hover { background: rgba(42,65,36,.07); }
.btn-danger { background: transparent; color: var(--poppy); border: 1px solid var(--poppy); }
.btn-danger:hover { background: rgba(192,57,43,.08); }
.btn-sm { padding: 6px 12px; font-size: .82rem; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .4px;
}
.badge-draft { background: #e8e4d6; color: #6b7263; }
.badge-scheduling { background: #fce9b8; color: #8a6d12; }
.badge-confirmed { background: #d6e6cd; color: #2a4124; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
tbody tr:hover { background: var(--cream-soft); }
td a { font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
input[type="text"], input[type="password"], input[type="number"],
input[type="email"], input[type="date"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--green-light); border-color: var(--green-light); }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- Flash messages ---------- */
.flashes { list-style: none; padding: 0; margin: 0 0 20px; }
.flashes li { padding: 12px 16px; border-radius: 8px; margin-bottom: 10px; font-weight: 500; }
.flash-success { background: #d6e6cd; color: #2a4124; border-left: 4px solid var(--green); }
.flash-error { background: #f6d9d4; color: #9c2c20; border-left: 4px solid var(--poppy); }

/* ---------- Definition list ---------- */
.detail-grid { display: grid; grid-template-columns: 160px 1fr; gap: 10px 18px; }
.detail-grid dt { color: var(--muted); font-weight: 600; }
.detail-grid dd { margin: 0; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--green); }
.login-card { background: #fff; border-radius: 14px; padding: 36px; width: 360px; box-shadow: 0 14px 40px rgba(0,0,0,.25); text-align: center; }
.login-card img { height: 92px; width: 92px; margin-bottom: 10px; }
.login-card h1 { color: var(--green); font-size: 1.25rem; margin: 0 0 4px; }
.login-card .sub { color: var(--muted); font-size: .8rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 22px; }
.login-card .form-row { text-align: left; }

/* ---------- Misc ---------- */
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.response-yes { color: var(--green); font-weight: 700; }
.response-no { color: var(--poppy); font-weight: 700; }
.response-pending { color: var(--muted); }
.help { font-size: .82rem; color: var(--muted); margin-top: 4px; }

.public-wrap { min-height: 100vh; background: var(--cream-soft); }
.public-card { max-width: 560px; margin: 40px auto; }

/* Error pages */
.error-card { max-width: 460px; }
.error-body { padding: 34px 26px; text-align: center; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--green); line-height: 1; }
.error-title { color: var(--green); font-size: 1.3rem; margin: 6px 0 10px; }
.error-body .btn { margin-top: 18px; }
.public-head { background: var(--green); color: var(--cream); border-radius: var(--radius) var(--radius) 0 0; padding: 24px; text-align: center; border-bottom: 4px solid var(--poppy); }
.public-head img { height: 70px; width: 70px; }

/* ---------- Section titles inside cards ---------- */
.section-title {
  color: var(--green);
  font-size: 1rem;
  margin: 22px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ---------- Tabs (list / calendar) ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 8px 18px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--green); }
.tab.active { color: var(--green); border-bottom-color: var(--green); }

/* ---------- Calendar ---------- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-period { font-weight: 700; color: var(--green); margin-left: 8px; text-transform: capitalize; }
.cal-views { display: flex; gap: 6px; }

table.calendar { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: collapse; }
table.calendar th {
  text-align: center; padding: 8px 4px; color: var(--muted);
  font-size: .72rem; text-transform: uppercase; letter-spacing: .5px;
}
table.calendar td.cal-cell {
  vertical-align: top; height: 104px; width: 14.28%;
  border: 1px solid var(--border); padding: 4px 5px; background: #fff;
}
table.calendar.week td.cal-cell { height: 360px; }
.cal-cell.out { background: var(--cream-soft); }
.cal-cell.out .cal-daynum { color: #c3bca9; }
.cal-cell.today { outline: 2px solid var(--green); outline-offset: -2px; }
.cal-daynum { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; text-align: right; }
.cal-cell.today .cal-daynum { color: var(--green); }
.cal-chip {
  display: block; text-decoration: none;
  font-size: .72rem; line-height: 1.3;
  padding: 3px 6px; border-radius: 5px; margin-bottom: 3px;
  border-left: 3px solid; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cal-chip .cal-chip-time { font-weight: 700; margin-right: 4px; }
.chip-draft { background: #ece7d6; border-color: #9aa088; color: #4d5142; }
.chip-scheduling { background: #fbeec4; border-color: #d8ad2e; color: #7a5f10; }
.chip-confirmed { background: #dcecd2; border-color: var(--green); color: var(--green); }
.cal-legend { display: flex; gap: 18px; margin-top: 14px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item .dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border-left: 3px solid; }

/* ---------- Dashboard filter ---------- */
.filter-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-bar label { font-weight: 600; }
select {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: .95rem;
  font-family: inherit;
  background: #fff;
}

/* ---------- Follow-up ---------- */
.followup-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--cream-soft);
}
.followup-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
label.inline { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; margin: 0; }

/* ---------- Payments ---------- */
.totals { display: flex; gap: 18px; flex-wrap: wrap; }
.total-box {
  flex: 1;
  min-width: 180px;
  background: var(--cream-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}
.total-label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.total-value { display: block; font-size: 1.6rem; font-weight: 700; color: var(--green); margin-top: 4px; }
.total-value.accent { color: var(--poppy); }
.mini-form { display: flex; align-items: center; gap: 6px; }
.mini-form input { padding: 6px 8px; }

/* Payments table: keep numeric/IBAN cells on one line, scroll if too wide. */
.table-scroll { overflow-x: auto; }
.payments-table th, .payments-table td { white-space: nowrap; vertical-align: middle; }
.payments-table td.wrap { white-space: normal; min-width: 160px; }
.payments-table .num { text-align: right; }
.payments-table th.num { text-align: right; }
.payments-table .iban { font-variant-numeric: tabular-nums; }
.in-num, .in-amount { padding: 6px 8px; text-align: right; }
.in-num { width: 58px; }
.in-amount { width: 90px; }
.nowrap { white-space: nowrap; }

/* ---------- Inline edit panel (teachers) ---------- */
.sub-row td { border-bottom: 1px solid var(--border); padding-top: 0; }
.sub-row details summary {
  cursor: pointer;
  color: var(--green);
  font-size: .85rem;
  font-weight: 600;
  padding: 4px 0;
}
.edit-panel { padding: 14px 0 6px; }
.edit-panel .inline-edit { max-width: 560px; }
tbody tr.sub-row:hover { background: transparent; }
.sub-row details + details { margin-top: 6px; }

/* Feedback / follow-up history per initiator */
.feedback-entry {
  border-left: 3px solid var(--border);
  padding: 8px 0 8px 12px;
  margin-bottom: 10px;
}
.feedback-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feedback-head a { font-weight: 600; text-decoration: none; }
.feedback-head a:hover { text-decoration: underline; }
.feedback-text { margin: 6px 0 0; white-space: pre-line; }

/* Copy-to-clipboard button (IBAN) */
.iban-wrap { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.iban-value { font-variant-numeric: tabular-nums; }
.btn-copy {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--green);
  border-radius: 5px;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 8px;
  line-height: 1.2;
  font-family: inherit;
}
.btn-copy:hover { background: var(--cream-soft); }
.btn-copy.copied { background: #d6e6cd; border-color: var(--green); }

/* ---------- Personal agenda ---------- */
.agenda-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.agenda-item.confirmed { border-left-color: var(--green); }
.agenda-main { display: flex; flex-direction: column; gap: 4px; }
.agenda-main strong { margin-right: 6px; }

@media (max-width: 640px) {
  .field-grid, .detail-grid { grid-template-columns: 1fr; }
  .site-header .brand .sub { display: none; }
  .agenda-item { flex-direction: column; align-items: flex-start; }
}

