/* Global reset and base typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg, #000);
  color: var(--text-1, #fff);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.table-container {
  overflow-x: auto;
  max-width: 100%;
  background: var(--table-container-bg, #160303);
  border: 1px solid var(--table-border, #2a1515);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  background: var(--table-surface, #1a0505);
}

thead {
  border-bottom: 2px solid var(--table-border, #2a1515);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--table-heading, #ffffff);
  border-right: 1px solid var(--table-border, #2a1515);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

th input,
th textarea {
  color: var(--table-heading, #ffffff);
}

th input::placeholder,
th textarea::placeholder {
  color: var(--table-heading, #ffffff);
  opacity: 0.5;
}

th:last-child {
  border-right: none;
}

tbody tr {
  border-bottom: 1px solid var(--table-border, #2a1515);
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background-color: var(--table-hover, #2a1010);
}

td {
  padding: 12px 16px;
  color: var(--text-1, #ffffff);
  border-right: 1px solid var(--table-border, #2a1515);
  font-size: 0.875rem;
}

td input,
td textarea,
td select {
  color: var(--text-1, #ffffff);
}

td input::placeholder,
td textarea::placeholder {
  color: var(--text-1, #ffffff);
  opacity: 0.5;
}

td:last-child {
  border-right: none;
}

.table-container input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--table-checkbox-border, #3a2020);
  border-radius: 3px;
  position: relative;
  transition: all 0.2s ease;
}

.table-container input[type="checkbox"]:hover {
  border-color: var(--table-hover-border, #4a2828);
}

.table-container input[type="checkbox"]:checked {
  background: var(--table-checkbox-bg, #2a1515);
  border-color: var(--table-checkbox-border, #3a2020);
}

.table-container input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: var(--table-checkbox-check, #ffffff);
  font-size: 12px;
  top: -1px;
  left: 2px;
}

.table-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.table-actions button {
  background: transparent;
  border: 1px solid var(--table-btn-border, #3a2020);
  color: var(--table-btn-text, #d4a5a5);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
}

.table-actions button:hover {
  background: var(--table-btn-hover-bg, #2a1515);
  border-color: var(--table-hover-border, #4a2828);
  color: var(--table-btn-hover-text, #e0e0e0);
}
