.zep-app-shell {
  --zep-lime: #a0e40d;
  --zep-navy: #1d3557;
  --zep-blue: #12c2e2;
  color: #102236;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0 auto;
  max-width: 720px;
  padding: 20px;
}

.zep-app-header {
  border-bottom: 4px solid var(--zep-lime);
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.zep-app-kicker {
  color: var(--zep-blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.zep-app-header h1 {
  color: var(--zep-navy);
  font-size: 28px;
  line-height: 1.15;
  margin: 0;
}

.zep-app-panel {
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  padding: 16px;
}

.zep-app-button {
  background: var(--zep-navy);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
  touch-action: manipulation;
}

.zep-app-button:focus {
  outline: 3px solid var(--zep-blue);
  outline-offset: 2px;
}

.zep-app-status {
  background: #f6f8fa;
  border-radius: 6px;
  margin: 14px 0 0;
  padding: 12px;
}

.zep-app-pwa-tools { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin-top: 10px; }
.zep-app-connection { align-items: center; display: inline-flex; font-size: 12px; font-weight: 700; gap: 6px; }
.zep-app-connection::before { background: #4f7d00; border-radius: 50%; content: ""; height: 9px; width: 9px; }
.zep-app-connection.is-offline { color: #9b3f3f; }
.zep-app-connection.is-offline::before { background: #c84949; }
.zep-app-install-help { background: #edf2f6; border-left: 4px solid var(--zep-blue); border-radius: 5px; font-size: 13px; margin: 10px 0 0; padding: 10px; }
.zep-app-update-banner { align-items: center; background: #fff8df; border: 1px solid #e0bd43; border-radius: 6px; display: flex; gap: 10px; justify-content: space-between; margin-top: 10px; padding: 10px; }
.zep-app-update-banner[hidden] { display: none; }
.zep-app-update-banner span { font-size: 13px; font-weight: 700; }
.zep-app-maintenance-banner { background: #fff2d9; border: 1px solid #e59b19; border-radius: 6px; color: #704500; font-size: 13px; font-weight: 700; margin-top: 10px; padding: 11px; }
.zep-app-maintenance-banner[hidden] { display: none; }
.zep-app-version-banner { background: #ffe4e4; border: 1px solid #c84949; border-radius: 6px; color: #8b2424; font-size: 13px; font-weight: 700; margin-top: 10px; padding: 11px; }
.zep-app-version-banner[hidden] { display: none; }
.zep-app-shell.is-maintenance [data-zep-propose], .zep-app-shell.is-maintenance [data-zep-association-submit],
.zep-app-shell.is-maintenance [data-zep-proposal-submit], .zep-app-shell.is-maintenance [data-zep-proposal-decision],
.zep-app-shell.is-maintenance [data-zep-cancel-proposal], .zep-app-shell.is-maintenance [data-zep-admin-action],
.zep-app-shell.is-maintenance [data-zep-admin-result-action], .zep-app-shell.is-maintenance [data-zep-user-action] { opacity: .45; pointer-events: none; }
.zep-app-shell.is-version-mismatch [data-zep-propose], .zep-app-shell.is-version-mismatch [data-zep-association-submit],
.zep-app-shell.is-version-mismatch [data-zep-proposal-submit], .zep-app-shell.is-version-mismatch [data-zep-proposal-decision],
.zep-app-shell.is-version-mismatch [data-zep-cancel-proposal], .zep-app-shell.is-version-mismatch [data-zep-admin-action],
.zep-app-shell.is-version-mismatch [data-zep-admin-result-action], .zep-app-shell.is-version-mismatch [data-zep-user-action] { opacity: .45; pointer-events: none; }

.zep-app-intro {
  margin-top: 0;
}

.zep-app-login {
  min-height: 44px;
}

.zep-app-user {
  align-items: center;
  display: flex;
  gap: 12px;
}

.zep-app-user div {
  display: grid;
  flex: 1;
  gap: 2px;
}

.zep-app-user span {
  color: #52677a;
  font-size: 14px;
}

.zep-app-avatar {
  border-radius: 50%;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.zep-app-button-secondary {
  background: #fff;
  border: 1px solid var(--zep-navy);
  color: var(--zep-navy);
}

.zep-app-dashboard {
  display: flex;
  flex-direction: column;
  margin-top: 18px;
}

/* Ordine esplicito: resta corretto anche durante un temporaneo disallineamento cache HTML/JS. */
.zep-app-account { order: 10; }
.zep-app-association { order: 20; }
.zep-app-admin { order: 30; }
.zep-app-admin-results { order: 40; }
.zep-app-player-section { order: 50; }
.zep-app-matches-heading { order: 60; }
.zep-app-matches { order: 70; }
.zep-app-proposal { order: 80; }

.zep-app-admin {
  border-bottom: 1px solid #d7e0e8;
  margin-bottom: 22px;
  padding-bottom: 22px;
}

.zep-app-admin-requests {
  display: grid;
  gap: 10px;
}

.zep-app-admin-request {
  align-items: center;
  background: #f8fafb;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) auto auto;
  padding: 12px;
}

.zep-app-admin-request > div:first-child {
  display: grid;
  gap: 2px;
}

.zep-app-admin-request span,
.zep-app-request-date {
  color: #617486;
  font-size: 12px;
}

.zep-app-request-actions {
  display: flex;
  gap: 7px;
}

.zep-app-button-approve {
  background: #4f7d00;
}

.zep-app-button-reject {
  background: #b42318;
}

.zep-app-error {
  background: #fff0ee;
  border-radius: 6px;
  color: #8f1f15;
  padding: 10px;
}

.zep-app-account {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.zep-app-account span,
.zep-app-badge {
  background: #edf2f6;
  border-radius: 999px;
  color: #334b61;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
}

.zep-app-section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.zep-app-section-heading h2 {
  color: var(--zep-navy);
  font-size: 22px;
  margin: 0;
}

.zep-app-matches {
  display: grid;
  gap: 12px;
}

.zep-app-match {
  background: #fff;
  border: 1px solid #d7e0e8;
  border-radius: 10px;
  padding: 14px;
}

.zep-app-match-meta {
  color: #617486;
  font-size: 12px;
  margin-bottom: 10px;
}

.zep-app-match-teams {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.zep-app-match-teams strong:last-child {
  text-align: right;
}

.zep-app-match-teams span {
  color: var(--zep-navy);
  font-weight: 800;
}

.zep-app-match-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.zep-app-match-sets { align-items: center; background: #f6f8fa; border-radius: 5px; display: flex; font-size: 13px; gap: 8px; justify-content: center; margin-top: 9px; padding: 7px; }
.zep-app-match-sets span { color: #617486; }

.zep-app-badge-action {
  background: rgba(160, 228, 13, 0.22);
  color: #365300;
}

.zep-app-empty {
  color: #617486;
}

.zep-app-association {
  background: #f6f9ec;
  border: 1px solid #cfe58d;
  border-radius: 10px;
  margin-bottom: 22px;
  padding: 16px;
}

.zep-app-association h2 { color: var(--zep-navy); margin: 0 0 8px; }
.zep-app-association p { margin: 0 0 14px; }
.zep-app-association form { align-items: end; display: grid; gap: 10px; grid-template-columns: 1fr auto; }
.zep-app-association label { font-weight: 700; grid-column: 1 / -1; }
.zep-app-association select { background: #fff; border: 1px solid #b9c7d3; border-radius: 6px; min-height: 42px; padding: 8px; }

.zep-app-button-propose { margin-left: auto; padding: 7px 10px; }
.zep-app-proposal { background: #f7fafc; border: 2px solid var(--zep-blue); border-radius: 10px; margin-top: 18px; padding: 16px; }
.zep-app-proposal > p { color: #52677a; }
.zep-app-set-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.zep-app-set-grid label { color: var(--zep-navy); display: grid; font-weight: 700; gap: 6px; }
.zep-app-set-grid select { background: #fff; border: 1px solid #b9c7d3; border-radius: 6px; min-height: 42px; padding: 8px; }
.zep-app-calculated-result { font-size: 18px; }
.zep-app-player-section { border-bottom: 1px solid #d7e0e8; margin-bottom: 24px; padding-bottom: 20px; }
.zep-app-subheading { color: var(--zep-navy); font-size: 21px; margin: 24px 0 12px; }
.zep-app-pending-card { background: #fff8e8; border: 1px solid #efcf7d; border-radius: 9px; display: grid; gap: 10px; margin-bottom: 10px; padding: 14px; }
.zep-app-admin-results { border-bottom: 1px solid #d7e0e8; margin-bottom: 24px; padding-bottom: 20px; }
.zep-app-table-actions { display: flex; flex-wrap: wrap; gap: 7px; min-width: 190px; }
.zep-app-table-actions .zep-app-button { font-size: 12px; padding: 7px 9px; }
.zep-app-detail { background: #f7fafc; border: 2px solid var(--zep-blue); border-radius: 10px; margin-top: 18px; padding: 16px; }
.zep-app-detail dl { display: grid; gap: 8px; margin: 0; }
.zep-app-detail dl div { border-bottom: 1px solid #d7e0e8; display: grid; gap: 8px; grid-template-columns: minmax(145px, .8fr) minmax(0, 1.2fr); padding: 8px 0; }
.zep-app-detail dt { color: #52677a; font-weight: 700; }
.zep-app-detail dd { margin: 0; overflow-wrap: anywhere; }
.zep-app-pending-score { color: var(--zep-navy); }
.zep-app-table-wrap { -webkit-overflow-scrolling: touch; overflow-x: auto; overscroll-behavior-inline: contain; }
.zep-app-table { border-collapse: collapse; font-size: 13px; min-width: 920px; width: 100%; }
.zep-app-table th, .zep-app-table td { border-bottom: 1px solid #d7e0e8; padding: 9px; text-align: left; vertical-align: top; }
.zep-app-table th { background: #edf2f6; color: var(--zep-navy); white-space: nowrap; }
.zep-app-load-more { align-items: center; background: #f6f8fa; border-radius: 8px; display: flex; gap: 10px; justify-content: space-between; padding: 10px; }
.zep-app-load-more span { color: #617486; font-size: 12px; font-weight: 700; }

.zep-app-dashboard > .zep-app-account { order: 10; }
.zep-app-dashboard > .zep-app-nav { order: 20; }
.zep-app-dashboard > .zep-app-association { order: 30; }
.zep-app-dashboard > [data-zep-view-panel] { order: 40; }

.zep-app-nav {
  background: #edf2f6;
  border-radius: 10px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  padding: 6px;
}

.zep-app-nav button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--zep-navy);
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 8px;
}

.zep-app-nav button.is-active { background: var(--zep-navy); color: #fff; }
.zep-app-nav button span { background: var(--zep-lime); border-radius: 999px; color: #1d3557; display: inline-block; min-width: 22px; padding: 2px 6px; }

.zep-app-filters {
  background: #f6f8fa;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  padding: 12px;
}

.zep-app-filters label { color: var(--zep-navy); display: grid; font-size: 12px; font-weight: 800; gap: 5px; }
.zep-app-filters select, .zep-app-filters input { background: #fff; border: 1px solid #b9c7d3; border-radius: 6px; min-height: 40px; padding: 7px; width: 100%; }
.zep-app-match-tools { align-items: center; display: flex; justify-content: space-between; margin: -4px 0 14px; }
.zep-app-match-tools span { color: #617486; font-size: 12px; font-weight: 700; }

[data-zep-view-panel][hidden], .zep-app-nav button[hidden] { display: none !important; }

.zep-app-activity-list { display: grid; gap: 10px; }
.zep-app-activity-item { background: #fff; border: 1px solid #d7e0e8; border-left: 5px solid var(--zep-blue); border-radius: 8px; color: #102236; cursor: pointer; display: grid; gap: 3px; padding: 12px; text-align: left; width: 100%; }
.zep-app-activity-controls { background: #edf2f6; border-radius: 8px; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
.zep-app-activity-controls label { display: grid; font-size: 12px; gap: 4px; }
.zep-app-activity-controls select { background: #fff; border: 1px solid #bac7d3; border-radius: 5px; min-height: 38px; padding: 6px 8px; width: 100%; }
.zep-app-activity-title, .zep-app-activity-detail, .zep-app-activity-date { display: block !important; grid-column: 1 / -1; width: 100%; }
.zep-app-activity-detail { margin-top: 5px; }
.zep-app-activity-date { margin-top: 4px; }
.zep-app-activity-item.is-action { border-left-color: var(--zep-lime); }
.zep-app-activity-item.is-warning { border-left-color: #e59b19; }
.zep-app-activity-item span, .zep-app-activity-item small { color: #617486; }
@media (max-width: 520px) { .zep-app-activity-controls { grid-template-columns: 1fr; } }
.zep-app-history-list { display: grid; gap: 10px; }
.zep-app-history-item { background: #fff; border: 1px solid #d7e0e8; border-radius: 8px; display: grid; gap: 5px; padding: 12px; }
.zep-app-history-item > div { align-items: center; display: flex; justify-content: space-between; }
.zep-app-history-item p { margin: 2px 0; }
.zep-app-history-item small, .zep-app-history-item span { color: #617486; }
.zep-app-user-filters {
  background: #f6f8fa;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 12px;
}
.zep-app-user-filters label { color: var(--zep-navy); display: grid; font-size: 12px; font-weight: 800; gap: 5px; }
.zep-app-user-filters input, .zep-app-user-filters select { background: #fff; border: 1px solid #b9c7d3; border-radius: 6px; min-height: 40px; padding: 7px; width: 100%; }
.zep-app-users-table { min-width: 980px; }
.zep-app-users-table td:first-child strong, .zep-app-users-table td:first-child small { display: block; }
.zep-app-users-table td:first-child small { color: #617486; margin-top: 3px; }
.zep-app-protected { color: #617486; font-size: 12px; font-weight: 700; }
.zep-app-notification-status { background: #edf2f6; border-left: 5px solid #617486; border-radius: 8px; display: grid; gap: 3px; margin-bottom: 18px; padding: 12px; }
.zep-app-notification-status span { color: #52677a; font-size: 13px; }
.zep-app-notification-status .zep-app-button { justify-self: start; margin-top: 7px; }
.zep-app-notification-controls { align-items: end; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; }
.zep-app-notification-controls label { display: grid; font-size: 12px; gap: 4px; }
.zep-app-notification-controls select { background: #fff; border: 1px solid #bac7d3; border-radius: 5px; min-height: 38px; padding: 6px 30px 6px 8px; }
.zep-app-notification-diagnostics { background: #fff; border: 1px solid #d6dfe7; border-radius: 6px; display: grid; font-size: 13px; gap: 4px; margin-top: 8px; padding: 10px; }
.zep-app-notification-diagnostics strong.is-ready { color: #4f7d00; }
.zep-app-notification-diagnostics strong.is-warning { color: #a96700; }
.zep-app-notification-audit { border-top: 1px solid #d6dfe7; display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; }
.zep-app-notification-audit > div { background: #fff; border-radius: 5px; display: grid; gap: 2px; padding: 7px; }
.zep-app-notification-audit > div span { font-size: 12px; }
.zep-app-notification-status.is-test { border-left-color: var(--zep-blue); }
.zep-app-notification-status.is-pilot { border-left-color: #a96700; }
.zep-app-notification-status.is-live { border-left-color: #4f7d00; }
.zep-app-notification-status.is-test_missing_recipient, .zep-app-notification-status.is-live_blocked { border-left-color: #e59b19; }
.zep-app-system-health { background: #edf2f6; border-left: 5px solid var(--zep-blue); border-radius: 8px; display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; }
.zep-app-operations-console { background: #f5f8fb; border-left: 5px solid var(--zep-navy); border-radius: 8px; display: grid; gap: 10px; margin-bottom: 14px; padding: 12px; }
.zep-app-operations-console .zep-app-section-heading { margin: 0; }
.zep-app-operations-console .zep-app-section-heading > div { display: grid; gap: 3px; }
.zep-app-operations-cards { display: grid; gap: 8px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.zep-app-operations-cards > div { background: #fff; border: 1px solid #d9e2ea; border-radius: 7px; display: grid; gap: 3px; padding: 9px; }
.zep-app-operations-cards span { color: #617486; font-size: 11px; }
.zep-app-operations-cards strong { color: var(--zep-navy); font-size: 20px; }
.zep-app-operations-table { min-width: 720px; }
.zep-app-operations-table tr.is-warning td { background: #fff8df; }
.zep-app-operations-table tr.is-action td { background: rgba(160, 228, 13, 0.1); }
.zep-app-dashboard-metrics { display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.zep-app-dashboard-metric { align-content: center; background: #f5f8fb; border: 1px solid #d9e2ea; border-radius: 8px; display: grid; gap: 6px; grid-template-columns: 1fr; justify-items: center; min-height: 102px; padding: 12px; text-align: center; }
button.zep-app-dashboard-metric { appearance: none; cursor: pointer; font: inherit; width: 100%; }
button.zep-app-dashboard-metric:hover, button.zep-app-dashboard-metric:focus-visible { border-color: var(--zep-blue); box-shadow: 0 0 0 2px rgba(18, 194, 226, 0.18); }
.zep-app-dashboard-metric span { color: #617486; display: block; font-size: 12px; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
.zep-app-dashboard-metric strong { color: var(--zep-navy); display: block; font-size: 24px; line-height: 1.1; }
.zep-app-dashboard-metric small { color: #617486; display: block; font-size: 10px; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.zep-app-dashboard-mine, .zep-app-dashboard-groups { margin-top: 20px; }
.zep-app-dashboard-mine h3, .zep-app-dashboard-groups h3 { color: var(--zep-navy); margin: 0 0 10px; }
.zep-app-dashboard-mine h3 { align-items: baseline; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.zep-app-dashboard-mine h3 strong { min-width: 0; overflow-wrap: anywhere; }
.zep-app-dashboard-mine > div { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.zep-app-dashboard-groups { display: grid; gap: 9px; }
.zep-app-dashboard-groups article { align-items: center; background: #f5f8fb; border-radius: 8px; display: grid; gap: 10px; grid-template-columns: minmax(150px, 1fr) minmax(140px, 2fr) 45px; padding: 10px; }
.zep-app-dashboard-groups article > div:first-child { display: grid; gap: 2px; }
.zep-app-dashboard-groups article span { color: #617486; font-size: 11px; }
.zep-app-progress { background: #dbe4eb; border-radius: 999px; height: 10px; overflow: hidden; }
.zep-app-progress i { background: linear-gradient(90deg, var(--zep-blue), var(--zep-lime)); display: block; height: 100%; }
.zep-app-system-health > div:first-child { display: grid; gap: 3px; }
.zep-app-system-health .zep-app-button { justify-self: start; }
.zep-app-system-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.zep-app-system-controls .zep-app-button { width: auto; }
.zep-app-data-safety { background: #edf2f6; border-left: 5px solid var(--zep-lime); border-radius: 8px; display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; }
.zep-app-data-safety > div:first-child { display: grid; gap: 3px; }
.zep-app-data-safety-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.zep-app-integrity-report { background: #fff; border-radius: 6px; display: grid; font-size: 13px; gap: 5px; padding: 10px; }
.zep-app-integrity-report ul { display: grid; gap: 4px; margin: 5px 0; max-height: 280px; overflow: auto; padding-left: 20px; }
.zep-app-integrity-report .is-ok { color: #4f7d00; }
.zep-app-integrity-report .is-error { color: #b13636; }
.zep-app-integrity-report li.is-warning { color: #946000; }
.zep-app-operation-audit { background: #edf2f6; border-left: 5px solid var(--zep-navy); border-radius: 8px; display: grid; gap: 8px; margin-bottom: 14px; padding: 12px; }
.zep-app-operation-audit-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.zep-app-operation-audit-list > div { background: #fff; border-radius: 5px; display: grid; font-size: 12px; gap: 2px; padding: 7px; }
.zep-app-health-report { background: #fff; border-radius: 6px; display: grid; font-size: 13px; gap: 5px; padding: 10px; }
.zep-app-health-report ul { display: grid; gap: 3px; margin: 5px 0; padding-left: 20px; }
.zep-app-health-report .is-ok, .zep-app-health-report li.is-ok { color: #4f7d00; }
.zep-app-health-report .is-error, .zep-app-health-report li.is-error { color: #b13636; }
.zep-app-health-report .is-warning { color: #946000; }
.zep-app-performance-detail { background: #eef6f8; border-radius: 5px; padding: 7px; }
.zep-app-performance-detail summary { color: var(--zep-navy); cursor: pointer; font-weight: 700; }
.zep-app-production-blockers { background: #fff8df; border-radius: 5px; color: #704500; padding: 8px 8px 8px 28px !important; }
.zep-app-help-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zep-app-help-grid article { background: #f6f8fa; border-left: 4px solid var(--zep-blue); border-radius: 7px; padding: 12px; }
.zep-app-help-grid h3 { color: var(--zep-navy); font-size: 16px; margin: 0 0 6px; }
.zep-app-help-grid p { font-size: 14px; margin: 0; }
.zep-app-profile-card { background: #f6f8fa; border-radius: 8px; display: grid; gap: 8px; padding: 12px; }
.zep-app-profile-card > div { border-bottom: 1px solid #d7e0e8; display: grid; gap: 2px; padding-bottom: 7px; }
.zep-app-profile-card > div:last-child { border-bottom: 0; padding-bottom: 0; }
.zep-app-profile-card span { color: #617486; font-size: 12px; }
.zep-app-profile-actions { background: #edf2f6; border-radius: 8px; display: grid; gap: 8px; margin-top: 12px; padding: 12px; }
.zep-app-profile-actions .zep-app-button { justify-self: start; }
.zep-app-profile-actions p { font-size: 12px; margin: 0; }
@media (max-width: 760px) {
  .zep-app-operations-cards, .zep-app-dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zep-app-dashboard-mine > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .zep-app-help-grid { grid-template-columns: 1fr; } }
.zep-app-standings-note { color: #617486; margin: -4px 0 14px; }
.zep-app-standings-list { display: grid; gap: 20px; }
.zep-app-standing-group h3 { color: var(--zep-navy); margin: 0 0 8px; }
.zep-app-standing-table { min-width: 680px; }
.zep-app-standing-table tr.is-mine td { background: rgba(160, 228, 13, 0.2); font-weight: 700; }

@media (max-width: 520px) {
  .zep-app-shell {
    max-width: none;
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    width: 100%;
  }

  .zep-app-header { margin-bottom: 12px; padding: 4px 2px 9px; }
  .zep-app-header h1 { font-size: 24px; }
  .zep-app-kicker { font-size: 11px; }
  .zep-app-panel { border-radius: 10px; padding: 12px; }
  .zep-app-intro { font-size: 14px; line-height: 1.45; }

  .zep-app-user {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .zep-app-user > div { min-width: 0; }
  .zep-app-user span { font-size: 12px; overflow-wrap: anywhere; }
  .zep-app-avatar { height: 40px; width: 40px; }
  .zep-app-status { font-size: 13px; margin-top: 10px; padding: 10px; }
  .zep-app-pwa-tools { align-items: stretch; flex-direction: column; }
  .zep-app-pwa-tools .zep-app-button { width: 100%; }

  .zep-app-button, .zep-app-nav button, select, input { min-height: 44px; }

  .zep-app-button-secondary {
    width: 100%;
  }

  .zep-app-section-heading { align-items: stretch; flex-direction: column; gap: 9px; }
  .zep-app-section-heading h2 { font-size: 20px; }
  .zep-app-section-heading .zep-app-button-secondary { width: 100%; }

  .zep-app-match-teams {
    font-size: 14px;
  }

  .zep-app-match { padding: 12px; }
  .zep-app-match-meta { line-height: 1.4; }
  .zep-app-match-teams strong { min-width: 0; overflow-wrap: anywhere; }
  .zep-app-match-teams span { white-space: nowrap; }
  .zep-app-match-footer { align-items: stretch; }
  .zep-app-button-propose { margin-left: 0; width: 100%; }
  .zep-app-match-sets { align-items: flex-start; flex-direction: column; gap: 2px; }

  .zep-app-admin-request {
    grid-template-columns: 1fr;
  }

  .zep-app-request-actions { flex-direction: column; }
  .zep-app-request-actions .zep-app-button { flex: 1; width: 100%; }

  .zep-app-association form { grid-template-columns: 1fr; }
  .zep-app-set-grid { grid-template-columns: 1fr; }
  .zep-app-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 16px;
    padding: 5px;
    position: sticky;
    top: max(4px, env(safe-area-inset-top));
    z-index: 20;
  }
  .zep-app-nav button { font-size: 12px; padding: 6px 3px; }
  .zep-app-nav button span { min-width: 19px; padding: 1px 5px; }
  .zep-app-filters { grid-template-columns: 1fr; }
  .zep-app-user-filters { grid-template-columns: 1fr; }
  .zep-app-dashboard-groups article { grid-template-columns: 1fr 45px; }
  .zep-app-dashboard-groups article > div:first-child { grid-column: 1 / -1; }
  .zep-app-dashboard-metrics, .zep-app-operations-cards { grid-template-columns: 1fr 1fr; }
  .zep-app-dashboard-mine h3 { align-items: stretch; display: grid; line-height: 1.3; }
  .zep-app-dashboard-mine > div { grid-template-columns: 1fr; }
  .zep-app-dashboard-mine .zep-app-dashboard-metric { align-items: center; justify-items: stretch; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; text-align: left; }
  .zep-app-dashboard-mine .zep-app-dashboard-metric strong { justify-self: end; white-space: nowrap; }
  .zep-app-dashboard-mine .zep-app-dashboard-metric small { grid-column: 1 / -1; }
  .zep-app-dashboard-metric, .zep-app-operations-cards > div { padding: 9px; }
  .zep-app-dashboard-metric strong { font-size: 21px; }
  .zep-app-detail { padding: 12px; }
  .zep-app-detail dl div { gap: 3px; grid-template-columns: 1fr; }
  .zep-app-system-controls, .zep-app-data-safety-actions, .zep-app-notification-controls { flex-direction: column; }
  .zep-app-system-controls .zep-app-button, .zep-app-data-safety-actions .zep-app-button,
  .zep-app-notification-controls .zep-app-button, .zep-app-notification-controls label,
  .zep-app-notification-controls select { width: 100%; }
  .zep-app-load-more { align-items: stretch; flex-direction: column; text-align: center; }
  .zep-app-load-more .zep-app-button { width: 100%; }
  .zep-app-table { font-size: 12px; min-width: 660px; }
  .zep-app-table th, .zep-app-table td { padding: 7px; }
  .zep-app-table th:first-child, .zep-app-table td:first-child {
    background: #fff;
    box-shadow: 2px 0 4px rgba(29, 53, 87, .08);
    left: 0;
    position: sticky;
    z-index: 2;
  }
  .zep-app-table th:first-child { background: #edf2f6; z-index: 3; }
  .zep-app-standing-table tr.is-mine td:first-child { background: #e8f8bd; }
  .zep-app-table-actions { min-width: 150px; }
  .zep-app-table-actions .zep-app-button { width: 100%; }
  .zep-app-history-item > div { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
  .zep-app-shell { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

.zep-app-skeleton { pointer-events: none; }
.zep-app-skeleton-line {
  animation: zep-app-skeleton-pulse 1.25s ease-in-out infinite;
  background: linear-gradient(90deg, #edf2f6 25%, #f8fafb 50%, #edf2f6 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  display: block;
  height: 15px;
  margin: 8px 0;
  width: 100%;
}
.zep-app-skeleton-line.is-short { width: 38%; }
.zep-app-skeleton-line.is-medium { width: 68%; }
@keyframes zep-app-skeleton-pulse { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (prefers-reduced-motion: reduce) {
  .zep-app-skeleton-line { animation: none; }
  .zep-app-shell *, .zep-app-shell *::before, .zep-app-shell *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
