/* ---- Recharge View ---- */

.rech-summary {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  margin-bottom: 16px;
}

.rech-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rech-stat__label {
  font-size: 0.75rem;
  color: var(--muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rech-stat__val {
  font-size: 1.1rem;
  font-weight: 500;
}

.rech-stat__val.strong {
  font-weight: 700;
}

/* Select-all toggle */
.rech-select-all {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--bg-secondary, #f5f5f5);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.rech-select-all input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Cost center group */
.rech-group {
  margin-bottom: 20px;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  overflow: hidden;
}

.rech-group__header {
  background: var(--bg-secondary, #f5f5f5);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.rech-group__title {
  font-weight: 600;
  font-size: 0.95rem;
}

.rech-group__bp {
  font-size: 0.85rem;
  color: var(--muted, #888);
}

.rech-group__totals {
  margin-left: auto;
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}

.rech-warn {
  color: var(--c-warn, #b5880a);
  font-style: italic;
}

/* Group checkbox */
.rech-group__check {
  display: flex;
  align-items: center;
}

.rech-group__check input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.rech-group__check input:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* Journal lines table */
.rech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.rech-table th,
.rech-table td {
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #e8e8e8);
}

.rech-table th {
  background: var(--bg-secondary, #fafafa);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

.rech-table td.right,
.rech-table th.right {
  text-align: right;
}

.rech-table td.nowrap {
  white-space: nowrap;
}

.rech-table td.truncate {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rech-table tbody tr:hover {
  background: var(--row-hover, #f0f4ff);
}

/* Modal invoice table */
.rech-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.rech-modal-table th,
.rech-modal-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.rech-modal-table th {
  background: var(--bg-secondary, #fafafa);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rech-modal-table td.right,
.rech-modal-table th.right {
  text-align: right;
}

.rech-modal-table tfoot td {
  border-top: 2px solid var(--border-color, #ccc);
  font-weight: 600;
}

.rech-modal-table input[type="number"] {
  padding: 4px 6px;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 4px;
  text-align: right;
}

/* Empty cost centers */
.rech-empty-cc {
  margin-top: 12px;
  font-size: 0.85rem;
}

.rech-empty-cc summary {
  cursor: pointer;
}

.rech-empty-cc ul {
  margin: 6px 0 0 20px;
  padding: 0;
}

.rech-empty-cc li {
  margin-bottom: 2px;
}
