/* tcg-erp.css
   ERP-style (rational / enterprise) overrides.
   Keep this file LAST in <head> so it wins over existing styles.
*/

:root{
  /* Neutral, enterprise palette */
  --tcg-bg:#f5f6f8;
  --tcg-card:#ffffff;
  --tcg-border:rgba(17,24,39,.14);
  --tcg-text:#111827;
  --tcg-muted:#6b7280;

  /* ERP blue */
  --tcg-primary:#1f4e79;
  --tcg-primary-2:#2563eb;

  --tcg-danger:#b91c1c;
  --tcg-success:#15803d;

  /* Less “rounded”, more enterprise */
  --tcg-radius:10px;
}

/* Typography */
body{
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: .1px;
}

/* Remove “glass / blur” feel */
.side{
  background: #fff !important;
  backdrop-filter: none !important;
}

/* Reduce heavy shadows */
.topbar,
.table-wrap,
.panel.cardlike{
  box-shadow: 0 2px 10px rgba(17,24,39,.06) !important;
}

/* Topbar accent: solid (less gradient) */
.topbar-accent{
  background: var(--tcg-primary) !important;
  height: 2px !important;
}

/* Titles */
.page-title, .title{
  font-weight: 800 !important;
  letter-spacing: .1px !important;
}
.page-meta, .meta .hint{
  color: var(--tcg-muted) !important;
}

/* Sidebar nav: keep CN + EN on one line, consistent spacing */
.navbtn{
  border-radius: 10px !important;
  padding: 9px 12px !important;
}
.navbtn .nav-label{ font-weight: 700 !important; white-space: nowrap; }
.navbtn .nav-sublabel, .navbtn .hint{ white-space: nowrap; }

/* Active state: subtle */
.navbtn.active{
  background: rgba(31,78,121,.08) !important;
  border-color: rgba(31,78,121,.22) !important;
}
.navbtn.active::before{
  background: var(--tcg-primary) !important;
}

/* Buttons: flatter, enterprise */
.btn-soft,
.btn-outline-primary,
.btn-outline-secondary{
  border-radius: 10px !important;
  box-shadow: none !important;
}
.btn-primary-strong{
  background: var(--tcg-primary) !important;
  border: 1px solid rgba(17,24,39,.10) !important;
  box-shadow: none !important;
}
.btn-danger-strong{
  background: var(--tcg-danger) !important;
  box-shadow: none !important;
}

/* “Pill” counters: less playful */
.pill-count{
  border-radius: 10px !important;
  background: rgba(31,78,121,.06) !important;
  border-color: rgba(31,78,121,.20) !important;
  font-weight: 800 !important;
}
.pill-count .n{
  background: rgba(31,78,121,.16) !important;
  border-color: rgba(31,78,121,.22) !important;
  color: var(--tcg-text) !important;
}

/* Inputs */
.form-control,
.form-select,
.tcg-input,
.tcg-select{
  border-radius: 8px !important;
  border-color: rgba(17,24,39,.18) !important;
  box-shadow: none !important;
}
.form-control:focus,
.form-select:focus{
  border-color: rgba(37,99,235,.55) !important;
  box-shadow: 0 0 0 .15rem rgba(37,99,235,.12) !important;
}

/* Tables: ERP look */
.stock-table{
  font-size: 12.5px !important;
}
.stock-table thead th{
  background: #f3f4f6 !important;
  color: #374151 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(17,24,39,.12) !important;
}
.stock-table tbody td{
  border-color: rgba(17,24,39,.10) !important;
  vertical-align: middle !important;
}
.stock-table tbody tr:nth-child(even){
  background: rgba(17,24,39,.02);
}
.stock-table tbody tr:hover{
  background: rgba(37,99,235,.06) !important;
}

/* Panels: less gradient */
.panel-head{
  background: #f8fafc !important;
}

/* Small text helpers */
.tiny{ font-size: 11px !important; }
.muted, .muted2, .text-muted{ color: var(--tcg-muted) !important; }

/* Mobile */
@media (max-width: 768px){
  .side{ border-right: 0 !important; border-bottom: 1px solid var(--tcg-border) !important; }
}
