/* ============================================================
   HEIZOMAT ERP – Haupt-Stylesheet
   CI: Heizomat Sinsheim GmbH
   Farben: Grün (Natur/Energie), Orange (Wärme), Dunkelgrau
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=Barlow+Condensed:wght@600;700&display=swap');

/* ── CSS-Variablen ────────────────────────────────────────── */
:root {
  /* Heizomat CI */
  --green-dark:    #1a4d1a;
  --green-main:    #2e7d32;
  --green-mid:     #388e3c;
  --green-light:   #4caf50;
  --green-pale:    #e8f5e9;
  --green-border:  #c8e6c9;

  --orange-main:   #e65100;
  --orange-mid:    #ef6c00;
  --orange-light:  #ff9800;
  --orange-pale:   #fff3e0;

  --gray-900:      #1a1a1a;
  --gray-800:      #2c2c2c;
  --gray-700:      #424242;
  --gray-600:      #616161;
  --gray-500:      #757575;
  --gray-400:      #9e9e9e;
  --gray-200:      #eeeeee;
  --gray-100:      #f5f5f5;
  --gray-50:       #fafafa;

  --white:         #ffffff;
  --danger:        #c62828;
  --danger-light:  #ffebee;
  --warning:       #f57f17;
  --warning-light: #fff8e1;
  --info:          #01579b;
  --info-light:    #e1f5fe;
  --success:       var(--green-main);
  --success-light: var(--green-pale);

  /* Sidebar */
  --sidebar-w:     260px;
  --sidebar-bg:    var(--green-dark);
  --sidebar-hover: var(--green-main);
  --sidebar-text:  rgba(255,255,255,0.88);
  --sidebar-muted: rgba(255,255,255,0.45);

  /* Layout */
  --header-h:      60px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.08);
  --shadow:        0 2px 12px rgba(0,0,0,0.10);
  --shadow-lg:     0 4px 24px rgba(0,0,0,0.14);
  --transition:    all .2s ease;

  /* Typography */
  --font-main:     'Barlow', sans-serif;
  --font-heading:  'Barlow Condensed', sans-serif;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green-main); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
img { max-width: 100%; }

/* ── Layout ───────────────────────────────────────────────── */
.erp-layout {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo img {
  height: 36px;
  filter: brightness(0) invert(1);
}
.sidebar-logo-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.sidebar-logo-text small {
  display: block;
  font-family: var(--font-main);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--sidebar-muted);
  letter-spacing: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; color: white;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 0.82rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 0.72rem; color: var(--sidebar-muted); }

.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; overflow-x: hidden; min-height: 0; }
.nav-group { margin-bottom: 4px; }
.nav-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sidebar-muted);
  padding: 8px 20px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--sidebar-text);
  font-size: 0.84rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
  border-left-color: var(--orange-light);
  text-decoration: none;
}
.nav-item.active {
  background: rgba(255,255,255,0.10);
  color: white;
  border-left-color: var(--orange-main);
}
.nav-item i { width: 18px; text-align: center; font-size: 0.9rem; opacity: 0.85; }

.sidebar-footer {
  flex-shrink: 0;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer a {
  display: flex; align-items: center; gap: 8px;
  color: var(--sidebar-muted); font-size: 0.8rem;
  text-decoration: none;
  transition: color .2s;
}
.sidebar-footer a:hover { color: white; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ── Top Header ───────────────────────────────────────────── */
.top-header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.page-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: 0.3px;
  flex: 1;
}
.header-actions { display: flex; align-items: center; gap: 8px; }

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--gray-500);
}
.breadcrumb a { color: var(--green-main); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--gray-400); }

/* ── Page Body ────────────────────────────────────────────── */
.page-body {
  padding: 24px;
  flex: 1;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-800);
  display: flex; align-items: center; gap: 8px;
}
.card-title i { color: var(--green-main); }
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* ── Stats-Cards (Dashboard) ──────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--green-main);
  display: flex; align-items: flex-start; gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-card.orange { border-left-color: var(--orange-main); }
