:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9e1ec;
  --primary: #e30613;
  --primary-dark: #b91c1c;
  --accent: #e30613;
  --danger: #b42318;
  --success-bg: #ecfdf3;
  --success: #027a48;
  --error-bg: #fef3f2;
  --error: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* KASS application shell: shared desktop sidebar and compact topbar. */
body.kass-app {
  background: #f5f6f8;
}

.kass-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 260px;
  padding: 20px 14px 24px;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 10px 0 30px rgba(17, 24, 39, 0.035);
}

.kass-sidebar-brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 112px;
  padding: 4px 8px 20px;
}

.kass-sidebar-brand a {
  display: block;
  max-width: 178px;
}

.kass-sidebar-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.kass-sidebar-close {
  display: none;
  min-height: auto;
  padding: 3px 8px;
  color: #4b5563;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
}

.kass-sidebar-close:hover {
  color: var(--primary);
  background: transparent;
}

.kass-sidebar-nav {
  display: grid;
  gap: 18px;
}

.kass-nav-group {
  display: grid;
  gap: 4px;
}

.kass-nav-group h2 {
  margin: 0 10px 7px;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kass-nav-group a,
.kass-nav-group form button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #263140;
  background: transparent;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
}

.kass-nav-group a svg,
.kass-nav-group form button svg {
  width: 20px;
  height: 20px;
}

.kass-nav-group a > i,
.kass-nav-group form button > i {
  display: inline-flex;
  justify-content: end;
  color: #8a94a3;
}

.kass-nav-group a > i svg,
.kass-nav-group form button > i svg {
  width: 14px;
  height: 14px;
}

.kass-nav-group a:hover,
.kass-nav-group a:focus-visible,
.kass-nav-group a.active,
.kass-nav-group form button:hover,
.kass-nav-group form button:focus-visible {
  color: #fff;
  background: var(--primary);
  outline: none;
}

.kass-nav-group a:hover > i,
.kass-nav-group a:focus-visible > i,
.kass-nav-group a.active > i,
.kass-nav-group form button:hover > i,
.kass-nav-group form button:focus-visible > i {
  color: #fff;
}

.kass-nav-account {
  margin-top: 2px;
}

.kass-sidebar-motto {
  margin: auto 10px 0;
  padding: 26px 0 0;
  border-top: 1px solid #f0f1f3;
  color: #5f6877;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.45;
}

.kass-sidebar-motto::after {
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 14px;
  background: var(--primary);
  content: "";
}

.kass-main-layout {
  min-width: 0;
  min-height: 100vh;
  margin-left: 260px;
}

.kass-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 70px;
  padding: 12px clamp(20px, 3vw, 42px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e6e8ed;
  backdrop-filter: blur(14px);
}

.kass-menu-toggle {
  display: grid;
  grid-template-columns: 20px auto;
  grid-template-rows: repeat(3, 3px);
  align-content: center;
  column-gap: 10px;
  row-gap: 3px;
  min-width: auto;
  min-height: 40px;
  padding: 7px 10px;
  color: #151b27;
  background: #f8f9fb;
}

.kass-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.kass-menu-toggle b {
  grid-row: 1 / -1;
  align-self: center;
  font-size: 0.78rem;
}

.kass-menu-toggle:hover,
.kass-menu-toggle:focus-visible {
  color: #fff;
  background: var(--primary);
}

.kass-topbar-title {
  min-width: 0;
  color: #111827;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 800;
}

.kass-topbar-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kass-topbar-user {
  display: grid;
  grid-template-columns: auto minmax(0, auto) 14px;
  align-items: center;
  gap: 10px;
  color: #111827;
}

.kass-topbar-user:hover,
.kass-topbar-user:focus-visible {
  color: var(--primary);
}

.kass-topbar-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #eaedf2;
  color: #485365;
  font-size: 0.77rem;
  font-weight: 900;
}

.kass-topbar-user strong,
.kass-topbar-user small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kass-topbar-user strong { font-size: 0.84rem; }
.kass-topbar-user small { margin-top: 2px; color: #6b7280; font-size: 0.7rem; font-weight: 700; }
.kass-topbar-user > svg { width: 14px; height: 14px; color: #6b7280; }

.kass-app .app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 3.6vw, 48px);
}

.kass-app .hero {
  position: relative;
  min-height: 210px;
  align-items: center;
  padding: clamp(30px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid #eceef2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.045);
}

.kass-app .hero::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(48%, 540px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.42)), url('/public/images/hero-archery.png') center right / cover no-repeat;
  content: "";
  opacity: 0.42;
  pointer-events: none;
}

