/* ==========================================
   LINE LIST IN A MODAL (shared)
   List of lines + total + "add" button + add form, rendered inside the premium
   modal: Koszty tile details (shared/js/cost-details.js) and Obrót manual service
   entries (obrot/js/views/day/serwisEntries.js). Koszty-only variants (KSeF, bank,
   recurring badges) stay in costs/css/style.css.
   ========================================== */
.subcategories-modal-content { padding: 4px 0; }

.subcategories-list { display: flex; flex-direction: column; gap: 8px; }

.subcategory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border, rgba(255,255,255,0.06));
  border-radius: 0;
  gap: 12px;
}
.subcategory-item-title  { flex: 1; font-size: 0.875rem; color: var(--text-primary, #e5e7eb); }
.subcategory-item-amount { font-weight: 700; color: #60a5fa; font-variant-numeric: tabular-nums; }

.subcategory-item-actions button {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 0;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 150ms;
}
.subcategory-item-actions button:hover { background: rgba(239,68,68,0.2); }

.subcategory-empty-state {
  padding: 24px;
  text-align: center;
  color: var(--text-muted, #6b7280);
  font-size: 0.875rem;
  line-height: 1.6;
}

.subcategory-total {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.875rem;
  color: var(--text-secondary, #9ca3af);
  text-align: right;
}
.subcategory-total strong { color: #60a5fa; font-variant-numeric: tabular-nums; }

.add-subcategory-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 16px;
  background: rgba(59,130,246,0.1);
  color: #60a5fa;
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}
.add-subcategory-btn:hover { background: rgba(59,130,246,0.18); }

.subcategory-form { display: flex; flex-direction: column; gap: 14px; }
.subcategory-form-group { display: flex; flex-direction: column; gap: 6px; }
.subcategory-form-group label { font-size: 0.8rem; color: var(--text-secondary, #9ca3af); font-weight: 500; }
.subcategory-form-group input {
  padding: 9px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0;
  color: var(--text-primary, #e5e7eb);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 150ms, background 150ms;
}
.subcategory-form-group input:focus {
  border-color: rgba(59,130,246,0.5);
  background: rgba(59,130,246,0.04);
}

/* Netto/Brutto radio group inside the "Dodaj pozycje kosztu" modal.
   2026-05-13 — operator can now declare whether the entered amount
   is the net or gross value; VAT-zero categories (ZUS / wypłaty)
   lock this to "netto" and replace the radio with an info hint. */
.subcategory-amount-type {
  display: flex;
  gap: 8px;
}

.subcategory-amount-type__option {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary, #9ca3af);
  transition: background 150ms, border-color 150ms, color 150ms;
}

.subcategory-amount-type__option:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary, #e5e7eb);
}

.subcategory-amount-type__option input[type="radio"] {
  margin: 0;
  accent-color: #3b82f6;
}

.subcategory-amount-type__option:has(input:checked) {
  background: rgba(59,130,246,0.14);
  border-color: rgba(59,130,246,0.45);
  color: #93c5fd;
}

.subcategory-form-subhint {
  font-size: 0.72rem;
  color: var(--text-muted, #6b7280);
  line-height: 1.4;
  margin-top: 2px;
}

.subcategory-form-hint {
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.5;
  border-radius: 6px;
  color: var(--text-secondary, #9ca3af);
}

.subcategory-form-hint--info {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
}

.subcategory-form-hint strong {
  color: #bfdbfe;
}

/* Small pill next to the amount on the list ("Dodaj koszt") — tells
   the operator how the value was entered. */
.subcategory-item-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  vertical-align: middle;
  font-variant-numeric: normal;
}

.subcategory-item-badge--brutto {
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.subcategory-item-badge--netto {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.32);
}
