/* Family submissions, corrections and office review. */
.document-card { margin-bottom: 18px; }
.document-form { display: grid; gap: 14px; max-width: 680px; }
.document-form label { display: grid; gap: 6px; margin: 0; font-size: var(--text-label); line-height: 1.4; }
.document-form label.checkbox { display: flex; flex-direction: row; align-items: flex-start; }
.document-form .helper { font-size: var(--text-small); line-height: 1.5; }
.document-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.document-submission { border-top: 1px solid var(--line); padding: 14px 0; }
.document-submission a, .document-list a { overflow-wrap: anywhere; }
.document-filters { display: flex; gap: var(--space-3); align-items: end; margin-bottom: 18px; flex-wrap: wrap; }
.document-filters label { margin: 0; }
.document-filters input[type=submit] { width: auto; margin: 0; }
.document-card .rows li { flex-wrap: wrap; gap: var(--space-2); }

.document-card .card-head { flex-wrap: wrap; }
.document-card .card-body { padding-top: 14px; font-size: var(--text-body); line-height: 1.5; }
.document-card p { margin-bottom: 10px; }
.document-card summary { cursor: pointer; font-weight: 600; }
.document-card details[open] > summary { margin-bottom: var(--space-4); }
.document-form textarea { width: 100%; min-height: 96px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); resize: vertical; font: inherit; color: var(--ink); }
.document-form input, .document-form select, .document-form textarea { max-width: 100%; }
.document-correction { padding: var(--space-3); border-left: 3px solid var(--yellow); background: var(--surface-2); }

.correction-details { margin-bottom: 20px; }

.order-money { grid-template-columns: minmax(0, 1fr) max-content; }
.order-money dd { white-space: nowrap; }
.order-money dt { padding-right: var(--space-4); overflow-wrap: anywhere; }
.claim-details > .badge { justify-self: start; }

.bank-review { overflow-wrap: anywhere; }

.announcement-review { overflow-wrap: anywhere; }
.announcement-review .card-head h2 { min-width: 0; }

.announcement-review .section-card { margin-bottom: var(--space-4); }
.announcement-review .card-body { font-size: var(--text-body); line-height: 1.5; }
.announcement-review .card-body > p { margin-bottom: var(--space-3); }