.kass-app .hero > div { position: relative; z-index: 1; max-width: 680px; }
.kass-app .hero h1 { margin: 8px 0 12px; color: #111111; font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.035em; }
.kass-app .hero p { margin: 0; color: #5f6877; font-size: clamp(1rem, 1.5vw, 1.16rem); font-weight: 600; }
.kass-app .eyebrow { color: var(--primary); letter-spacing: 0.085em; }

.kass-app .grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.kass-app .panel {
  border-color: #e8ebf0;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.045);
}

.kass-app .panel.accent { border-top-color: var(--primary); }
.kass-app .button { border-radius: 9px; }
.kass-app .secondary { background: #f3f4f6; color: #242b36; }
.kass-app .secondary:hover { background: #e5e7eb; }
.kass-app input:focus, .kass-app select:focus, .kass-app textarea:focus { outline-color: rgba(227, 6, 19, 0.16); border-color: var(--primary); }

.kass-sidebar-scrim { display: none; }

.organization-dashboard-shell {
  display: grid;
  gap: 20px;
}

.organization-dashboard-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 210px;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid #e8ebf0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.04);
}

.organization-dashboard-hero::after {
  position: absolute;
  inset: 0 15% 0 auto;
  width: 46%;
  background: linear-gradient(90deg, #fff 2%, rgba(255, 255, 255, 0.4)), url('/public/images/hero-archery.png') center / cover no-repeat;
  content: "";
  opacity: 0.25;
  pointer-events: none;
}

.organization-dashboard-hero > div,
.organization-dashboard-hero blockquote {
  position: relative;
  z-index: 1;
}

.organization-dashboard-hero > div > span {
  color: #111827;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.organization-dashboard-hero h1 {
  max-width: 820px;
  margin: 6px 0 10px;
  color: #090b0e;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.035em;
}

.organization-dashboard-hero p,
.organization-dashboard-hero small {
  display: block;
  margin: 0;
  color: #596273;
  font-size: 1.02rem;
  font-weight: 650;
}

.organization-dashboard-hero small { margin-top: 3px; font-weight: 500; }

.organization-dashboard-hero blockquote {
  width: 150px;
  margin: 0;
  padding: 15px 0 15px 18px;
  border-top: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  color: #171c25;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.35;
}

.organization-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.organization-stat-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  min-height: 148px;
  padding: 20px;
  border: 1px solid #e6e9ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(17, 24, 39, 0.04);
}

.organization-stat-card > i,
.organization-quick-grid > a > i {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 15px;
  background: #f1f3f6;
  color: #3c4656;
}

.organization-stat-card:nth-child(odd) > i,
.organization-quick-grid > a:nth-child(odd) > i {
  background: #ffebed;
  color: var(--primary);
}

.organization-stat-card svg,
.organization-quick-grid svg { width: 26px; height: 26px; }
.organization-stat-card > div { display: grid; align-content: center; gap: 2px; }
.organization-stat-card strong { color: #080b10; font-size: 2rem; line-height: 1; }
.organization-stat-card span { color: #202735; font-size: 0.85rem; font-weight: 700; }
.organization-stat-card a { display: inline-flex; align-items: center; gap: 4px; margin-top: 11px; color: var(--primary); font-size: 0.78rem; font-weight: 800; }
.organization-stat-card a svg { width: 14px; height: 14px; }

.organization-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.organization-dashboard-panel,
.organization-quick-panel {
  padding: clamp(20px, 2.6vw, 28px);
  border: 1px solid #e6e9ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(17, 24, 39, 0.04);
}

.organization-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eceef1;
}

.organization-panel-heading h2 { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: #111827; font-size: 1.05rem; }
.organization-panel-heading h2 svg { width: 21px; height: 21px; color: #252e3d; }
.organization-panel-heading > a { display: inline-flex; align-items: center; gap: 5px; color: #596273; font-size: 0.8rem; font-weight: 750; }
.organization-panel-heading > a:hover { color: var(--primary); }
.organization-panel-heading > a svg { width: 15px; height: 15px; }

.organization-activity-list { display: grid; }
.organization-activity-list > div { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 17px 0; border-bottom: 1px solid #eef0f3; }
.organization-activity-list > div:last-child { border-bottom: 0; }
.organization-activity-list i { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #f0f2f5; color: #485364; }
.organization-activity-list i svg { width: 20px; height: 20px; }
.organization-activity-list strong, .organization-activity-list small { display: block; }
.organization-activity-list strong { color: #1c2430; font-size: 0.87rem; }
.organization-activity-list small { margin-top: 3px; color: #737d8d; font-size: 0.78rem; }
.organization-activity-list time { color: #727c8c; font-size: 0.72rem; line-height: 1.5; text-align: right; }

.organization-upcoming-list { display: grid; gap: 10px; padding-top: 18px; }
.organization-upcoming-list a { display: grid; gap: 4px; padding: 14px; border: 1px solid #eceef1; border-radius: 10px; color: #1d2531; }
.organization-upcoming-list a:hover { border-color: #f2b5b9; background: #fff7f7; }
.organization-upcoming-list span { color: #717b8b; font-size: 0.78rem; }

.organization-empty { display: grid; justify-items: center; gap: 10px; padding: 36px 16px 10px; color: #687385; text-align: center; }
.organization-empty > i { color: #4b5565; }
.organization-empty > i svg { width: 44px; height: 44px; }
.organization-empty strong { color: #283140; }
.organization-empty span { max-width: 280px; font-size: 0.85rem; line-height: 1.5; }
.organization-empty .button { margin-top: 10px; }

.organization-quick-panel { padding-bottom: 20px; }
.organization-quick-panel .organization-panel-heading { border-bottom: 0; padding-bottom: 14px; }
.organization-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.organization-quick-grid > a { display: grid; grid-template-columns: 46px minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: 102px; padding: 14px; border: 1px solid #eef0f3; border-radius: 12px; background: #fafbfc; color: #1c2430; }
.organization-quick-grid > a:hover { border-color: #f4b8bc; background: #fff8f8; transform: translateY(-1px); }
.organization-quick-grid > a > i { width: 46px; height: 46px; border-radius: 12px; }
.organization-quick-grid > a > i svg { width: 21px; height: 21px; }
.organization-quick-grid strong, .organization-quick-grid small { display: block; }
.organization-quick-grid strong { font-size: 0.82rem; }
.organization-quick-grid small { margin-top: 4px; color: #707a8a; font-size: 0.75rem; line-height: 1.35; }
.organization-quick-grid > a > b { color: #626d7d; }
.organization-quick-grid > a > b svg { width: 16px; height: 16px; }

@media (min-width: 981px) {
  .kass-menu-toggle { display: none; }
}

@media (max-width: 980px) {
  body.sidebar-open { overflow: hidden; }

  .kass-sidebar {
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .kass-main-layout { margin-left: 0; }
  .kass-menu-toggle { display: grid; }
  .sidebar-open .kass-sidebar { transform: translateX(0); }
  .sidebar-open .kass-sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: block;
    background: rgba(17, 24, 39, 0.34);
  }
  .kass-sidebar-close { display: inline-flex; }
  .organization-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .organization-dashboard-grid { grid-template-columns: 1fr; }
  .organization-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .kass-topbar { gap: 12px; min-height: 64px; padding: 10px 16px; }
  .kass-topbar-user { grid-template-columns: auto; }
  .kass-topbar-user > span:not(.kass-topbar-avatar), .kass-topbar-user > svg { display: none; }
  .kass-app .app-shell { padding: 20px 16px 42px; }
  .kass-app .hero { min-height: 190px; padding: 28px 22px; }
  .kass-app .hero::after { width: 72%; opacity: 0.2; }
  .kass-app .hero h1 { font-size: clamp(1.75rem, 10vw, 2.4rem); }
  .kass-sidebar { width: min(86vw, 320px); }
  .organization-dashboard-hero { align-items: flex-start; min-height: 240px; }
  .organization-dashboard-hero::after { width: 70%; opacity: 0.13; }
  .organization-dashboard-hero blockquote { display: none; }
  .organization-stat-grid, .organization-quick-grid { grid-template-columns: 1fr; }
  .organization-stat-card { min-height: 118px; }
  .organization-activity-list > div { grid-template-columns: 42px minmax(0, 1fr); }
  .organization-activity-list time { grid-column: 2; text-align: left; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.08);
}

.auth-card {
  width: min(100%, 420px);
  padding: 28px;
}

.auth-card.register-card {
  width: min(100%, 720px);
}

.auth-card.organization-register-card {
  width: min(100%, 820px);
}

.auth-logo {
  width: 136px;
  height: auto;
  display: block;
  margin-bottom: 18px;
}

.auth-note {
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-note a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
}

.logo-placeholder {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

h2 {
  font-size: 1.2rem;
}

p,
dd,
td {
  color: var(--muted);
}

.form {
  display: grid;
  gap: 16px;
  margin: 24px 0 18px;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin: 18px 0 24px;
}

.inline-form.compact {
  grid-template-columns: repeat(2, minmax(160px, 1fr)) auto;
  margin: 0;
}

.inline-form.search-form {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.filter-form,
.create-athlete-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-items: end;
  gap: 12px;
  margin: 18px 0 24px;
}

.stack-form,
.mini-form,
.assignment-item {
  display: grid;
  gap: 8px;
}

.profile-form {
  min-width: 280px;
}

.mini-form,
.assignment-item {
  grid-template-columns: minmax(140px, 1fr) auto;
  align-items: center;
}

.assignment-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.plain-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.plain-list span,
.muted {
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(7, 94, 84, 0.16);
  border-color: var(--primary);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.form-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 8px;
}

.form-section h2 {
  grid-column: 1 / -1;
  margin: 0;
}

.form-section label:has(textarea),
.form-section .full-row {
  grid-column: 1 / -1;
}

.organization-type-field {
  display: grid;
  gap: 10px;
}

.competition-status-field {
  display: grid;
  gap: 10px;
}

.organization-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.competition-status-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.organization-type-options label {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  cursor: pointer;
}

.competition-status-options label {
  min-height: 86px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  cursor: pointer;
}

.organization-type-options input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.competition-status-options input {
  width: auto;
  min-height: auto;
  margin: 4px 0 0;
}

.competition-status-options span,
.competition-status-options strong,
.competition-status-options small {
  display: block;
}

.competition-status-options strong {
  margin-bottom: 4px;
}

.competition-status-options small {
  color: var(--muted);
  line-height: 1.35;
}

.organization-type-options label:has(input:checked) {
  border-color: var(--primary);
  background: #fff1f2;
  color: var(--primary);
}

.competition-status-options label:has(input:checked) {
  border-color: var(--primary);
  background: #fff1f2;
  color: var(--primary);
}

.competition-status-options label:has(input:checked) small {
  color: var(--primary);
}

.button,
button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:hover,
button:hover {
  background: var(--primary-dark);
}

.full {
  width: 100%;
}

.secondary {
  background: #f3f4f6;
  color: #273142;
}

.secondary:hover {
  background: #e5e7eb;
}

.danger {
  background: var(--danger);
}

.small {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.muted-link {
  display: inline-flex;
  margin-top: 4px;
  color: var(--muted);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 36px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 800;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.link-button {
  color: var(--text);
  background: transparent;
  padding: 8px;
  min-height: auto;
  font-weight: 650;
}

.link-button:hover,
.nav a:hover {
  color: var(--primary);
  background: transparent;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 36px) 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 42px) 0;
}

.eyebrow {
  color: var(--primary);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel {
  padding: 24px;
}

.panel.narrow {
  max-width: 680px;
}

.panel.wide {
  overflow: hidden;
}

.panel.accent {
  border-top: 4px solid var(--accent);
}

.confirmation-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.details {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
}

.details div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

dt {
  font-weight: 750;
}

dd {
  margin: 0;
  text-align: right;
}

.table-wrap {
  overflow-x: auto;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 18px 0 22px;
}

.summary-strip span {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  font-weight: 650;
}

.summary-strip strong {
  color: var(--text);
  font-size: 1.35rem;
}

@media print {
  nav,
  .no-print,
  .filter-form,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .panel,
  .admin-panel {
    box-shadow: none !important;
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }
}

.certificate-form {
  display: grid;
  gap: 16px;
}

.certificate-bulk-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.certificate-bulk-form p {
  margin: 0;
}

.certificate-checkbox {
  width: 20px;
  min-height: 20px;
}

.certificate-design-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.certificate-detail-preview {
  display: grid;
  place-items: center;
  flex: 0 0 180px;
  width: 180px;
  min-height: 110px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.certificate-detail-preview img {
  max-width: 100%;
  max-height: 112px;
  object-fit: contain;
}

.certificate-detail-preview.standard {
  gap: 6px;
  padding: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.certificate-design-section h2,
.certificate-design-section p {
  margin: 0;
}

.certificate-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.certificate-template-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 24, 33, 0.08);
}

.certificate-template-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  text-decoration: none;
}

.certificate-template-preview.standard {
  gap: 8px;
  padding: 16px;
  color: var(--text);
}

.certificate-template-preview.standard img {
  width: min(150px, 72%);
  height: auto;
}

.certificate-template-preview.image img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f8fbfa;
}

.certificate-template-meta {
  display: grid;
  gap: 6px;
}

.certificate-template-meta h3 {
  margin: 0;
  font-size: 1rem;
}

.certificate-template-meta span {
  color: var(--muted);
}

.certificate-settings-editor {
  margin-bottom: 18px;
}

.certificate-settings-editor fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.certificate-settings-editor legend {
  padding: 0 6px;
  color: var(--text);
  font-weight: 800;
}

.certificate-visual-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.certificate-live-stage-wrap {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f1;
  overflow: auto;
}

.certificate-editor-canvas,
.certificate-live-stage {
  position: relative;
  width: 842px;
  height: 595px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.16);
  user-select: none;
}

.certificate-editor-canvas.show-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.certificate-live-background-image,
.certificate-live-standard-frame,
.certificate-editor-element,
.certificate-live-logo,
.certificate-live-element,
.certificate-live-signature {
  position: absolute;
}

.certificate-live-background-image {
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.certificate-live-standard-frame {
  inset: 5.7% 4%;
  z-index: 0;
  border: 2px solid var(--primary);
  outline: 1px solid var(--text);
  outline-offset: -14px;
  pointer-events: none;
}

.certificate-editor-element {
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-height: 0;
  z-index: 2;
  border: 1px solid transparent;
  background: transparent;
  cursor: move;
  pointer-events: auto;
  transform: none;
  touch-action: none;
  user-select: none;
}

.certificate-editor-element.locked {
  cursor: not-allowed;
}

.certificate-editor-element * {
  pointer-events: none;
}

.certificate-live-logo {
  padding: 0;
  color: inherit;
}

.certificate-live-logo img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.certificate-live-element,
.certificate-live-signature {
  color: var(--text);
  font: inherit;
}

.certificate-live-element {
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.16;
}

.certificate-live-element.title,
.certificate-live-element.participant,
.certificate-live-element.competition,
.certificate-live-element.signerName {
  font-weight: 850;
}

.certificate-live-element.participant {
  color: var(--primary);
}

.certificate-live-element.intro,
.certificate-live-element.joinedText,
.certificate-live-element.date,
.certificate-live-element.location,
.certificate-live-element.category,
.certificate-live-element.certificateNumber,
.certificate-live-element.signerTitle,
.certificate-live-element.organization {
  font-weight: 700;
  color: #344054;
}

.certificate-live-signature {
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: center;
  padding: 2px;
  text-align: center;
}

.certificate-live-signature img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
}

.certificate-signature-placeholder {
  display: grid;
  min-height: 38px;
  align-items: end;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
}

.certificate-signature-line {
  display: block;
  width: 100%;
  border-top: 1px solid var(--text);
}

.certificate-live-signature strong {
  font-size: 0.86rem;
}

.certificate-live-signature small {
  color: var(--muted);
  white-space: pre-line;
}

.certificate-editor-element.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}

.certificate-lock-indicator {
  position: absolute;
  top: -10px;
  right: -10px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}

.certificate-editor-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 24, 33, 0.08);
}

.certificate-save-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.certificate-save-status.unsaved {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.certificate-save-status.saved {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.certificate-editor-panel h2 {
  margin: 0;
}

.certificate-editor-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.certificate-editor-tools label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  font-weight: 800;
}

.certificate-editor-tools .button {
  width: 100%;
}

.certificate-control-group {
  display: grid;
  grid-template-columns: 1fr 0.7fr 0.7fr;
  gap: 10px;
}

.certificate-control-group.two {
  grid-template-columns: 1fr 1fr;
}

.certificate-align-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.certificate-align-control legend {
  padding: 0 6px;
  font-weight: 800;
}

.certificate-align-control .active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.certificate-lock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  font-weight: 800;
}

.certificate-editor-panel details {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.certificate-editor-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.certificate-editor-panel details label {
  margin-top: 10px;
}

.is-muted input[readonly] {
  color: var(--muted);
  background: #eef2f1;
}

.button.danger {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

td strong,
td span {
  display: block;
}

th {
  color: var(--text);
  font-size: 0.88rem;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 750;
}

.status.ok {
  color: var(--success);
  background: var(--success-bg);
}

.status.off {
  color: var(--error);
  background: var(--error-bg);
}

/* Athlete management */
.athlete-admin-welcome,
.athlete-detail-header {
  margin-bottom: 22px;
}

.athlete-admin-welcome h1,
.athlete-detail-header h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.athlete-admin-toolbar,
.athlete-admin-create,
.athlete-admin-list,
.athlete-detail-card {
  box-shadow: 0 10px 24px rgba(18, 24, 33, 0.045);
}

.athlete-admin-filter {
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(150px, 1fr)) repeat(3, minmax(135px, 0.82fr)) auto;
  margin: 0;
}

.athlete-admin-create {
  margin-bottom: 18px;
}

.athlete-admin-create details > summary,
.athlete-admin-edit > summary {
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.athlete-admin-create details > summary {
  font-size: 1.05rem;
}

.athlete-admin-create .create-athlete-form {
  margin: 20px 0 0;
}

.athlete-admin-list .admin-panel-head,
.athlete-detail-card .admin-panel-head {
  margin-bottom: 18px;
}

.athlete-admin-table th,
.athlete-admin-table td,
.athlete-detail-table th,
.athlete-detail-table td {
  vertical-align: top;
}

.athlete-admin-table th {
  padding-top: 10px;
  padding-bottom: 10px;
}

.athlete-admin-table td {
  padding-top: 18px;
  padding-bottom: 18px;
}

.athlete-admin-table td:first-child {
  min-width: 190px;
}

.athlete-admin-table td:nth-child(3) {
  min-width: 210px;
}

.athlete-admin-table td:nth-child(5) {
  min-width: 190px;
}

.athlete-admin-table td strong a {
  color: var(--admin-dark);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.athlete-admin-table td strong a:hover,
.athlete-admin-table td strong a:focus-visible {
  color: var(--admin-red);
  text-decoration-color: currentColor;
}

.athlete-admin-edit {
  margin-top: 10px;
}

.athlete-admin-edit .inline-form,
.athlete-admin-edit .profile-form {
  margin: 14px 0 0;
}

.athlete-admin-edit .profile-form {
  min-width: 220px;
}

.athlete-admin-table .status {
  margin: 0 6px 7px 0;
}

.athlete-detail-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.athlete-detail-header p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
}

.athlete-detail-back {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--admin-muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.athlete-detail-back:hover,
.athlete-detail-back:focus-visible {
  color: var(--admin-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.athlete-detail-actions {
  padding-bottom: 2px;
}

.athlete-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.athlete-detail-card + .athlete-detail-card {
  margin-top: 18px;
}

.athlete-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 0;
}

.athlete-detail-fields div {
  min-width: 0;
}

.athlete-detail-fields dt {
  margin-bottom: 5px;
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.athlete-detail-fields dd {
  overflow-wrap: anywhere;
  color: var(--admin-dark);
  font-weight: 700;
  text-align: left;
}

.athlete-detail-fields-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.athlete-detail-empty {
  margin: 0;
  padding: 20px 0 2px;
  color: var(--admin-muted);
}

.athlete-detail-table table {
  min-width: 900px;
}

.athlete-detail-table th,
.athlete-detail-table td {
  padding-top: 15px;
  padding-bottom: 15px;
}

.athlete-detail-table td:first-child {
  min-width: 210px;
}

@media (max-width: 980px) {
  .athlete-admin-filter {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .athlete-detail-fields-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .athlete-admin-filter,
  .athlete-detail-grid,
  .athlete-detail-fields,
  .athlete-detail-fields-wide {
    grid-template-columns: 1fr;
  }

  .athlete-detail-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .athlete-detail-actions {
    padding-top: 2px;
  }

  .athlete-detail-fields {
    gap: 15px;
  }
}

/* Athlete list structural layout */
.app-shell.athlete-admin-shell {
  --admin-red: #e30613;
  --admin-dark: #121821;
  --admin-muted: #667085;
  --admin-line: #e1e7f0;
  width: min(1400px, 100%);
}

.athlete-admin-toolbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.athlete-admin-filter {
  grid-template-columns: minmax(210px, 1.45fr) repeat(2, minmax(145px, 1fr)) repeat(3, minmax(125px, 0.8fr)) auto;
}

.athlete-admin-create {
  position: relative;
  margin: 0;
}

.athlete-admin-create > summary,
.athlete-action-menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-dark);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  list-style: none;
}

.athlete-admin-create > summary::-webkit-details-marker,
.athlete-action-menu > summary::-webkit-details-marker {
  display: none;
}

.athlete-admin-create > summary {
  min-height: 42px;
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.athlete-admin-create[open] > .create-athlete-form {
  position: absolute;
  z-index: 3;
  top: calc(100% + 10px);
  right: 0;
  width: min(760px, calc(100vw - 36px));
  margin: 0;
  padding: 20px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 24, 33, 0.14);
}

.athlete-admin-table table {
  min-width: 1220px;
  table-layout: fixed;
}

.athlete-admin-table th,
.athlete-admin-table td {
  overflow-wrap: anywhere;
}

.athlete-admin-table th:nth-child(1) { width: 22%; }
.athlete-admin-table th:nth-child(2) { width: 14%; }
.athlete-admin-table th:nth-child(3),
.athlete-admin-table th:nth-child(4) { width: 13%; }
.athlete-admin-table th:nth-child(5) { width: 13%; }
.athlete-admin-table th:nth-child(6) { width: 25%; }

.athlete-admin-table td {
  padding: 16px 14px;
}

.athlete-admin-table td:first-child,
.athlete-admin-table td:nth-child(3),
.athlete-admin-table td:nth-child(5) {
  min-width: 0;
}

.athlete-admin-table td:nth-child(2) span {
  line-height: 1.45;
}

.athlete-actions-cell {
  position: relative;
}

.athlete-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.athlete-action-menu {
  position: relative;
}

.athlete-action-menu[open] > .athlete-action-popover {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 24, 33, 0.16);
}

.athlete-action-popover {
  display: grid;
  gap: 12px;
}

.athlete-action-popover.profile-form {
  min-width: 0;
}

.athlete-action-menu > summary:hover,
.athlete-action-menu > summary:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

@media (max-width: 1100px) {
  .athlete-admin-toolbar-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .athlete-admin-filter {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .athlete-admin-create {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .app-shell.athlete-admin-shell {
    width: 100%;
  }

  .athlete-admin-filter {
    grid-template-columns: 1fr;
  }

  .athlete-admin-create[open] > .create-athlete-form {
    right: auto;
    left: 0;
  }
}

.alert {
  width: min(100%, 720px);
  margin: 0 auto 18px;
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 650;
}

.auth-shell .alert {
  position: fixed;
  top: 18px;
}

.kass-home {
  --home-red: #e30613;
  --home-dark: #121821;
  --home-muted: #566173;
  background: #f7f9fc;
  color: var(--home-dark);
  overflow-x: hidden;
}

.kass-home-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px clamp(22px, 5vw, 84px) 12px;
}

.kass-home-logo {
  display: inline-flex;
  align-items: center;
}

.kass-home-logo img {
  width: clamp(210px, 22vw, 300px);
  max-width: 48vw;
  height: auto;
  display: block;
}

.kass-home-nav {
  display: flex;
  align-items: center;
  gap: clamp(22px, 4vw, 46px);
  font-weight: 800;
}

.kass-home-nav a {
  color: var(--home-dark);
}

.kass-home-nav a:hover,
.kass-home-nav a:focus-visible {
  color: var(--home-red);
}

.kass-home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(520px, 1.05fr);
  align-items: center;
  min-height: 650px;
  max-width: 1480px;
  margin: -18px auto 0;
  padding: 0 clamp(22px, 5vw, 84px) 34px;
}

.kass-home-hero::before {
  content: "";
  position: absolute;
  inset: 0 42% 0 0;
  z-index: 1;
  background: linear-gradient(90deg, #fff 0%, #fff 72%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.kass-home-hero::after {
  content: "";
  position: absolute;
  right: -9vw;
  bottom: 0;
  z-index: 2;
  width: min(34vw, 460px);
  height: 76%;
  background: rgba(227, 6, 19, 0.86);
  transform: skewX(-24deg);
  transform-origin: bottom;
  pointer-events: none;
}

.kass-home-hero-content {
  position: relative;
  z-index: 4;
  max-width: 820px;
  padding-top: 18px;
}

.kass-home-eyebrow {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  color: #647084;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.kass-home-eyebrow span {
  width: 58px;
  height: 3px;
  background: var(--home-red);
}

.kass-home-hero h1 {
  max-width: 650px;
  margin: 0;
  color: #05070a;
  font-size: clamp(3.1rem, 5.1vw, 4.85rem);
  line-height: 0.96;
  font-weight: 900;
}

.kass-home-hero h1 strong {
  display: block;
  color: var(--home-red);
}

.kass-home-hero-content > p {
  max-width: 620px;
  margin: 20px 0 28px;
  color: var(--home-muted);
  font-size: clamp(1.08rem, 1.8vw, 1.45rem);
  line-height: 1.35;
  font-weight: 550;
}

.kass-home-hero-media {
  position: absolute;
  inset: 0 0 0 43%;
  z-index: 0;
  overflow: hidden;
}

.kass-home-hero-media::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -110px;
  z-index: 2;
  width: 235px;
  background: rgba(255, 255, 255, 0.72);
  transform: skewX(-30deg);
  pointer-events: none;
}

.kass-home-hero-media::after {
  content: "";
  position: absolute;
  right: 10vw;
  bottom: -42px;
  z-index: 2;
  width: 180px;
  height: 58%;
  background: rgba(255, 255, 255, 0.34);
  transform: skewX(-32deg);
  pointer-events: none;
}

.kass-home-hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 62% 50%;
}

.kass-login-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 22px;
  max-width: 820px;
}

.kass-login-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px 28px;
  border: 1px solid rgba(18, 24, 33, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.12);
}

.kass-login-card h2 {
  margin: 0 0 8px;
  color: var(--home-dark);
  font-size: 1.3rem;
  line-height: 1.1;
  font-weight: 900;
}

.kass-login-card p {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.35;
  font-weight: 500;
}

.kass-login-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.kass-login-icon.red {
  background: var(--home-red);
}

.kass-login-icon.dark {
  background: var(--home-dark);
}

.kass-login-icon svg {
  width: 36px;
  height: 36px;
}

.kass-home-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.kass-home-button.red {
  background: var(--home-red);
}

.kass-home-button.dark {
  background: var(--home-dark);
}

.kass-home-button:hover,
.kass-home-button:focus-visible {
  color: #fff;
  filter: brightness(0.9);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(18, 24, 33, 0.16);
}

.kass-register-note {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid #dfe5ee;
  color: var(--home-muted);
  text-align: center;
  font-size: 0.93rem;
}

.kass-register-note a {
  color: var(--home-red);
  font-weight: 900;
  text-decoration: underline;
}

.kass-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px clamp(22px, 5vw, 84px) 30px;
  border-top: 1px solid #e5ebf3;
  background: rgba(255, 255, 255, 0.82);
}

.kass-feature-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 108px;
  padding: 0 clamp(18px, 3vw, 48px);
}

.kass-feature-item + .kass-feature-item {
  border-left: 1px solid #ccd5e2;
}

.kass-feature-icon {
  color: var(--home-red);
}

.kass-feature-icon svg {
  width: 48px;
  height: 48px;
}

.kass-feature-item h2 {
  margin: 0 0 8px;
  color: var(--home-dark);
  font-size: 1.08rem;
  font-weight: 900;
}

.kass-feature-item p {
  margin: 0;
  color: var(--home-muted);
  line-height: 1.35;
}

.kass-home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px clamp(22px, 5vw, 84px);
  border-top: 1px solid #dfe5ee;
  color: var(--home-muted);
  font-size: 0.9rem;
}

.kass-home-footer p {
  margin: 0;
}

.kass-home-footer div {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.kass-home-footer a,
.kass-home-footer span {
  color: var(--home-muted);
}

.kass-home-footer a:hover,
.kass-home-footer a:focus-visible {
  color: var(--home-red);
}

.athlete-dashboard {
  --athlete-red: #e30613;
  --athlete-red-dark: #a9000a;
  --athlete-dark: #121821;
  --athlete-muted: #667085;
  --athlete-line: #e1e7f0;
  min-height: 100vh;
  background: #f5f7fb;
  color: var(--athlete-dark);
  overflow-x: hidden;
}

.athlete-dashboard-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) minmax(220px, auto);
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 58px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--athlete-line);
  box-shadow: 0 10px 28px rgba(18, 24, 33, 0.05);
  backdrop-filter: blur(16px);
}

.athlete-dashboard-logo {
  display: inline-flex;
  align-items: center;
}

.athlete-dashboard-logo img {
  width: clamp(132px, 15vw, 190px);
  height: auto;
  display: block;
}

.athlete-dashboard-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 30px);
}

.athlete-dashboard-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  color: var(--athlete-muted);
  font-weight: 800;
  white-space: nowrap;
}

.athlete-dashboard-nav svg {
  width: 19px;
  height: 19px;
}

.athlete-dashboard-nav a:hover,
.athlete-dashboard-nav a:focus-visible,
.athlete-dashboard-nav a.active {
  color: var(--athlete-red);
}

.athlete-dashboard-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 3px;
  border-radius: 999px;
  background: var(--athlete-red);
}

.athlete-dashboard-user {
  display: grid;
  grid-template-columns: auto minmax(0, auto) auto;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.athlete-dashboard-user strong,
.athlete-dashboard-user span {
  display: block;
}

.athlete-dashboard-user strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--athlete-dark);
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.athlete-dashboard-user span {
  color: var(--athlete-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.athlete-dashboard-user > svg {
  width: 18px;
  height: 18px;
  color: var(--athlete-muted);
}

.athlete-dashboard-user form {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: -4px;
}

.athlete-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbe7e9;
  color: var(--athlete-red);
  font-weight: 900;
}

.athlete-dashboard-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 62px) clamp(18px, 4vw, 40px) 52px;
}

.admin-dashboard {
  --admin-red: #e30613;
  --admin-dark: #121821;
  --admin-muted: #667085;
  --admin-line: #e1e7f0;
  min-height: 100vh;
  background: #f5f7fb;
  color: var(--admin-dark);
  overflow-x: hidden;
}

.admin-login-card {
  width: min(100%, 440px);
}

.admin-dashboard-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) minmax(180px, auto);
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--admin-line);
  box-shadow: 0 10px 28px rgba(18, 24, 33, 0.05);
  backdrop-filter: blur(16px);
}

.admin-dashboard-logo,
.admin-dashboard-logo img {
  display: block;
}

.admin-dashboard-logo img {
  width: clamp(126px, 14vw, 178px);
  height: auto;
}

.admin-dashboard-nav {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1.1vw, 16px);
  overflow-x: auto;
}

.admin-dashboard-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--admin-muted);
  font-weight: 800;
  white-space: nowrap;
}

.admin-dashboard-nav svg {
  width: 18px;
  height: 18px;
}

.admin-dashboard-nav a:hover,
.admin-dashboard-nav a:focus-visible,
.admin-dashboard-nav a.active {
  color: var(--admin-red);
}

.admin-dashboard-user {
  display: grid;
  grid-template-columns: auto minmax(0, auto) auto;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.admin-dashboard-user strong,
.admin-dashboard-user span {
  display: block;
}

.admin-dashboard-user strong {
  color: var(--admin-dark);
  font-size: 0.94rem;
}

.admin-dashboard-user span {
  color: var(--admin-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbe7e9;
  color: var(--admin-red);
  font-weight: 900;
}

.admin-dashboard-main {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 56px) clamp(18px, 4vw, 40px) 52px;
}

.admin-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-welcome h1 {
  max-width: 740px;
  margin: 0;
  color: var(--admin-dark);
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 1;
  font-weight: 900;
}

.admin-welcome p {
  max-width: 650px;
  margin: 14px 0 0;
  color: var(--admin-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.admin-welcome time {
  padding: 10px 14px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-muted);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(18, 24, 33, 0.05);
  white-space: nowrap;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.admin-stat-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(18, 24, 33, 0.06);
}

.admin-stat-card i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff0f1;
  color: var(--admin-red);
}

.admin-stat-card i svg {
  width: 18px;
  height: 18px;
}

.admin-stat-card span {
  color: var(--admin-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.admin-stat-card strong {
  color: var(--admin-dark);
  font-size: 2rem;
  line-height: 1;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
}

.admin-panel {
  padding: 22px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(18, 24, 33, 0.06);
}

.admin-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--admin-line);
}

.admin-list-item:last-child {
  border-bottom: 0;
}

.admin-list-item strong,
.admin-list-item span {
  display: block;
}

.admin-list-item span,
.admin-list-actions {
  color: var(--admin-muted);
  font-size: 0.92rem;
}

.admin-list-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.admin-quick-actions {
  margin: 0 0 22px;
}

.admin-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-section-title h2 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.admin-action-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-dark);
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(18, 24, 33, 0.06);
}

.admin-action-card svg {
  width: 22px;
  height: 22px;
  color: var(--admin-red);
}

.admin-panel-wide {
  grid-column: 1 / -1;
}

.admin-participant-filter {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  margin: 0;
}

.admin-competition-filter {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  margin: 0;
}

.admin-participant-table th,
.admin-participant-table td,
.admin-competition-table th,
.admin-competition-table td {
  vertical-align: top;
}

.admin-participant-table td:nth-child(4) {
  min-width: 220px;
}

.admin-empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 24px 0 4px;
  color: var(--admin-muted);
}

