/* CAS-Jartpoint V56 — één visueel systeem voor de hele website
   Doel: taakgericht, rustig, 60+ vriendelijk en toch herkenbaar premium. */
:root {
  --cj56-bg: #f2efe8;
  --cj56-surface: #fffdf8;
  --cj56-surface-soft: #f8f4ec;
  --cj56-ink: #12271e;
  --cj56-ink-soft: #34483e;
  --cj56-muted: #68736c;
  --cj56-green-950: #041a12;
  --cj56-green-900: #07281d;
  --cj56-green-800: #0b3f2d;
  --cj56-green-700: #126044;
  --cj56-green-600: #187451;
  --cj56-gold-500: #c99537;
  --cj56-gold-400: #d9ad51;
  --cj56-gold-300: #ead18b;
  --cj56-line: #d8d1c5;
  --cj56-line-soft: #eae4da;
  --cj56-danger: #9d3c3c;
  --cj56-info: #285f7b;
  --cj56-radius-sm: 10px;
  --cj56-radius: 14px;
  --cj56-radius-lg: 20px;
  --cj56-shadow: 0 10px 26px rgba(23, 43, 33, .08);
  --cj56-shadow-lg: 0 18px 42px rgba(12, 31, 22, .14);
  --cj56-content: 1320px;
}

