/* BDK-WaWi Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #2563eb;
  --primary-dk: #1d4ed8;
  --secondary:  #64748b;
  --success:    #16a34a;
  --warning:    #ca8a04;
  --danger:     #dc2626;
  --bg:         #ffffff;
  --surface-10: #e6f0eb;
  --surface-20: #cce1d7;
  --sidebar-bg: #006367;
  --sidebar-tx: #cbd5e1;
  --sidebar-act:#008783;
  --white:      #f5f5f5;
  --border:     #6c7786;
  --text:       #1e293b;
  --text-muted: #64748b;
  --radius:     6px;
  --shadow:     0 1px 3px rgba(0,0,0,.1);
  --control-height: 25px;
  --control-padding-y: 4px;
  --control-padding-x: 6px;
  --control-font-size: 12px;
  --control-line-height: 1.25;
}

body { font-family: 'Segoe UI', system-ui, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }

/* Layout */
.layout { display: block; min-height: 100vh; }

/* Sidebar */
.sidebar { width: 180px; height: 100vh; position: fixed; left: 0; top: 0; background: var(--sidebar-bg); display: flex; flex-direction: column; overflow: hidden; z-index: 120; }
.sidebar-brand { padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand a { color: #f1f5f9; font-size: 16px; font-weight: 700; text-decoration: none; letter-spacing: .5px; }
.nav-list { list-style: none; padding: 10px 0; flex: 1; overflow: visible; }
.nav-item { margin: 2px 8px; }
.nav-link { display: block; padding: 9px 14px; color: var(--sidebar-tx); text-decoration: none; border-radius: var(--radius); transition: background .15s, color .15s; font-size: 13.5px; }
.nav-link:hover, a.nav-link.active { background: var(--sidebar-act); color: #fff; }

.tree-group details { width: 100%; }
.tree-group summary.nav-link { list-style: none; cursor: pointer; -webkit-user-select: none; user-select: none; position: relative; }
.tree-group summary.nav-link::-webkit-details-marker { display: none; }
.tree-group summary.nav-link::after {
  content: '▸';
  position: absolute;
  right: 10px;
  color: rgba(255,255,255,.7);
  transform: rotate(0deg);
  transition: transform .15s ease;
}
.tree-group details[open] > summary.nav-link::after { transform: rotate(90deg); }
.tree-submenu { list-style: none; padding: 4px 0 8px 0; margin: 0; }
.tree-submenu li { margin: 1px 8px; }
.tree-submenu .nav-link { padding: 7px 12px 7px 26px; font-size: 13px; }
.tree-submenu.nested .nav-link { padding-left: 36px; font-size: 12.5px; }
.tree-subgroup summary.nav-link {
  list-style: none;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  padding-left: 26px;
}
.tree-subgroup summary.nav-link::-webkit-details-marker { display: none; }
.tree-subgroup summary.nav-link::after {
  content: '▸';
  position: absolute;
  right: 10px;
  color: rgba(255,255,255,.7);
  transform: rotate(0deg);
  transition: transform .15s ease;
}
.tree-subgroup details[open] > summary.nav-link::after { transform: rotate(90deg); }

/* Main content */
.main-content { margin-left: 200px; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; background: var(--surface-10); border-bottom: 1px solid rgba(0,103,54,.12); box-shadow: var(--shadow); }
.page-title { font-size: 20px; font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 12px; }
.topbar-user span { color: var(--text-muted); font-size: 13px; }

.global-search { position: relative; width: min(520px, 48vw); }
.global-search .form-control { background: #f8fafc; }
.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15,23,42,.16);
  max-height: 380px;
  overflow: auto;
  z-index: 40;
}
.global-search-item {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.global-search-item:last-child { border-bottom: none; }
.global-search-item:hover, .global-search-item.active { background: #eff6ff; }
.global-search-type { font-size: 11px; color: var(--primary); font-weight: 600; }
.global-search-title { font-size: 13px; font-weight: 600; }
.global-search-subtitle { font-size: 12px; color: var(--text-muted); }
.global-search-empty { padding: 12px; color: var(--text-muted); font-size: 12px; }

/* Address and generic live-search fields */
.adresse-suchfeld,
.search-field-wrapper { position: relative; }
.adresse-suchfeld-input-wrapper,
.search-field-input-wrapper { position: relative; display: flex; align-items: center; }
.adresse-suchfeld-input-wrapper .form-control,
.search-field-input-wrapper .form-control { padding-right: 28px; }
.adresse-suchfeld-clear,
.search-field-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.adresse-suchfeld-clear:hover,
.search-field-clear:hover { color: var(--danger); }
.adresse-suchfeld-results,
.search-field-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(15,23,42,.14);
  max-height: 320px;
  overflow: auto;
  z-index: 50;
}
.adresse-suchfeld-item,
.search-field-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.adresse-suchfeld-item:last-child,
.search-field-item:last-child { border-bottom: none; }
.adresse-suchfeld-item:hover, .adresse-suchfeld-item.active,
.search-field-item:hover, .search-field-item.active { background: #eff6ff; }
.adresse-suchfeld-title,
.search-field-title { font-size: 13px; font-weight: 600; color: var(--text); }
.adresse-suchfeld-subtitle,
.search-field-subtitle { font-size: 12px; color: var(--text-muted); }
.adresse-suchfeld-empty,
.search-field-empty { padding: 10px 12px; color: var(--text-muted); font-size: 12px; }

.content-area { padding: 24px; overflow-y: auto; background: var(--surface-10); }

/* Standard page sections (top action bar, content section, bottom action bar) */
.page-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-section {
  background: var(--surface-20);
  border: 1px solid rgba(0,103,54,.18);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0,103,54,.08);
}

.page-section-body {
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius);
}

.page-actionbar,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--surface-10);
  border: 1px solid rgba(0,103,54,.12);
  border-radius: var(--radius);
}

