/* Components for integrated ERP pages; original screens retain their layout. */
.erp-ui { max-width: 1480px; margin: 0 auto; min-width: 0; }
.erp-ui h1,.erp-ui h2,.erp-ui h3 { overflow-wrap: anywhere; }
.erp-ui .page-header { margin-bottom: 1.5rem; }
.erp-ui .card { border: 1px solid var(--theme-border-light); background: var(--theme-surface); color: var(--theme-text); }
.erp-ui .card-header { background: var(--theme-surface-alt); color: var(--theme-text); border-bottom-color: var(--theme-border-light); padding: 1rem 1.25rem; }
.erp-ui .card-body { padding: 1.25rem; }
.erp-ui .form-label { display: block; font-weight: 600; margin-bottom: .4rem; }
.erp-ui .form-text,.erp-ui .text-muted { color: var(--theme-text-muted) !important; }
.erp-ui .form-control,.erp-ui .form-select { background-color: var(--theme-input-bg); color: var(--theme-input-text); border-color: var(--theme-input-border); }
.erp-ui .table { --bs-table-bg: var(--theme-surface); --bs-table-color: var(--theme-text); --bs-table-border-color: var(--theme-border-light); --bs-table-striped-bg: var(--theme-surface-alt); --bs-table-striped-color: var(--theme-text); }
.erp-ui .table th { font-size: .85rem; color: var(--theme-text-muted); }
.erp-ui .table td,.erp-ui .table th { padding: .8rem; vertical-align: top; }
.erp-ui .table-responsive { max-width: 100%; }
.erp-ui details { border: 1px solid var(--theme-border-light); border-radius: .5rem; background: var(--theme-surface); }
.erp-ui summary { cursor: pointer; padding: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.erp-ui details[open] > summary { border-bottom: 1px solid var(--theme-border-light); }
.erp-ui .product-line,.erp-ui .evidence-note { background: var(--theme-surface-alt) !important; color: var(--theme-text); }
.erp-ui .status-pass { background: #146c43; color: white; }
.erp-ui .status-fail { background: #b02a37; color: white; }
.erp-ui .status-hold { background: #ffc107; color: #212529; }
.erp-ui .status-neutral { background: #536878; color: white; }
.erp-ui .metric { font-size: 2rem; font-weight: 700; }
.erp-ui .nav-pills .nav-link { color: var(--theme-text); }
.erp-ui .nav-pills .nav-link.active { color: white; background: var(--erp-primary,#008b6a); }
.erp-ui .evidence-value { overflow-wrap: anywhere; }
.erp-ui .btn { white-space: normal; }
.erp-ui .platform-password { font-family: inherit; }
@media(max-width:767px) { .erp-ui .card-body { padding: 1rem; } .erp-ui .page-actions { width: 100%; } .erp-ui .page-actions .btn { flex: 1; } .erp-ui .metric { font-size: 1.5rem; } }

/* Shared visual language for ERP overview metrics and finance reporting.
   Scoped to these screens: no global manufacturing form/calendar changes. */
.erp-refined-dashboard .card,
.erp-refined-finance .card {
  border: 1px solid var(--theme-border-light) !important;
  border-top: 1px solid var(--theme-border-light) !important;
  border-radius: 14px !important;
  overflow: hidden;
  background: var(--theme-surface);
  box-shadow: 0 4px 16px rgba(17, 24, 39, .07) !important;
  transition: box-shadow .18s ease, transform .18s ease;
}
.erp-refined-dashboard .card:hover,
.erp-refined-finance .card:hover {
  box-shadow: 0 8px 24px rgba(17, 24, 39, .11) !important;
}
.erp-refined-dashboard .card-header,
.erp-refined-finance .card-header {
  border-radius: 0 !important;
  padding: 1rem 1.2rem;
}
.erp-refined-dashboard .card-body,
.erp-refined-finance .card-body {
  padding: 1.25rem 1.35rem;
}
.erp-refined-dashboard .row.g-3.mb-4 > [class*="col-"] > a {
  display: block;
  height: 100%;
}
.erp-refined-dashboard .row.g-3.mb-4 > [class*="col-"] > a .card {
  min-height: 12rem;
}
.erp-refined-dashboard .table-responsive,
.erp-refined-finance .table-responsive {
  border-radius: 9px;
}
.erp-refined-finance .table th {
  vertical-align: middle;
}
.erp-refined-finance .badge {
  border-radius: 7px;
  padding: .4em .65em;
}
html[data-theme="dark"] .erp-refined-dashboard .card,
html[data-theme="dark"] .erp-refined-finance .card {
  box-shadow: 0 4px 18px rgba(0,0,0,.25) !important;
}
@media(max-width:767px) {
  .erp-refined-dashboard .row.g-3.mb-4 > [class*="col-"] > a .card { min-height: 0; }
}