body.cj-v56,
body.cj-has-admin-shell,
body.cj-has-public-shell {
  color: var(--cj56-ink) !important;
  background:
    radial-gradient(circle at 92% -8rem, rgba(201,149,55,.08), transparent 28rem),
    linear-gradient(180deg, #eeebe4 0, #f8f6f1 20rem, var(--cj56-bg) 100%) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 16px;
  line-height: 1.5;
}

/* Contentbreedte en ritme */
body.cj-has-admin-shell .container,
body.cj-has-public-shell .container,
body.cj-has-admin-shell .wrap,
body.cj-has-public-shell .wrap,
body.cj-has-admin-shell .manage-wrap,
body.cj-has-public-shell .manage-wrap,
body.cj-has-admin-shell main.container,
body.cj-has-public-shell main.container {
  width: min(var(--cj56-content), calc(100% - 36px)) !important;
  max-width: var(--cj56-content) !important;
  margin-inline: auto !important;
  padding: 22px 0 54px !important;
}

/* Pagina-intro: minder hoog, maar visueel sterker */
body.cj-has-admin-shell .cj-page-hero,
body.cj-has-public-shell .cj-page-hero,
body.cj-has-admin-shell .overview-hero,
body.cj-has-public-shell .overview-hero {
  position: relative;
  margin-bottom: 16px !important;
  padding: clamp(20px, 2.6vw, 32px) !important;
  overflow: hidden;
  color: #fffaf0 !important;
  border: 1px solid rgba(234,209,139,.30) !important;
  border-radius: var(--cj56-radius-lg) !important;
  background:
    radial-gradient(circle at 88% 10%, rgba(234,209,139,.15), transparent 18rem),
    linear-gradient(135deg, var(--cj56-green-950), var(--cj56-green-800) 58%, #15563e) !important;
  box-shadow: var(--cj56-shadow-lg) !important;
}
body.cj-has-admin-shell .cj-page-hero::after,
body.cj-has-public-shell .cj-page-hero::after,
body.cj-has-admin-shell .overview-hero::after,
body.cj-has-public-shell .overview-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cj56-gold-500) 20%, var(--cj56-gold-300) 50%, var(--cj56-gold-500) 80%, transparent);
}
body.cj-has-admin-shell .cj-page-hero h1,
body.cj-has-admin-shell .cj-page-hero h2,
body.cj-has-public-shell .cj-page-hero h1,
body.cj-has-public-shell .cj-page-hero h2,
body.cj-has-admin-shell .overview-hero h1,
body.cj-has-public-shell .overview-hero h1 {
  margin: 0 0 7px !important;
  color: #fffaf0 !important;
  font-size: clamp(30px, 3.1vw, 46px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -.04em !important;
}
body.cj-has-admin-shell .cj-page-hero p,
body.cj-has-public-shell .cj-page-hero p,
body.cj-has-admin-shell .overview-hero p,
body.cj-has-public-shell .overview-hero p {
  max-width: 820px;
  margin: 0 !important;
  color: rgba(255,250,240,.86) !important;
  font-size: 15px !important;
  line-height: 1.55 !important;
}

/* Kaarten: minder decoratieve wildgroei, meer inhoudelijke hiërarchie */
body.cj-has-admin-shell .card,
body.cj-has-public-shell .card,
body.cj-has-admin-shell .section,
body.cj-has-public-shell .section,
body.cj-has-admin-shell .section-card,
body.cj-has-public-shell .section-card,
body.cj-has-admin-shell .panel,
body.cj-has-public-shell .panel,
body.cj-has-admin-shell .competition-card,
body.cj-has-public-shell .competition-card,
body.cj-has-admin-shell .wedstrijd-card,
body.cj-has-public-shell .wedstrijd-card,
body.cj-has-admin-shell .wedstrijd-item,
body.cj-has-public-shell .wedstrijd-item,
body.cj-has-admin-shell .match-item,
body.cj-has-public-shell .match-item,
body.cj-has-admin-shell .item,
body.cj-has-public-shell .item,
body.cj-has-admin-shell .info-box,
body.cj-has-public-shell .info-box {
  color: var(--cj56-ink) !important;
  background: linear-gradient(180deg, #fffefa, var(--cj56-surface)) !important;
  border: 1px solid var(--cj56-line) !important;
  border-radius: var(--cj56-radius) !important;
  box-shadow: var(--cj56-shadow) !important;
}
body.cj-has-admin-shell .card,
body.cj-has-public-shell .card,
body.cj-has-admin-shell .section,
body.cj-has-public-shell .section,
body.cj-has-admin-shell .section-card,
body.cj-has-public-shell .section-card,
body.cj-has-admin-shell .panel,
body.cj-has-public-shell .panel {
  padding: clamp(17px, 2vw, 24px) !important;
}
body.cj-has-admin-shell .card + .card,
body.cj-has-public-shell .card + .card,
body.cj-has-admin-shell .section + .section,
body.cj-has-public-shell .section + .section { margin-top: 14px !important; }

body.cj-has-admin-shell h1,
body.cj-has-admin-shell h2,
body.cj-has-admin-shell h3,
body.cj-has-public-shell h1,
body.cj-has-public-shell h2,
body.cj-has-public-shell h3 {
  color: var(--cj56-ink) !important;
  font-weight: 850 !important;
  letter-spacing: -.025em !important;
}
body.cj-has-admin-shell p,
body.cj-has-public-shell p,
body.cj-has-admin-shell .small,
body.cj-has-public-shell .small,
body.cj-has-admin-shell .muted,
body.cj-has-public-shell .muted,
body.cj-has-admin-shell .meta,
body.cj-has-public-shell .meta,
body.cj-has-admin-shell .hint,
body.cj-has-public-shell .hint { color: var(--cj56-muted) !important; }

.section-head,
.card-title {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 14px !important;
  flex-wrap: wrap !important;
  margin-bottom: 16px !important;
  padding-bottom: 13px !important;
  border-bottom: 1px solid var(--cj56-line-soft) !important;
}
.section-head h2,
.card-title h2 { margin: 0 !important; font-size: clamp(23px, 2.2vw, 32px) !important; }

/* Formulieren: 60+ vriendelijk en mobiel */
body.cj-has-admin-shell label,
body.cj-has-public-shell label {
  color: var(--cj56-ink-soft) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
body.cj-has-admin-shell input,
body.cj-has-admin-shell select,
body.cj-has-admin-shell textarea,
body.cj-has-public-shell input,
body.cj-has-public-shell select,
body.cj-has-public-shell textarea {
  min-height: 46px !important;
  padding: 10px 12px !important;
  color: var(--cj56-ink) !important;
  background: #fff !important;
  border: 1px solid #bfc8c1 !important;
  border-radius: var(--cj56-radius-sm) !important;
  box-shadow: inset 0 1px 2px rgba(10,25,18,.03) !important;
  font-size: 16px !important;
}
body.cj-has-admin-shell input:focus,
body.cj-has-admin-shell select:focus,
body.cj-has-admin-shell textarea:focus,
body.cj-has-public-shell input:focus,
body.cj-has-public-shell select:focus,
body.cj-has-public-shell textarea:focus {
  outline: 3px solid rgba(201,149,55,.22) !important;
  border-color: var(--cj56-green-600) !important;
  box-shadow: 0 0 0 2px rgba(18,96,68,.10) !important;
}

/* Knoppen: maximaal drie visuele niveaus */
body.cj-has-admin-shell button,
body.cj-has-public-shell button,
body.cj-has-admin-shell .button,
body.cj-has-public-shell .button,
body.cj-has-admin-shell .btn,
body.cj-has-public-shell .btn,
body.cj-has-admin-shell .back-btn,
body.cj-has-public-shell .back-btn,
body.cj-has-admin-shell input[type="submit"],
body.cj-has-public-shell input[type="submit"] {
  min-height: 44px !important;
  padding: 10px 14px !important;
  border: 1px solid transparent !important;
  border-radius: var(--cj56-radius-sm) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
}
body.cj-has-admin-shell .primary,
body.cj-has-public-shell .primary,
body.cj-has-admin-shell .button-primary,
body.cj-has-public-shell .button-primary,
body.cj-has-admin-shell .btn.green,
body.cj-has-public-shell .btn.green {
  color: #fff !important;
  background: linear-gradient(135deg, var(--cj56-green-700), var(--cj56-green-900)) !important;
  border-color: rgba(4,34,23,.20) !important;
}
body.cj-has-admin-shell .secondary,
body.cj-has-public-shell .secondary,
body.cj-has-admin-shell .button-secondary,
body.cj-has-public-shell .button-secondary,
body.cj-has-admin-shell .btn.dark,
body.cj-has-public-shell .btn.dark,
body.cj-has-admin-shell .back-btn,
body.cj-has-public-shell .back-btn {
  color: var(--cj56-ink-soft) !important;
  background: #fff !important;
  border-color: #bcc6bf !important;
}
body.cj-has-admin-shell .btn.gold,
body.cj-has-public-shell .btn.gold,
body.cj-has-admin-shell .button.gold,
body.cj-has-public-shell .button.gold {
  color: #2b200b !important;
  background: linear-gradient(135deg, var(--cj56-gold-300), var(--cj56-gold-500)) !important;
  border-color: rgba(145,96,16,.22) !important;
}
body.cj-has-admin-shell .danger,
body.cj-has-public-shell .danger,
body.cj-has-admin-shell .btn.red,
body.cj-has-public-shell .btn.red { color:#fff !important; background:var(--cj56-danger) !important; }

/* Tabellen: duidelijke kop, vaste rijhoogte, altijd horizontaal bruikbaar */
body.cj-has-admin-shell .table-wrap,
body.cj-has-public-shell .table-wrap,
body.cj-has-admin-shell .stand-scroll,
body.cj-has-public-shell .stand-scroll {
  width: 100% !important;
  overflow: auto !important;
  border: 1px solid var(--cj56-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  -webkit-overflow-scrolling: touch;
}
body.cj-has-admin-shell table,
body.cj-has-public-shell table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
}
body.cj-has-admin-shell table th,
body.cj-has-public-shell table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 9px !important;
  color: #fff !important;
  background: linear-gradient(180deg, #114531, #0b3325) !important;
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .035em !important;
}
body.cj-has-admin-shell table td,
body.cj-has-public-shell table td {
  min-height: 46px;
  padding: 10px 9px !important;
  color: var(--cj56-ink) !important;
  border-bottom: 1px solid var(--cj56-line-soft) !important;
  font-size: 14px !important;
}
body.cj-has-admin-shell table tbody tr:nth-child(even),
body.cj-has-public-shell table tbody tr:nth-child(even) { background: #faf8f3 !important; }
body.cj-has-admin-shell table tbody tr:hover,
body.cj-has-public-shell table tbody tr:hover { background: #f3ead3 !important; }

/* Details = geavanceerd, standaard rustig */
body.cj-has-admin-shell details,
body.cj-has-public-shell details {
  border-radius: var(--cj56-radius) !important;
}
body.cj-has-admin-shell details > summary,
body.cj-has-public-shell details > summary {
  min-height: 52px;
  cursor: pointer;
}

/* Nieuwe taakgerichte dashboard-elementen */
.cj56-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
}
.cj56-dashboard-title h2 { margin: 0 !important; font-size: clamp(27px,3vw,42px) !important; }
.cj56-dashboard-title p { margin: 5px 0 0 !important; }
.cj56-dashboard-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: #6d4a0e;
  background: #f5e7be;
  border: 1px solid #ddc37f;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.cj56-task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}
.cj56-task {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 24px;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 16px;
  overflow: hidden;
  color: var(--cj56-ink);
  background: linear-gradient(180deg, #fffefb, #f7f1e5);
  border: 1px solid var(--cj56-line);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(24,48,35,.07);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cj56-task::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--cj56-green-700);
}
.cj56-task:hover { transform: translateY(-2px); border-color:#c7ae70; box-shadow: 0 14px 28px rgba(24,48,35,.12); }
.cj56-task--primary {
  color: #fffaf0;
  background: linear-gradient(135deg, #0a3a2a, #126044);
  border-color: rgba(201,149,55,.55);
}
.cj56-task--primary::before { background: var(--cj56-gold-400); }
.cj56-task-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: var(--cj56-green-800);
  border-radius: 12px;
  font-size: 22px;
}
.cj56-task--primary .cj56-task-icon { color:#2b200b; background:linear-gradient(135deg,var(--cj56-gold-300),var(--cj56-gold-500)); }
.cj56-task-copy strong { display:block; color:inherit; font-size:18px; line-height:1.15; }
.cj56-task-copy small { display:block; margin-top:4px; color:var(--cj56-muted); font-size:12px; line-height:1.35; }
.cj56-task--primary .cj56-task-copy small { color:rgba(255,250,240,.78); }
.cj56-task-arrow { color:var(--cj56-gold-500); font-size:24px; font-weight:900; }
.cj56-extra-actions { margin-top: 14px; }
.cj56-extra-actions > summary {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  color:var(--cj56-ink-soft);
  background:var(--cj56-surface-soft);
  border:1px solid var(--cj56-line);
  border-radius:12px;
  font-weight:850;
  list-style:none;
}
.cj56-extra-actions > summary::-webkit-details-marker { display:none; }
.cj56-extra-actions[open] > summary { border-radius:12px 12px 0 0; }
.cj56-extra-actions-body {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:12px;
  background:#fff;
  border:1px solid var(--cj56-line);
  border-top:0;
  border-radius:0 0 12px 12px;
}

/* Competitie-overzicht: compacte maar rijke kaarten */
body.cj-page-biljart .competition-grid { grid-template-columns: repeat(auto-fit, minmax(320px,1fr)) !important; }
body.cj-page-biljart .competition-card {
  position: relative;
  padding: 18px 18px 17px 21px !important;
  overflow: hidden;
}
body.cj-page-biljart .competition-card::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(180deg,var(--cj56-green-700),var(--cj56-gold-500));
}
body.cj-page-biljart .competition-card h3 { margin: 12px 0 5px !important; font-size: 23px !important; }
body.cj-page-biljart .competition-card p { min-height: 0 !important; font-size: 13px !important; }
body.cj-page-biljart .competition-metrics { gap: 6px !important; }
body.cj-page-biljart .competition-metrics span { padding: 8px !important; border-radius: 10px !important; }
body.cj-page-biljart .competition-actions { margin-top: 12px !important; }

/* Modulepagina's die nog oude inline styling hebben */
body.cj-page-pubquiz .top,
body.cj-page-dart .top,
body.cj-page-klaverjas .top { display:none !important; }
body.cj-page-pubquiz .cards,
body.cj-page-dart .cards,
body.cj-page-klaverjas .cards { gap: 14px !important; }
body.cj-page-pubquiz .card,
body.cj-page-dart .card,
body.cj-page-klaverjas .card { border-radius: var(--cj56-radius) !important; }
body.cj-page-pubquiz .hero,
body.cj-page-dart .hero,
body.cj-page-klaverjas .hero { border-radius: var(--cj56-radius-lg) !important; }

/* Mobiele snelle navigatie */
.cj-shell__quickbar { display:none; }
@media (max-width: 980px) {
  body.cj-has-admin-shell,
  body.cj-has-public-shell { padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important; }
  .cj-shell__quickbar {
    position: fixed;
    inset: auto 8px calc(8px + env(safe-area-inset-bottom));
    z-index: 9998;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 5px;
    padding: 6px;
    background: rgba(5,29,20,.96);
    border: 1px solid rgba(234,209,139,.28);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(2,17,11,.34);
    backdrop-filter: blur(12px);
  }
  .cj-shell__quickbar a,
  .cj-shell__quickbar button {
    display:grid;
    min-width:0;
    min-height:52px;
    place-items:center;
    gap:2px;
    padding:5px 3px;
    color:#e7ece9;
    background:transparent;
    border:0;
    border-radius:11px;
    text-decoration:none;
    font-size:10px;
    font-weight:850;
  }
  .cj-shell__quickbar .cj-icon { width:20px; height:20px; }
  .cj-shell__quickbar a.is-active { color:#241a08; background:linear-gradient(135deg,var(--cj56-gold-300),var(--cj56-gold-500)); }
  .cj-shell__quickbar button { cursor:pointer; }

  .cj56-task-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cj56-dashboard-head { grid-template-columns:1fr; }
}

@media (max-width: 700px) {
  body.cj-has-admin-shell .container,
  body.cj-has-public-shell .container,
  body.cj-has-admin-shell .wrap,
  body.cj-has-public-shell .wrap,
  body.cj-has-admin-shell .manage-wrap,
  body.cj-has-public-shell .manage-wrap,
  body.cj-has-admin-shell main.container,
  body.cj-has-public-shell main.container {
    width: min(100% - 16px, var(--cj56-content)) !important;
    padding-top: 12px !important;
  }
  body.cj-has-admin-shell .cj-page-hero,
  body.cj-has-public-shell .cj-page-hero,
  body.cj-has-admin-shell .overview-hero,
  body.cj-has-public-shell .overview-hero {
    padding: 18px !important;
    border-radius: 15px !important;
  }
  body.cj-has-admin-shell .cj-page-hero h1,
  body.cj-has-admin-shell .cj-page-hero h2,
  body.cj-has-public-shell .cj-page-hero h1,
  body.cj-has-public-shell .cj-page-hero h2 { font-size: 31px !important; }
  body.cj-has-admin-shell .card,
  body.cj-has-public-shell .card,
  body.cj-has-admin-shell .section,
  body.cj-has-public-shell .section,
  body.cj-has-admin-shell .section-card,
  body.cj-has-public-shell .section-card,
  body.cj-has-admin-shell .panel,
  body.cj-has-public-shell .panel { padding: 14px !important; }
  .cj56-task-grid { grid-template-columns:1fr; gap:8px; }
  .cj56-task { min-height:76px; padding:12px; }
  .cj56-task-copy strong { font-size:16px; }
  .cj56-task-copy small { font-size:11px; }
  .section-head,
  .card-title { align-items:flex-start !important; }
}


/* V62 — beheerfuncties zijn nooit onderdeel van de publieke bediening. */
body.cj-has-public-shell a[href*="beheer"],
body.cj-has-public-shell a[href$="login.php"],
body.cj-has-public-shell a[href*="/login.php"] {
  display: none !important;
}

/* V66: de openbare onderbalk bevat bewust alleen Score, Planning en Stand. */
@media (max-width: 980px) {
  .cj-shell__quickbar--public { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