.admin-pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.admin-pagination a,
.admin-pagination span {
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 8px 12px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-muted);
  font-weight: 800;
}

.admin-pagination a.active {
  border-color: var(--admin-red);
  background: #fff0f1;
  color: var(--admin-red);
}

.admin-page-gap {
  border-color: transparent;
  background: transparent;
}

.athlete-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 28px;
  margin-bottom: 30px;
}

.athlete-eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--athlete-red);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.athlete-welcome h1 {
  max-width: 740px;
  margin: 0;
  color: var(--athlete-dark);
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.98;
  font-weight: 900;
}

.athlete-welcome h1 strong {
  color: var(--athlete-red);
}

.athlete-welcome p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--athlete-muted);
  font-size: 1.16rem;
  line-height: 1.45;
  font-weight: 550;
}

.athlete-date-panel {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(18, 24, 33, 0.07);
}

.athlete-date-panel div {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbe7e9;
  color: var(--athlete-red);
}

.athlete-date-panel svg {
  width: 24px;
  height: 24px;
}

.athlete-date-panel strong {
  color: var(--athlete-dark);
  font-size: 1.06rem;
  font-weight: 900;
}

.athlete-date-panel span {
  color: var(--athlete-muted);
  line-height: 1.4;
}

.athlete-action-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.athlete-action-card {
  position: relative;
  min-height: 280px;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.08);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.athlete-action-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--athlete-red);
}

