/* =========================================================================
 * T-Cashflow V3.75 — Commission Tab CSS
 * ========================================================================= */

.tcc-wrap { padding: 12px 0; }

/* ---------- Period picker ---------- */
.tcc-picker {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tcc-picker label {
  font-size: 13px;
  color: #5F5E5A;
  font-weight: 500;
}
.tcc-select {
  padding: 5px 10px;
  border: 1px solid #d0d7de;
  border-radius: 5px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.tcc-select:focus { border-color: #185FA5; }
.tcc-period-label {
  margin-left: auto;
  background: #E6F1FB;
  color: #0C447C;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ---------- Card ---------- */
.tcc-card {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}
.tcc-card-title {
  background: #F3F8FD;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #0C447C;
  border-bottom: 1px solid #d9e6f2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tcc-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 400;
}
.tcc-tag.draft     { background: #fef3d4; color: #854F0B; }
.tcc-tag.finalized { background: #d4f4e8; color: #0F6E56; }

/* ---------- Empty ---------- */
.tcc-empty {
  text-align: center;
  padding: 40px 20px;
  color: #5F5E5A;
}
.tcc-empty-sm {
  text-align: center;
  padding: 20px;
  color: #888;
  font-size: 13px;
}

/* ---------- Actions row ---------- */
.tcc-actions {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}
.tcc-mode-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tcc-mode-label {
  font-size: 12px;
  color: #5F5E5A;
  font-weight: 500;
}
.tcc-mode-btn {
  padding: 5px 12px;
  border: 1px solid #d0d7de;
  background: white;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  color: #5F5E5A;
  transition: all 0.15s;
  font-family: inherit;
}
.tcc-mode-btn:hover:not(:disabled) { background: #f3f4f6; }
.tcc-mode-btn.active {
  background: #185FA5;
  color: white;
  border-color: #185FA5;
  font-weight: 500;
}
.tcc-mode-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.tcc-act-right {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.tcc-btn, .tcc-btn-primary {
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #d0d7de;
  background: white;
  color: #2d2c2a;
  font-family: inherit;
}
.tcc-btn:hover { background: #f3f4f6; }
.tcc-btn-primary {
  background: #185FA5;
  color: white;
  border-color: #185FA5;
  font-weight: 500;
}
.tcc-btn-primary:hover { background: #0C447C; }

/* ---------- Summary ---------- */
.tcc-sum {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 14px;
  background: #fafbfc;
  border-bottom: 1px solid #f0f0f0;
}
.tcc-sum-item {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 5px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}
.tcc-sum-item .lbl {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
}
.tcc-sum-item .val {
  font-size: 18px;
  font-weight: 600;
  color: #2d2c2a;
}
.tcc-sum-item.highlight {
  background: #E6F1FB;
  border-color: #b5d4f4;
}
.tcc-sum-item.highlight .val { color: #185FA5; }
.tcc-sum-item.highlight .lbl { color: #0C447C; }

/* ---------- Tables ---------- */
.tcc-table-wrap {
  overflow-x: auto;
}
.tcc-table-sm, .tcc-dist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.tcc-table-sm thead, .tcc-dist-table thead {
  background: #fafbfc;
}
.tcc-table-sm th, .tcc-dist-table th {
  padding: 8px 10px;
  text-align: left;
  font-weight: 500;
  color: #5F5E5A;
  border-bottom: 1px solid #e8e8e8;
  white-space: nowrap;
}
.tcc-table-sm td, .tcc-dist-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.tcc-table-sm .num, .tcc-dist-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tcc-com { color: #185FA5; }
.tcc-sub { font-size: 11px; color: #888; margin-top: 2px; }

.tcc-dist-table tfoot td {
  background: #F3F8FD;
  border-top: 2px solid #185FA5;
  border-bottom: none;
  padding: 10px;
}

.tcc-pct-input {
  width: 80px;
  padding: 4px 8px;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  font-size: 12px;
  text-align: right;
  outline: none;
  font-family: inherit;
}
.tcc-pct-input:focus { border-color: #185FA5; }

/* ---------- Add employee ---------- */
.tcc-add-emp {
  padding: 14px;
  background: #fafbfc;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tcc-add-emp label {
  font-size: 12px;
  font-weight: 500;
  color: #5F5E5A;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .tcc-sum { grid-template-columns: repeat(2, 1fr); }
  .tcc-actions { flex-direction: column; align-items: stretch; }
  .tcc-act-right { margin-left: 0; }
}
