/* Shared dashboard table surface. Keep table header and sticky-column fills consistent across modules. */
:root {
  --dashboard-table-head-bg: linear-gradient(180deg, #0d1d33, #081424);
  --dashboard-table-head-text: #9eb7d6;
  --dashboard-table-head-border: rgba(52, 82, 119, 0.55);
  --dashboard-table-sticky-cell-bg: #0b1724;
  --dashboard-table-sticky-cell-bg-alt: #0a192b;
  --dashboard-table-sticky-cell-bg-hover: #122a48;
  --dashboard-table-sticky-shadow-left: 1px 0 0 rgba(52, 82, 119, 0.42);
  --dashboard-table-sticky-shadow-right: -1px 0 0 rgba(52, 82, 119, 0.42);
}

body.theme-glass-light {
  --dashboard-table-head-bg: linear-gradient(180deg, #ebf4ff, #e0eeff);
  --dashboard-table-head-text: #607696;
  --dashboard-table-head-border: rgba(159, 184, 215, 0.78);
  --dashboard-table-sticky-cell-bg: #f8fbff;
  --dashboard-table-sticky-cell-bg-alt: #ffffff;
  --dashboard-table-sticky-cell-bg-hover: #e8f2ff;
  --dashboard-table-sticky-shadow-left: 1px 0 0 rgba(182, 204, 232, 0.82);
  --dashboard-table-sticky-shadow-right: -1px 0 0 rgba(182, 204, 232, 0.82);
}

#pageRoot[data-page] .table-shell table thead th,
#pageRoot[data-page] .table-shell .wide-table thead th,
#pageRoot[data-page] .table-shell table thead th:nth-child(-n + 4),
#pageRoot[data-page] .table-shell .wide-table thead th:nth-child(-n + 4),
#pageRoot[data-page] .table-shell table thead th:last-child,
#pageRoot[data-page] .table-shell .wide-table thead th:last-child {
  color: var(--dashboard-table-head-text);
  border-bottom-color: var(--dashboard-table-head-border);
  background: var(--dashboard-table-head-bg);
}

body.theme-glass-light #pageRoot[data-page] .table-shell table thead th,
body.theme-glass-light #pageRoot[data-page] .table-shell .wide-table thead th,
body.theme-glass-light #pageRoot[data-page] .table-shell table thead th:nth-child(-n + 4),
body.theme-glass-light #pageRoot[data-page] .table-shell .wide-table thead th:nth-child(-n + 4),
body.theme-glass-light #pageRoot[data-page] .table-shell table thead th:last-child,
body.theme-glass-light #pageRoot[data-page] .table-shell .wide-table thead th:last-child {
  color: var(--dashboard-table-head-text);
  border-bottom-color: var(--dashboard-table-head-border);
  background: var(--dashboard-table-head-bg);
}

#pageRoot[data-page] .wide-table td:nth-child(1),
#pageRoot[data-page] .wide-table td:nth-child(2),
#pageRoot[data-page] .wide-table td:nth-child(3),
#pageRoot[data-page] .wide-table td:nth-child(4) {
  background: var(--dashboard-table-sticky-cell-bg);
  box-shadow: var(--dashboard-table-sticky-shadow-left);
}

body.theme-glass-light #pageRoot[data-page] .wide-table td:nth-child(1),
body.theme-glass-light #pageRoot[data-page] .wide-table td:nth-child(2),
body.theme-glass-light #pageRoot[data-page] .wide-table td:nth-child(3),
body.theme-glass-light #pageRoot[data-page] .wide-table td:nth-child(4) {
  background: var(--dashboard-table-sticky-cell-bg);
  box-shadow: var(--dashboard-table-sticky-shadow-left);
}

#pageRoot[data-page] .wide-table td:last-child {
  background: var(--dashboard-table-sticky-cell-bg);
  box-shadow: var(--dashboard-table-sticky-shadow-right);
}

body.theme-glass-light #pageRoot[data-page] .wide-table td:last-child {
  background: var(--dashboard-table-sticky-cell-bg);
  box-shadow: var(--dashboard-table-sticky-shadow-right);
}

#pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(1),
#pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(2),
#pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(3),
#pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(4),
#pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:last-child {
  background: var(--dashboard-table-sticky-cell-bg-alt);
}

body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(1),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(2),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(3),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:nth-child(4),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:nth-child(even) td:last-child {
  background: var(--dashboard-table-sticky-cell-bg-alt);
}

#pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(1),
#pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(2),
#pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(3),
#pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(4),
#pageRoot[data-page] .wide-table tbody tr:hover td:last-child {
  background: var(--dashboard-table-sticky-cell-bg-hover);
}

body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(1),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(2),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(3),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:hover td:nth-child(4),
body.theme-glass-light #pageRoot[data-page] .wide-table tbody tr:hover td:last-child {
  background: var(--dashboard-table-sticky-cell-bg-hover);
}

#pageRoot[data-page] .wide-table thead th:nth-child(1),
#pageRoot[data-page] .wide-table thead th:nth-child(2),
#pageRoot[data-page] .wide-table thead th:nth-child(3),
#pageRoot[data-page] .wide-table thead th:nth-child(4) {
  box-shadow: var(--dashboard-table-sticky-shadow-left);
}

#pageRoot[data-page] .wide-table thead th:last-child {
  box-shadow: var(--dashboard-table-sticky-shadow-right);
}

#pageRoot[data-page="orders"] .order-query-table thead th:nth-child(1),
#pageRoot[data-page="orders"] .order-query-table thead th:nth-child(2),
#pageRoot[data-page="orders"] .order-query-table thead th:nth-child(3),
#pageRoot[data-page="orders"] .order-query-table thead th:nth-child(4),
#pageRoot[data-page="orders"] .order-query-table td:nth-child(1),
#pageRoot[data-page="orders"] .order-query-table td:nth-child(2),
#pageRoot[data-page="orders"] .order-query-table td:nth-child(3),
#pageRoot[data-page="orders"] .order-query-table td:nth-child(4) {
  box-shadow: none;
}

#pageRoot[data-page="decision"] .proposal-table thead th:nth-child(5),
#pageRoot[data-page="decision"] .proposal-table td:nth-child(5) {
  background: var(--dashboard-table-sticky-cell-bg);
  box-shadow: var(--dashboard-table-sticky-shadow-left);
}

#pageRoot[data-page="decision"] .proposal-table tbody tr:nth-child(even) td:nth-child(5) {
  background: var(--dashboard-table-sticky-cell-bg-alt);
}

#pageRoot[data-page="decision"] .proposal-table tbody tr:hover td:nth-child(-n + 5),
#pageRoot[data-page="decision"] .proposal-table tbody tr.is-selected td:nth-child(-n + 5),
#pageRoot[data-page="decision"] .proposal-table tbody tr.is-selected td {
  background: var(--dashboard-table-sticky-cell-bg-hover);
}

#pageRoot[data-page="decision"] .proposal-group-row td,
#pageRoot[data-page="decision"] .proposal-group-row:hover td {
  box-shadow: none;
}
