/**
 * Bookkeeping shared UI — light declutter conventions.
 * Keep minimal; page-specific density stays in txn-table.css / templates.
 */

/* Page chrome */
.bk-page-head {
  margin-bottom: 1.25rem;
}
.bk-page-head h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.bk-page-head .bk-sub {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #64748b;
  max-width: 42rem;
}
.bk-page-head .bk-crumb {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
}
.bk-page-head .bk-crumb a {
  color: #2563eb;
  text-decoration: underline;
}
.bk-page-head .bk-crumb .current {
  color: #334155;
  font-weight: 600;
}

/* Cards / panels */
.bk-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.bk-card-pad {
  padding: 1rem 1.25rem;
}

/* Primary / secondary actions */
.bk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.bk-btn-primary {
  background: #0f172a;
  color: #fff;
}
.bk-btn-primary:hover {
  background: #1e293b;
  color: #fff;
}
.bk-btn-accent {
  background: #f97316;
  color: #fff;
}
.bk-btn-accent:hover {
  background: #ea580c;
  color: #fff;
}
.bk-btn-secondary {
  background: #fff;
  color: #334155;
  border-color: #cbd5e1;
}
.bk-btn-secondary:hover {
  background: #f8fafc;
}

/* Collapsible panels (filters, add forms, legends) */
.bk-collapse {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  margin-bottom: 1rem;
}
.bk-collapse > .bk-collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
}
.bk-collapse > .bk-collapse-toggle:hover {
  background: #f8fafc;
}
.bk-collapse > .bk-collapse-toggle .bk-chev {
  width: 0.75rem;
  color: #64748b;
  font-size: 0.65rem;
  flex-shrink: 0;
}
.bk-collapse > .bk-collapse-body {
  padding: 0 1rem 1rem;
}
.bk-collapse > .bk-collapse-body[hidden],
.bk-collapse.is-collapsed > .bk-collapse-body {
  display: none;
}
.bk-collapse .bk-badge-active {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #1d4ed8;
}

/* Dense list tables */
.bk-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}
.bk-table-wrap .bk-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.bk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.bk-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.55rem 0.75rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  white-space: nowrap;
}
.bk-table tbody td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #1e293b;
}
.bk-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}
.bk-table tbody tr:hover td {
  background: #f1f5f9;
}
.bk-table .num,
.bk-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bk-table a {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Quiet legend / meta rows */
.bk-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

/* Nav polish — slightly less shouty than full uppercase tracking */
#nav-menu,
#nav-menu .group > div {
  letter-spacing: 0.02em;
}
#nav-menu a,
#nav-menu button {
  font-size: 0.7rem;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

/* Help panel already collapsed; keep bar compact */
.pg-help-panel {
  margin-bottom: 0.75rem;
}