.athlete-action-card:hover,
.athlete-action-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(227, 6, 19, 0.22);
  box-shadow: 0 24px 52px rgba(18, 24, 33, 0.12);
}

.athlete-card-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbe7e9;
  color: var(--athlete-red);
}

.athlete-card-icon svg {
  width: 28px;
  height: 28px;
}

.athlete-action-card h2 {
  margin: 4px 0 0;
  color: var(--athlete-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.athlete-action-card p {
  margin: 0;
  color: var(--athlete-muted);
  line-height: 1.55;
}

.athlete-action-card a {
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: var(--athlete-red);
  font-weight: 900;
}

.athlete-action-card a i {
  width: 38px;
  height: 38px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--athlete-red);
  color: #fff;
  font-style: normal;
}

.athlete-action-card a svg {
  width: 19px;
  height: 19px;
}

.athlete-dashboard-footer {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(150px, 0.8fr)) minmax(220px, 1fr);
  gap: 28px;
  margin-top: 28px;
  padding: 34px clamp(18px, 4vw, 58px) 20px;
  background: linear-gradient(135deg, var(--athlete-red-dark), var(--athlete-red));
  color: #fff;
}

.athlete-footer-brand img {
  width: min(100%, 190px);
  height: auto;
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
}

.athlete-dashboard-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.athlete-dashboard-footer a,
.athlete-dashboard-footer span {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.86);
}