.page-actionbar-left,
.page-actionbar-right,
.toolbar-left,
.toolbar-right,
.btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-actionbar-right,
.toolbar-right {
  margin-left: auto;
}

.page-actionbar .btn,
.toolbar .btn {
  white-space: nowrap;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--surface-10);
  border-top: 1px solid rgba(0,103,54,.12);
  color: var(--text-muted);
  font-size: 12.5px;
}

@media (min-height: 750px) {
  .main-content { height: 100vh; }
  .content-area { flex: 1 1 auto; min-height: 0; }
  .app-footer { flex-shrink: 0; }
}

/* Cards */
.card { background: var(--surface-20); border: 1px solid rgba(0,103,54,.18); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0,103,54,.08); margin-bottom: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid rgba(0,103,54,.12); display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; background: transparent; }
.card-title { font-size: 15px; font-weight: 600;  }
.card-body { padding: 20px; background: var(--white); border-radius: 0 0 var(--radius) var(--radius); }
.card-body--flush { padding: 0; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13.5px; border: 1px solid transparent; }
.alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.alert-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--control-height);
  padding: var(--control-padding-y) 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: var(--control-font-size);
  line-height: var(--control-line-height);
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, opacity .15s;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
.btn-primary,
.btn-start {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover,
.btn-start:hover {
  background: var(--primary-dk);
  border-color: var(--primary-dk);
}
.btn-secondary,
.btn-neutral {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}
.btn-secondary:hover,
.btn-neutral:hover {
  background: #cbd5e1;
  border-color: #94a3b8;
}
.btn-success,
.btn-save {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}
.btn-success:hover,
.btn-save:hover {
  background: #15803d;
  border-color: #166534;
}
.btn-danger,
.btn-cancel,
.btn-stop {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.btn-danger:hover,
.btn-cancel:hover,
.btn-stop:hover {
  background: #b91c1c;
  border-color: #991b1b;
}
.btn-warning {
  background: var(--warning);
  border-color: #a16207;
  color: #111827;
}
.btn-warning:hover {
  background: #a16207;
  border-color: #854d0e;
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: #cbd5e1;
  color: #334155;
}
.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.btn-sm,
.btn-lg,
.btn-xs {
  min-height: var(--control-height);
  padding-top: var(--control-padding-y);
  padding-bottom: var(--control-padding-y);
  line-height: var(--control-line-height);
}
.btn-sm { padding-left: 10px; padding-right: 10px; font-size: var(--control-font-size); }
.btn-lg { padding-left: 16px; padding-right: 16px; font-size: var(--control-font-size); }
.btn-xs { padding-left: 8px; padding-right: 8px; font-size: 11px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 13px; color: var(--text); }
.form-control { width: 100%; min-height: var(--control-height); padding: var(--control-padding-y) var(--control-padding-x); border: 1px solid var(--border); border-radius: var(--radius); font-size: var(--control-font-size); line-height: var(--control-line-height); background: var(--white); color: var(--text); transition: border-color .15s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-control[readonly] { background: #f8fafc; color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 90px; resize: vertical; }
.html-editor .ql-toolbar.ql-snow {
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: #f8fafc;
}
.html-editor .html-editor-mode-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.html-editor .html-editor-mode-switch .btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.html-editor .html-editor-mode-switch .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.html-editor .ql-container.ql-snow {
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--white);
  height: 160px;
  min-height: 160px;
  overflow-y: auto;
  resize: vertical;
}
.html-editor .ql-editor {
  min-height: 100%;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}
.html-editor .ql-toolbar.ql-snow:focus-within,
.html-editor .ql-container.ql-snow.ql-focused {
  border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-text { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.relation-cards { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.relation-card { flex: 0 1 420px; width: min(100%, 420px); margin-bottom: 0; }
.relation-card .card-body { width: min(100%, 420px); }
.relation-card .form-group { margin-bottom: 0; }
.relation-card .form-control { max-width: 100%; }

/* Tables */
.table-wrapper { overflow-x: auto; }
.table-wrapper table { border-collapse: separate; border-spacing: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.table-compact { width: auto; }
thead th { background: #f8fafc; padding: 6px 8px; text-align: left; font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap; font-size: 12.5px; vertical-align: top; }
tbody td { padding: 5px 8px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

.table-wrapper table thead th {
  position: relative;
  background: #f8fafc;
  z-index: 20;
  will-change: transform;
}

.table-wrapper table thead tr.list-filter-row th {
  background: #ffffff;
}

.table-wrapper table thead.is-stuck tr:first-child th {
  box-shadow: inset 0 -1px 0 var(--border);
}

.table-wrapper table thead.is-stuck tr + tr th {
  z-index: 21;
}

/* Sortable columns */
th.sortable { cursor: pointer; -webkit-user-select: none; user-select: none; }
th.sortable a { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 4px; }
th.sortable a:hover { color: var(--primary); }
.sort-icon { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
th.sort-asc .sort-icon, th.sort-desc .sort-icon { color: var(--primary); }

/* List table filter row */
.list-filter-row th { background: #ffffff; border-bottom: 1px solid var(--border); padding: 4px 6px; }
.list-filter-row .form-control { min-width: 0; }
.list-filter-row .btn { white-space: nowrap; }

/* Column picker */
.col-picker { position: relative; display: inline-block; }
.col-picker-dropdown {
  display: none; position: absolute; top: calc(100% + 5px); left: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 6px 0; min-width: 160px; z-index: 50;
}
.col-picker-dropdown.open { display: block; }
.col-picker-item {
  display: flex; align-items: center; gap: 8px; padding: 5px 14px;
  font-size: 13px; cursor: pointer; -webkit-user-select: none; user-select: none;
}
.col-picker-item:hover { background: #f1f5f9; }
.col-picker-item input[type=checkbox] { cursor: pointer; margin: 0; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef9c3; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* Pagination (compact pager) */
.pagination { display: flex; gap: 4px; align-items: center; margin-top: 16px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); font-size: 13px; }
.pagination a:hover { background: #f1f5f9; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Compact pager bar */
.pager-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pager-nav { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 28px; padding: 0 7px;
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text); font-size: 13px; background: var(--white);
  transition: background .12s, border-color .12s;
}
a.pager-btn:hover { background: #f1f5f9; border-color: var(--primary); }
.pager-btn.current { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.pager-btn.disabled { color: var(--text-muted); cursor: default; opacity: .5; }
.pager-ellipsis { padding: 0 4px; color: var(--text-muted); font-size: 13px; line-height: 28px; }
.pager-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Filters toolbar */
.filters-bar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 14px; background: var(--surface-10); border: 1px solid rgba(0,103,54,.12); border-radius: var(--radius); }
.filters-bar .form-group { margin-bottom: 0; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Login page */
.login-body { background: var(--bg); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-container { width: 100%; max-width: 400px; padding: 24px; }
.login-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 36px; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.login-card h1 { text-align: center; color: var(--primary); margin-bottom: 4px; font-size: 22px; }
.login-card h2 { text-align: center; font-size: 15px; color: var(--text-muted); margin-bottom: 24px; font-weight: 400; }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.actions { display: flex; gap: 6px; }
.mobile-only { display: none !important; }
.required::after { content: ' *'; color: var(--danger); }
.is-dirty { color: var(--danger) !important; }
.form-control.is-dirty,
.form-control.is-dirty[readonly],
select.form-control.is-dirty {
  color: var(--danger) !important;
  -webkit-text-fill-color: var(--danger) !important;
}
.separator { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Article image gallery */
.image-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.image-slot {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fafc;
  overflow: hidden;
  cursor: move;
  min-height: 180px;
}
.image-slot.is-main { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.14); }
.image-slot.is-dragging { opacity: .65; }
.image-slot-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
}
.image-slot-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-slot-empty { font-size: 12px; color: var(--text-muted); }
.image-slot-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px; font-size: 12px; }
.image-slot-hint { padding: 0 8px 8px 8px; font-size: 11px; color: var(--text-muted); }
.image-slot-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(15,23,42,.6);
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.image-slot:hover .image-slot-overlay,
.image-slot:focus-within .image-slot-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Article view specific */
.article-view-image-slot { cursor: zoom-in; }
.article-view-top-actions .is-disabled { opacity: .45; pointer-events: none; }
.artikel-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 6, 23, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.artikel-image-lightbox[hidden] { display: none; }
.artikel-image-lightbox img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
  background: #fff;
}
.artikel-image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(15, 23, 42, .75);
  color: #fff;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.artikel-image-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(15, 23, 42, .75);
  color: #fff;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.artikel-image-lightbox-prev { left: 16px; }
.artikel-image-lightbox-next { right: 16px; }


/* Mobile nav toggle button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius);
}
.nav-toggle:hover { background: #f1f5f9; }
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 149; }
.sidebar-overlay.visible { display: block; }

/* Responsive */
@media (max-width: 992px) {
  .nav-toggle { display: flex; }
  .mobile-only { display: inline-flex !important; }
  .main-content { margin-left: 0; }
  .sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    z-index: 150;
    width: 220px;
    height: 100vh;
    transition: left .25s ease;
    box-shadow: 4px 0 16px rgba(0,0,0,.25);
  }
  .sidebar.open { left: 0; }
  .topbar { padding: 8px 14px; gap: 8px; }
  .global-search { flex: 1; min-width: 0; width: auto; }
  .content-area { padding: 14px; }
  .page-actionbar,
  .toolbar { padding: 10px 12px; }
  .page-actionbar-left,
  .page-actionbar-right,
  .toolbar-left,
  .toolbar-right,
  .btn-group { width: 100%; }
  .page-actionbar-right,
  .toolbar-right { margin-left: 0; }
  .page-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 35vw; }
  .topbar-user span { display: none; }
}

/* Dashboard grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}
.dashboard-grid .card {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.dashboard-grid .card .card-body {
  flex: 1;
}
@media (max-width: 992px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  .sidebar, .topbar, .app-footer, .btn, .filters-bar, .pagination { display: none !important; }
  .main-content { overflow: visible; }
  .content-area { padding: 0; }
}