.renewal-review { overflow-wrap: anywhere; }
.renewal-review .section-card { margin-bottom: 18px; }
.renewal-review .card-body { font-size: var(--text-body); line-height: 1.5; }
.renewal-review .document-card { padding-bottom: var(--space-4); border-bottom: 1px solid var(--line); }
.renewal-review fieldset { min-width: 0; }
.renewal-review summary { cursor: pointer; }
.renewal-form { display: grid; gap: 14px; }
.renewal-step > .checkbox { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.renewal-step { display: grid; gap: 14px; }
.renewal-step > .btn { justify-self: start; width: auto; }

.fee-impact { overflow-wrap: anywhere; }
.fee-impact .section-card { margin-bottom: 18px; }
.fee-impact .card-body { font-size: var(--text-body); line-height: 1.5; }
.fee-impact .card-body > p, .fee-impact .card-body > form { margin-bottom: 14px; }
.fee-impact .document-card { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fee-impact summary { cursor: pointer; font-weight: 600; margin-bottom: 14px; }

/* Atletas (enrollments/index): the head's "Mais ações" and Novo atleta (a
   round "…" and a yellow "+" by the title on a phone); the tabs with the
   toolbar on their right, over one line (on a narrow laptop the toolbar
   narrows first, then the tabs scroll sideways; it never drops under
   them); a sentence about the list; the athletes as a table on a laptop and
   as a row list on a phone; the note about SCORE under it. */
.athletes-head { position: relative; }
.athletes-menu-phone, .tab-name-phone { display: none; }
.athletes-tabs { display: flex; align-items: flex-end; justify-content: space-between; gap: 0 var(--space-3); margin-top: var(--space-5); border-bottom: 1px solid var(--line); }
.athletes-tabs .tabs { margin: 0; border-bottom: 0; }
.athletes-tabs .list-toolbar { gap: var(--space-2); margin: 0 0 var(--space-2); }
.athletes-tabs + .panel { margin-top: 18px; }
.athletes-lead { margin: 18px var(--space-1) var(--space-3); color: var(--muted); font-size: var(--text-label); }
.athletes-note { margin: var(--space-3) var(--space-1) 0; color: var(--faint); font-size: var(--text-small); }
.athletes-note a { color: inherit; text-decoration: underline; }
:is(.papers-table, .athletes-table) td { vertical-align: middle; }
:is(.papers-table, .athletes-table) .person { gap: 10px; }
:is(.papers-table, .athletes-table) .avatar { width: 34px; height: 34px; font-size: .75rem; }
.athlete-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.athlete-name a { color: var(--ink); font-weight: 600; }
.athlete-name a:hover { color: var(--blue); }
.paper-badges { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.papers-game { white-space: nowrap; }
:is(.papers-rows, .athletes-rows) .avatar, .review-rows .avatar { width: 36px; height: 36px; font-size: .75rem; }
.papers-rows, .athletes-rows { display: none; }
.review-rows .row-lead, .papers-rows .row-lead, .athletes-rows .row-lead { align-self: flex-start; }

@media (min-width: 701px) {
  .athletes-head .page-head { align-items: flex-end; }
  .athletes-tabs .tabs { min-width: 0; }
  .athletes-tabs .list-toolbar { flex: 0 100 auto; flex-wrap: nowrap; }
  .athletes-tabs .list-toolbar > .search { flex: 0 1 170px; width: auto; min-width: 120px; }
  .athletes-tabs .list-toolbar > select { flex: 0 1 auto; min-width: 120px; max-width: 180px; }
}

@media (max-width: 700px) {
  .athletes-menu { display: none; }
  .athletes-menu-phone { display: block; position: absolute; top: 0; right: 52px; }
  .athletes-head .head-actions > .btn.primary { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; }
  .athletes-head .head-actions > .btn.primary span { display: none; }
  .athletes-head .page-head h1 { padding-right: 104px; }
  .athletes-tabs { display: block; border-bottom: 0; }
  .athletes-tabs .tabs { margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4); border-bottom: 1px solid var(--line); }
  .athletes-tabs .tab-name-phone { display: inline; }
  .athletes-tabs a:has(.tab-name-phone) .tab-name { display: none; }
  .athletes-tabs .list-toolbar { margin: var(--space-4) 0 0; }
  /* The phone board draws only the search, no age group. */
  .athletes-tabs .list-toolbar > select[name=team] { display: none; }
  .papers-table, .athletes-table { display: none; }
  .papers-rows, .athletes-rows { display: block; }
  :is(.papers-rows, .athletes-rows, .review-rows) .row-item { flex-wrap: nowrap; gap: var(--space-3); }
  :is(.papers-rows, .athletes-rows, .review-rows) .row-main { flex: 1 1 0; }
  .athletes-rows .row-aside { order: 0; flex-basis: auto; }
  .athletes-menu-phone .icon-btn { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-3); color: var(--ink); }
  .papers-rows .row-main small:first-of-type { color: var(--ink); font-weight: 600; }
  /* The badge and the name keep one line, as the board draws them: a long
     name wraps beside the badge instead of dropping under it. */
  :is(.papers-rows, .athletes-rows, .review-rows) .row-head { flex-wrap: nowrap; }
  :is(.papers-rows, .athletes-rows, .review-rows) .row-title { min-width: 0; }
  .athletes-note { display: none; }
}

/* Season renewal (season_renewals/new): help as muted notes, and the
   athletes as a table (cards below the list width), those to decide first,
   the rest folded. The steps and the teams are in settings_seasons.css. */
.renewal-review .card-body>.card-note:first-child { margin: 0 0 var(--space-4); }
.renewal-group { margin: 0 0 var(--space-3); font-size: var(--text-subheading); }
.renewal-settled { margin-top: var(--space-5); }
.renewal-settled>summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--control-height); cursor: pointer; list-style: none; color: var(--blue); font-weight: 600; }
.renewal-settled>summary::-webkit-details-marker { display: none; }
.renewal-settled>summary svg { flex: none; transition: transform .15s; }
.renewal-settled[open]>summary { margin-bottom: var(--space-3); }
.renewal-settled[open]>summary svg { transform: rotate(180deg); }
.renewal-table td { vertical-align: top; }
.renewal-table td small { display: block; color: var(--muted); font-size: var(--text-small); }
.renewal-table :is(input, select) { box-sizing: border-box; width: 100%; min-width: 0; height: var(--control-height); }
@media (min-width: 1101px) {
  .renewal-table table { table-layout: fixed; white-space: normal; }
  .renewal-table :is(th, td) { padding: var(--space-3); }
  .renewal-table th:first-child { width: 26%; }
  .renewal-table th:nth-child(4) { width: 96px; }
}

