/*
 * TTC Sukarti design system applied to the member administration.
 *
 * The first part (down to "Application components") is the system's own component stylesheet
 * (components/bundle.css), limited to the components these pages use. The second part adds what an
 * administration needs and the system does not ship: page frame, forms, notices, pagination. Those are
 * built from the same tokens and follow the system's rules for corners, borders, type and focus.
 * Every value comes from tokens.css; class prefix sk- for system components, pg- for the page frame.
 */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-sans); font-size: 17px; line-height: 26px; background: var(--surface); color: var(--ink); }
.sk-label { font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.sk-num { font-variant-numeric: tabular-nums; }
.sk-muted { color: var(--ink-muted); }
:where(a, button, input, select):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Button */
.sk-btn { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-sans); font-size: 16px; line-height: 20px; font-weight: 600; padding: var(--space-3) var(--space-6); border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.sk-btn-primary { background: var(--club-blue); color: var(--on-blue); }
.sk-btn-primary:hover { background: var(--club-blue-hover); }
.sk-btn-secondary { background: var(--surface-raised); color: var(--ink); border-color: var(--line-strong); }
.sk-btn-secondary:hover { border-color: var(--club-blue); color: var(--club-blue); }
.sk-btn-ghost { background: transparent; color: var(--club-blue); padding-inline: var(--space-2); }
.sk-btn-ghost:hover { color: var(--club-blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.sk-on-navy .sk-btn-secondary { background: transparent; color: var(--on-navy); border-color: var(--on-navy-muted); }
.sk-on-navy :focus-visible { outline-color: var(--on-navy); }

/* SiteHeader */
.sk-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) var(--space-6); background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.sk-wordmark { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 32px; letter-spacing: -.01em; }
.sk-wordmark b { color: var(--club-blue); font-weight: 700; }
.sk-logo-plate { display: inline-flex; align-items: center; justify-content: center; background: var(--logo-ground); border-radius: var(--radius-sm); padding: 2px 4px; }
.sk-logo { display: block; height: 44px; width: auto; }
.sk-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.sk-nav form { margin: 0; }
.sk-nav a, .sk-nav button { display: block; padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink); text-decoration: none; font-family: var(--font-sans); font-weight: 600; font-size: 16px; line-height: 26px; cursor: pointer; }
.sk-nav a:hover, .sk-nav button:hover { color: var(--club-blue); }
.sk-nav a[aria-current="page"] { background: var(--blue-soft); color: var(--ink); box-shadow: inset 0 -2px 0 var(--club-blue); }

/* Hero: the court motif. A navy band with an inset white court line and a centre line */
.sk-hero { position: relative; overflow: hidden; background: var(--navy); color: var(--on-navy); border-radius: var(--radius-md); padding: var(--space-12) var(--space-8); }
.sk-hero::before { content: ""; position: absolute; inset: var(--space-3); border: 2px solid var(--court-line); border-radius: var(--radius-sm); opacity: .22; pointer-events: none; }
.sk-hero::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); top: 50%; border-top: 1px solid var(--court-line); opacity: .14; pointer-events: none; }
.sk-hero > * { position: relative; }
.sk-hero-eyebrow { color: var(--on-navy-muted); margin: 0 0 var(--space-3); }
.sk-hero h1 { font-family: var(--font-display); font-size: 64px; line-height: 60px; font-weight: 700; letter-spacing: -.01em; text-transform: uppercase; margin: 0; max-width: 14ch; text-wrap: balance; }
.sk-hero p { max-width: 52ch; margin: var(--space-4) 0 0; color: var(--on-navy-muted); }
.sk-hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.sk-hero-ball { position: absolute; right: var(--space-12); top: var(--space-12); width: 40px; height: 40px; border-radius: var(--radius-ball); background: var(--ball); }
@media (max-width: 560px) { .sk-hero { padding: var(--space-8) var(--space-6); } .sk-hero h1 { font-size: 44px; line-height: 46px; } .sk-hero-ball { display: none; } }

/* Card shell */
.sk-card { background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-6); min-width: 0; }
.sk-card h3 { font-size: 20px; line-height: 26px; font-weight: 600; margin: 0; }

/* Table: lines, not shadows; scrolls inside its own frame */
.sk-table-wrap { overflow-x: auto; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.sk-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.sk-table th { text-align: left; color: var(--ink-muted); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.sk-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); vertical-align: top; }
.sk-table tr:last-child td { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .sk-btn { transition: none; } }

/* ---------------------------------------------------------------------------------------------------------
 * Application components
 * ------------------------------------------------------------------------------------------------------ */

