/* ==========================================================================
   Balu Cars ERP — Premium Enterprise Automotive Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Enterprise Color Palette */
  --erp-primary: #2563EB;
  --erp-primary-hover: #1D4ED8;
  --erp-primary-light: #EFF6FF;
  --erp-primary-border: #BFDBFE;

  --erp-sidebar-bg: #0B1220;
  --erp-sidebar-hover: rgba(255, 255, 255, 0.06);
  --erp-sidebar-active: #2563EB;
  --erp-sidebar-text: #94A3B8;
  --erp-sidebar-text-active: #FFFFFF;
  --erp-sidebar-border: rgba(255, 255, 255, 0.08);

  --erp-bg-workspace: #F5F7FA;
  --erp-bg-surface: #FFFFFF;
  --erp-bg-subtle: #F8FAFC;
  --erp-bg-muted: #F1F5F9;

  --erp-text-main: #111827;
  --erp-text-muted: #64748B;
  --erp-text-light: #94A3B8;

  --erp-border: #E5E7EB;
  --erp-border-focus: #2563EB;

  --erp-success: #16A34A;
  --erp-success-bg: #DCFCE7;
  --erp-success-border: #BBF7D0;

  --erp-warning: #D97706;
  --erp-warning-bg: #FEF3C7;
  --erp-warning-border: #FDE68A;

  --erp-danger: #DC2626;
  --erp-danger-bg: #FEE2E2;
  --erp-danger-border: #FECACA;

  /* Layout Constants */
  --erp-sidebar-width: 250px;
  --erp-sidebar-collapsed-width: 72px;
  --erp-header-height: 64px;

  --erp-radius-sm: 6px;
  --erp-radius-md: 8px;
  --erp-radius-lg: 12px;

  --erp-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --erp-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --erp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --erp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--erp-bg-workspace);
  color: var(--erp-text-main);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--erp-primary);
  text-decoration: none;
}
a:hover {
  color: var(--erp-primary-hover);
}

/* Tabular figures for monetary values */
.num, .amt-hint, .value, .table-num td.num, .table-num th.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Master Layout Framework
   ========================================================================== */
.erp-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

/* Left Sidebar */
.erp-sidebar {
  width: var(--erp-sidebar-width);
  background-color: var(--erp-sidebar-bg);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  border-right: 1px solid var(--erp-sidebar-border);
}

.erp-sidebar-header {
  height: var(--erp-header-height);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--erp-sidebar-border);
  flex-shrink: 0;
}