.athlete-dashboard-footer a:hover,
.athlete-dashboard-footer a:focus-visible {
  color: #fff;
}

.athlete-page-heading,
.athlete-detail-heading {
  margin-bottom: 22px;
}

.athlete-page-heading h1,
.athlete-detail-heading h1 {
  max-width: 820px;
  margin: 0;
  color: var(--athlete-dark);
  font-size: clamp(2.35rem, 5vw, 4.15rem);
  line-height: 1;
  font-weight: 900;
}

.athlete-page-heading p,
.athlete-detail-heading p {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--athlete-muted);
  font-size: 1.12rem;
  line-height: 1.45;
}

.athlete-filter-panel,
.athlete-content-section,
.athlete-registration-panel {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.06);
}

.athlete-filter-panel form,
.athlete-participant-filter {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 0.55fr) minmax(170px, 0.55fr) auto;
  align-items: end;
  gap: 14px;
}

.athlete-participant-filter {
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  margin: 16px 0 20px;
}

.athlete-my-filter {
  grid-template-columns: minmax(220px, 320px) auto;
}

.athlete-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.athlete-summary-cards article {
  display: grid;
  gap: 8px;
  min-height: 126px;
  padding: 22px;
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.06);
}

.athlete-summary-cards span {
  color: var(--athlete-muted);
  font-weight: 850;
}