/* Page frame, as in the system's HomePage example */
.pg { max-width: 1120px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.pg-main { flex: 1; display: grid; align-content: start; gap: var(--space-8); padding: var(--space-8) var(--space-6) var(--space-12); }
.pg-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.pg-head h1 { font-family: var(--font-display); font-size: 44px; line-height: 46px; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.pg-lead { margin: var(--space-2) 0 0; color: var(--ink-muted); }
.pg-sec { display: grid; gap: var(--space-6); }
.pg-sec h2 { font-family: var(--font-display); font-size: 28px; line-height: 32px; font-weight: 600; margin: 0; }
.pg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-6); }
.pg-foot { background: var(--navy); color: var(--on-navy); padding: var(--space-8) var(--space-6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-6); }
.pg-foot p { margin: 0; font-size: 14px; line-height: 20px; color: var(--on-navy-muted); }
.pg-foot strong { font-family: var(--font-display); font-size: 22px; line-height: 28px; color: var(--on-navy); display: block; margin-bottom: var(--space-1); }

a { color: var(--club-blue); text-underline-offset: 3px; }
a:hover { color: var(--club-blue-hover); }
.sk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }

/* Sortable column headers keep the label style of the table header */
.sk-table th a { color: inherit; text-decoration: none; }
.sk-table th a:hover { color: var(--ink); text-decoration: underline; }
.sk-table th[aria-sort] a { color: var(--ink); }
.sk-table td a { font-weight: 600; }
.sk-table td.sk-check { width: 1%; }

/* Pagination: the current page is marked like the current navigation item */
.sk-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-6); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.sk-pager-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.sk-pager a, .sk-pager [aria-current] { display: inline-block; min-width: 32px; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); text-align: center; text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.sk-pager [aria-current] { background: var(--blue-soft); color: var(--ink); box-shadow: inset 0 -2px 0 var(--club-blue); }

/* Member card */
.sk-member { display: grid; gap: var(--space-4); align-content: start; }
.sk-member dl { display: grid; gap: var(--space-3); margin: 0; }
.sk-member dt { color: var(--ink-muted); }
.sk-member dd { margin: 0; overflow-wrap: anywhere; }
.sk-member .sk-actions { margin: 0 calc(-1 * var(--space-2)) calc(-1 * var(--space-2)); }

/* Form: a card with the fields and a row of actions */
.sk-form { display: grid; gap: var(--space-6); max-width: 720px; }
.sk-form-narrow { max-width: 480px; }
.sk-form-fields { display: grid; gap: var(--space-4); }
.sk-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-4); align-items: end; }
.sk-form .sk-actions { justify-content: flex-end; padding-top: var(--space-6); border-top: 1px solid var(--line); }
.sk-form p { margin: 0; }
.sk-field { display: grid; gap: var(--space-1); min-width: 0; margin: 0; padding: 0; border: 0; }
.sk-field label, .sk-field legend { padding: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.sk-field legend { margin-bottom: var(--space-1); }
.sk-required { color: var(--ink-muted); font-weight: 400; }
.sk-input { display: block; width: 100%; min-height: 46px; font-family: var(--font-sans); font-size: 16px; line-height: 20px; color: var(--ink); background: var(--surface-raised); padding: var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.sk-input[aria-invalid="true"] { border: 2px solid var(--ink); }
.sk-field-error { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.sk-checks { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); min-height: 46px; align-items: center; }
.sk-checks label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 16px; font-weight: 400; white-space: nowrap; }
.sk-checks-stacked { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.sk-row-actions { flex-wrap: nowrap; gap: var(--space-1); margin: calc(-1 * var(--space-2)) 0; }
.sk-row-actions form { margin: 0; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--club-blue); }

/* Filter bar above a table */
.sk-filter { display: grid; grid-template-columns: minmax(140px, 1fr) 120px auto auto; gap: var(--space-4); align-items: end; }
.sk-filter .sk-actions { min-height: 46px; }

/* Notice: a tinted panel with a label, for confirmations, warnings and errors alike */
.sk-notice { display: grid; gap: var(--space-1); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--blue-soft); color: var(--ink); }
.sk-notice p { margin: 0; }

@media (max-width: 1040px) {
  .sk-filter { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .sk-header { padding-inline: var(--space-4); }
  .pg-main { padding: var(--space-6) var(--space-4) var(--space-12); gap: var(--space-6); }
  .pg-foot { padding-inline: var(--space-4); }
  .pg-head h1 { font-size: 36px; line-height: 38px; }
  .sk-filter { grid-template-columns: 1fr; }
}