/* The bank CSV import form: one card, the paired settings side by side. */
.bank-import-form { max-width: 760px; }
.bank-import-form .helper { margin: calc(-1 * var(--space-1)) 0 0; }
.bank-import-form .form-grid { gap: 14px var(--space-4); }

/* An order's decision forms: the submit sizes to its label,
   like the buttons beside it. */
.claim-details .document-form input[type=submit] { justify-self: start; width: auto; }

/* The message on the preview page (announcements/_content): the details
   line sits right under the title, the text below it. */
.announcement-review .announcement-note { margin: 0 0 var(--space-3); }
/* New message (announcements/new): the recipients box matches the fields. */
.announcement-review fieldset { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4) var(--space-2); border: 1px solid var(--line); border-radius: var(--radius); }
.announcement-review fieldset legend { padding: 0 var(--space-2); font-size: var(--text-label); font-weight: 650; }
.announcement-review fieldset .checkbox { margin-bottom: var(--space-2); }

/* The athlete record (enrollments/show): three columns on a laptop, the
   games two wide; two on a narrow laptop; one on a phone, the games last. */
.record-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.record-wide { grid-column: span 2; }
.record-grid .card-head { padding: 20px 20px 14px; }
.record-grid .card-head h2 { font-size: var(--text-subheading); }
.record-grid .card-body { padding: 0 20px 20px; }
.record-grid .card-body:first-child { padding-top: 20px; }
.record-phone { display: none; }
.record-state { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.record-state h2 { margin: 0; font-size: var(--text-subheading); }
.record-state p { margin: 0; color: var(--muted); font-size: var(--text-small); }
/* The papers' lines under it: a paper's name keeps the room to read on one
   or two lines; a long state ("Até 30/06/2027 · por confirmar") wraps. */
.record-state ~ .facts-split { grid-template-columns: minmax(7.5rem, 1fr) minmax(0, auto); }
.record-mark { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--muted); }
.record-mark.red::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--problem-dot); }
.record-mark.orange::before { content: ""; width: 14px; height: 14px; border: 2px solid var(--muted); border-radius: 50%; }
.record-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-top: 14px; font-size: var(--text-label); font-weight: 600; }
.record-born::before { content: "· "; }
.record-links a, .record-games-more { color: var(--blue); }
.card-button { margin-top: var(--space-3); }

.record-people { margin: 0; padding: 0; list-style: none; }
.record-people li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.record-people li:first-child { padding-top: 0; border-top: 0; }
.record-person { flex: 1; min-width: 0; }
.record-person strong { display: block; font-size: var(--text-body); }
.record-person small { display: block; color: var(--muted); font-size: var(--text-small); }
.record-person-contacts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; font-size: var(--text-label); }
.record-person-phone, .record-person-buttons { display: none; }
.record-person-missing { margin: 0 0 var(--space-2); }
.record-person-buttons .icon-btn { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); color: var(--ink); }

.record-games { margin: 0; padding: 0; list-style: none; }
.record-games li + li { border-top: 1px solid var(--line-soft); }
.record-games a { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); font-size: var(--text-label); }
.record-games a:hover strong { color: var(--blue); }
.record-games strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.record-games-date { flex: none; width: 80px; color: var(--muted); }
.record-called { flex: none; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: .75rem; font-weight: 600; }
.record-games-more { display: none; margin-top: var(--space-2); font-size: var(--text-label); font-weight: 600; }
.record-games-more.is-long { display: inline-block; }

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

@media (max-width: 700px) {
  .record-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .record-grid .card-head { padding: 16px 16px 12px; }
  .record-grid .card-body { padding: 0 16px 16px; }
  .record-grid .card-body:first-child { padding-top: 16px; }
  .record-state { margin-bottom: 10px; }
  .record-links { margin-top: 10px; }
  .record-laptop { display: none; }
  .record-phone { display: revert; }
  dl.record-phone { display: grid; }
  .record-wide { grid-column: auto; order: 1; }
  .record-born { display: none; }
  .record-person-contacts { display: none; }
  .record-person-phone { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-small); }
  .record-person-buttons { display: flex; gap: var(--space-2); }
  .record-games:not(.is-all) li:nth-child(n+4) { display: none; }
  .record-games-more { display: inline-block; }
  .record-games-date { width: 76px; }
}

