/* Shared presentation for list, detail and editable tables. */
.platform table.stockrest-table{
  width:100%;min-width:0;border-collapse:separate;border-spacing:0;table-layout:auto;
  color:var(--ui-text);font-size:13px;line-height:1.45;background:var(--ui-surface);
}
.platform .stockrest-table thead th{
  padding:0;background:var(--ui-surface-alt);border-top:1px solid var(--ui-border);border-bottom:1px solid var(--ui-border);
  color:var(--ui-muted);font-size:12px;font-weight:700;letter-spacing:0;text-align:left;vertical-align:middle;white-space:nowrap;
}
.platform .stockrest-table th .table-sort-button{
  display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;min-height:39px;
  padding:10px 12px;margin:0;border:0;border-radius:0;background:transparent;color:inherit;
  font:inherit;line-height:1.4;white-space:nowrap;text-align:left;cursor:pointer;
}
.platform .stockrest-table th .table-sort-button:hover{background:var(--ui-primary-soft);color:var(--ui-link)}
.platform .stockrest-table th .table-sort-button:focus-visible{outline:2px solid var(--ui-link);outline-offset:-3px;border-radius:4px;background:var(--ui-primary-soft);color:var(--ui-link)}
.platform .stockrest-table th[aria-sort=ascending],.platform .stockrest-table th[aria-sort=descending]{background:var(--ui-primary-soft);color:var(--ui-link);border-bottom-color:var(--ui-focus)}
.platform .stockrest-table .table-sort-indicator{flex:none;min-width:11px;font-size:13px;line-height:1;color:var(--ui-muted);text-align:center}
.platform .stockrest-table th[aria-sort=ascending] .table-sort-indicator,.platform .stockrest-table th[aria-sort=descending] .table-sort-indicator{color:var(--ui-link);font-weight:900}
.platform .stockrest-table tbody td{
  padding:10px 12px;border:0;border-bottom:1px solid var(--ui-border);vertical-align:middle;
  background:transparent;color:var(--ui-text);font-size:13px;line-height:1.5;max-width:30rem;overflow-wrap:break-word;
}
.platform .stockrest-table tbody td strong{overflow-wrap:inherit}
.platform .stockrest-table tbody tr:nth-child(even){background:var(--ui-surface-alt)}
.platform .stockrest-table tbody tr:hover,.platform .stockrest-table tbody tr:focus-within{background:var(--ui-hover)}
.platform .stockrest-table tbody tr:last-child td{border-bottom:0}
.platform .stockrest-table .table-primary{color:var(--ui-text);min-width:130px}
.platform .stockrest-table td.table-primary{border-left:3px solid var(--ui-border);font-weight:600}
.platform .stockrest-table td.table-primary a:not(.button){color:var(--ui-link);font-weight:700;text-decoration:none}
.platform .stockrest-table td.table-primary a:not(.button):hover{text-decoration:underline}
.platform .stockrest-table td.table-primary a:focus-visible{outline:2px solid var(--ui-link);outline-offset:3px;border-radius:2px}
.platform .stockrest-table tbody tr[data-tone=success] td.table-primary{border-left-color:var(--ui-success)}
.platform .stockrest-table tbody tr[data-tone=warning] td.table-primary{border-left-color:var(--ui-warning)}
.platform .stockrest-table tbody tr[data-tone=danger] td.table-primary{border-left-color:var(--ui-danger)}
.platform .stockrest-table tbody tr[data-tone=info] td.table-primary{border-left-color:var(--ui-info)}
.platform .stockrest-table th.table-number,.platform .stockrest-table td.table-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.platform .stockrest-table th.table-number .table-sort-button{justify-content:flex-end;text-align:right}
.platform .stockrest-table th.table-date,.platform .stockrest-table td.table-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.platform .stockrest-table th.table-actions{padding:10px 12px;text-align:right;color:var(--ui-muted);font-weight:600}
.platform .stockrest-table td.table-actions{text-align:right;white-space:nowrap}
.platform .stockrest-table td small{display:block;margin-top:2px;color:var(--ui-muted);font-size:11px;font-weight:400;line-height:1.5}
.platform .stockrest-table .row-actions{display:flex;justify-content:flex-end;align-items:center;gap:5px;flex-wrap:wrap}
.platform .stockrest-table td .button{min-height:34px;padding:7px 9px;font-size:12px;line-height:1.3}
.platform .stockrest-table input,.platform .stockrest-table select{
  max-width:100%;min-height:38px;padding:9px 10px;border:1px solid var(--ui-border);border-radius:5px;
  background:var(--ui-surface);color:var(--ui-text);font:inherit;line-height:1.4;
}
.platform .stockrest-table input[type=number]{width:100px;min-width:75px;text-align:right;font-variant-numeric:tabular-nums}
.platform .stockrest-table select{min-width:140px;max-width:330px}
.platform .stockrest-table input:focus-visible,.platform .stockrest-table select:focus-visible{outline:2px solid var(--ui-focus);outline-offset:1px;border-color:var(--ui-link)}
.platform .stockrest-table input[readonly]{background:var(--ui-surface-alt);border-color:var(--ui-border);color:var(--ui-muted)}
.platform .data-scroll[tabindex]:focus-visible{outline:2px solid var(--ui-link);outline-offset:-2px;border-radius:3px}
.platform .table-editor-component{max-width:100%;margin:0 0 10px}
.platform .table-editor-component .data-scroll{border:1px solid var(--ui-border);border-radius:6px}
.platform .table-editor-component .stockrest-table thead th{border-top:0}
.platform.compact .stockrest-table tbody td,.platform .compact .stockrest-table tbody td{padding-top:6px;padding-bottom:6px}
.platform.compact .stockrest-table th .table-sort-button,.platform .compact .stockrest-table th .table-sort-button{min-height:35px;padding-top:8px;padding-bottom:8px}
.platform.compact .stockrest-table th.table-actions,.platform .compact .stockrest-table th.table-actions{padding-top:8px;padding-bottom:8px}
@media(max-width:860px){
  .platform .stockrest-table th .table-sort-button,.platform.compact .stockrest-table th .table-sort-button,.platform .compact .stockrest-table th .table-sort-button{min-height:40px;padding:10px;gap:7px}
  .platform .stockrest-table tbody td{padding:9px 10px}
  .platform .stockrest-table .table-primary{min-width:140px}
  .platform .stockrest-table td .button{min-height:40px;font-size:12px}
  .platform .stockrest-table input,.platform .stockrest-table select{min-height:40px;font-size:16px}
  .platform .stockrest-table select{max-width:240px}
}
@media print{
  .platform .stockrest-table .table-sort-indicator{display:none}
  .platform .stockrest-table th .table-sort-button{pointer-events:none;color:var(--ui-text);background:transparent;padding:7px 9px;min-height:0}
  .platform .stockrest-table th[aria-sort]{background:var(--ui-surface-alt);color:var(--ui-text)}
  .platform .stockrest-table th.table-actions,.platform .stockrest-table td.table-actions{display:none}
  .platform .stockrest-table tbody td{padding:7px 9px;color:var(--ui-text)}
}