.athlete-summary-cards strong {
  color: var(--athlete-red);
  font-size: 2.3rem;
  line-height: 1;
  font-weight: 900;
}

.account-management-shell {
  max-width: 1540px;
}

.account-management-welcome {
  margin-bottom: 22px;
}

.account-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.account-summary-cards article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 22px;
  border: 1px solid var(--athlete-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(18, 24, 33, 0.06);
}

.account-summary-cards span,
.account-summary-cards small {
  color: var(--athlete-muted);
  font-weight: 750;
}

.account-summary-cards strong {
  color: var(--admin-red);
  font-size: 2.2rem;
  line-height: 1;
}

.account-management-toolbar,
.account-management-list {
  margin-bottom: 22px;
}

.account-management-filter {
  display: grid;
  grid-template-columns: minmax(250px, 1.4fr) repeat(2, minmax(160px, 0.65fr)) auto auto;
  align-items: end;
  gap: 14px;
}

.account-management-table table {
  min-width: 1120px;
}

.account-management-table td {
  vertical-align: top;
}

.account-management-table td > strong,
.account-management-table td > .muted {
  display: block;
}

.account-organization-summary {
  min-width: 180px;
  color: var(--athlete-muted);
  line-height: 1.45;
}

.account-confirm-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 22, 32, 0.52);
}

.account-confirm-dialog {
  width: min(100%, 520px);
  max-height: min(680px, calc(100vh - 40px));
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--athlete-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(16, 22, 32, 0.24);
}

.account-confirm-dialog h2 {
  margin: 0 0 14px;
}

.athlete-competition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.athlete-competition-card {
  position: relative;
  min-height: 340px;
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.07);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.athlete-my-registration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.athlete-my-registration-card {
  position: relative;
  display: grid;
  gap: 18px;
  min-height: 330px;
  padding: 24px;
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.07);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.athlete-my-registration-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--athlete-red);
}