.stat-card.orange .stat-icon { background: var(--orange-pale); color: var(--orange-main); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-card.red    .stat-icon { background: var(--danger-light); color: var(--danger); }
.stat-card.blue   { border-left-color: var(--info); }
.stat-card.blue   .stat-icon { background: var(--info-light); color: var(--info); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--border-radius);
  background: var(--green-pale);
  color: var(--green-main);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.stat-body { flex: 1; }
.stat-value { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; color: var(--gray-900); line-height: 1.1; }
.stat-label { font-size: 0.78rem; color: var(--gray-500); margin-top: 3px; }
.stat-trend { font-size: 0.75rem; margin-top: 4px; }
.stat-trend.up   { color: var(--green-main); }
.stat-trend.down { color: var(--danger); }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
thead th {
  background: var(--gray-50);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
thead th.sortable { cursor: pointer; user-select: none; }
thead th.sortable:hover { color: var(--green-main); }
tbody tr { border-bottom: 1px solid var(--gray-200); transition: background .15s; }
tbody tr:hover { background: var(--green-pale); }
tbody tr:last-child { border-bottom: none; }
td { padding: 10px 14px; vertical-align: middle; }
td.actions { white-space: nowrap; text-align: right; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--green-main); color: white; }
.btn-primary:hover { background: var(--green-dark); color: white; }
.btn-orange   { background: var(--orange-main); color: white; }
.btn-orange:hover { background: var(--orange-mid); color: white; }
.btn-secondary{ background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-400); color: var(--gray-900); }
.btn-danger   { background: var(--danger); color: white; }
.btn-danger:hover { background: #b71c1c; color: white; }
.btn-outline  { background: transparent; border: 1.5px solid var(--green-main); color: var(--green-main); }
.btn-outline:hover { background: var(--green-main); color: white; }
.btn-sm   { padding: 4px 10px; font-size: 0.78rem; }
.btn-lg   { padding: 10px 22px; font-size: 0.95rem; }
.btn-icon { padding: 6px 8px; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Forms ────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
@media (max-width: 768px) {
  .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }
label { font-size: 0.8rem; font-weight: 600; color: var(--gray-700); }
label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 0.86rem;
  color: var(--gray-800);
  background: var(--white);
  transition: var(--transition);
  width: 100%;
}
.form-control:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(76,175,80,0.12);
}
.form-control:disabled { background: var(--gray-100); color: var(--gray-500); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 6 5-6' stroke='%23757575' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-hint { font-size: 0.74rem; color: var(--gray-500); }
.form-error { font-size: 0.74rem; color: var(--danger); }
.input-group { display: flex; }
.input-group .form-control { border-radius: 6px 0 0 6px; flex: 1; }
.input-group .btn { border-radius: 0 6px 6px 0; }
.input-prefix {
  display: flex; align-items: center;
  padding: 0 10px;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 0.84rem;
  color: var(--gray-600);
}
.input-prefix + .form-control { border-radius: 0 6px 6px 0; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-success   { background: var(--green-pale);    color: var(--green-dark); }
.badge-warning   { background: var(--warning-light); color: var(--warning); }
.badge-danger    { background: var(--danger-light);  color: var(--danger); }
.badge-info      { background: var(--info-light);    color: var(--info); }
.badge-secondary { background: var(--gray-200);      color: var(--gray-600); }
.badge-draft     { background: var(--gray-200);      color: var(--gray-600); }
.badge-sent      { background: #e3f2fd;               color: #1565c0; }
.badge-orange    { background: var(--orange-pale);   color: var(--orange-main); }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.86rem;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: var(--green-pale);   border-left: 4px solid var(--green-main); color: var(--green-dark); }
.alert-error   { background: var(--danger-light); border-left: 4px solid var(--danger);     color: var(--danger); }
.alert-warning { background: var(--warning-light);border-left: 4px solid var(--warning);    color: var(--warning); }
.alert-info    { background: var(--info-light);   border-left: 4px solid var(--info);       color: var(--info); }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--gray-200); margin-bottom: 20px; }
.tab {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--gray-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  text-decoration: none;
}
.tab:hover { color: var(--green-main); text-decoration: none; }
.tab.active { color: var(--green-main); border-bottom-color: var(--green-main); }

/* ── Document Position Table ──────────────────────────────── */
.pos-table { width: 100%; border-collapse: collapse; }
.pos-table th { background: var(--green-dark); color: white; padding: 8px 10px; font-size: 0.78rem; font-weight: 600; }
.pos-table td { padding: 6px 8px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.pos-table tfoot td { background: var(--gray-50); font-weight: 600; }
.pos-table tfoot .total-row td { background: var(--green-dark); color: white; font-size: 1rem; }
.pos-table .btn-icon-danger { color: var(--danger); cursor: pointer; background: none; border: none; padding: 4px; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalIn .2s ease;
}
.modal-lg { max-width: 900px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
}
.modal-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--gray-500); font-size: 1.1rem; padding: 4px; }
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--gray-200); display: flex; gap: 8px; justify-content: flex-end; }

