/* The tables of the lists, the same as INTECHI CRM (its public/app.css table.cards and public/css/tables.css; the owner's visual audit of
   both apps, 30. 11. 2026). One file for one part of the application: a change of the lists touches only this file. */

/* a phone: every row of a list is a boxed card (public/js/stack.js makes the table stack-table): the first cell is the title of the card
   without its label, the other lines "label : value" under it divided by a thin line, the edge of the card is the last line. A heading of
   a group (the letters, the payments, the months) is only its strip, never a card around it (the owner, 3. 12. 2026: a double frame
   around „Prosinec“ on Náklady) */
@media (max-width: 640px) {
  html.sd table.stack-table > tbody > tr:not(.letter-row):not(.pay-head):not(.month-head):not([data-filter-follow]):not(.cf-none) {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: var(--card);
  }
  /* the strip of a month stands on the same edges as the cards under it */
  html.sd table.stack-table > tbody.month-group > tr.month-head > td {
    padding-inline: 0;
  }
  html.sd table.stack-table > tbody > tr:not(.letter-row):not(.pay-head):not(.month-head):not([data-filter-follow]):not(.cf-none) > * + * {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  /* the first cell (the name, the date) is the heading of the card: no label, bold, from the left */
  html.sd table.stack-table > tbody > tr:not(.letter-row):not(.pay-head):not(.month-head):not([data-filter-follow]):not(.cf-none):not(.card-has-check) > :first-child {
    justify-content: flex-start;
    text-align: left;
    font-weight: 700;
    padding-bottom: 6px;
    border-bottom: 0;
    background: transparent;
  }
  html.sd table.stack-table > tbody > tr:not(.letter-row):not(.pay-head):not(.month-head):not([data-filter-follow]):not(.cf-none):not(.card-has-check) > :first-child::before {
    content: none;
  }
  /* a card with a tick box: the box, the name and the buttons are its heading on ONE line, without lines between them; the first line
     of the values under it runs through the whole width of the card (the owner, 3. 12. 2026: „čáry nejsou dotažené“) */
  html.sd table.stack-table > tbody > tr.card-has-check:not(.letter-row):not(.pay-head):not(.month-head):not([data-filter-follow]):not(.cf-none) > :is(td.card-check, td.card-check + *, td.doc-actions-cell) {
    border-top: 0;
    border-bottom: 0;
  }
}

/* every cell in the vertical middle of its row (the owner, 26. 11. 2026; ui-check VAROVANI-STRED on Náklady and Mzdy): a chip in a cell does
   not stretch the line below its text (as CRM tables.css), and a cell with only a file is its picture and name, without the space of a line */
html.sd td .badge {
  vertical-align: middle;
}
html.sd table.stm td > a:only-child:has(> .file-name:only-child) {
  display: flex;
}

/* the payments from the bank (Faktury › Platby z banky): the form to pair and the form „není k faktuře“ stand under each other with their
   buttons on the same right edge, each form on one line (the owner's audit 30. 11. 2026: the two buttons were off the axis) */
@media (min-width: 641px) {
  html.sd table.pay-table td > form.row {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
}

/* Výpisy: the box of the selection is a narrow column and the file starts right after it in every table of the statements, also for an
   account with PDF only (4 columns, the spare width went to the box column and pushed the files to the middle; the owner, 1. 12. 2026) */
html.sd table.stm-files > thead > tr > th:first-child,
html.sd table.stm-files > tbody > tr:not(.month-head) > td:first-child {
  width: 44px;
}
html.sd table.stm-files > thead > tr > th:last-child,
html.sd table.stm-files > tbody > tr:not(.month-head) > td.act {
  width: 1%;
  white-space: nowrap;
}

/* a column with nothing in any row is not shown, with its head (public/js/emptycols.js; the owner, 1. 12. 2026) */
.col-empty {
  display: none !important;
}