.erp-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.erp-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--erp-radius-md);
  background: var(--erp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.erp-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.erp-brand-text .title {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
}

.erp-brand-text .tag {
  color: #60A5FA;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.erp-sidebar-nav {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Custom Scrollbar for Sidebar */
.erp-sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.erp-sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.nav-group-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748B;
  padding: 0 0.65rem 0.4rem 0.65rem;
  white-space: nowrap;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-item {
  width: 100%;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--erp-radius-md);
  color: var(--erp-sidebar-text);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  position: relative;
}

.nav-link-item i {
  font-size: 1.15rem;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link-item:hover {
  color: #FFFFFF;
  background-color: var(--erp-sidebar-hover);
}

.nav-link-item.active {
  background-color: var(--erp-sidebar-active);
  color: var(--erp-sidebar-text-active);
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.nav-link-item.active i {
  color: #FFFFFF;
}

/* Sidebar Footer / User section */
.erp-sidebar-footer {
  border-top: 1px solid var(--erp-sidebar-border);
  padding: 0.85rem 0.75rem;
  flex-shrink: 0;
}

/* Collapsed Sidebar Mode */
body.sidebar-collapsed .erp-sidebar {
  width: var(--erp-sidebar-collapsed-width);
}

body.sidebar-collapsed .erp-brand-text,
body.sidebar-collapsed .nav-group-label,
body.sidebar-collapsed .nav-link-item span {
  display: none !important;
}

body.sidebar-collapsed .nav-link-item {
  justify-content: center;
  padding: 0.65rem 0;
}

body.sidebar-collapsed .nav-link-item i {
  font-size: 1.25rem;
}

body.sidebar-collapsed .erp-main-container {
  margin-left: var(--erp-sidebar-collapsed-width);
}

/* Main Container */
.erp-main-container {
  flex-grow: 1;
  margin-left: var(--erp-sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Header */
.erp-topbar {
  height: var(--erp-header-height);
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--erp-border);
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--erp-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.sidebar-toggle-btn:hover {
  background-color: var(--erp-bg-subtle);
  color: var(--erp-text-main);
  border-color: #CBD5E1;
}

/* Breadcrumb */
.erp-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--erp-text-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}
.erp-breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.erp-breadcrumbs li:not(:last-child)::after {
  content: "/";
  color: var(--erp-text-light);
  font-size: 0.8rem;
}
.erp-breadcrumbs li:last-child {
  color: var(--erp-text-main);
  font-weight: 600;
}

/* Topbar Center (Search) */
.topbar-center {
  flex-grow: 1;
  max-width: 420px;
  margin: 0 1.5rem;
}

.topbar-search {
  position: relative;
  width: 100%;
}
.topbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--erp-text-light);
  font-size: 0.95rem;
  pointer-events: none;
}
.topbar-search input {
  width: 100%;
  height: 38px;
  padding: 0 0.85rem 0 2.25rem;
  background-color: var(--erp-bg-workspace);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-md);
  font-size: 0.86rem;
  color: var(--erp-text-main);
  transition: all 0.15s ease;
}
.topbar-search input:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Topbar Right */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--erp-radius-sm);
  border: 1px solid var(--erp-border);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--erp-text-muted);
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
  text-decoration: none;
}
.topbar-action-btn:hover {
  background-color: var(--erp-bg-subtle);
  color: var(--erp-text-main);
}
.topbar-action-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background-color: var(--erp-primary);
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.6rem;
  border-radius: var(--erp-radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
  border: 1px solid transparent;
}
.topbar-profile:hover {
  background-color: var(--erp-bg-subtle);
  border-color: var(--erp-border);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--erp-radius-sm);
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
}

.profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.profile-info .name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--erp-text-main);
}
.profile-info .role {
  font-size: 0.7rem;
  color: var(--erp-text-muted);
}

/* Main Content Workspace */
.erp-content {
  flex-grow: 1;
  padding: 1.75rem 2rem;
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
}

/* Page Header */
.erp-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.erp-page-header .page-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--erp-text-main);
  letter-spacing: -0.02em;
  margin: 0;
}

.erp-page-header .page-subtitle {
  font-size: 0.85rem;
  color: var(--erp-text-muted);
  margin-top: 0.2rem;
  margin-bottom: 0;
}

/* ==========================================================================
   ERP Card & Container Architecture
   ========================================================================== */
.erp-card {
  background: var(--erp-bg-surface);
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-lg);
  box-shadow: var(--erp-shadow-xs);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.erp-card-header {
  padding: 1rem 1.25rem;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--erp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.erp-card-header .header-title-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.erp-card-header .step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--erp-primary);
  background: var(--erp-primary-light);
  border: 1px solid var(--erp-primary-border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.erp-card-header .header-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--erp-text-main);
  margin: 0;
}

.erp-card-header .header-sub {
  font-size: 0.78rem;
  color: var(--erp-text-muted);
}

.erp-card-body {
  padding: 1.25rem;
}

/* ==========================================================================
   Forms & Inputs (Commercial ERP Density: 42-46px)
   ========================================================================== */
.form-label {
  font-size: 0.81rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.3rem;
  display: block;
}