.athlete-my-registration-card:hover,
.athlete-my-registration-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(227, 6, 19, 0.22);
  box-shadow: 0 24px 52px rgba(18, 24, 33, 0.12);
}

.athlete-my-registration-card h2 {
  margin: 14px 0 6px;
  color: var(--athlete-dark);
  font-size: 1.35rem;
  line-height: 1.18;
  font-weight: 900;
}

.athlete-my-registration-card p {
  margin: 0;
  color: var(--athlete-muted);
  font-weight: 850;
}

.athlete-my-registration-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.athlete-my-registration-card dl div {
  display: grid;
  gap: 5px;
}

.athlete-my-registration-card dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--athlete-muted);
  font-size: 0.84rem;
}

.athlete-my-registration-card dt svg {
  width: 17px;
  height: 17px;
  color: var(--athlete-red);
}

.athlete-my-registration-card dd {
  margin: 0;
  color: var(--athlete-dark);
  text-align: left;
  font-weight: 850;
}

.athlete-my-registration-card > a {
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  border-radius: 999px;
  padding: 10px 14px 10px 18px;
  background: #fbe7e9;
  color: var(--athlete-red);
  font-weight: 900;
}

.athlete-my-registration-card > a i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--athlete-red);
  color: #fff;
  font-style: normal;
}

.athlete-my-registration-card > a svg {
  width: 17px;
  height: 17px;
}

.athlete-profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.athlete-profile-card,
.athlete-profile-section {
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.06);
}

.athlete-profile-card {
  position: sticky;
  top: 104px;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px 24px;
  text-align: center;
}

.athlete-profile-avatar {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fbe7e9;
  color: var(--athlete-red);
  font-size: 2.1rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 8px #fff, 0 18px 34px rgba(227, 6, 19, 0.14);
}

.athlete-profile-card h2 {
  margin: 10px 0 0;
  color: var(--athlete-dark);
  font-size: 1.35rem;
  line-height: 1.2;
  font-weight: 900;
}

.athlete-profile-card p {
  margin: 0;
  color: var(--athlete-muted);
  font-weight: 850;
}

.athlete-profile-status-row {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.athlete-profile-member {
  width: 100%;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--athlete-line);
  color: var(--athlete-muted);
  font-weight: 850;
}

.athlete-profile-content,
.athlete-profile-side-sections {
  display: grid;
  gap: 22px;
}

.athlete-profile-section {
  padding: 24px;
}

.athlete-profile-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 20px;
}

.athlete-profile-section h2 {
  margin: 0;
  color: var(--athlete-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.athlete-profile-details,
.athlete-profile-mini-details {
  display: grid;
  gap: 14px;
  margin: 0;
}

.athlete-profile-details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.athlete-profile-details div,
.athlete-profile-mini-details div {
  min-width: 0;
  padding: 16px;
  border: 1px solid #edf1f7;
  border-radius: 14px;
  background: #fafbfe;
}

.athlete-profile-details dt,
.athlete-profile-mini-details dt {
  margin-bottom: 6px;
  color: var(--athlete-muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.athlete-profile-details dd,
.athlete-profile-mini-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--athlete-dark);
  font-weight: 900;
}

.athlete-profile-empty {
  margin: 0;
  color: var(--athlete-muted);
  line-height: 1.5;
}

.athlete-edit-panel {
  position: relative;
  width: min(360px, 100%);
}

.athlete-edit-panel summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: 100%;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--athlete-red);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  list-style: none;
}

.athlete-edit-panel summary::-webkit-details-marker {
  display: none;
}

.athlete-profile-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--athlete-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.08);
}

.athlete-profile-form label {
  display: grid;
  gap: 7px;
  color: var(--athlete-dark);
  font-weight: 850;
}

.athlete-profile-form input,
.athlete-profile-form select {
  width: 100%;
}

.athlete-representation-field,
.representation-field {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--athlete-line, #d9e0ea);
  border-radius: 14px;
  background: #fff;
}

.athlete-representation-field legend,
.representation-field legend {
  padding: 0 6px;
  color: var(--athlete-dark, #151b24);
  font-weight: 900;
}

.athlete-representation-options,
.representation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.athlete-representation-options label,
.representation-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--athlete-line, #d9e0ea);
  border-radius: 999px;
  background: #fafbfe;
  font-weight: 900;
}

.athlete-representation-options input,
.representation-options input {
  width: auto;
  accent-color: var(--athlete-red, #e30613);
}

.athlete-competition-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--athlete-red);
}

.athlete-competition-card:hover,
.athlete-competition-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(227, 6, 19, 0.22);
  box-shadow: 0 24px 52px rgba(18, 24, 33, 0.12);
}

.athlete-status-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.athlete-status-badge.open {
  color: #027a48;
  background: #ecfdf3;
}

.athlete-status-badge.neutral {
  color: #344054;
  background: #eef2f7;
}

.athlete-status-badge.closed {
  color: #b42318;
  background: #fef3f2;
}

.athlete-competition-card h2 {
  margin: 0;
  color: var(--athlete-dark);
  font-size: 1.35rem;
  line-height: 1.18;
  font-weight: 900;
}

.athlete-card-code {
  margin: -4px 0 0;
  color: var(--athlete-muted);
  font-weight: 800;
}

.athlete-competition-card dl,
.athlete-summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.athlete-competition-card dl div,
.athlete-summary-list div {
  display: grid;
  gap: 3px;
}

.athlete-competition-card dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--athlete-muted);
  font-size: 0.84rem;
}

.athlete-competition-card dt svg {
  width: 17px;
  height: 17px;
  color: var(--athlete-red);
}

.athlete-competition-card dd,
.athlete-summary-list dd {
  margin: 0;
  color: var(--athlete-dark);
  text-align: left;
  font-weight: 800;
}

.athlete-competition-card > a,
.athlete-inline-button {
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 14px 10px 18px;
  background: #fbe7e9;
  color: var(--athlete-red);
  font-weight: 900;
}

.athlete-competition-card > a i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--athlete-red);
  color: #fff;
  font-style: normal;
}

.athlete-competition-card > a svg {
  width: 17px;
  height: 17px;
}

.athlete-inline-button.secondary {
  background: #eef2f7;
  color: var(--athlete-dark);
}

.athlete-empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 34px;
  border: 1px dashed #cfd8e5;
  border-radius: 18px;
  background: #fff;
}

.athlete-empty-state h2 {
  margin: 0;
  color: var(--athlete-dark);
  font-size: 1.4rem;
}

.athlete-empty-state p {
  margin: 0;
  color: var(--athlete-muted);
}

.athlete-back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--athlete-muted);
  font-weight: 850;
}

.athlete-back-link:hover,
.athlete-back-link:focus-visible {
  color: var(--athlete-red);
}

.athlete-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.athlete-info-card {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--athlete-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(18, 24, 33, 0.06);
}

.athlete-info-card svg {
  width: 26px;
  height: 26px;
  color: var(--athlete-red);
}

.athlete-info-card span {
  color: var(--athlete-muted);
  font-weight: 800;
}

.athlete-info-card strong {
  color: var(--athlete-dark);
  font-size: 1.06rem;
}

.athlete-registration-panel {
  display: grid;
  gap: 12px;
}

.athlete-registration-panel.success {
  grid-template-columns: 56px minmax(0, 1fr);
  border-color: rgba(2, 122, 72, 0.22);
  background: #f6fffa;
}