/* ── Filters / Search Bar ────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.filter-bar .form-control { max-width: 220px; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 0.85rem; }
.search-box input { padding-left: 32px; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 16px; }
.pagination .btn { min-width: 34px; justify-content: center; }
.pagination .btn.active { background: var(--green-main); color: white; }

/* ── Document Preview ─────────────────────────────────────── */
.doc-preview {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
  font-size: 0.85rem;
}
.doc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.doc-logo { height: 50px; }
.doc-company { text-align: right; font-size: 0.8rem; color: var(--gray-600); }
.doc-company strong { color: var(--gray-900); font-size: 0.9rem; }
.doc-address-block { margin-bottom: 20px; }
.doc-address-from { font-size: 0.72rem; color: var(--gray-500); border-bottom: 1px solid var(--gray-300); padding-bottom: 4px; margin-bottom: 6px; }
.doc-meta { display: flex; gap: 40px; margin-bottom: 20px; padding: 14px 0; border-top: 2px solid var(--green-main); border-bottom: 1px solid var(--gray-200); }
.doc-meta-item label { font-size: 0.72rem; color: var(--gray-500); display: block; }
.doc-meta-item strong { font-size: 0.9rem; }
.doc-title { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; color: var(--green-dark); }
.doc-pos-table { margin: 20px 0; }
.doc-totals { margin-top: 20px; display: flex; justify-content: flex-end; }
.doc-totals table { min-width: 280px; }
.doc-totals td { padding: 4px 10px; }
.doc-totals tr.total { font-weight: 700; font-size: 1.05rem; border-top: 2px solid var(--green-main); }
.doc-footer { margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--gray-200); display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--gray-500); }
.doc-bank { margin-top: 10px; font-size: 0.75rem; color: var(--gray-600); }

/* ── Login Page ───────────────────────────────────────────── */
.login-page {
  height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-main) 60%, var(--orange-mid) 100%);
}
.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-box {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo img { height: 52px; }
.login-logo h1 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--green-dark); margin-top: 12px; }
.login-logo p { font-size: 0.82rem; color: var(--gray-500); }
.login-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  color: white;
}
.login-tagline { max-width: 400px; }
.login-tagline h2 { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
.login-tagline p { opacity: 0.85; line-height: 1.7; }
@media (max-width: 768px) { .login-right { display: none; } }

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 992px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ── Detail View ──────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 992px) { .detail-grid { grid-template-columns: 1fr; } }

.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-label { width: 150px; min-width: 150px; font-size: 0.78rem; font-weight: 600; color: var(--gray-500); padding-top: 1px; }
.info-value { flex: 1; font-size: 0.86rem; color: var(--gray-800); }

/* ── Toolbar ──────────────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}
.empty-state i { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ── Progress Bar ─────────────────────────────────────────── */
.progress { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--green-main); border-radius: 4px; transition: width .4s ease; }
.progress-bar.orange { background: var(--orange-main); }

/* ── Utility ──────────────────────────────────────────────── */
.d-flex  { display: flex; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-4    { margin-top: 4px; }
.mt-8    { margin-top: 8px; }
.mt-16   { margin-top: 16px; }
.mb-16   { margin-bottom: 16px; }
.mb-0    { margin-bottom: 0; }
.fw-600  { font-weight: 600; }
.fw-700  { font-weight: 700; }
.fs-sm   { font-size: 0.78rem; }
.text-muted { color: var(--gray-500); }
.text-green { color: var(--green-main); }
.text-orange{ color: var(--orange-main); }
.text-danger{ color: var(--danger); }
.w-100   { width: 100%; }
.hidden  { display: none !important; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar { width: 60px; }
  .sidebar-logo-text, .nav-item span, .sidebar-user-info, .sidebar-footer a span,
  .nav-group-label { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .nav-item i { width: auto; font-size: 1.1rem; }
  .main-content { margin-left: 60px; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .sidebar, .top-header, .btn, .toolbar, .filter-bar, .no-print { display: none !important; }
  .main-content { margin-left: 0; }
  .page-body { padding: 0; }
  .card { box-shadow: none; border: none; }
}

/* ── Sidebar Scrollbar ─────────────────────────────────── */
.sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb,
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }
