/* =====================================================================
   PSG ACADEMY RWANDA - PLAYER DATA MANAGEMENT SYSTEM
   White + blue theme
   ===================================================================== */

:root {
  --navy:        #041e42;   /* PSG deep navy - sidebar, headings */
  --navy-700:    #082c5c;
  --navy-500:    #0d3a76;
  --blue:        #0b5fbf;   /* primary action blue */
  --blue-600:    #0a54a8;
  --blue-100:    #e3edfb;
  --blue-50:     #f2f6fd;
  --red:         #da291c;   /* PSG red - used sparingly */
  --green:       #17864b;
  --amber:       #b4700a;

  --page:        #f2f6fb;
  --surface:     #ffffff;
  --line:        #dbe5f2;
  --line-soft:   #edf2f9;
  --ink:         #17263b;
  --ink-soft:    #4a5f7d;
  --muted:       #7288a6;

  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 1px 2px rgba(4, 30, 66, .05), 0 8px 24px rgba(4, 30, 66, .06);
  --sidebar-w:   250px;
  --ease:        cubic-bezier(.22, .8, .24, 1);   /* shared easing for motion */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 600; letter-spacing: -.015em; margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- sidebar */
/* Moving between pages crossfades instead of flashing. The sidebar is its own
   layer, so it holds still while only the active link and the content change. */
@view-transition { navigation: auto; }

@property --fade-top    { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --fade-bottom { syntax: '<length>'; inherits: false; initial-value: 0px; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--navy);
  display: flex; flex-direction: column;
  z-index: 40;
  view-transition-name: sidebar;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand strong { display: block; color: #fff; font-size: 15px; line-height: 1.2; }
.brand span { color: #9fc0ea; font-size: 12.5px; }

.nav {
  position: relative; flex: 1; min-height: 0;
  padding: 14px 12px; overflow-y: auto;
  overscroll-behavior: contain;
  /* keep the menu scrollable on short screens, but hide the scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* soften whichever edge still has links hidden behind it (toggled in app.js) */
  --fade-top: 0px; --fade-bottom: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent);
  transition: --fade-top .3s var(--ease), --fade-bottom .3s var(--ease);
}
.nav::-webkit-scrollbar { display: none; }
.nav.fade-top    { --fade-top: 26px; }
.nav.fade-bottom { --fade-bottom: 40px; }

.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: #c3d6ef; font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.nav a .icon { width: 18px; height: 18px; flex: none; opacity: .8; }
/* icon and label glide on hover; transforms never shift the layout */
.nav a .icon, .nav-label { transition: transform .35s var(--ease), opacity .25s var(--ease); }
.nav a:hover { background-color: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav a:hover .icon { opacity: 1; }
.nav a:hover .icon, .nav a:hover .nav-label { transform: translateX(3px); }
.nav a:active { background-color: rgba(255, 255, 255, .11); }
.nav a.active { background-color: var(--blue); color: #fff; }
.nav a.active .icon { opacity: 1; }
.nav a.active:hover { background-color: var(--blue-600); }
.nav a.active:hover .icon, .nav a.active:hover .nav-label { transform: none; }
.nav a:focus-visible { outline: 2px solid #9fc0ea; outline-offset: -2px; }

.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.season-badge {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px; margin-bottom: 10px;
  background: rgba(255, 255, 255, .08); border-radius: 8px;
  color: #9fc0ea; font-size: 12.5px;
}
.logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px;
  color: #fff; font-size: 13.5px;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.logout .icon { transition: transform .35s var(--ease); }
.logout:hover { background-color: var(--red); border-color: var(--red); color: #fff; text-decoration: none; }
.logout:hover .icon { transform: translateX(3px); }
.logout:focus-visible { outline: 2px solid #9fc0ea; outline-offset: 2px; }

.menu-toggle {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 60;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--navy); cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.menu-toggle:hover { background: var(--blue-50); border-color: #cfdcf0; }
.menu-toggle .icon { width: 20px; height: 20px; }
.sidebar-backdrop { display: none; }

/* ---------------------------------------------------------------- shell */
.shell { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 16px 28px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 21px; }
.topbar p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar-mini {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue-100); color: var(--navy);
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600;
}
.user-meta strong { display: block; font-size: 13.5px; color: var(--navy); }
.user-meta small { color: var(--muted); font-size: 12px; }

.content { flex: 1; padding: 24px 28px 40px; max-width: 1400px; width: 100%; }

.pagefoot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 28px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12.5px;
}

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: box-shadow .28s ease, border-color .28s ease, transform .28s ease;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 16px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.split  { grid-template-columns: 1.6fr 1fr; align-items: start; }
/* Grid items default to min-width:auto, which lets wide content (tables)
   push a column past the viewport. Let them shrink and scroll instead. */
.grid > * { min-width: 0; }

/* ---------------------------------------------------------------- stats */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.stat .ico { flex: none; display: grid; place-items: center; color: var(--blue); }
.stat .ico.navy  { color: var(--navy); }
.stat .ico.red   { color: var(--red); }
.stat .ico.green { color: var(--green); }
.stat .ico .icon { width: 28px; height: 28px; }
.stat b { display: block; font-size: 25px; line-height: 1.1; color: var(--navy); font-weight: 700; }
.stat span { color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
/* Poppins is wider than most interface faces, so tables take a smaller step
   and their columns still fit the card. */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; padding: 12px 16px;
  background: var(--blue-50); color: var(--navy);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: var(--blue-50); }
td.num, th.num { text-align: center; }

.player-cell { display: flex; align-items: center; gap: 11px; }
.player-cell img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--blue-100); flex: none;
}
.player-cell strong { display: block; color: var(--navy); font-size: 14px; }
.player-cell small { color: var(--muted); font-size: 12px; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--navy); font-size: 15px; margin-bottom: 4px; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--blue-100); color: var(--navy-500);
}
.badge.active   { background: #e7f5ee; color: var(--green); }
.badge.inactive { background: #f1f4f8; color: var(--muted); }
.badge.transferred { background: #fdf3e3; color: var(--amber); }
.badge.win  { background: #e7f5ee; color: var(--green); }
.badge.loss { background: #fdeceb; color: var(--red); }
.badge.draw { background: #f1f4f8; color: var(--ink-soft); }
.badge.foot { background: var(--navy); color: #fff; }


/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--blue); background: var(--blue); color: #fff;
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  text-decoration: none; line-height: 1.35;
  transition: background .2s ease, border-color .2s ease, color .2s ease,
              box-shadow .2s ease, transform .2s ease;
}
.btn:hover { background: var(--blue-600); border-color: var(--blue-600); text-decoration: none; color: #fff; }
.btn.ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { background: var(--blue-50); border-color: var(--blue); color: var(--navy); }
.btn.navy { background: var(--navy); border-color: var(--navy); }
.btn.navy:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn.danger { background: #fff; color: var(--red); border-color: #f3c9c6; }
.btn.danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.field label {
  display: block; margin-bottom: 5px;
  font-size: 13px; font-weight: 500; color: var(--ink-soft);
}
.field input[type=text], .field input[type=date], .field input[type=number],
.field input[type=email], .field input[type=password], .field input[type=tel],
.field input[type=file], .field select, .field textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 76px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100);
}
.field input[readonly] { background: var(--blue-50); color: var(--navy); font-weight: 600; }
.field .hint { margin: 5px 0 0; font-size: 12px; color: var(--muted); }

.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 7px; margin: 0;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; font-size: 13.5px; color: var(--ink);
}
.radio-row input { accent-color: var(--blue); }
.radio-row label:has(input:checked) { border-color: var(--blue); background: var(--blue-50); color: var(--navy); font-weight: 500; }

.form-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding-top: 18px; margin-top: 20px; border-top: 1px solid var(--line-soft);
}

.section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 14px; color: var(--navy); font-size: 14px; font-weight: 600;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-title:first-child { margin-top: 0; }

.photo-picker { display: flex; align-items: center; gap: 16px; }
.photo-picker img {
  width: 92px; height: 92px; border-radius: 12px; object-fit: cover;
  border: 1px solid var(--line); background: var(--blue-50);
}

/* specific evaluation form: one row per area, five choices */
.rate-list { display: grid; }
.rate-row {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.rate-row:first-child { padding-top: 0; }
.rate-row:last-child  { padding-bottom: 0; border-bottom: 0; }
.rate-label { color: var(--navy); font-size: 13.5px; font-weight: 600; }
.rate-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rate-option { position: relative; margin: 0; cursor: pointer; }
.rate-option input { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; }
/* Level colours: solid --lv fill with --lv-on text (every pair clears 4.5:1). */
.lv-5 { --lv: #15803d; --lv-on: #ffffff; }  /* Excellent  - green  */
.lv-4 { --lv: #0b5fbf; --lv-on: #ffffff; }  /* Very good  - blue   */
.lv-3 { --lv: #facc15; --lv-on: #041e42; }  /* Good       - yellow */
.lv-2 { --lv: #f97316; --lv-on: #041e42; }  /* Developing - orange */
.lv-1 { --lv: #da291c; --lv-on: #ffffff; }  /* Poor       - red    */

.rate-option span {
  position: relative; display: block; padding: 8px 4px; text-align: center; white-space: nowrap;
  border: 1px solid var(--lv); border-radius: 8px; background: var(--lv);
  color: var(--lv-on); font-size: 12.5px; font-weight: 600;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.rate-option:hover span { transform: translateY(-1px); box-shadow: 0 4px 10px -4px rgba(4, 30, 66, .45); }

/* all buttons stay solid, so the chosen one is marked with a navy ring and a check badge */
.rate-option input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--navy); }
.rate-option input:checked + span::after {
  content: ""; position: absolute; top: -8px; right: -8px; z-index: 1;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--navy); box-shadow: 0 0 0 2px #fff;
}
.rate-option input:checked + span::before {
  content: ""; position: absolute; top: -4px; right: -4px; z-index: 2;
  width: 10px; height: 10px; background: #fff;
  -webkit-mask: url(../img/icons/check.png) center / contain no-repeat;
          mask: url(../img/icons/check.png) center / contain no-repeat;
}
.rate-option input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.rate-key { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.rate-key h3 { margin-bottom: 10px; font-size: 13px; }
.rate-key ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rate-key li { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 13px; font-weight: 600; }
.rate-swatch { flex: none; width: 14px; height: 14px; border-radius: 4px; background: var(--lv); }

/* rating shown back: rising five-step meter plus the word */
.rating { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; vertical-align: middle; }
.rating-steps { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.rating-steps i {
  display: block; width: 5px; border-radius: 1.5px; background: #e6ebf2;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rating-steps i:nth-child(1) { height: 6px; }
.rating-steps i:nth-child(2) { height: 8px; }
.rating-steps i:nth-child(3) { height: 10px; }
.rating-steps i:nth-child(4) { height: 12px; }
.rating-steps i:nth-child(5) { height: 14px; }
.rating-steps i.on { background: var(--lv, var(--blue)); }
/* the word sits on a solid pill in its level colour, same pairs as the form buttons */
.rating-word, .rating-pill {
  padding: 2px 9px; border-radius: 999px;
  background: var(--lv, var(--blue)); color: var(--lv-on, #fff);
  font-size: 12px; font-weight: 600; line-height: 1.5;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.rating-score { color: #5b6f8c; font-size: 12px; font-variant-numeric: tabular-nums; }
.legacy-note  { display: block; margin-top: 3px; color: #5b6f8c; font-size: 11.5px; font-weight: 400; }

.rating-rows { display: grid; }
.rating-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 90px; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.rating-row:last-child { border-bottom: 0; }
.rating-row-label { color: var(--ink-soft); }
.rating-row b { color: var(--navy); font-weight: 600; white-space: nowrap; }
.rating-row b.rating-pill { justify-self: start; color: var(--lv-on, #fff); }
.rating-overall {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.rating-overall > span:first-child { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.report-overall { justify-content: flex-start; margin-top: 0; padding-top: 0; border-top: 0; }

.tl-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.tl-rating .legacy-note { display: inline; margin: 0; }
.tl-ratings { margin-bottom: 12px; }
.tl-ratings .rating-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }

@media (max-width: 860px) {
  .rate-row { grid-template-columns: 1fr; gap: 8px; }
  .tl-ratings .rating-rows { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .rate-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* coaches table: many columns, so it scrolls sideways inside its card */
/* headers wrap onto two lines and cells stay tight so all thirteen columns fit */
.coach-table th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.coach-table th, .coach-table td { padding: 10px 8px; }
.coach-table th:first-child, .coach-table td:first-child { padding-left: 18px; }
.coach-table th:last-child,  .coach-table td:last-child  { padding-right: 18px; }
.coach-table td.nowrap { white-space: nowrap; }
.coach-name { color: var(--navy); font-weight: 600; white-space: nowrap; margin-right: 6px; }
.coach-photo {
  display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--blue-100); background: var(--blue-50);
}
.clamp-2 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  min-width: 130px; max-width: 190px;
}
td .none { color: var(--muted); }

/* match list: a row switches into inputs for a quick edit of the match details */
.match-table td.nowrap, .row-actions { white-space: nowrap; }
.match-table th, .match-table td { padding-left: 10px; padding-right: 10px; }
.match-table th:first-child, .match-table td:first-child { padding-left: 18px; }
.match-table th:last-child,  .match-table td:last-child  { padding-right: 18px; }
.edit-panel > td { padding: 0 !important; background: var(--blue-50); border-bottom: 1px solid var(--line); }
tbody tr.edit-panel:hover { background: none; }
.inline-edit { padding: 18px; border-left: 3px solid var(--blue); }
.inline-edit-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 14px; }
.inline-edit-head h3 { font-size: 14.5px; }
.inline-edit-head span { color: var(--ink-soft); font-size: 12.5px; }
.inline-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 14px; }
.inline-edit-grid .field input, .inline-edit-grid .field select { background: #fff; }
.score-inputs { display: flex; align-items: center; gap: 6px; }
.score-inputs input { text-align: center; }
.inline-edit-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.inline-edit-actions .hint { margin: 0 0 0 4px; color: var(--ink-soft); font-size: 12.5px; }

/* ---------------------------------------------------------------- alerts */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px;
  font-size: 13.5px; border: 1px solid transparent;
}
.alert.success { background: #e7f5ee; border-color: #bfe4d0; color: #10613a; }
.alert.error   { background: #fdeceb; border-color: #f4cbc8; color: #9b1f16; }
.alert.info    { background: var(--blue-50); border-color: #cfe0f7; color: var(--navy-500); }

/* ---------------------------------------------------------------- filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 150px; }
.filters .grow { flex: 1; min-width: 220px; }

/* ---------------------------------------------------------------- profile */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button {
  padding: 10px 16px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--navy); }
.tabs button.active { color: var(--blue); border-bottom-color: var(--blue); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.datalist { display: grid; gap: 0; }
.datalist div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.datalist div:last-child { border-bottom: 0; }
.datalist dt, .datalist span:first-child { color: var(--muted); }
.datalist strong { color: var(--navy); font-weight: 600; text-align: right; }

.prose-block { margin-bottom: 16px; }
.prose-block h4 { font-size: 13px; color: var(--muted); font-weight: 500; margin-bottom: 3px; }
.prose-block p { margin: 0; color: var(--ink); }

/* bars */
.bar-row { display: grid; grid-template-columns: 90px 1fr 46px; align-items: center; gap: 12px; margin-bottom: 9px; }
.bar-row span:first-child { font-size: 13px; color: var(--ink-soft); }
.bar { height: 9px; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-500), var(--blue)); border-radius: 999px; transition: width .5s ease; }
.bar-row b { text-align: right; font-size: 13px; color: var(--navy); }

/* timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -25px; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--blue-100);
}
.timeline-item .when { font-size: 12.5px; color: var(--muted); }
.timeline-item h4 { font-size: 14.5px; margin: 2px 0 6px; }
.timeline-item .tl-body { background: var(--blue-50); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; }

/* ---------------------------------------------------------------- player profile */
/* white identity card with a stats strip and light pill tabs */
.pf-hero {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04), 0 14px 34px -24px rgba(4, 30, 66, .25);
}
.pf-hero-top {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 30px 30px 26px;
  background: linear-gradient(180deg, #f5f8fd 0%, #ffffff 100%);
}
.pf-photo {
  flex: none; width: 116px; height: 116px; object-fit: cover; border-radius: 20px; background: var(--blue-50);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line), 0 14px 28px -16px rgba(4, 30, 66, .45);
}
.pf-identity { flex: 1; min-width: 0; }
.pf-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pf-code { color: var(--blue); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.pf-status {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  background: #eef3f9; color: var(--ink-soft); font-size: 12px; font-weight: 600;
}
.pf-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pf-status.active      { background: #e7f5ee; color: #13703f; }
.pf-status.transferred { background: #fdf3e3; color: #8a5508; }
.pf-identity h2 { margin: 6px 0 12px; font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.025em; }
.pf-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pf-facts li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft); font-size: 12.5px; font-weight: 500;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.pf-facts li .icon { color: var(--blue); }
.pf-facts li:hover { border-color: #c7d7ec; color: var(--navy); }

.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-soft); }
.pf-stats > div {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 26px;
  transition: background-color .25s var(--ease);
}
.pf-stats > div + div { border-left: 1px solid var(--line-soft); }
.pf-stats > div:hover { background: #fafcff; }
.pf-stat-label { display: inline-flex; align-items: center; gap: 7px; color: #5b6f8c; font-size: 12.5px; font-weight: 500; }
.pf-stat-label .icon { color: var(--blue); }
.pf-stat-label.pf-green .icon { color: var(--green); }
.pf-stat-label.pf-red .icon { color: var(--red); }
.pf-stats b { color: var(--navy); font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }

.profile .tabs {
  display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%;
  margin: 20px 0 18px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
}
.profile .tabs button {
  margin: 0; padding: 8px 16px; border: 0; border-radius: 8px;
  color: var(--ink-soft); font-size: 13.5px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.profile .tabs button:hover { background: var(--blue-50); color: var(--navy); }
.profile .tabs button.active { background: var(--navy); color: #fff; }
.profile .tab-panel.active { animation: pfPanelIn .35s var(--ease); }
@keyframes pfPanelIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.profile .card { border-radius: 14px; box-shadow: 0 1px 2px rgba(4, 30, 66, .04); }
.profile .card-head { padding: 18px 22px; }
.profile .card-body { padding: 20px 22px; }
.profile .card-body.tight { padding: 0; }

/* player information: grouped, label above value */
.pf-group + .pf-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.pf-group h3, .pf-note h3 {
  margin: 0 0 12px; color: #5b6f8c; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; margin: 0; }
.pf-grid dt { color: #5b6f8c; font-size: 12px; }
.pf-grid dd { margin: 3px 0 0; color: var(--navy); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pf-none { color: #5b6f8c; font-weight: 400; }
.pf-note { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: 10px; background: #f8fafd; }
.pf-note h3 { margin-bottom: 6px; }
.pf-note p { margin: 0; color: var(--ink); font-size: 13.5px; }

/* season summary */
.pf-sum-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.pf-sum-row:first-child { padding-top: 0; }
.pf-sum-row:last-child { padding-bottom: 0; border-bottom: 0; }
.pf-sum-row > span { color: var(--ink-soft); }
.pf-sum-row > b { color: var(--navy); font-weight: 600; }
.pf-sum-row > b small { color: #5b6f8c; font-size: 12px; font-weight: 500; }
.pf-sum-rating .meter { flex-basis: 100%; }
.pf-cards { display: inline-flex; gap: 14px; }
.pf-cards > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-card-y, .pf-card-r { display: inline-block; width: 9px; height: 12px; border-radius: 2px; }
.pf-card-y { background: #facc15; }
.pf-card-r { background: var(--red); }

.pf-empty-eval { display: grid; justify-items: center; gap: 6px; padding: 28px 20px; text-align: center; }
.pf-empty-eval .icon { width: 30px; height: 30px; margin-bottom: 4px; color: var(--blue); }
.pf-empty-eval strong { color: var(--navy); font-size: 14.5px; }
.pf-empty-eval span { max-width: 32ch; color: #5b6f8c; font-size: 13px; }
.pf-empty-eval .btn { margin-top: 8px; }

/* development and follow-up timelines: white cards on a quiet line */
.profile .timeline::before { background: var(--line-soft); }
.profile .timeline-item::before { background: #fff; border: 2px solid var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.profile .timeline-item .tl-body {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
}

@media (max-width: 1100px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pf-hero-top { gap: 18px; padding: 22px 18px; }
  .pf-photo { width: 88px; height: 88px; border-radius: 16px; }
  .pf-identity h2 { font-size: 22px; }
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-stats > div { padding: 14px 18px; }
  .pf-stats > div:nth-child(3) { border-left: 0; }
  .pf-stats > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .profile .tabs { flex-wrap: nowrap; width: 100%; overflow-x: auto; }
  .profile .tabs button { flex: none; }
}
@media (max-width: 560px) {
  /* phones: photo above the name so the fact chips get the full width */
  .pf-hero-top { flex-direction: column; align-items: flex-start; }
}
/* ---------------------------------------------------------------- players list */
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.pl [hidden] { display: none !important; }

/* squad summary strip */
.pl-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden;
  margin-bottom: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
}
.pl-summary > div { display: flex; align-items: center; gap: 14px; padding: 18px 22px; }
.pl-summary > div + div { border-left: 1px solid var(--line-soft); }
.pl-sum-ico { display: grid; place-items: center; flex: none; color: var(--blue); }
.pl-sum-ico .icon { width: 26px; height: 26px; }
.pl-sum-ico.pl-green { color: var(--green); }
.pl-summary b { display: block; color: var(--navy); font-size: 24px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.pl-summary div > span:last-child { color: #5b6f8c; font-size: 12.5px; }

/* toolbar: search, filters, layout switch, category chips */
.pl-toolbar {
  margin-bottom: 14px; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
}
.pl-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pl-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; margin: 0; }
.pl-search .icon { position: absolute; left: 13px; color: #7288a6; pointer-events: none; }
.pl-search input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fafd;
  color: var(--ink); font: inherit; font-size: 14px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.pl-search input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-100); }
.pl-filters select {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background-color: #fff;
  color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pl-filters select:hover { border-color: #c7d7ec; }
.pl-filters select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.pl-clear { color: var(--blue); font-size: 13px; font-weight: 500; white-space: nowrap; }

.pl-view { display: inline-flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 10px; background: #eef3f9; }
.pl-view button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.pl-view button:hover { color: var(--navy); }
.pl-view button.is-on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(4, 30, 66, .12); }

.pl-chips {
  display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line-soft); scrollbar-width: none;
}
.pl-chips::-webkit-scrollbar { display: none; }
.pl-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 6px 7px 6px 14px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.pl-chip span {
  min-width: 22px; padding: 1px 7px; border-radius: 999px; text-align: center;
  background: #eef3f9; color: var(--ink-soft); font-size: 11.5px; font-weight: 600;
}
.pl-chip:hover { border-color: #c7d7ec; color: var(--navy); text-decoration: none; }
.pl-chip.is-on { border-color: var(--navy); background: var(--navy); color: #fff; }
.pl-chip.is-on span { background: rgba(255, 255, 255, .18); color: #fff; }

.pl-results { margin: 0 2px 12px; }
.pl-results p { margin: 0; color: #5b6f8c; font-size: 13px; }
.pl-results b { color: var(--navy); font-weight: 600; }

/* player cards */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.pl-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  animation: revealUp .5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.pl-card:hover {
  transform: translateY(-3px); border-color: #cfdae8;
  box-shadow: 0 2px 4px rgba(4, 30, 66, .04), 0 16px 32px -18px rgba(4, 30, 66, .28);
}
.pl-card-top { display: flex; align-items: center; gap: 12px; padding: 18px 18px 0; }
.pl-avatar-link { flex: none; }
.pl-avatar {
  display: block; width: 52px; height: 52px; border-radius: 14px; object-fit: cover;
  background: var(--blue-50); box-shadow: 0 0 0 1px var(--line);
}
.pl-card-id { flex: 1; min-width: 0; }
.pl-name {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--navy); font-size: 15px; font-weight: 600;
}
.pl-name:hover { color: var(--blue); text-decoration: none; }
.pl-code { color: #5b6f8c; font-size: 12px; letter-spacing: .04em; }
.pl-card-top .pf-status { flex: none; align-self: flex-start; }

.pl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 18px 0; padding: 0; list-style: none; }
.pl-tags li { padding: 3px 9px; border-radius: 7px; background: #f3f6fa; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.pl-tags li.pl-tag-strong { background: var(--blue-50); color: var(--blue-600); font-weight: 600; }

.pl-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: 16px 18px 0; padding: 12px 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.pl-card-stats > div { text-align: center; }
.pl-card-stats > div + div { border-left: 1px solid var(--line-soft); }
.pl-card-stats b { display: block; color: var(--navy); font-size: 20px; font-weight: 600; line-height: 1.15; }
.pl-card-stats span { color: #5b6f8c; font-size: 11.5px; }

.pl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 12px 18px 16px; }
.pl-joined { color: #5b6f8c; font-size: 12px; white-space: nowrap; }
.pl-actions { display: flex; gap: 6px; }

/* table layout: eleven columns, so cells stay tight and names keep one line */
.pl-table td.nowrap { white-space: nowrap; }
.pl-table th, .pl-table td { padding-left: 10px; padding-right: 10px; }
.pl-table th:first-child, .pl-table td:first-child { padding-left: 18px; }
.pl-table th:last-child, .pl-table td:last-child { padding-right: 18px; }
.pl-table .player-cell strong { white-space: nowrap; }
.pl-cat {
  display: inline-block; padding: 3px 9px; border-radius: 7px;
  background: var(--blue-50); color: var(--blue-600); font-size: 12px; font-weight: 600;
}

@media (max-width: 1100px) {
  .pl-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-summary > div:nth-child(3) { border-left: 0; }
  .pl-summary > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 640px) {
  .pl-summary > div { padding: 14px 16px; }
  .pl-filters select { flex: 1 1 140px; }
  .pl-view { margin-left: 0; }
}
/* ---------------------------------------------------------------- staff directory */
.st-head { margin: 0 2px 14px; }
.st-head p { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; color: #5b6f8c; font-size: 13.5px; }
.st-head b { color: var(--navy); font-weight: 600; }
.st-dot { width: 4px; height: 4px; border-radius: 50%; background: #b8c6d9; }

.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }
.st-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.st-card:hover {
  transform: translateY(-3px); border-color: #cfdae8;
  box-shadow: 0 2px 4px rgba(4, 30, 66, .04), 0 16px 32px -18px rgba(4, 30, 66, .28);
}
/* a vacant position reads as an open slot */
.st-card.is-vacant { border-style: dashed; border-color: #c9d6e6; background: #fbfcfe; box-shadow: none; }
.st-card-body { display: flex; align-items: center; flex: 1; gap: 16px; padding: 20px; }
.st-avatar { flex: none; width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.st-initials { display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.st-empty { display: grid; place-items: center; border: 1.5px dashed #b8c6d9; color: #7288a6; }
.st-empty .icon { width: 24px; height: 24px; }
.st-info { min-width: 0; }
.st-role { display: block; color: var(--blue); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.st-name { display: block; margin-top: 3px; color: var(--navy); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.st-name.st-vacant { color: #5b6f8c; font-weight: 500; font-style: italic; }
.st-contact { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.st-contact li + li { margin-top: 2px; }
.st-contact a { color: var(--ink-soft); overflow-wrap: anywhere; }
.st-contact a:hover { color: var(--blue); }
.st-card-foot { display: flex; justify-content: flex-end; gap: 6px; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
/* ---------------------------------------------------------------- export preview */
.xp-list { margin: 0; padding: 0; list-style: none; }
.xp-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--line-soft);
  transition: background-color .2s var(--ease);
}
.xp-list li:last-child { border-bottom: 0; }
.xp-list li:hover { background: #f8fafd; }
.xp-list-main { min-width: 0; color: inherit; }
.xp-list-main:hover { text-decoration: none; }
.xp-list-main strong { display: block; color: var(--navy); font-size: 13.5px; font-weight: 600; }
.xp-list-main span { display: block; color: #5b6f8c; font-size: 12px; }
.xp-list-main:hover strong { color: var(--blue); }
.xp-list-actions { display: flex; flex: none; gap: 6px; }

.xp-tabs { margin: 0 0 16px; padding-top: 0; border-top: 0; }
.xp-downloads { display: flex; gap: 6px; }

/* wide data: scrolls inside the card, headings and row numbers stay in view */
.xp-wrap { max-height: 70vh; overflow: auto; }
.xp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.xp-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 10px 14px; background: #f3f7fc; border-bottom: 1px solid var(--line);
  color: var(--navy); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap;
}
.xp-table tbody td {
  padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  color: var(--ink); white-space: nowrap; vertical-align: top;
}
.xp-table tbody tr:hover td { background: #f8fafd; }
.xp-table .xp-num {
  position: sticky; left: 0; z-index: 1; width: 44px; min-width: 44px;
  background: #fff; color: #7288a6; font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums;
  border-right: 1px solid var(--line-soft);
}
.xp-table thead th.xp-num { z-index: 3; background: #f3f7fc; }
.xp-table td.xp-long { white-space: normal; }
.xp-table td.xp-long span {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  min-width: 220px; max-width: 320px;
}
.xp-note { margin: 0; padding: 12px 20px; border-top: 1px solid var(--line-soft); color: #5b6f8c; font-size: 12.5px; }
/* ---------------------------------------------------------------- loans & departures */
.pf-status.on_loan { background: #fdf3e3; color: #8a5508; }
.pf-status.left    { background: #fdeceb; color: #9b1f16; }
.pf-facts li.pf-fact-alert { border-color: #f1d7a8; background: #fffaf0; color: #8a5508; }
.pf-facts li.pf-fact-alert .icon { color: #b4700a; }
.pl-sum-ico.mv-amber { color: #b4700a; }
.pl-sum-ico.mv-red   { color: var(--red); }

.mv-now { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.mv-now-ico { display: grid; place-items: center; flex: none; }
.mv-now-ico .icon { width: 28px; height: 28px; }
.mv-now strong { display: block; color: var(--navy); font-size: 15px; }
.mv-now span { display: block; margin-top: 2px; color: #5b6f8c; font-size: 13px; }
.mv-loan { background: #fffaf0; border-color: #f1d7a8; }
.mv-loan .mv-now-ico { color: #b4700a; }
.mv-left { background: #fef6f5; border-color: #f4cbc8; }
.mv-left .mv-now-ico { color: var(--red); }
.mv-here { background: #f5faf7; border-color: #cfe8da; }
.mv-here .mv-now-ico { color: var(--green); }

.mv-due {
  display: inline-block; margin-top: 8px; padding: 2px 9px; border-radius: 999px;
  background: #eef3f9; color: var(--ink-soft); font-size: 12px; font-style: normal; font-weight: 600; white-space: nowrap;
}
.mv-due.soon    { background: #fdf3e3; color: #8a5508; }
.mv-due.overdue { background: #fdeceb; color: #9b1f16; }
.mv-due.later   { background: #e7f5ee; color: #13703f; }
.mv-table .mv-due { margin-top: 0; }

.mv-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 2px; }
.mv-tag.loan { background: #fdf3e3; color: #8a5508; }
.mv-tag.left { background: #fdeceb; color: #9b1f16; }
.mv-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; margin: 0; }
.mv-facts dt { color: #5b6f8c; font-size: 12px; }
.mv-facts dd { margin: 2px 0 0; color: var(--navy); font-size: 13.5px; font-weight: 600; }

.mv-form, .mv-go { display: grid; gap: 14px; }
.mv-form .btn, .mv-go .btn { justify-self: start; }
.mv-label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.mv-hint { display: block; margin-top: 5px; color: #5b6f8c; font-size: 12.5px; }

/* the attached contract or proof document */
.mv-doc {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 9px 14px 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--navy);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.mv-doc:hover { border-color: var(--blue); background: var(--blue-50); text-decoration: none; }
.mv-doc .icon { flex: none; color: var(--blue); }
.mv-doc strong { display: block; font-size: 13.5px; font-weight: 600; }
.mv-doc small { display: block; color: #5b6f8c; font-size: 12px; }
.mv-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mv-reason { position: relative; margin: 0; cursor: pointer; }
.mv-reason input { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; }
.mv-reason span {
  display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink-soft); font-size: 13px; font-weight: 500; text-align: center;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.mv-reason:hover span { border-color: #c7d7ec; color: var(--navy); }
.mv-reason input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; font-weight: 600; }
.mv-reason input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.mv-chips { margin: 0; padding: 12px 20px; border-top: 0; border-bottom: 1px solid var(--line-soft); }
.mv-team { color: var(--navy); white-space: nowrap; }
.mv-table .player-cell strong, .mv-table .player-cell small { white-space: nowrap; }
.mv-table td.nowrap { white-space: nowrap; }
.mv-reason-tag {
  display: inline-block; padding: 3px 9px; border-radius: 7px; white-space: nowrap;
  background: #f3f6fa; color: var(--ink-soft); font-size: 12px; font-weight: 600;
}
.mv-reason-row { display: grid; grid-template-columns: 150px 1fr 32px; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; }
.mv-reason-row:last-child { margin-bottom: 0; }
.mv-reason-row span { color: var(--ink-soft); }
.mv-reason-row b { color: var(--navy); text-align: right; }

@media (max-width: 560px) {
  .mv-reasons, .mv-facts { grid-template-columns: 1fr; }
}
/* ---------------------------------------------------------------- login */
.login-page {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--page);
}
.login-side {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-500) 60%, var(--blue) 140%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center;
}
/* academy photographs fading one into the next, dimmed so the words stay readable */
.login-slides { position: absolute; inset: 0; z-index: 0; }
.login-slides i {
  position: absolute; inset: 0; opacity: 0;
  background-size: cover; background-position: center;
  animation: loginSlide 24s linear infinite;   /* steady zoom, no easing bump */
}
/* the negative delay starts the first photograph already showing */
.login-slides i:nth-child(1) { animation-delay: -1s; }
.login-slides i:nth-child(2) { animation-delay: 7s; }
.login-slides i:nth-child(3) { animation-delay: 15s; }
/* each photograph fades in and keeps zooming in while it is on screen */
@keyframes loginSlide {
  0%      { opacity: 0;   transform: scale(1); }
  4%      { opacity: .38; }
  29%     { opacity: .38; }
  33.33%  { opacity: 0;   transform: scale(1.18); }
  100%    { opacity: 0;   transform: scale(1.18); }
}
/* a navy wash over the photographs keeps the contrast even on light frames */
.login-side::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(160deg, rgba(4, 30, 66, .72) 0%, rgba(13, 58, 118, .6) 60%, rgba(11, 95, 191, .5) 140%);
}
/* the logo and the words sit above the wash; the slideshow layer stays behind it */
.login-side > :not(.login-slides) { position: relative; z-index: 2; }
.login-side img {
  width: clamp(110px, 12vw, 160px); margin-bottom: 30px;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .35));
}
.login-side h2 { color: #fff; font-size: 30px; line-height: 1.2; max-width: 15ch; }
.login-side p { color: #b9d2ef; max-width: 42ch; margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  /* no fading: the first photograph simply stays */
  .login-slides i { animation: none; opacity: 0; }
  .login-slides i:first-child { opacity: .38; }
}

.login-main { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-box h1 { font-size: 24px; margin-bottom: 4px; }
.login-box > p { color: var(--muted); margin: 0 0 24px; }
.login-box .field { margin-bottom: 14px; }
.login-box .btn { width: 100%; justify-content: center; padding: 11px; }

/* ---------------------------------------------------------------- report */
.report-sheet {
  max-width: 820px; margin: 0 auto; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 42px;
}
.report-head { display: flex; align-items: center; gap: 18px; border-bottom: 3px solid var(--navy); padding-bottom: 18px; }
.report-head img { width: 62px; }
.report-head h1 { font-size: 22px; }
.report-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.report-section { margin-top: 26px; }
.report-section h3 {
  font-size: 13px; color: #fff; background: var(--navy);
  padding: 6px 12px; border-radius: 6px; display: inline-block; margin-bottom: 12px;
}
.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.report-grid div { background: var(--blue-50); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.report-grid b { display: block; font-size: 21px; color: var(--navy); }
.report-grid span { font-size: 12px; color: var(--muted); }
.report-grid + .report-grid { margin-top: 12px; }
.report-grid div span { display: block; margin-top: 2px; }

/* complete report: profile details, tables, one block per evaluation */
.report-toolbar { display: flex; justify-content: flex-end; gap: 8px; max-width: 820px; margin: 0 auto 16px; }
.report-profile { display: flex; align-items: flex-start; gap: 20px; }
.report-profile img { flex: none; width: 104px; height: 104px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.report-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.report-name h2 { font-size: 20px; }
.report-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
.report-details dt { color: var(--muted); font-size: 11.5px; }
.report-details dd { margin: 2px 0 0; color: var(--navy); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.report-none { color: var(--muted); font-weight: 400; font-style: italic; }
.report-note { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: #f8fafd; }
.report-note h4 { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.report-note p { margin: 0; font-size: 13px; }

.report-subhead { margin: 22px 0 10px; color: var(--navy); font-size: 14px; font-weight: 600; }
.report-empty { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-style: italic; }
.report-table { width: 100%; font-size: 12.5px; }
.report-table thead th { padding: 8px; background: var(--blue-50); font-size: 11.5px; white-space: nowrap; }
.report-table tbody td { padding: 8px; vertical-align: top; }
.report-table td.nowrap { white-space: nowrap; }
.report-table .badge { font-size: 11.5px; padding: 2px 8px; }
.report-table tr.report-comment td { padding-top: 0; color: var(--ink-soft); font-size: 12px; font-style: italic; border-top: 0; }
.report-table tfoot td { padding: 8px; border-top: 1px solid var(--line); background: #f8fafd; color: var(--navy); font-weight: 600; }

.report-eval { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; break-inside: avoid; page-break-inside: avoid; }
.report-eval-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.report-eval-head strong { color: var(--navy); font-size: 13.5px; }
.report-eval-head .report-eval-meta { color: var(--muted); font-size: 12.5px; }
.report-eval .rating-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.report-prose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin-top: 14px; }
.report-prose .prose-block { margin: 0; }
.report-prose .prose-block.full { grid-column: 1 / -1; }
.report-prose .prose-block p { font-size: 13px; }
.report-foot { margin: 32px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; text-align: center; }
.pf-card-y, .pf-card-r, .report-grid div, .report-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* ---------------------------------------------------------------- icons */
/* Icons8 PNGs used as masks: the shape comes from the image, the colour from
   the surrounding text, so hover and active colours keep working. */
.icon {
  display: inline-block; flex: none; width: 1em; height: 1em;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
@media (forced-colors: active) {
  .icon { forced-color-adjust: none; background-color: CanvasText; }
}
.i-home         { -webkit-mask-image: url(../img/icons/home.png); mask-image: url(../img/icons/home.png); }
.i-users        { -webkit-mask-image: url(../img/icons/users.png); mask-image: url(../img/icons/users.png); }
.i-user-plus    { -webkit-mask-image: url(../img/icons/user-plus.png); mask-image: url(../img/icons/user-plus.png); }
.i-ball         { -webkit-mask-image: url(../img/icons/ball.png); mask-image: url(../img/icons/ball.png); }
.i-chart        { -webkit-mask-image: url(../img/icons/chart.png); mask-image: url(../img/icons/chart.png); }
.i-trophy       { -webkit-mask-image: url(../img/icons/trophy.png); mask-image: url(../img/icons/trophy.png); }
.i-whistle      { -webkit-mask-image: url(../img/icons/whistle.png); mask-image: url(../img/icons/whistle.png); }
.i-doc          { -webkit-mask-image: url(../img/icons/doc.png); mask-image: url(../img/icons/doc.png); }
.i-grid         { -webkit-mask-image: url(../img/icons/grid.png); mask-image: url(../img/icons/grid.png); }
.i-shield       { -webkit-mask-image: url(../img/icons/shield.png); mask-image: url(../img/icons/shield.png); }
.i-cog          { -webkit-mask-image: url(../img/icons/cog.png); mask-image: url(../img/icons/cog.png); }
.i-target       { -webkit-mask-image: url(../img/icons/target.png); mask-image: url(../img/icons/target.png); }
.i-medal        { -webkit-mask-image: url(../img/icons/medal.png); mask-image: url(../img/icons/medal.png); }
.i-calendar     { -webkit-mask-image: url(../img/icons/calendar.png); mask-image: url(../img/icons/calendar.png); }
.i-clipboard    { -webkit-mask-image: url(../img/icons/clipboard.png); mask-image: url(../img/icons/clipboard.png); }
.i-star         { -webkit-mask-image: url(../img/icons/star.png); mask-image: url(../img/icons/star.png); }
.i-flag         { -webkit-mask-image: url(../img/icons/flag.png); mask-image: url(../img/icons/flag.png); }
.i-arrow-right  { -webkit-mask-image: url(../img/icons/arrow-right.png); mask-image: url(../img/icons/arrow-right.png); }
.i-sparkle      { -webkit-mask-image: url(../img/icons/sparkle.png); mask-image: url(../img/icons/sparkle.png); }
.i-check        { -webkit-mask-image: url(../img/icons/check.png); mask-image: url(../img/icons/check.png); }
.i-minus        { -webkit-mask-image: url(../img/icons/minus.png); mask-image: url(../img/icons/minus.png); }
.i-close        { -webkit-mask-image: url(../img/icons/close.png); mask-image: url(../img/icons/close.png); }
.i-logout       { -webkit-mask-image: url(../img/icons/logout.png); mask-image: url(../img/icons/logout.png); }
.i-menu         { -webkit-mask-image: url(../img/icons/menu.png); mask-image: url(../img/icons/menu.png); }
.i-search       { -webkit-mask-image: url(../img/icons/search.png); mask-image: url(../img/icons/search.png); }
.i-staff        { -webkit-mask-image: url(../img/icons/staff.png); mask-image: url(../img/icons/staff.png); }
.i-transfer     { -webkit-mask-image: url(../img/icons/transfer.png); mask-image: url(../img/icons/transfer.png); }

.ic     { width: 20px; height: 20px; flex: none; }
.ic-sm  { width: 16px; height: 16px; }
.ic-lg  { width: 26px; height: 26px; }
.nav-ic { width: 18px; height: 18px; flex: none; }


/* ------------------------------------------------------------ dashboard */
.dash {
  --d-line:     #dfe6ef;   /* card borders, board dividers */
  --d-grid:     #e9eef5;   /* hairline gridlines and row rules */
  --d-axis:     #c9d4e2;   /* chart baselines */
  --d-muted:    #5b6f8c;   /* small text - 5.1:1 on white (the app's --muted is 3.6:1) */
  --d-tint:     #f7faff;   /* hover wash */
  --d-scored:   #0b5fbf;   /* chart series 1 \ validated as a pair:        */
  --d-conceded: #da291c;   /* chart series 2 / CVD dE 24.5, contrast >= 3:1 */
  --d-good:     #0ca30c;   /* status: won  */
  --d-neutral:  #8a96a8;   /* status: drawn */
  --d-critical: #d03b3b;   /* status: lost */
  --d-radius:   12px;
  display: grid; gap: 16px;
}
.dash [hidden] { display: none !important; }

/* Welcome banner ------------------------------------------------------- */
.dash-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center;
  padding: 30px 32px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #041e42 0%, #062a59 55%, #0a3a78 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 1px 2px rgba(4, 30, 66, .18);
}
/* one crisp centre-circle arc, nothing blurred */
.dash-hero::before {
  content: ""; position: absolute; right: -110px; top: -150px;
  width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .07);
}
.dash-hero > * { position: relative; }

.dash-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 11px 4px 9px; border-radius: 6px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  color: #dbe9fb; font-size: 12px; font-weight: 500;
}
.dash-hero .eyebrow .icon { color: #8fc0ff; }
.dash-hero h2 { color: #fff; font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.025em; margin: 14px 0 6px; }
.dash-hero p  { margin: 0; color: #b7d0ee; font-size: 14px; max-width: 52ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.btn.light { background: #fff; border-color: #fff; color: var(--navy); }
.btn.light:hover { background: #e9f1fd; border-color: #e9f1fd; color: var(--navy); transform: translateY(-1px); }
.btn.glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .24); color: #fff; }
.btn.glass:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; transform: translateY(-1px); }

/* Season record: hero figure + W/D/L stacked bar + form ---------------- */
.season-card {
  padding: 20px 22px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
}
.season-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.season-label { display: block; color: #9fc0ea; font-size: 12px; font-weight: 500; }
.season-meta  { color: #9fc0ea; font-size: 12px; white-space: nowrap; }
.hero-figure {
  display: block; margin-top: 4px;
  color: #fff; font-size: 52px; font-weight: 600; line-height: 1; letter-spacing: -.035em;
}
.hero-figure small { font-size: 22px; font-weight: 600; color: #9fc0ea; margin-left: 2px; letter-spacing: 0; }

.wdl {
  display: flex; gap: 2px; height: 10px;
  animation: wipe .9s var(--ease) .15s backwards;
}
.wdl-seg { min-width: 4px; transition: opacity .2s var(--ease); }
.wdl-seg:last-child { border-radius: 0 4px 4px 0; }   /* square at the baseline, rounded data end */
.wdl-seg.win  { background: var(--d-good); }
.wdl-seg.draw { background: var(--d-neutral); }
.wdl-seg.loss { background: var(--d-critical); }
.wdl:hover .wdl-seg:not(:hover) { opacity: .45; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

.wdl-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  list-style: none; margin: 12px 0 0; padding: 0;
  color: #b7d0ee; font-size: 12.5px;
}
.wdl-legend li { display: flex; align-items: center; }
.wdl-legend b { color: #fff; font-weight: 600; margin-left: 6px; }

.sw { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; }
.sw.win      { background: var(--d-good); }
.sw.draw     { background: var(--d-neutral); }
.sw.loss     { background: var(--d-critical); }
.sw.scored   { background: var(--d-scored); }
.sw.conceded { background: var(--d-conceded); }

.form-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.pills { display: flex; gap: 6px; }
/* letter ink picked per fill for >= 4.5:1: dark on green and grey, white on red */
.pill {
  width: 26px; height: 26px; border-radius: 6px; flex: none;
  display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 700; line-height: 1;
  transition: transform .25s var(--ease);
}
.pill.win  { background: var(--d-good);     color: #0b0b0b; }
.pill.draw { background: var(--d-neutral);  color: #0b0b0b; }
.pill.loss { background: var(--d-critical); color: #fff; }
.pill.sm   { width: 20px; height: 20px; border-radius: 5px; font-size: 10.5px; vertical-align: middle; margin-right: 4px; }
.pills .pill { cursor: default; }
.pills .pill:hover, .pills .pill:focus-visible { transform: translateY(-2px); }
.pills .pill:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.season-blank { display: grid; justify-items: center; gap: 3px; padding: 10px; text-align: center; color: #9fc0ea; }
.season-blank .icon { color: #8fc0ff; margin-bottom: 6px; }
.season-blank strong { color: #fff; font-size: 15px; }
.season-blank span { font-size: 12.5px; max-width: 34ch; }

/* Totals board: one card, hairline dividers ---------------------------- */
.board {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--d-line);
  border: 1px solid var(--d-line); border-radius: var(--d-radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
}
.tile {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 18px 20px; background: #fff;
  transition: background-color .25s var(--ease);
}
.tile:hover { background: var(--d-tint); }
.tile-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tile-label { color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.tile-value { color: var(--navy); font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: -.025em; }
.tile-note  { color: var(--d-muted); font-size: 12.5px; }
.tile-row   { display: flex; align-items: baseline; gap: 6px; }
.tile-of    { color: var(--d-muted); font-size: 12.5px; }

.tile.compact { gap: 8px; padding: 14px 20px 16px; }
.tile.compact .tile-value { font-size: 22px; }
.tile.compact .chip .icon { width: 18px; height: 18px; }

.chip {
  flex: none; display: grid; place-items: center;
  color: var(--blue);
  transition: transform .3s var(--ease);
}
.chip .icon { width: 20px; height: 20px; }
.chip.navy  { color: var(--navy); }
.chip.green { color: var(--green); }
.chip.red   { color: var(--red); }
.tile:hover .chip { transform: translateY(-1px); }

/* meter: accent fill on a lighter step of the same blue */
.meter { height: 6px; border-radius: 3px; background: var(--blue-100); overflow: hidden; }
.meter i {
  display: block; height: 100%; border-radius: 0 3px 3px 0;
  background: var(--d-scored, var(--blue)); transform-origin: left;   /* fallback outside the dashboard */
  animation: growX .9s var(--ease) .3s backwards;
}
@keyframes growX { from { transform: scaleX(0); } }

/* Panels --------------------------------------------------------------- */
.dash-row { display: grid; gap: 16px; align-items: stretch; }
.row-a { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.row-b { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  display: flex; flex-direction: column; min-width: 0;
  background: #fff; border: 1px solid var(--d-line); border-radius: var(--d-radius);
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.panel:hover {
  border-color: #cfdae8;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04), 0 10px 24px -14px rgba(4, 30, 66, .2);
}
.panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--d-grid);
}
.panel-head h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.panel-head p  { margin: 2px 0 0; color: var(--d-muted); font-size: 12.5px; }
.panel-body { flex: 1; min-width: 0; padding: 16px 20px; }
.panel-body.flush { padding: 0; }
.panel-foot { border-top: 1px solid var(--d-grid); border-radius: 0 0 var(--d-radius) var(--d-radius); overflow: hidden; }
.panel-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 20px; color: var(--blue); font-size: 13px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.panel-link .icon { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.panel-link:hover { background: var(--d-tint); color: var(--blue-600); text-decoration: none; }
.panel-link:hover .icon { transform: translateX(3px); }

.seg { display: inline-flex; flex: none; padding: 2px; border-radius: 8px; background: #eef3f9; }
.seg-btn {
  padding: 4px 10px; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--d-muted);
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.seg-btn:hover { color: var(--navy); }
.seg-btn.is-on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(4, 30, 66, .14); }

.legend { display: flex; gap: 16px; list-style: none; margin: 0 0 14px; padding: 0; color: var(--ink-soft); font-size: 12.5px; }
.legend li { display: flex; align-items: center; }

/* Goals per match: grouped columns ------------------------------------- */
.chart-body { display: flex; flex-direction: column; }
.chart-pane { flex: 1; display: flex; flex-direction: column; }
.colchart {
  flex: 1; display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: minmax(180px, 1fr) auto;
  column-gap: 10px;
}
.colchart-y { position: relative; color: var(--d-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.colchart-y span { position: absolute; right: 0; line-height: 1; transform: translateY(-50%); }
.colchart-plot { position: relative; min-height: 180px; }
.colchart-grid i { position: absolute; left: 0; right: 0; height: 1px; background: var(--d-grid); }
.colchart-grid i.base { top: auto; bottom: 0; background: var(--d-axis); }
.colchart-cols {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
}
.col {
  display: flex; align-items: flex-end; justify-content: center; gap: 2px;   /* 2px surface gap */
  border-radius: 6px 6px 0 0; outline: none; cursor: default;
  transition: background-color .2s var(--ease);
}
.col:hover, .col:focus-visible { background: rgba(11, 95, 191, .05); }
.col:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
.bar {
  display: block; width: 16px; max-width: 38%;
  border-radius: 4px 4px 0 0;   /* rounded data end, square on the baseline */
  transform-origin: bottom;
  transition: opacity .2s var(--ease);
  animation: growY .75s var(--ease) backwards;
  animation-delay: calc(var(--j, 0) * 55ms + 150ms);
}
.bar.scored   { background: var(--d-scored); }
.bar.conceded { background: var(--d-conceded); }
.colchart-cols:hover .col:not(:hover) .bar { opacity: .4; }
@keyframes growY { from { transform: scaleY(0); } }
.colchart-x {
  grid-column: 2;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  margin-top: 8px; color: var(--d-muted); font-size: 11.5px; text-align: center; white-space: nowrap;
}

/* Tooltip (shared by every chart mark) --------------------------------- */
.viz-tip {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  min-width: 130px; padding: 9px 11px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line, #dbe5f2);
  box-shadow: 0 10px 28px -10px rgba(4, 30, 66, .3);
  color: var(--navy); font-size: 12px; line-height: 1.45;
  opacity: 0; transition: opacity .15s ease;
}
.viz-tip.show { opacity: 1; }
.tip-title { margin-bottom: 4px; color: #5b6f8c; font-size: 11.5px; white-space: nowrap; }
/* key | value | label columns, so figures line up whatever their width */
.tip-grid { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 1px 8px; }
.viz-tip.no-keys .tip-grid { grid-template-columns: auto 1fr; }
.tip-row { display: contents; }
.tip-row span { color: #4a5f7d; white-space: nowrap; }
.tip-row b { justify-self: end; color: var(--navy); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tip-key { width: 12px; height: 2px; border-radius: 1px; }
.tip-key.none { visibility: hidden; }
.viz-tip.no-keys .tip-key { display: none; }
.tip-key.scored   { background: #0b5fbf; }
.tip-key.conceded { background: #da291c; }
.tip-key.win      { background: #0ca30c; }
.tip-key.draw     { background: #8a96a8; }
.tip-key.loss     { background: #d03b3b; }

/* Lists ---------------------------------------------------------------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; border-bottom: 1px solid var(--d-grid);
  transition: background-color .2s var(--ease);
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--d-tint); }
.list-main { flex: 1; min-width: 0; }
.list-main strong, .list-main a {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--navy); font-size: 13.5px; font-weight: 600;
}
.list-main a:hover { color: var(--blue); text-decoration: none; }
.list-main span {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--d-muted); font-size: 12px;
}
.list-end { flex: none; display: grid; justify-items: end; gap: 2px; }
.list-end > span { color: var(--d-muted); font-size: 11.5px; }
.score { color: var(--navy); font-size: 15px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 1px var(--d-line); }

/* Tables --------------------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  padding: 9px 12px; text-align: left; white-space: nowrap;
  background: #f8fafd; border-bottom: 1px solid var(--d-grid);
  color: var(--d-muted); font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
}
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--d-grid); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color .2s var(--ease); }
.data-table tbody tr:hover { background: var(--d-tint); }
.data-table th:first-child, .data-table td:first-child { padding-left: 20px; }
.data-table th:last-child,  .data-table td:last-child  { padding-right: 20px; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .strong { color: var(--navy); font-weight: 600; }
.chart-body .data-table th:first-child, .chart-body .data-table td:first-child { padding-left: 0; }
.chart-body .data-table th:last-child,  .chart-body .data-table td:last-child  { padding-right: 0; }

/* Top scorers leaderboard ---------------------------------------------- */
.scorers-panel { container-type: inline-size; }
.scorers { table-layout: fixed; }
.scorers th, .scorers td { padding-left: 8px; padding-right: 8px; }
.scorers th { padding-top: 10px; padding-bottom: 10px; }
.scorers td { padding-top: 12px; padding-bottom: 12px; }
.scorers th.rank-col, .scorers td.rank-col { width: 48px; padding-right: 4px; }
.scorers .goals-col   { width: 104px; }
.scorers .assists-col { width: 68px; text-align: right; font-variant-numeric: tabular-nums; }
.scorers td.assists-col { color: var(--ink-soft); font-size: 13.5px; }

/* medals for the podium, a plain figure after it */
.rank {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px;
  color: var(--d-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.rank-1, .rank-2, .rank-3 { font-weight: 700; }
.rank-1 { background: #f6d77a; color: #4d3805; box-shadow: inset 0 0 0 1px rgba(77, 56, 5, .14); }
.rank-2 { background: #e3e8ef; color: #3e4c5e; box-shadow: inset 0 0 0 1px rgba(62, 76, 94, .14); }
.rank-3 { background: #efc7a4; color: #5d3517; box-shadow: inset 0 0 0 1px rgba(93, 53, 23, .14); }

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .avatar { width: 32px; height: 32px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--d-line); }
.is-leader .who .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #e2b246; }
.who-text { min-width: 0; }
.who-text a {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--navy); font-size: 13.5px; font-weight: 600;
  transition: color .2s var(--ease);
}
.who-text a:hover { color: var(--blue); text-decoration: none; }
.who-text span {
  display: block; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--d-muted); font-size: 11.5px;
}
.tag {
  display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px;
  background: #eef3f9; color: var(--ink-soft);
  font-size: 10.5px; font-style: normal; font-weight: 600; line-height: 17px;
}

/* goals: one-series bar scaled to the leader, value at the tip */
.goal-bar { display: flex; align-items: center; gap: 8px; min-height: 24px; cursor: default; }
.goal-bar i {
  display: block; flex: none; height: 8px;
  width: calc((100% - 22px) * var(--v));
  border-radius: 0 4px 4px 0; background: var(--d-scored);
  transform-origin: left; transition: opacity .2s var(--ease);
  animation: growX .8s var(--ease) backwards;
  animation-delay: calc(var(--j, 0) * 60ms + 250ms);
}
.goal-bar b { color: var(--navy); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scorers tbody:hover tr:not(:hover) .goal-bar i { opacity: .45; }
@container (max-width: 400px) {
  .scorers .goals-col { width: 56px; }
  .goal-bar i { display: none; }
}
@container (max-width: 360px) {
  .scorers th.rank-col, .scorers td.rank-col { width: 44px; padding-right: 0; }
  .scorers th:nth-child(2), .scorers td:nth-child(2) { padding-left: 4px; padding-right: 4px; }
  .who { gap: 8px; }
  .who .avatar { width: 28px; height: 28px; }
}

/* Squad by category: horizontal bars, value at the tip ----------------- */
.hbars { display: grid; gap: 2px; list-style: none; margin: 0; padding: 0; }
.hbar {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px;
  margin: 0 -8px; padding: 5px 8px; border-radius: 6px; outline: none; cursor: default;
  transition: background-color .2s var(--ease);
}
.hbar:hover, .hbar:focus-visible { background: var(--d-tint); }
.hbar:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); }
.hbar-label { color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.hbar-track { display: flex; align-items: center; gap: 8px; min-height: 24px; border-left: 1px solid var(--d-axis); }
.hbar-track i {
  display: block; flex: none; height: 14px;
  width: calc((100% - 36px) * var(--v));
  border-radius: 0 4px 4px 0; background: var(--d-scored);
  transform-origin: left; transition: opacity .2s var(--ease);
  animation: growX .8s var(--ease) backwards;
  animation-delay: calc(var(--j, 0) * 55ms + 200ms);
}
.hbar-track b { color: var(--navy); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hbars:hover .hbar:not(:hover) .hbar-track i { opacity: .45; }

/* Empty states --------------------------------------------------------- */
.dash .empty { padding: 36px 16px; color: var(--d-muted); font-size: 13px; }
.empty-ico { display: grid; place-items: center; margin: 0 auto 10px; color: var(--blue); }
.empty-ico .icon { width: 32px; height: 32px; }

/* Entrance ------------------------------------------------------------- */
.reveal {
  animation: revealUp .55s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Dashboard responsive ------------------------------------------------- */
@media (max-width: 1180px) {
  .dash-hero { grid-template-columns: 1fr; gap: 24px; }
  .row-a { grid-template-columns: 1fr; }
  .row-b { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-b > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .dash-hero { padding: 24px 20px; border-radius: 14px; }
  .dash-hero h2 { font-size: 22px; }
  .season-card { padding: 18px; }
  .row-b { grid-template-columns: 1fr; }
  .tile { padding: 14px 16px; }
  .tile.compact { padding: 12px 16px 14px; }
  .tile-value { font-size: 26px; }
  .panel-head, .panel-body:not(.flush), .list-item, .panel-link { padding-left: 16px; padding-right: 16px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 16px; }
  .data-table th:last-child,  .data-table td:last-child  { padding-right: 16px; }
}

@media (max-width: 520px) {
  /* keep the newest date label, drop every other one so they never collide */
  .colchart-x span:nth-last-child(even) { visibility: hidden; }
  .season-top { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- public player page */
/* view_player_data/: no sidebar, a slim brand bar, content centred */
body.pp { display: flex; flex-direction: column; min-height: 100vh; background: #f5f8fc; }

.pp-top {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px;
  padding: 12px max(20px, calc((100% - 1040px) / 2));
  background: #fff; border-bottom: 1px solid var(--line);
}
.pp-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); }
.pp-brand:hover { text-decoration: none; }
.pp-brand img { width: 40px; height: 40px; object-fit: contain; }
.pp-brand strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.pp-brand small { display: block; color: #5b6f8c; font-size: 12.5px; }

.pp-find { display: flex; align-items: center; gap: 8px; }
.pp-find-field {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.pp-find-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11, 95, 191, .14); }
.pp-find-field .icon { flex: none; color: #5b6f8c; }
.pp-find-field input {
  width: 100%; min-width: 0; padding: 9px 0; border: 0; outline: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 14px; text-transform: uppercase; letter-spacing: .03em;
}
.pp-find-field input::placeholder { color: #8193ab; text-transform: none; letter-spacing: 0; }
.pp-find .pp-find-field { width: 190px; }

.pp-main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px 20px 8px; }

/* lookup card */
.pp-lookup {
  max-width: 520px; margin: 6vh auto 0; padding: 34px 32px 30px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .04), 0 18px 40px -28px rgba(4, 30, 66, .3);
}
.pp-lookup-logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 14px; }
.pp-lookup h1 { font-size: 26px; letter-spacing: -.02em; }
.pp-lookup > p { max-width: 40ch; margin: 6px auto 22px; color: var(--ink-soft); }
.pp-lookup .alert { margin-bottom: 16px; text-align: left; }
.pp-lookup-form { text-align: left; }
.pp-lookup-form label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.pp-lookup-row { display: flex; gap: 8px; }
.pp-lookup-row .pp-find-field { flex: 1; }
.pp-lookup-row .pp-find-field input { padding: 11px 0; font-size: 15px; }
.pp-lookup-row .btn { flex: none; justify-content: center; padding-inline: 18px; }
.pp-lookup-form small { display: block; margin-top: 8px; color: #5b6f8c; font-size: 12.5px; }

/* profile */
.pp-hero .pf-identity h1 { margin: 6px 0 12px; font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -.025em; }
.pp-share { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }

.pp-split { margin-top: 20px; }
.pp .card { border-radius: 14px; box-shadow: 0 1px 2px rgba(4, 30, 66, .04); }
.pp .card-head { padding: 18px 22px; }
.pp .card-body { padding: 20px 22px; }
.pp .card-body.tight { padding: 0; }

.pp-matches th, .pp-matches td { padding: 11px 12px; }
.pp-matches th:first-child, .pp-matches td:first-child { padding-left: 22px; }
.pp-matches th:last-child, .pp-matches td:last-child { padding-right: 22px; }
.pp-matches .nowrap { white-space: nowrap; }
.pp-matches td strong { display: block; color: var(--navy); font-weight: 600; }
.pp-matches td.nowrap strong { font-weight: 500; }
.pp-matches td small { display: block; color: #5b6f8c; font-size: 12px; }

.pp-awards { display: grid; margin: 0; padding: 0; list-style: none; }
.pp-awards li { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.pp-awards li:first-child { padding-top: 0; }
.pp-awards li:last-child { padding-bottom: 0; }
.pp-awards li + li { border-top: 1px solid var(--line-soft); }
.pp-award-ico { flex: none; display: grid; place-items: center; color: var(--blue); }
.pp-award-ico.is-trophy { color: var(--amber); }
.pp-award-ico .icon { width: 20px; height: 20px; }
.pp-awards strong { display: block; color: var(--navy); font-size: 14px; font-weight: 600; }
.pp-awards small { display: block; color: #5b6f8c; font-size: 12.5px; }

.pp-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
  width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px 20px 26px;
  color: #5b6f8c; font-size: 12.5px;
}

@media (max-width: 1100px) {
  /* stacked columns: the cards carry their own spacing */
  .pp-split { row-gap: 0; }
}
@media (max-width: 860px) {
  .pp-hero .pf-identity h1 { font-size: 22px; }
}
@media (max-width: 560px) {
  .pp-top { padding: 10px 16px; }
  .pp-find { width: 100%; }
  .pp-find .pp-find-field { flex: 1; width: auto; }
  .pp-main { padding: 18px 16px 8px; }
  .pp-lookup { margin-top: 12px; padding: 26px 18px 22px; }
  .pp-lookup-row { flex-direction: column; }
  .pp-foot { padding: 14px 16px 22px; }
  /* phones: rows stay one line tall and the table scrolls sideways */
  .pp-matches td strong, .pp-matches td small { white-space: nowrap; }
  .pp-matches th:first-child, .pp-matches td:first-child { padding-left: 18px; }
}

/* categories sit in the narrow column, so their cells stay tight */
.cat-table th, .cat-table td { padding-left: 10px; padding-right: 10px; }
.cat-table th:first-child, .cat-table td:first-child { padding-left: 18px; }
.cat-table th:last-child, .cat-table td:last-child { padding-right: 18px; }

/* ------------------------------------------------------ document viewer */
/* an attached contract, shown over the page */
.doc-viewer {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  padding: 24px; background: rgba(4, 30, 66, .55);
  animation: docFade .2s var(--ease);
}
.doc-sheet {
  display: flex; flex-direction: column; width: min(980px, 100%); height: min(88vh, 100%);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(4, 30, 66, .7);
  animation: docRise .26s var(--ease);
}
.doc-sheet header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line-soft);
}
.doc-sheet h2 { font-size: 16px; }
.doc-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-body { flex: 1; min-height: 0; display: grid; place-items: center; background: #f2f6fb; }
.doc-body object, .doc-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
/* a PDF drawn page by page, scrolling inside the panel */
.doc-body.doc-pages { display: block; overflow: auto; padding: 16px; text-align: center; }
.doc-body.doc-pages canvas {
  display: block; margin: 0 auto 16px; background: #fff; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .08), 0 10px 26px -18px rgba(4, 30, 66, .5);
}
.doc-body.doc-pages canvas:last-child { margin-bottom: 0; }
.doc-loading { margin: 40px 0; color: #5b6f8c; font-size: 13.5px; }
.doc-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.doc-none { display: grid; gap: 4px; justify-items: center; padding: 40px 24px; text-align: center; }
.doc-none strong { color: var(--navy); font-size: 15px; }
.doc-none span { max-width: 36ch; color: #5b6f8c; font-size: 13px; }
@keyframes docFade { from { opacity: 0; } }
@keyframes docRise { from { opacity: 0; transform: translateY(10px) scale(.99); } }

@media (max-width: 560px) {
  .doc-viewer { padding: 12px; }
  .doc-sheet { height: 92vh; }
  .doc-sheet header { padding: 12px 14px; }
}

/* ------------------------------------------------------- confirm dialog */
/* SweetAlert2, dressed in the interface's own type and colours */
.psg-swal {
  border-radius: 16px; padding: 28px 26px 22px; font-family: inherit;
  box-shadow: 0 1px 2px rgba(4, 30, 66, .06), 0 28px 60px -30px rgba(4, 30, 66, .55);
}
.psg-swal .swal2-title { color: var(--navy); font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.psg-swal .swal2-html-container { color: var(--ink-soft); font-size: 14px; margin-top: 8px; }
.psg-swal .swal2-icon { width: 62px; height: 62px; border-width: 3px; margin: 2px auto 16px; }
.psg-swal .swal2-icon .swal2-icon-content { font-size: 38px; }
.psg-swal .swal2-actions { gap: 8px; margin-top: 22px; }
.psg-swal .swal2-styled {
  border-radius: var(--radius-sm); padding: 9px 18px;
  font-size: 13.5px; font-weight: 500; box-shadow: none !important;
}
.psg-swal .swal2-styled:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.psg-swal-cancel { border: 1px solid var(--line) !important; color: var(--navy) !important; }
.psg-swal-cancel:hover { background: var(--blue-50) !important; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.split  { grid-template-columns: 1fr; }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .menu-toggle { display: grid; place-items: center; }
  .sidebar { transform: translateX(-100%); transition: transform .35s var(--ease); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(4, 30, 66, .45);
    opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease), visibility 0s linear .3s;
  }
  .sidebar-backdrop.show { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
  .shell { margin-left: 0; }
  .topbar { padding: 14px 18px 14px 68px; }
  .content { padding: 18px 16px 32px; }
  .pagefoot { padding: 16px 18px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .report-sheet { padding: 22px; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .report-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-profile { flex-direction: column; }
  .report-eval .rating-rows, .report-prose { grid-template-columns: 1fr; }
  .report-table { display: block; overflow-x: auto; }
  .user-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}

/* ---------------------------------------------------------------- print */
@media print {
  .sidebar, .topbar, .pagefoot, .menu-toggle, .no-print, .btn { display: none !important; }
  .shell { margin-left: 0; }
  .content { padding: 0; }
  body { background: #fff; }
  .report-sheet { border: 0; padding: 0; max-width: none; }
  body { padding: 0 !important; }
  .report-table tr, .report-grid, .report-details div { break-inside: avoid; page-break-inside: avoid; }
  .report-subhead { break-after: avoid; page-break-after: avoid; }
  @page { margin: 14mm; }
}
