/* ── Billing App CSS ── */
:root {
  --bs-primary: #2563eb;
  --sidebar-bg: #1e3a5f;
}

body {
  background: #f8fafc;
  font-size: 14px;
}

/* Navbar */
.navbar-dark.bg-primary { background-color: #1d4ed8 !important; }
.navbar-brand { font-size: 1.1rem; letter-spacing: .5px; }

/* Cards */
.card { border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-header { background: #f1f5f9; border-bottom: 1px solid #e2e8f0; font-weight: 600; }

/* Tables */
.table th { background: #f1f5f9; font-weight: 600; font-size: 13px; }
.table-hover tbody tr:hover { background: #eff6ff; cursor: pointer; }
.table td, .table th { vertical-align: middle; }

/* Status badges */
.badge-draft    { background: #6b7280; }
.badge-sent     { background: #3b82f6; }
.badge-paid     { background: #10b981; }
.badge-signed   { background: #10b981; }
.badge-active   { background: #10b981; }
.badge-closed   { background: #6b7280; }
.badge-cancelled{ background: #ef4444; }

/* Status badge auto-color */
.status-badge { font-size: 11px; padding: 3px 8px; border-radius: 12px; color: #fff; font-weight: 600; }

/* Items table in forms */
.items-table { font-size: 13px; }
.items-table input { font-size: 13px; padding: 4px 6px; }
.items-table .btn-remove-item { padding: 2px 6px; }

/* Document view */
.doc-header { border-left: 4px solid var(--bs-primary); padding-left: 12px; }
.doc-meta { color: #64748b; font-size: 13px; }

/* Log table */
.log-entry { font-size: 12px; border-bottom: 1px solid #f1f5f9; }
.log-action { font-weight: 600; color: #374151; }

/* Mobile */
@media (max-width: 576px) {
  .table-responsive { font-size: 12px; }
  .d-mobile-none { display: none !important; }
  main.container-fluid { padding: 8px; }
}

/* Totals row */
.total-row td { font-weight: 700; background: #f8fafc; }

/* Required asterisk */
label .req { color: #ef4444; margin-left: 2px; }

/* INN search spinner */
.inn-search-btn { cursor: pointer; }

/* Template editor */
.template-editor { font-family: monospace; min-height: 400px; font-size: 13px; }

/* Print */
@media print {
  .navbar, .btn, .no-print { display: none !important; }
  .card { border: none; box-shadow: none; }
}

/* Autocomplete dropdown */
.autocomplete-dropdown li:hover,
.autocomplete-dropdown li.ac-active {
  background: #e8f0fe;
  color: #1a56db;
}
.autocomplete-dropdown li {
  border-bottom: 1px solid #f1f3f5;
}
.autocomplete-dropdown li:last-child {
  border-bottom: none;
}
