:root {
  --navy: #173f63;
  --navy-deep: #102f4a;
  --blue: #286b9e;
  --sky: #eaf3f8;
  --amber: #fff3c4;
  --amber-deep: #b7791f;
  --surface: #ffffff;
  --surface-muted: #f5f7f8;
  --ink: #17212b;
  --muted: #63707c;
  --line: #d9e0e5;
  --success: #1d6b4d;
  --success-bg: #e5f5ec;
  --danger: #9b2432;
  --danger-bg: #fdebed;
  --info: #235d86;
  --info-bg: #eaf3fb;
  --shadow: 0 10px 32px rgba(23, 63, 99, .09);
  font-family: Inter, Aptos, Arial, sans-serif;
  color: var(--ink);
  background: #eef2f5;
}

* { box-sizing: border-box; }
body { margin: 0; background: #eef2f5; font-size: 16px; line-height: 1.45; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 16.25rem minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 1.8rem; padding: 1.35rem .9rem 1rem; background: var(--navy-deep); color: #eff8ff; }
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; min-width: 0; }
.brand:hover { color: inherit; text-decoration: none; }
.brand strong { display: block; line-height: 1.15; font-size: .98rem; overflow-wrap: anywhere; }
.brand small { display: block; color: #b8cedc; margin-top: .15rem; font-size: .76rem; }
.brand-mark { display: grid; place-items: center; flex: 0 0 2.35rem; width: 2.35rem; height: 2.35rem; border-radius: .7rem; background: #e9b949; color: var(--navy-deep); font-weight: 800; font-size: 1.2rem; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.sidebar nav { display: grid; gap: .25rem; }
.nav-item { color: #d6e6ef; padding: .7rem .8rem; border-radius: .55rem; font-size: .94rem; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.09); text-decoration: none; }
.nav-item.is-active { color: var(--navy-deep); background: #f4c95d; font-weight: 700; }
.nav-item-sub { margin: -.3rem 0 .25rem 1.05rem; padding: .5rem .65rem; border-left: 1px solid rgba(255,255,255,.28); font-size: .82rem; }
.sidebar-footer { margin-top: auto; display: grid; gap: .2rem; padding: .9rem .75rem; border-top: 1px solid rgba(255,255,255,.17); font-size: .85rem; }
.sidebar-footer small { color: #b8cedc; text-transform: capitalize; }
.link-button { width: max-content; padding: 0; border: 0; background: transparent; color: #d6e6ef; text-decoration: underline; font-size: .83rem; }

.main-content { padding: clamp(1rem, 3vw, 2.5rem); max-width: 100rem; width: 100%; margin: 0 auto; }
.mobile-header { display: none; }
.mobile-menu { display: none; }
.page-heading { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1.35rem; }
.page-heading h1 { margin: 0; color: var(--navy-deep); font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.15; }
.page-heading p { max-width: 48rem; margin: .38rem 0 0; color: var(--muted); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.metric-grid.single-metric { grid-template-columns: minmax(0, 20rem); }
.metric-grid.cash-metrics { grid-template-columns: repeat(3, minmax(0, 20rem)); }
.metric-card { display: grid; gap: .4rem; min-height: 9.4rem; padding: 1.25rem; border: 1px solid #dde6ec; border-radius: .85rem; background: var(--surface); box-shadow: var(--shadow); }
.metric-card span { color: var(--muted); font-size: .84rem; }
.metric-card strong { color: var(--navy-deep); font-size: clamp(1.4rem, 2.3vw, 2rem); line-height: 1.1; }
.metric-card small { color: var(--muted); font-size: .77rem; }
.cash-balance-positive { border-color: #a9d8bd; background: var(--success-bg); }
.cash-balance-positive span, .cash-balance-positive strong { color: var(--success); }
.cash-balance-negative { border-color: #e7b2ba; background: var(--danger-bg); }
.cash-balance-negative span, .cash-balance-negative strong { color: var(--danger); }
.cash-income span, .cash-income strong { color: var(--success); }
.cash-expense span, .cash-expense strong { color: var(--danger); }

.panel { margin-bottom: 1.25rem; padding: 1.2rem; border: 1px solid #dce5ea; border-radius: .85rem; background: var(--surface); box-shadow: 0 4px 18px rgba(23, 63, 99, .05); }
.compact-panel { display: flex; align-items: end; flex-wrap: wrap; gap: .85rem; padding: .9rem 1rem; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h2 { margin: 0; color: var(--navy-deep); font-size: 1.1rem; }
.panel-heading p, .panel-heading span { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.panel-heading > div { min-width: 0; }

.notice { margin: 0 0 1rem; padding: .75rem .9rem; border-radius: .55rem; border: 1px solid transparent; font-size: .92rem; }
.notice-success { color: var(--success); border-color: #bbdfcb; background: var(--success-bg); }
.notice-error { color: var(--danger); border-color: #efc2c8; background: var(--danger-bg); }
.notice-info { color: var(--info); border-color: #c4dceb; background: var(--info-bg); }
.notice-overlay { position: fixed; z-index: 1000; top: max(.75rem, env(safe-area-inset-top)); left: 50%; display: grid; gap: .5rem; width: min(44rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); overflow-y: auto; transform: translateX(-50%); pointer-events: none; }
.notice-overlay .notice { margin: 0; box-shadow: 0 14px 38px rgba(45, 22, 27, .22); pointer-events: auto; }
.notice-floating { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; border-width: 2px; font-weight: 650; }
.notice-floating span { overflow-wrap: anywhere; }
.notice-dismiss { flex: 0 0 1.8rem; width: 1.8rem; min-height: 1.8rem; padding: 0; border: 0; border-radius: .3rem; color: inherit; background: transparent; font-size: 1.4rem; line-height: 1; }
.notice-dismiss:hover, .notice-dismiss:focus-visible { background: rgba(155, 36, 50, .12); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.55rem; padding: .58rem .95rem; border: 1px solid transparent; border-radius: .55rem; font-weight: 700; font-size: .9rem; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.button-primary:hover { color: #fff; background: #0f3556; }
.button-secondary { color: var(--navy-deep); background: #e7f0f5; border-color: #c4d8e5; }
.button-secondary:hover { color: var(--navy-deep); background: #d8e8f1; }
.button-quiet { color: var(--muted); background: transparent; border-color: var(--line); }
.button-quiet:hover { color: var(--ink); background: var(--surface-muted); }
.button-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-danger:hover { color: #fff; background: #7f1d2a; }
.icon-button { display: inline-grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid #e2b7bd; border-radius: .45rem; background: #fff7f8; color: var(--danger); font-weight: 800; font-size: 1.2rem; }

.form-panel { overflow: hidden; }
.form-grid { display: grid; gap: .9rem; margin-bottom: .9rem; }
.form-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.parent-cash-fields .field-note { grid-column: 1 / -1; margin: -.15rem 0 0; }
.form-grid label, .filter-bar label, .form-panel > label, .stack-form label { display: grid; gap: .38rem; color: #344554; font-weight: 650; font-size: .86rem; }
input, select, textarea { width: 100%; min-height: 2.45rem; padding: .52rem .65rem; border: 1px solid #bfcbd4; border-radius: .48rem; color: var(--ink); background: #fff; }
textarea { min-height: 4rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(40, 107, 158, .2); border-color: var(--blue); }
.checkbox-label { display: flex !important; align-items: center; gap: .48rem; align-self: end; min-height: 2.45rem; padding: 0 .1rem; }
.checkbox-label input { width: 1.05rem; min-height: 1.05rem; }
.field-note { color: var(--muted); font-size: .84rem; margin: .6rem 0 1rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.inline-form { display: inline-flex; margin: 0; }
.cash-received-form { align-items: end; flex-wrap: wrap; gap: .35rem; }
.cash-received-form > label:not(.checkbox-label) { display: grid; gap: .2rem; font-size: .8rem; font-weight: 650; }
.cash-received-form > label:not(.checkbox-label) input { min-width: 7rem; }
[data-sale-cash-note] { grid-column: 1 / -1; margin: 0; }
.table-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-width: max-content; }
.table-button { min-height: 2rem; padding: .35rem .58rem; font-size: .78rem; }

.filter-bar label { min-width: 10rem; }
.filter-bar .button { margin-bottom: 0; }
.issue-filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; margin: .75rem 0 1rem; }
.issue-filter-bar .form-actions { margin: 0; }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid #dbe4e9; border-radius: .58rem; }
table { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: .87rem; }
th, td { padding: .62rem .7rem; vertical-align: middle; text-align: left; border-bottom: 1px solid #e4eaed; }
th { position: sticky; top: 0; background: var(--navy); color: #fff; font-size: .76rem; letter-spacing: .01em; line-height: 1.2; }
tbody tr:nth-child(even) { background: #f8fafb; }
tbody tr:hover { background: #eef6fa; }
tbody tr:last-child td { border-bottom: 0; }
.cash-row-income, tbody tr.cash-row-income:nth-child(even) { color: var(--success); background: #edf8f1; }
.cash-row-expense, tbody tr.cash-row-expense:nth-child(even) { color: var(--danger); background: #fdf0f2; }
tbody tr.cash-row-income:hover { background: #dff2e7; }
tbody tr.cash-row-expense:hover { background: #fae1e5; }
tbody tr.issue-row-awaiting-cash, tbody tr.issue-row-awaiting-cash:nth-child(even) { background: #fff0f1; box-shadow: inset .28rem 0 0 var(--danger); }
tbody tr.issue-row-awaiting-cash:hover { background: #fce2e5; }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-cell { color: var(--muted); text-align: center; padding: 1.5rem; }
.row-error { background: #fff0f1 !important; color: var(--danger); }
.purchase-lines table { min-width: 80rem; }
.purchase-lines input, .purchase-lines select, .issue-lines input, .issue-lines select { min-width: 5rem; min-height: 2.2rem; padding: .38rem .48rem; font-size: .84rem; }
.purchase-lines td:nth-child(3) input { min-width: 15rem; }
.purchase-lines td:nth-child(9) input { min-width: 10rem; }
.issue-lines table { min-width: 45rem; }
.issue-lines select { min-width: 25rem; }
.import-line-duplicate { background: #eef1f4 !important; color: #68727d; }
.import-line-duplicate input:disabled, .import-line-duplicate select:disabled { color: #68727d; background: #e4e8ec; border-color: #cbd2d8; opacity: 1; }
.import-line-duplicate .icon-button:disabled { cursor: not-allowed; opacity: .35; }
.import-line-new { background: #eef9f2 !important; box-shadow: inset .25rem 0 0 var(--success); }
.import-line-status { white-space: nowrap; }
.line-status-new { color: var(--success); font-size: .76rem; font-weight: 750; white-space: nowrap; }

.jersey-player-chip { display: inline-block; margin: .15rem .15rem .15rem 0; padding: .28rem .55rem; border: 1px solid #d5e2e9; border-radius: 999px; color: var(--navy-deep); background: #f3f8fa; font-size: .83rem; }
.jersey-roster-list { display: grid; gap: .4rem; margin: .65rem 0 .85rem; }
.jersey-year-ranges { display: grid; gap: .55rem; margin-bottom: .85rem; }
.jersey-year-row { display: grid; grid-template-columns: minmax(13rem, 1fr) repeat(2, minmax(8rem, .5fr)); align-items: end; gap: .7rem; padding: .5rem .7rem; border: 1px solid #e0e7eb; border-radius: .5rem; }
.jersey-year-row > label:not(.checkbox-label) { display: grid; gap: .25rem; color: #344554; font-size: .82rem; font-weight: 650; }
.jersey-year-row input[type="number"] { width: 100%; }
.jersey-roster-row { display: grid; grid-template-columns: minmax(9rem, 1.3fr) 7rem minmax(6rem, .7fr) 5.5rem minmax(8rem, 1fr) minmax(7rem, .8fr) minmax(12rem, 1.3fr); align-items: stretch; gap: .7rem; padding: .45rem .7rem; border: 1px solid #e0e7eb; border-radius: .55rem; background: #fbfcfd; }
.jersey-roster-row small { color: var(--muted); font-size: .75rem; font-weight: 500; }
.jersey-roster-row form { margin: 0; }
.jersey-roster-actions { display: flex; align-items: center; align-self: center; justify-content: end; gap: .4rem; flex-wrap: wrap; }
.jersey-roster-actions form { margin: 0; }
.jersey-roster-loan-form { display: flex; align-items: end; gap: .35rem; flex-wrap: wrap; }
.jersey-roster-loan-form label { display: grid; gap: .15rem; color: #344554; font-size: .75rem; font-weight: 650; }
.jersey-roster-loan-form select { max-width: 9rem; }
.jersey-own-availability { margin: 1rem 0; padding: .7rem .85rem; border: 1px solid #d5e2e9; border-radius: .55rem; background: #f7fafb; }
.jersey-own-availability summary { cursor: pointer; font-weight: 750; }
.jersey-available-numbers { display: flex; flex-wrap: wrap; gap: .3rem; }
.jersey-available-numbers span { min-width: 2rem; padding: .25rem .4rem; border-radius: .3rem; background: #e8f6eb; color: #1d663b; font-weight: 750; text-align: center; }
.jersey-roster-add { display: flex; align-items: end; gap: .65rem; flex-wrap: wrap; margin: .4rem 0 1rem; padding: .7rem; border: 1px dashed #cdd9e0; border-radius: .6rem; background: #f7fafb; }
.jersey-roster-add label { display: grid; gap: .35rem; min-width: min(100%, 23rem); color: #344554; font-size: .84rem; font-weight: 650; }
.jersey-roster-add button { margin-bottom: 0; }
.jersey-category { padding: 0; overflow: clip; }
.jersey-category-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; color: var(--navy-deep); font-size: 1.12rem; font-weight: 750; cursor: pointer; }
.jersey-category-summary:hover { background: #f3f8fa; }
.jersey-category-summary small { color: var(--muted); font-size: .82rem; font-weight: 500; }
.jersey-category-label { display: grid; gap: .15rem; }
.jersey-category-label small { font-variant-numeric: tabular-nums; }
.jersey-category-content { padding: 0 1.2rem 1.2rem; }
.jersey-roster-info { min-width: 0; align-self: center; }
.jersey-roster-birth, .jersey-roster-position, .jersey-roster-age, .jersey-roster-membership { display: grid; align-content: center; gap: .15rem; min-width: 0; color: #344554; font-size: .82rem; }
.jersey-roster-birth strong, .jersey-roster-position strong, .jersey-roster-age strong, .jersey-roster-membership strong { overflow-wrap: anywhere; font-weight: 700; }
.jersey-import-fields { display: flex; flex-wrap: wrap; gap: .65rem 1.2rem; margin: .85rem 0; padding: .85rem; border: 1px solid #d5e2e9; border-radius: .55rem; }
.jersey-import-fields legend { padding: 0 .3rem; font-weight: 750; }
.jersey-import-table { min-width: 62rem; }
.jersey-import-table td { vertical-align: top; }
.jersey-import-table td .checkbox-label { display: flex; margin-bottom: .3rem; white-space: nowrap; }
.jersey-roster-identity { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; color: #344554; }
.jersey-roster-identity strong { font-weight: 700; }
.jersey-roster-number { display: grid; place-items: center; min-height: 3.35rem; padding: .2rem; border: 1px solid #bed5e6; border-radius: .5rem; color: #173f63; background: #e2f0f9; font-size: 1.9rem; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.jersey-roster-number-named { border-color: #9ecfac; color: #1d663b; background: #e0f2e5; }
.jersey-roster-number-loaned { border-color: #e8c18d; color: #805012; background: #fff0d5; }
.jersey-roster-number span { color: #9aa7af; font-size: 1.3rem; font-weight: 500; }
.jersey-roster-number-empty { border-color: #d5dde3; background: #f5f7f8; }
.jersey-roster-number-empty span { color: #52616d; font-size: .75rem; font-weight: 750; text-align: center; }
.jersey-roster-kind { display: block; margin-top: .22rem; font-size: .78rem; font-weight: 800; }
.jersey-roster-kind-named { color: #1d663b; }
.jersey-roster-kind-loaned { color: #805012; }
.jersey-roster-note { display: block; margin-top: .25rem; overflow-wrap: anywhere; }
.jersey-table-kind { white-space: nowrap; }
.jersey-table-kind-named { color: #1d663b; background: #e8f6eb; }
.jersey-table-kind-free { color: #71530b; background: #fff3c6; }
.jersey-table-kind-loaned { color: #805012; background: #fff0d5; }
.jersey-edit-toggle { min-width: 5.5rem; }
.panel .jersey-inline-edit { margin-top: .35rem; padding: .65rem .8rem; border: 1px solid #d5e4ee; border-radius: .55rem; background: #f5f9fc; }
.panel .jersey-inline-edit:not([open]), .panel .jersey-inline-edit summary[hidden] { display: none; }
.panel .jersey-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .6rem; margin: .7rem 0 .2rem; }
.jersey-edit-form label { display: grid; gap: .3rem; min-width: 0; font-size: .8rem; font-weight: 650; }
.jersey-edit-form input { width: 100%; min-width: 0; }
.jersey-edit-form button { justify-self: start; }
.jersey-edit-form [data-number-field][hidden] { display: none; }
.jersey-edit-form .field-note { grid-column: 1 / -1; margin: 0; }
.jersey-overview-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; margin: -.25rem 0 1.1rem; }
.jersey-overview-metrics > div { display: grid; gap: .2rem; padding: .8rem 1rem; border: 1px solid #dce5ea; border-radius: .7rem; background: var(--surface); }
.jersey-overview-metrics strong { color: var(--navy-deep); font-size: 1.45rem; }
.jersey-overview-metrics span { color: var(--muted); font-size: .82rem; }
.jersey-overview-metrics .is-named { border-left: .25rem solid #39835a; }
.jersey-overview-metrics .is-available { border-left: .25rem solid #dfb228; }
.jersey-overview-metrics .is-loaned { border-left: .25rem solid #c4812d; }
.jersey-overview-metrics .is-conflict { border-left: .25rem solid #c0394b; }
.jersey-overview-metrics .is-conflict strong { color: #a52f3d; }
.jersey-number-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .65rem; margin: .6rem 0 1.15rem; }
.jersey-tile { display: grid; align-content: start; gap: .15rem; min-height: 6rem; padding: .65rem .75rem; border: 1px solid #d7e0e5; border-left-width: .3rem; border-radius: .65rem; background: #fff; }
.jersey-tile strong { color: var(--navy-deep); font-size: 1.65rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.jersey-tile span { font-size: .74rem; font-weight: 750; }
.jersey-tile small { overflow: hidden; color: #52616d; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.jersey-tile-named { border-left-color: #39835a; background: #e8f6eb; }
.jersey-tile-named span { color: #1d663b; }
.jersey-tile-available { border-left-color: #dfb228; background: #fff5d3; }
.jersey-tile-available span { color: #71530b; }
.jersey-tile-loaned { border-left-color: #c4812d; background: #fff8ed; }
.jersey-tile-loaned span { color: #925b17; }
.jersey-preview-filter { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.jersey-preview-filter form { margin: 0; }
.jersey-preview-filter label { display: grid; gap: .35rem; color: #344554; font-size: .86rem; font-weight: 650; }
.jersey-preview-filter select { min-width: 11rem; }
.jersey-preview-legend { display: flex; align-items: center; gap: .8rem 1.2rem; flex-wrap: wrap; color: #344554; font-size: .83rem; }
.jersey-preview-legend > span { display: inline-flex; align-items: center; gap: .42rem; }
.jersey-dot { display: inline-block; width: .72rem; height: .72rem; border-radius: 50%; background: #39835a; }
.dot-free { background: #dfb228; }.dot-loaned { background: #c4812d; }.dot-conflict { background: #c0394b; }
.jersey-category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.jersey-category-heading h2 { margin: 0; color: var(--navy-deep); font-size: 1.12rem; }
.jersey-category-heading > span { color: var(--muted); font-size: .8rem; }
.jersey-preview-group + .jersey-preview-group { margin-top: 1.15rem; }
.jersey-preview-group h3 { margin: 0 0 .7rem; color: var(--navy-deep); font-size: .94rem; }
.jersey-preview-unassigned { padding: .85rem; border: 1px solid #efd889; border-radius: .7rem; background: #fffbe9; }
.jersey-preview-unassigned h3 { color: #71530b; }
.jersey-shirt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.1rem, 1fr)); gap: .85rem; align-items: start; }
.jersey-shirt-card { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: .7rem .55rem .65rem; border: 1px solid #e0e7eb; border-radius: .75rem; background: #fff; text-align: center; }
.jersey-shirt-person { width: 100%; overflow: hidden; color: #344554; font-size: .82rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.jersey-shirt-status { margin-top: .17rem; color: #657582; font-size: .65rem; font-weight: 800; letter-spacing: .055em; }
.jersey-shirt-art { display: block; width: 7rem; height: 7.65rem; margin: .22rem auto .12rem; }
.shirt-shape { fill: #3972a0; stroke: rgba(13,47,71,.28); stroke-width: 1.5; stroke-linejoin: round; }
.shirt-collar { fill: none; stroke: rgba(255,255,255,.8); stroke-width: 4; stroke-linecap: round; }
.shirt-number { fill: #fff; font-size: 31px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
.jersey-shirt-named { background: #e8f6eb; }.jersey-shirt-named .shirt-shape { fill: #39835a; }
.jersey-shirt-free { background: #fff5d3; }.jersey-shirt-free .shirt-shape { fill: #e0b12e; }
.jersey-shirt-free .shirt-number { fill: #513a04; }
.jersey-shirt-loaned { background: #fffaf2; }.jersey-shirt-loaned .shirt-shape { fill: #c4812d; }
.jersey-shirt-conflict { border-color: #e2a0a8; background: #fff3f4; box-shadow: inset 0 0 0 1px #f5dadd; }
.jersey-shirt-conflict .jersey-shirt-person, .jersey-shirt-conflict .jersey-shirt-status, .jersey-shirt-warning { color: #a52f3d; }
.jersey-shirt-conflict .shirt-shape { fill: #c0394b; }
.jersey-shirt-kind { color: #657582; font-size: .69rem; }
.jersey-shirt-named .jersey-shirt-kind { color: #1d663b; font-weight: 800; }
.jersey-shirt-warning { margin-top: .35rem; font-size: .68rem; font-weight: 700; line-height: 1.3; }
.jersey-loan-form { align-items: center; gap: .4rem; min-width: 18rem; }
.jersey-loan-form select { min-width: 12rem; }
.panel details { margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.panel details summary { color: var(--navy); font-weight: 700; cursor: pointer; }
.panel details form { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .8rem 0; }
.panel details input[type="file"] { max-width: 25rem; }
@media (max-width: 1350px) { .jersey-roster-row { grid-template-columns: minmax(0, 1fr) 7rem minmax(0, 1fr) 5.5rem; } .jersey-roster-age, .jersey-roster-membership, .jersey-roster-actions { grid-column: span 2; } .jersey-roster-actions { justify-content: flex-end; } }
@media (max-width: 760px) { .jersey-overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jersey-year-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .jersey-year-row .checkbox-label { grid-column: 1 / -1; } .jersey-roster-row { grid-template-columns: minmax(0, 1fr) 5rem; } .jersey-roster-info { grid-column: 1; grid-row: 1; } .jersey-roster-number { grid-column: 2; grid-row: 1 / 3; } .jersey-roster-birth { grid-column: 1; grid-row: 2; } .jersey-roster-position, .jersey-roster-age, .jersey-roster-membership { grid-column: 1 / -1; } .jersey-roster-actions { grid-column: 1 / -1; justify-content: flex-end; } .panel .jersey-edit-form { grid-template-columns: 1fr; } }

.audit-table { min-width: 68rem; }
.audit-table td { vertical-align: top; }
.audit-collapse > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer; list-style: none; }
.audit-collapse > summary::-webkit-details-marker { display: none; }
.audit-collapse-title { display: block; color: var(--navy-deep); font-size: 1.1rem; }
.audit-collapse-meta { display: block; margin-top: .2rem; color: var(--muted); font-size: .88rem; font-weight: 400; }
.audit-collapse-control { color: var(--blue); font-size: .86rem; font-weight: 700; white-space: nowrap; }
.audit-collapse[open] .audit-collapse-control { font-size: 0; }
.audit-collapse[open] .audit-collapse-control::after { content: 'Skryť log'; font-size: .86rem; }
.audit-collapse-content { margin-top: 1rem; }
.audit-action { display: inline-flex; padding: .2rem .48rem; border-radius: 999px; font-size: .74rem; font-weight: 750; white-space: nowrap; }
.audit-action-create { color: var(--success); background: var(--success-bg); }
.audit-action-update { color: var(--info); background: var(--info-bg); }
.audit-action-delete { color: var(--danger); background: var(--danger-bg); }
.audit-details summary { color: var(--blue); cursor: pointer; white-space: nowrap; }
.audit-comparison { display: grid; grid-template-columns: repeat(2, minmax(16rem, 1fr)); gap: .75rem; width: min(60rem, 75vw); margin-top: .55rem; }
.audit-comparison section { min-width: 0; padding: .65rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--surface-muted); }
.audit-comparison strong { display: block; margin-bottom: .35rem; color: var(--navy-deep); font-size: .78rem; }
.audit-comparison pre { margin: 0; overflow: auto; color: var(--ink); font: .75rem/1.45 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.status { display: inline-flex; align-items: center; border-radius: 999px; padding: .22rem .58rem; font-size: .76rem; font-weight: 750; }
.status-prepared { color: #815500; background: #fff0c1; }
.status-confirmed { color: var(--success); background: var(--success-bg); }
.status-awaiting { color: var(--danger); background: var(--danger-bg); }
.login-shell { display: grid; place-items: center; min-height: 100vh; padding: 1.2rem; background: radial-gradient(circle at 10% 10%, #e7f2f8 0, #eef2f5 40%, #dfe9ef 100%); }
.login-card { width: min(100%, 28rem); padding: 1.65rem; border: 1px solid #d6e1e7; border-radius: 1rem; background: #fff; box-shadow: var(--shadow); }
.brand-login { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1.3rem; }
.brand-login h1 { margin: .08rem 0 0; color: var(--navy-deep); font-size: 1.35rem; }
.brand-login p { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.stack-form { display: grid; gap: .9rem; }
.import-review { border-left: .32rem solid var(--amber-deep); }

.backup-panel { border-top: .32rem solid var(--amber-deep); }
.backup-file-name { max-width: 28rem; padding: .38rem .65rem; border-radius: .45rem; color: var(--navy-deep) !important; background: #fff5c9; font: 700 .82rem/1.35 Consolas, monospace !important; overflow-wrap: anywhere; }
.backup-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin: .25rem 0 1rem; }
.backup-summary-item { display: grid; gap: .22rem; min-height: 7.2rem; align-content: center; padding: 1rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--surface-muted); }
.backup-summary-item span { color: var(--muted); font-size: .8rem; }
.backup-summary-item strong { color: var(--navy-deep); font-size: 1.2rem; }
.backup-summary-item small { color: var(--muted); }
.backup-summary-total { border-color: #e7c636; background: #fff8d8; }
.backup-security-note { margin-top: 1rem; padding: .8rem .9rem; border: 1px solid #e6d26d; border-radius: .55rem; color: #65520a; background: #fff9df; font-size: .88rem; }
.backup-security-note strong { display: block; margin-bottom: .2rem; }
.backup-download-form .field-note.is-success { color: var(--success); font-weight: 700; }
.backup-download-form .field-note.is-error { color: var(--danger); font-weight: 700; }
.backup-restore-panel { border-top: .32rem solid var(--danger); }
.backup-warning { margin-bottom: 1rem; }
.backup-restore-form { max-width: 46rem; }
.backup-confirm-check { align-self: auto; min-height: auto; padding: .65rem .75rem; border: 1px solid #e6c2c7; border-radius: .5rem; background: #fff7f8; }
.backup-restore-form label strong { color: var(--danger); }

.split-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.merch-line-table { min-width: 92rem; }
.merch-line-table input, .merch-line-table select { min-width: 7rem; }
.merch-line-table td { vertical-align: top; }
.merch-line-table td label { min-width: 7rem; margin-bottom: .35rem; }
.merch-line-actions { min-width: 15rem; }
.merch-line-actions .button { width: 100%; justify-content: flex-start; text-align: left; }
.compact-list { display: grid; gap: .28rem; margin: 0; padding-left: 1.1rem; }
.status-draft, .status-unpaid { color: #815d00; background: #fff4cc; }
.status-exported { color: #145a85; background: #e0f2ff; }
.status-processed, .status-cash, .status-kis { color: #1d6b42; background: #e1f5e8; }
.status-cancelled { color: #8a3038; background: #fde9eb; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid.cash-metrics { grid-template-columns: repeat(2, minmax(0, 20rem)); }
  .form-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .backup-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-panels { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main-content { padding: 1rem; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-bottom: 1.15rem; padding: .8rem; border-radius: .75rem; background: var(--navy-deep); color: #fff; }
  .mobile-menu { display: block; position: relative; }
  .mobile-menu summary { list-style: none; padding: .44rem .6rem; border: 1px solid rgba(255,255,255,.35); border-radius: .45rem; color: #fff; font-size: .85rem; font-weight: 700; cursor: pointer; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu-panel { display: none; position: absolute; z-index: 3; top: calc(100% + .45rem); right: 0; min-width: 13.5rem; overflow: hidden; border-radius: .65rem; background: #fff; box-shadow: var(--shadow); }
  .mobile-menu[open] .mobile-menu-panel { display: grid; }
  .mobile-menu nav { display: grid; padding: .45rem; }
  .mobile-menu .nav-item { color: var(--navy-deep); }
  .mobile-menu .nav-item:hover { color: var(--navy-deep); background: var(--sky); }
  .mobile-menu .nav-item.is-active { background: #f4c95d; }
  .mobile-menu .nav-item-sub { margin-left: .9rem; border-color: #c7d5de; }
  .mobile-user { display: grid; gap: .3rem; padding: .55rem 1.25rem .7rem; border-top: 1px solid var(--line); color: var(--ink); font-size: .8rem; }
  .mobile-user .link-button { color: var(--blue); }
  .page-heading { display: grid; }
  .page-heading .button { width: 100%; }
  .metric-grid, .metric-grid.single-metric { grid-template-columns: 1fr; }
  .metric-grid.cash-metrics { grid-template-columns: 1fr; }
  .form-grid-four, .form-grid-two, .form-grid-three { grid-template-columns: 1fr; }
  .compact-panel { align-items: stretch; }
  .filter-bar label { min-width: 100%; }
  .filter-bar .button { width: 100%; }
  .panel { padding: 1rem; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .audit-comparison { grid-template-columns: 1fr; width: 75vw; }
  .backup-summary { grid-template-columns: 1fr; }
  .backup-summary-item { min-height: 0; }
  .backup-download-form .button, .backup-restore-form .button { width: 100%; }
}
/* Club logo in the application header */
img.brand-mark {
  display: block;
  width: 56px !important;
  height: 56px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  object-fit: contain;
  flex: 0 0 56px;
}