/* Pedidos de documentos (document_requests#index, the B-Fila boards): each
   section a table on a laptop, its lines on a phone; the athlete's name with
   the team badge after it; a passed deadline in bold; the note on where a
   new request is made, under the lists. */
.fila-tabs { margin: 20px 0 22px; }
.fila-section + .fila-section { margin-top: 28px; }
.fila-section .table-panel { margin: 0; }
.fila-table table { table-layout: fixed; }
.fila-table th { padding: 12px 16px; }
.fila-table td { padding: 13px 16px; color: var(--ink); vertical-align: middle; }
.fila-table tbody tr:hover td { background: var(--surface-2); }
.fila-athlete { width: 30%; }
.fila-kind { width: 22%; }
.fila-due { width: 14%; }
.fila-action { width: 120px; }
.fila-who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); color: var(--ink); font-weight: 600; }
.fila-who:hover { color: var(--blue); }
.fila-late { color: var(--ink); }
.fila-rows { display: none; }
.fila-rows .row-title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fila-rows .row-main small + small { margin-top: 4px; }
.fila-note { margin: 18px var(--space-1) 0; color: var(--faint); font-size: var(--text-small); }

@media (max-width: 700px) {
  .fila-tabs { max-width: none; margin: 12px calc(-1 * var(--space-4)) 20px; padding: 0 var(--space-4); }
  .fila-section + .fila-section { margin-top: 24px; }
  .fila-table { display: none; }
  .fila-rows { display: block; }
  .fila-rows .row-item { flex-wrap: nowrap; }
  .fila-rows .row-item > svg { display: block; }
}

/* The family's documents (boards C-Documentos): requests beside corrections,
   each line with a file icon and its state under it; the correction button
   heads the page on a computer and ends it on a phone. Every line ends in
   its chevron, on a phone too. */
.fdocs-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); align-items: start; }
.fdocs-columns .row-lead, .fdocs-columns .row-item > svg:last-child { align-self: start; color: var(--muted); }
.row-state { display: flex; margin-top: 6px; }
.fdocs-pill { padding: 2px 8px; border-radius: 999px; background: var(--surface-3); font-weight: 600; }
.fdocs-done { color: var(--muted); font-size: var(--text-small); }
.fdocs-foot { display: none; }
@media (max-width: 700px) {
  .fdocs-columns { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .page-head:has(+ .fdocs-columns) .head-actions { display: none; }
  .fdocs-foot { display: block; margin-top: var(--space-5); }
  .fdocs-foot .btn { width: 100%; border-color: transparent; background: var(--surface-3); color: var(--ink); }
  /* Each line keeps its chevron on a phone too, as the boards draw it. */
  .fdocs-columns .row-item { flex-wrap: nowrap; }
  .fdocs-columns .row-main { flex: 1 1 0; }
  .fdocs-columns .row-item > svg:last-child { display: block; }
}

/* One document for the family (boards C-Documento): the state card and what
   was sent on the left, the upload on the right; stacked in that order on a
   phone. */
.fdoc > div { display: grid; gap: var(--space-5); align-content: start; }
.fdoc-card { padding: 20px 22px; }
.fdoc-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.fdoc-card-head h3 { margin: 0; font-size: 1.125rem; }
.fdoc-card .facts { margin-bottom: var(--space-3); }
.fdoc-card .document-message, .fdoc-card .document-correction { margin-bottom: var(--space-3); }
.fdoc-explain { margin: 0; color: var(--muted); font-size: var(--text-body); line-height: 1.5; }
.fdoc-none { margin: 0; padding: 14px 16px; color: var(--muted); }
.document-form label.fdoc-drop { display: grid; justify-items: center; gap: 2px; padding: 24px 16px; border: 1.5px dashed var(--blue-line); border-radius: var(--radius); background: var(--surface-2); color: var(--ink); text-align: center; cursor: pointer; }
.fdoc-drop svg { color: var(--blue); margin-bottom: var(--space-2); }
.fdoc-drop [data-attach-target=name] { max-width: none; overflow-wrap: anywhere; }
.fdoc-drop small { color: var(--muted); font-size: var(--text-small); }
.fdoc-drop:focus-within { outline: 3px solid var(--blue-line); outline-offset: 1px; }
.fdoc-label { display: grid; gap: 2px; font-weight: 700; }
.fdoc-label small { color: var(--muted); font-weight: 400; }
