/* 12 Tax (round 2, CD audit TX1-TX13): the Tax Clients register and Accounting Production. Layout only, tokens only. */

/* TX5: the page ends with room under the last row so the Alfred pill covers nothing */
#view-tax-register, #view-accounting-prod { padding-bottom: 96px; }

/* TX1: filter chips never wrap; natural width; one row. What does not fit goes behind "Más filtros" (JS, _tcFitChips) */
#view-tax-register .al-chips { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; position: relative; }
#view-tax-register .al-chips .al-chip { flex: none; white-space: nowrap; height: 28px; display: inline-flex; align-items: center; }
#view-tax-register .al-chips select.al-chip { width: auto; min-width: 120px; max-width: 200px; }
#view-tax-register .al-chips .al-label { flex: none; white-space: nowrap; }
#view-tax-register .tx-more { position: relative; flex: none; }
#view-tax-register .tx-more-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; display: flex; flex-direction: column; gap: 8px; padding: 12px; min-width: 220px;
  background: var(--al-card); border-radius: var(--al-r-card); border: 1px solid var(--al-divider); box-shadow: var(--al-shadow-card); }
#view-tax-register .tx-more-pop[hidden] { display: none; }
#view-tax-register .tx-more-pop .al-chip { width: 100%; max-width: none; justify-content: flex-start; }

/* TX2 / TX3 / TX9 / TX10 / TX12: one line per row; names end in an ellipsis and carry the full name as a title.
   The Client column has first claim on the width: the other columns shrink before it does. */
#view-tax-register .al-table th, #view-tax-register .al-table td { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
#view-tax-register .al-table th:first-child { width: 30%; min-width: 210px; }
#view-tax-register .al-table td:first-child > div { min-width: 0; }
#view-tax-register .al-table .al-cell-2 { flex: 1; max-width: none; min-width: 0; }
#view-tax-register .al-table .tx-name, #view-tax-register .al-table .al-cell-2 .al-sub { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-tax-register .al-table td.al-cats, #view-tax-register .al-table td.al-absent { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-tax-register .al-table td.tx-people { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
#view-tax-register .al-table td .al-status { white-space: nowrap; }
#view-tax-register .al-table th:nth-child(2) { width: 96px; }
#view-tax-register .al-table th:nth-child(3) { width: 110px; }
#view-tax-register .al-table th:nth-child(5), #view-tax-register .al-table td:nth-child(5) { width: 150px; min-width: 150px; }
#view-tax-register .al-table th:nth-child(7) { width: 120px; }
#view-tax-register .al-table th:nth-child(8) { width: 44px; }
#view-tax-register .al-table td .al-status { overflow: visible; max-width: none; text-overflow: clip; }
#view-tax-register .al-table th:nth-child(7) { white-space: normal; line-height: 1.25; min-width: 96px; }
#view-tax-register .al-table th { letter-spacing: .04em; }
#view-tax-register .al-table .al-num, #view-accounting-prod .al-table .al-num { font-family: var(--al-font-ui); }

/* TX2: beside the detail pane the table keeps six columns (Client, NIF/NIE, Categories, Status, Adviser · Accountant, A3);
   Books and Period move into the pane. Below 1440 the pane is an overlay, so the full table shows until a client is opened. */
@media (min-width: 1440px) {
  #view-tax-register .al-table :is(th, td):nth-child(4),
  #view-tax-register .al-table :is(th, td):nth-child(6) { display: none; }
}
@media (max-width: 1439px) {
  #view-tax-register.tc-detail-open .al-table :is(th, td):nth-child(4),
  #view-tax-register.tc-detail-open .al-table :is(th, td):nth-child(6) { display: none; }
}

/* TX7 / TX11: Accounting Production: a figure that is a word uses the normal face; rows stay on one line */
#view-accounting-prod .al-figure-value .al-absent { font-family: var(--al-font-ui); font-size: var(--al-fs-13); letter-spacing: 0; }
#view-accounting-prod .al-table td { white-space: nowrap; }
#view-accounting-prod .al-table .al-cell-2 { max-width: none; min-width: 0; }
#view-accounting-prod .al-table .al-cell-2 span { display: block; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* G-PILL: the client card is sticky beside the table; it never runs under the Alfred pill, it scrolls inside and fades when cut */
#view-tax-register .al-detail { top: var(--al-topbar-h); height: calc(100vh - var(--al-topbar-h)); border-radius: var(--al-r-card) var(--al-r-card) 0 0; overflow-y: auto; padding-bottom: 88px; scrollbar-width: thin; scrollbar-color: var(--al-scroll-thumb) transparent; }
#view-tax-register .al-detail.is-overflowing::after { content: ''; display: block; position: sticky; bottom: 0; height: 28px; margin-top: -28px; background: linear-gradient(to bottom, transparent, var(--al-card)); pointer-events: none; }

/* recipe 06 A (step 4): the register head on the parts -- four open figures, the lenses as filter chips with one overlap line */
#view-tax-register #tc-figures { display: block; margin-bottom: var(--v3-s-4, 16px); }
#view-tax-register #tc-lenses { display: block; margin-bottom: var(--v3-s-4, 16px); }
#view-tax-register #tc-lenses .alf-filters { display: flex; flex-wrap: wrap; gap: 8px; }
#view-tax-register #tc-lenses > p { margin: 8px 0 0; font-size: 13px; color: var(--v3-text-2); }
/* t1 (eyes): the figures sit under the title, the lens and filter chips never break their words, the selects are kit-sized */
#view-tax-register #tc-lenses { background: none; border: 0; padding: 0; box-shadow: none; }
#view-tax-register #tc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
#view-tax-register #tc-chips .alf-filter, #view-tax-register #tc-lenses .alf-filter { white-space: nowrap; flex: none; }
#view-tax-register #tc-chips select { min-height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--al-line-control); border-radius: var(--al-r-control); background: var(--al-field); font: inherit; font-size: 14px; color: var(--v3-ink); max-width: 220px; }
/* s1 (eyes): the client file's tabs stay one row and scroll with the kit fade; the list keeps its name column */
#view-tax-register #tc-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#view-tax-register #tc-tabs > * { flex: none; white-space: nowrap; }