.athlete-registration-panel h2,
.athlete-content-section h2 {
  margin: 0;
  color: var(--athlete-dark);
  font-size: 1.45rem;
  font-weight: 900;
}

.athlete-registration-panel p {
  margin: 0;
  color: var(--athlete-muted);
}

.athlete-success-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #027a48;
  color: #fff;
  font-weight: 900;
}

.athlete-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.athlete-register-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 8px;
}

.athlete-category-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.athlete-category-list article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--athlete-line);
  border-radius: 14px;
  background: #fbfcfe;
}

.athlete-category-list h3 {
  margin: 0;
  color: var(--athlete-dark);
  font-size: 1.05rem;
}

.athlete-category-list span {
  color: var(--athlete-muted);
  font-weight: 800;
}

.athlete-category-list small {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 10px;
  background: #ecfdf3;
  color: #027a48;
  font-weight: 900;
}

.athlete-footer-line {
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 900;
}

.athlete-footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.9rem;
}

.success {
  color: var(--success);
  background: var(--success-bg);
}

.error {
  color: var(--error);
  background: var(--error-bg);
}

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .inline-form,
  .inline-form.compact,
  .inline-form.search-form,
  .filter-form,
  .create-athlete-form,
  .form-section,
  .competition-status-options,
  .organization-type-options,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .details div {
    display: grid;
  }

  dd {
    text-align: left;
  }

  .kass-home-header {
    align-items: flex-start;
    padding-top: 20px;
  }

  .kass-home-logo img {
    width: clamp(168px, 46vw, 210px);
    max-width: 58vw;
  }

  .kass-home-hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 0;
    padding-bottom: 24px;
  }

  .kass-home-hero::before,
  .kass-home-hero::after,
  .kass-home-hero-media::before,
  .kass-home-hero-media::after {
    display: none;
  }

  .kass-home-hero-content {
    width: 100%;
    padding-top: 26px;
  }

  .kass-home-eyebrow {
    gap: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
  }

  .kass-home-eyebrow span {
    width: 34px;
  }

  .kass-home-hero h1 {
    font-size: clamp(2.5rem, 14vw, 3.6rem);
  }

  .kass-login-options {
    grid-template-columns: 1fr;
  }

  .kass-login-card {
    grid-template-columns: 70px minmax(0, 1fr);
    padding: 20px;
  }

  .kass-login-icon {
    width: 62px;
    height: 62px;
  }

  .kass-login-icon svg {
    width: 30px;
    height: 30px;
  }

  .kass-home-hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(260px, 68vw, 440px);
    margin-top: 8px;
    border-radius: 16px;
  }

  .kass-home-hero-media img {
    object-position: 65% 50%;
  }

  .kass-feature-strip {
    grid-template-columns: 1fr;
    padding-top: 12px;
  }

  .kass-feature-item {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 18px 0;
  }

  .kass-feature-item + .kass-feature-item {
    border-left: 0;
    border-top: 1px solid #ccd5e2;
  }

  .kass-home-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 1040px) {
  .admin-dashboard-header {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .admin-dashboard-user {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .admin-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-participant-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-competition-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-dashboard-header {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .athlete-dashboard-user {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .athlete-dashboard-user form {
    grid-column: auto;
    justify-self: start;
    margin-top: 0;
  }

  .athlete-action-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-competition-grid,
  .athlete-my-registration-grid,
  .athlete-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-management-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-profile-layout {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  }

  .athlete-profile-section-head {
    grid-template-columns: 1fr;
  }

  .athlete-edit-panel {
    width: 100%;
  }

  .athlete-participant-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .athlete-dashboard-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-dashboard-header {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 18px;
  }

  .admin-dashboard-logo img {
    width: 138px;
  }

  .admin-dashboard-nav {
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 6px;
  }

  .admin-dashboard-user {
    width: 100%;
    justify-content: start;
  }

  .admin-dashboard-main {
    padding-top: 28px;
  }

  .admin-stat-grid,
  .admin-list-item,
  .admin-welcome,
  .admin-action-grid,
  .admin-participant-filter,
  .admin-competition-filter {
    grid-template-columns: 1fr;
  }

  .certificate-design-section {
    display: grid;
  }

  .certificate-detail-preview {
    width: 100%;
    max-width: 240px;
  }

  .certificate-visual-editor {
    grid-template-columns: 1fr;
  }

  .certificate-control-group {
    grid-template-columns: 1fr;
  }

  .admin-welcome time {
    justify-self: start;
    white-space: normal;
  }

  .admin-list-actions {
    justify-items: start;
    text-align: left;
  }

  .admin-panel-head {
    display: grid;
  }

  .admin-quick-actions .button {
    width: 100%;
  }

  .athlete-dashboard-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 18px;
  }

  .athlete-dashboard-logo img {
    width: 138px;
  }

  .athlete-dashboard-nav {
    justify-content: flex-start;
    gap: 18px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .athlete-dashboard-nav a.active::after {
    bottom: -6px;
  }

  .athlete-dashboard-user {
    width: 100%;
  }

  .athlete-dashboard-main {
    padding-top: 28px;
  }

  .athlete-welcome {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .athlete-welcome h1 {
    font-size: clamp(2.25rem, 13vw, 3.4rem);
  }

  .athlete-welcome p {
    font-size: 1.02rem;
  }

  .athlete-action-cards {
    grid-template-columns: 1fr;
  }

  .athlete-filter-panel form,
  .athlete-participant-filter,
  .athlete-detail-grid,
  .athlete-register-form,
  .athlete-profile-layout,
  .athlete-profile-details,
  .athlete-competition-grid,
  .athlete-my-registration-grid,
  .athlete-category-list {
    grid-template-columns: 1fr;
  }

  .athlete-summary-cards,
  .account-summary-cards,
  .athlete-my-registration-card dl,
  .athlete-representation-options,
  .representation-options {
    grid-template-columns: 1fr;
  }

  .account-management-filter {
    grid-template-columns: 1fr;
  }

  .account-management-filter .button,
  .account-management-filter a.button {
    width: 100%;
  }

  .athlete-registration-panel.success {
    grid-template-columns: 1fr;
  }

  .athlete-button-row .athlete-inline-button,
  .athlete-register-form .button {
    width: 100%;
    justify-content: center;
  }

  .athlete-action-card {
    min-height: 0;
    padding: 24px;
  }

  .athlete-profile-card {
    position: static;
  }

  .athlete-profile-section {
    padding: 20px;
  }

  .athlete-profile-form .athlete-button-row .button {
    width: 100%;
    justify-content: center;
  }

  .athlete-dashboard-footer {
    grid-template-columns: 1fr;
  }

  .athlete-footer-bottom {
    display: grid;
  }
}

/* Mesej Admin */
.message-panel { min-width: 0; }
.message-panel h1, .message-panel td { overflow-wrap: anywhere; }
.message-panel .form { margin-block: 1.5rem; }
.message-panel textarea { width: 100%; min-height: 9rem; resize: vertical; box-sizing: border-box; font: inherit; }
.message-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.message-reply { border: 1px solid #dce3eb; border-radius: 12px; padding: 1rem; margin-block: 1rem; }
.message-status, .message-nav-badge { display: inline-block; background: #e9efff; color: #243e7c; border-radius: 20px; padding: .25rem .6rem; font-size: .75rem; font-weight: 700; }
.message-nav-badge { background: #ba2632; color: #fff; flex-shrink: 0; }
@media (max-width: 640px) {
  .message-panel .filter-form { display: flex; flex-direction: column; align-items: stretch; }
  .message-panel .filter-form label { width: 100%; }
  .message-panel .table-wrap { overflow-x: auto; }
}
