/* Table presentation overrides */
.report-table-wrap,
.inventory-table-wrap,
.master-list,
.recent-table-wrap {
  border: 1px solid #cfdce3;
  border-radius: 14px;
  background: #fff;
  overflow-x: auto;
}

.report-table,
.master-table,
.inventory-table,
.recent-table,
.material-card table,
.print-table {
  border-collapse: collapse;
  color: #273f4f;
}

.report-table th,
.master-table th,
.inventory-table th,
.recent-table th,
.material-card th,
.print-table th {
  background: #f5f7f9;
  color: #203746;
  border: 1px solid #cfdce3;
  border-bottom: 2px solid #aebfc9;
  font-weight: 850;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.report-table td,
.master-table td,
.inventory-table td,
.recent-table td,
.material-card td,
.print-table td {
  border: 1px solid #dbe5ea;
  color: #294758;
  background: #fff;
}

.report-table tbody tr:nth-child(even) td,
.master-table tbody tr:nth-child(even) td,
.inventory-table tbody tr:nth-child(even) td,
.recent-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.report-table tbody tr:hover td,
.master-table tbody tr:hover td,
.inventory-table tbody tr:hover td,
.recent-table tbody tr:hover td {
  background: #f1f7fa;
}

.report-table .number-col,
.master-table .master-number-col {
  color: #526d7c;
}

.report-table input[type=checkbox],
.master-table input[type=checkbox] {
  accent-color: var(--primary);
}

.table-actions .btn-edit,
.master-item-actions .btn-edit {
  background: #eef7fb;
  color: #075985;
}

.table-actions .btn-delete,
.master-item-actions .btn-delete {
  background: #fee2e2;
  color: #b91c1c;
}

.print-table th {
  border-color: #c1d1da;
}

body.dark-mode .report-table-wrap,
body.dark-mode .inventory-table-wrap,
body.dark-mode .master-list,
body.dark-mode .recent-table-wrap {
  border-color: #31586b;
  background: #0f2333;
}

body.dark-mode .report-table th,
body.dark-mode .master-table th,
body.dark-mode .inventory-table th,
body.dark-mode .recent-table th,
body.dark-mode .material-card th {
  background: #182f40;
  color: #eaf8ff;
  border-color: #31586b;
  border-bottom-color: #5f8497;
}

body.dark-mode .report-table td,
body.dark-mode .master-table td,
body.dark-mode .inventory-table td,
body.dark-mode .recent-table td,
body.dark-mode .material-card td {
  background: #10293a;
  color: #d8edf7;
  border-color: #284d60;
}

body.dark-mode .report-table tbody tr:nth-child(even) td,
body.dark-mode .master-table tbody tr:nth-child(even) td,
body.dark-mode .inventory-table tbody tr:nth-child(even) td,
body.dark-mode .recent-table tbody tr:nth-child(even) td {
  background: #0d2332;
}

body.dark-mode .report-table tbody tr:hover td,
body.dark-mode .master-table tbody tr:hover td,
body.dark-mode .inventory-table tbody tr:hover td,
body.dark-mode .recent-table tbody tr:hover td {
  background: #17384a;
}

/* Final dark table consistency */
body.dark-mode .report-table-wrap,
body.dark-mode .inventory-table-wrap,
body.dark-mode .master-list,
body.dark-mode .recent-table-wrap {
  background: #10283A;
  border-color: #315F74;
}

body.dark-mode .report-table th,
body.dark-mode .master-table th,
body.dark-mode .inventory-table th,
body.dark-mode .recent-table th,
body.dark-mode .material-card th {
  background: #18384D;
  color: #EAF8FF;
  border-color: #315F74;
  border-bottom-color: #5D8EA4;
}

body.dark-mode .report-table td,
body.dark-mode .master-table td,
body.dark-mode .inventory-table td,
body.dark-mode .recent-table td,
body.dark-mode .material-card td {
  background: #10283A;
  color: #D9EEF7;
  border-color: #2A5367;
}

/* Compact table density */
.report-table,
.master-table,
.inventory-table,
.recent-table,
.material-card table {
  font-size: 12.5px;
}

.report-table th,
.master-table th,
.inventory-table th,
.recent-table th,
.material-card th {
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.25;
}

.report-table td,
.master-table td,
.inventory-table td,
.recent-table td,
.material-card td {
  padding: 8px 10px;
  line-height: 1.3;
}

.master-table .master-select-col {
  width: 34px;
  padding-left: 6px;
  padding-right: 6px;
}

.master-table .master-number-col {
  width: 40px;
}

.report-table input[type=checkbox],
.master-table input[type=checkbox],
.inventory-table input[type=checkbox] {
  width: 15px;
  height: 15px;
}

.table-actions button,
.master-item-actions button {
  padding: 5px 8px;
  min-height: 28px;
  border-radius: 7px;
  font-size: 11.5px;
}

.master-item-actions button:disabled,
.table-actions button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.type-pill,
.status-pill,
.inventory-status {
  padding: 4px 8px;
  font-size: 10.5px;
}

.master-bulk-bar {
  margin: 6px 0 8px;
  font-size: 11.5px;
}

.master-bulk-delete {
  height: 30px;
  padding: 0 10px;
}

@media (max-width: 760px) {
  .report-table,
  .master-table,
  .inventory-table,
  .recent-table,
  .material-card table {
    font-size: 12px;
  }

  .report-table th,
  .master-table th,
  .inventory-table th,
  .recent-table th,
  .material-card th,
  .report-table td,
  .master-table td,
  .inventory-table td,
  .recent-table td,
  .material-card td {
    padding: 7px 8px;
  }
}

body.dark-mode .report-table tbody tr:nth-child(even) td,
body.dark-mode .master-table tbody tr:nth-child(even) td,
body.dark-mode .inventory-table tbody tr:nth-child(even) td,
body.dark-mode .recent-table tbody tr:nth-child(even) td {
  background: #0D2333;
}

body.dark-mode .report-table tbody tr:hover td,
body.dark-mode .master-table tbody tr:hover td,
body.dark-mode .inventory-table tbody tr:hover td,
body.dark-mode .recent-table tbody tr:hover td {
  background: #17384D;
}

/* Design.md table layer */
.report-table-wrap,
.inventory-table-wrap,
.master-list,
.recent-table-wrap {
  border-color: #CFE4EC;
  background: #fff;
}

.report-table th,
.master-table th,
.inventory-table th,
.recent-table th,
.material-card th,
.print-table th {
  background: #F5F7F9;
  color: #203746;
  border-color: #CFE4EC;
  border-bottom-color: #AEBFC9;
}

.report-table td,
.master-table td,
.inventory-table td,
.recent-table td,
.material-card td,
.print-table td {
  color: #294758;
  border-color: #DBE5EA;
}

body.dark-mode .report-table-wrap,
body.dark-mode .inventory-table-wrap,
body.dark-mode .master-list,
body.dark-mode .recent-table-wrap {
  background: #10283A;
  border-color: #315F74;
}

body.dark-mode .report-table th,
body.dark-mode .master-table th,
body.dark-mode .inventory-table th,
body.dark-mode .recent-table th,
body.dark-mode .material-card th {
  background: #18384D;
  color: #EAF8FF;
  border-color: #315F74;
  border-bottom-color: #5D8EA4;
}

body.dark-mode .report-table td,
body.dark-mode .master-table td,
body.dark-mode .inventory-table td,
body.dark-mode .recent-table td,
body.dark-mode .material-card td {
  background: #10283A;
  color: #D9EEF7;
  border-color: #2A5367;
}