.form-control, .form-select {
  height: 42px;
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  color: var(--erp-text-main);
  background-color: #FFFFFF;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-sm);
  transition: all 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--erp-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

.form-control-sm, .form-select-sm {
  height: 34px;
  padding: 0.25rem 0.6rem;
  font-size: 0.82rem;
  border-radius: 4px;
}

.amt-hint {
  font-size: 0.78rem;
  color: var(--erp-primary);
  font-weight: 600;
  margin-top: 0.2rem;
  min-height: 1.1rem;
}

/* ==========================================================================
   Payment Source Selectable Cards (Section 02)
   ========================================================================== */
.acct-block {
  background: #FFFFFF;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-md);
  padding: 1rem;
  margin-top: 0.5rem;
}

.acct-source-card {
  border: 1.5px solid var(--erp-border);
  border-radius: var(--erp-radius-md);
  padding: 0.85rem 1rem;
  background-color: #FFFFFF;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  user-select: none;
}

.acct-source-card:hover {
  border-color: #CBD5E1;
  background-color: var(--erp-bg-subtle);
}

.acct-source-card.is-selected {
  border-color: var(--erp-primary);
  background-color: var(--erp-primary-light);
}

.acct-source-card .card-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--erp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: #FFFFFF;
  flex-shrink: 0;
}

.avatar-pp { background: #2563EB; }
.avatar-se { background: #7C3AED; }

.acct-block.is-invalid-block {
  border-color: var(--erp-danger) !important;
  background-color: var(--erp-danger-bg) !important;
}

/* ==========================================================================
   Dynamic Row Items (Investor, Interest, Service, Expense)
   ========================================================================== */
.row-item {
  background: #FFFFFF;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-md);
  padding: 0.85rem 1rem !important;
  margin-bottom: 0.75rem !important;
  box-shadow: var(--erp-shadow-xs);
  transition: border-color 0.15s ease;
}

.row-item:hover {
  border-color: #CBD5E1;
}

/* ==========================================================================
   Sticky Acquisition Summary Panel (Section 11)
   ========================================================================== */
.acquisition-summary-card {
  position: sticky;
  top: calc(var(--erp-header-height) + 1.25rem);
  background: #FFFFFF;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-lg);
  box-shadow: var(--erp-shadow-sm);
  overflow: hidden;
}

.summary-header {
  padding: 1rem 1.25rem;
  background: var(--erp-bg-subtle);
  border-bottom: 1px solid var(--erp-border);
}

.summary-header .title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--erp-text-main);
  margin: 0;
}

.summary-body {
  padding: 1.25rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--erp-border);
  font-size: 0.86rem;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row .label {
  color: var(--erp-text-muted);
}

.summary-row .val {
  font-weight: 600;
  color: var(--erp-text-main);
  font-family: var(--font-sans);
}

.summary-row.total-cost-row {
  padding-top: 0.85rem;
  border-top: 1.5px solid var(--erp-border);
  border-bottom: 1.5px solid var(--erp-border);
  margin: 0.5rem 0;
}

.summary-row.total-cost-row .label {
  font-weight: 700;
  color: var(--erp-text-main);
}
.summary-row.total-cost-row .val {
  font-weight: 800;
  color: var(--erp-primary);
  font-size: 1.1rem;
}

.summary-row.profit-row {
  background-color: var(--erp-bg-subtle);
  padding: 0.65rem 0.85rem;
  border-radius: var(--erp-radius-sm);
  border: none;
  margin-top: 0.5rem;
}

/* ==========================================================================
   KPI Stat Cards (Dashboard)
   ========================================================================== */
.stat-card {
  background: #FFFFFF;
  border: 1px solid var(--erp-border);
  border-radius: var(--erp-radius-lg);
  padding: 1.15rem;
  box-shadow: var(--erp-shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--erp-shadow-md);
  border-color: #CBD5E1;
}

.stat-card .stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.stat-card .stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--erp-text-muted);
}

.stat-card .stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--erp-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-card .value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--erp-text-main);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.stat-card .stat-sub {
  font-size: 0.78rem;
  color: var(--erp-text-muted);
}

/* Icon Tints */
.icon-sapphire { background: #EFF6FF; color: #2563EB; }
.icon-emerald  { background: #DCFCE7; color: #16A34A; }
.icon-amber    { background: #FEF3C7; color: #D97706; }
.icon-indigo   { background: #EEF2FF; color: #4F46E5; }
.icon-violet   { background: #F5F3FF; color: #7C3AED; }
.icon-rose     { background: #FEE2E2; color: #DC2626; }
.icon-teal     { background: #F0FDF4; color: #0D9488; }

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.badge-status-stock {
  background-color: var(--erp-warning-bg);
  color: var(--erp-warning);
  border: 1px solid var(--erp-warning-border);
}

.badge-status-sold {
  background-color: var(--erp-success-bg);
  color: var(--erp-success);
  border: 1px solid var(--erp-success-border);
}

.badge-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.badge-status-stock .badge-status-dot { background-color: #D97706; }
.badge-status-sold .badge-status-dot  { background-color: #16A34A; }

.plate-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: #FFFFFF;
  color: #0F172A;
  border: 1.5px solid #CBD5E1;
  border-radius: 4px;
  padding: 0.12rem 0.45rem;
}
.plate-badge::before {
  content: "IND";
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--erp-primary);
  margin-right: 0.3rem;
  padding-right: 0.25rem;
  border-right: 1px solid #CBD5E1;
}

.profit-pos { color: var(--erp-success) !important; font-weight: 700; }
.profit-neg { color: var(--erp-danger) !important; font-weight: 700; }

.badge-profit-pos {
  background-color: var(--erp-success-bg);
  color: #14532D;
  border: 1px solid var(--erp-success-border);
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.78rem;
}

.badge-profit-neg {
  background-color: var(--erp-danger-bg);
  color: #7F1D1D;
  border: 1px solid var(--erp-danger-border);
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.78rem;
}

/* ==========================================================================
   ERP Tables (Compact, Clean, High Density)
   ========================================================================== */
.table {
  --bs-table-hover-bg: #F8FAFC;
  --bs-table-bg: transparent;
  color: #334155;
  font-size: 0.86rem;
  margin-bottom: 0;
}

.table thead th {
  background-color: #F8FAFC;
  color: var(--erp-text-muted);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--erp-border);
  padding: 0.75rem 0.95rem;
  vertical-align: middle;
}

.table tbody td {
  padding: 0.75rem 0.95rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--erp-border);
}

.table tfoot th, .table tfoot td {
  padding: 0.85rem 0.95rem;
  background-color: #F8FAFC;
  border-top: 1.5px solid #CBD5E1;
  color: var(--erp-text-main);
  font-weight: 700;
}

.table-num td.num, .table-num th.num {
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--erp-radius-sm);
  padding: 0.45rem 0.95rem;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--erp-primary);
  border-color: var(--erp-primary);
  color: #FFFFFF;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--erp-primary-hover);
  border-color: var(--erp-primary-hover);
}

.btn-success {
  background-color: var(--erp-success);
  border-color: var(--erp-success);
  color: #FFFFFF;
}
.btn-success:hover {
  background-color: #15803D;
  border-color: #15803D;
}

.btn-outline-secondary {
  border-color: var(--erp-border);
  color: #475569;
  background: #FFFFFF;
}
.btn-outline-secondary:hover {
  background: var(--erp-bg-subtle);
  border-color: #CBD5E1;
  color: var(--erp-text-main);
}

.btn-sm {
  height: 32px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
}

.btn-lg {
  height: 46px;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
}

/* ==========================================================================
   Responsive Sidebar Handling
   ========================================================================== */
.erp-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 1035;
  backdrop-filter: blur(2px);
}

@media (max-width: 991.98px) {
  .erp-sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-open .erp-sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .erp-sidebar-backdrop {
    display: block;
  }
  .erp-main-container {
    margin-left: 0 !important;
  }
  .topbar-center {
    display: none;
  }
  .erp-content {
    padding: 1.25rem 1rem;
  }
}

/* Print Overrides */
@media print {
  .erp-sidebar, .erp-topbar, .erp-footer, .no-print {
    display: none !important;
  }
  .erp-main-container {
    margin-left: 0 !important;
  }
  .erp-content {
    padding: 0 !important;
    max-width: 100% !important;
  }
  body {
    background: #FFFFFF !important;
  }
  .erp-card {
    border: 1px solid #D1D5DB !important;
    box-shadow: none !important;
  }
}
