/* ─── Volteo CRM – Shared Styles ─────────────────────────────── */
:root {
  --blue: #0E3CAF;
  --blue-dark: #0a2d87;
  --blue-light: #e8edf8;
  --orange: #FF8200;
  --orange-light: #fff3e0;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --green: #10b981;
  --green-light: #d1fae5;
  --red: #ef4444;
  --red-light: #fee2e2;
  --yellow: #f59e0b;
  --yellow-light: #fef3c7;
  --sidebar-width: 240px;
  --header-height: 60px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.5;
}

/* ─── Login Page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 50%, #061a5a 100%);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-text {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.login-logo .volt { color: var(--blue); }
.login-logo .eo { color: var(--orange); }

.login-logo .tagline {
  font-size: 12px;
  color: var(--gray-500);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-800);
  text-align: center;
  margin-bottom: 28px;
}

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

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

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .logo-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.sidebar-logo .volt { color: white; }
.sidebar-logo .eo { color: var(--orange); }

.sidebar-logo .logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
}

.sidebar-user .user-name {
  font-weight: 600;
  font-size: 13px;
  color: white;
}

.sidebar-user .user-role {
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

.sidebar-user .user-level {
  display: inline-block;
  background: rgba(255,130,0,0.25);
  color: var(--orange);
  border: 1px solid rgba(255,130,0,0.4);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 6px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  padding: 12px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.nav-item.active {
  background: rgba(255,255,255,0.12);
  color: white;
  border-left-color: var(--orange);
}

.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  font-family: inherit;
  transition: color var(--transition);
}

.btn-logout:hover { color: white; }

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

.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
}

.page-header .header-sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.page-body {
  padding: 28px 32px;
  flex: 1;
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.card-body {
  padding: 20px;
}

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-card.blue { border-left: 4px solid var(--blue); }
.stat-card.orange { border-left: 4px solid var(--orange); }
.stat-card.green { border-left: 4px solid var(--green); }
.stat-card.red { border-left: 4px solid var(--red); }
.stat-card.yellow { border-left: 4px solid var(--yellow); }

.stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1;
}

.stat-sub {
  font-size: 12px;
  color: var(--gray-400);
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(14, 60, 175, 0.1);
}

.form-control:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

select.form-control { cursor: pointer; }

.form-hint {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
}

.form-row {
  display: grid;
  gap: 16px;
}

.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.form-section {
  margin-bottom: 24px;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--blue-light);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--blue);
  color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }

.btn-orange {
  background: var(--orange);
  color: white;
}
.btn-orange:hover:not(:disabled) { background: #e67400; }

.btn-success {
  background: var(--green);
  color: white;
}
.btn-success:hover:not(:disabled) { background: #059669; }

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover:not(:disabled) {
  background: var(--blue-light);
}

.btn-ghost {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
}
.btn-ghost:hover:not(:disabled) { background: var(--gray-200); }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

.btn-icon {
  padding: 7px;
  border-radius: 6px;
  background: transparent;
  border: 1.5px solid var(--gray-200);
  cursor: pointer;
  color: var(--gray-600);
  font-size: 14px;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-icon:hover { background: var(--gray-100); color: var(--blue); }

/* ─── Tables ─────────────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--blue-light); }

tbody td {
  padding: 11px 14px;
  color: var(--gray-700);
  vertical-align: middle;
}

.table-clickable { cursor: pointer; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: var(--green-light); color: #065f46; }
.badge-red { background: var(--red-light); color: #991b1b; }
.badge-yellow { background: var(--yellow-light); color: #92400e; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-orange { background: var(--orange-light); color: #c05600; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* Status badges */
.status-lead { background: #dbeafe; color: #1e40af; }
.status-aktiv { background: var(--green-light); color: #065f46; }
.status-gekuendigt { background: var(--red-light); color: #991b1b; }
.status-inaktiv { background: var(--gray-100); color: var(--gray-600); }
.status-offen { background: #dbeafe; color: #1e40af; }
.status-bezahlt { background: var(--green-light); color: #065f46; }
.status-überfällig { background: var(--red-light); color: #991b1b; }
.status-storniert { background: var(--gray-100); color: var(--gray-600); }

/* ─── Toolbar / Filters ──────────────────────────────────────── */
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
}

.search-box input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
  transition: border-color var(--transition);
}

.search-box input:focus { border-color: var(--blue); }

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
  pointer-events: none;
}

.filter-select {
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}

.filter-select:focus { border-color: var(--blue); }

/* ─── Alerts & Messages ──────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-error { background: var(--red-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--green-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-warning { background: var(--yellow-light); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--blue-light); color: #1e40af; border: 1px solid #bfdbfe; }

/* ─── Cost Calculator ────────────────────────────────────────── */
.cost-calculator {
  background: linear-gradient(135deg, var(--blue-light), #f0f4ff);
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 12px;
}

.cost-calculator .calc-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  margin-bottom: 12px;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13.5px;
  color: var(--gray-700);
  border-bottom: 1px solid rgba(14,60,175,0.1);
}

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

.cost-row.total {
  font-weight: 700;
  font-size: 15px;
  color: var(--blue);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 2px solid var(--blue);
  border-bottom: none;
}

.cost-value { font-weight: 600; font-family: 'Courier New', monospace; }

/* ─── Deadline Warning ───────────────────────────────────────── */
.deadline-warning {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.deadline-green { background: var(--green-light); color: #065f46; }
.deadline-yellow { background: var(--yellow-light); color: #92400e; }
.deadline-red { background: var(--red-light); color: #991b1b; animation: pulse-red 1.5s infinite; }

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ─── Activities ─────────────────────────────────────────────── */
.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.activity-icon.call { background: #dbeafe; }
.activity-icon.meeting { background: var(--green-light); }
.activity-icon.email { background: var(--orange-light); }
.activity-icon.offer { background: var(--yellow-light); }
.activity-icon.contract { background: #ede9fe; }

.activity-content { flex: 1; }
.activity-meta { font-size: 12px; color: var(--gray-500); margin-top: 3px; }
.activity-notes { font-size: 13px; color: var(--gray-700); margin-top: 4px; }
.activity-next {
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ─── Tree Structure ─────────────────────────────────────────── */
.tree-container { padding: 20px 0; }

.tree-node {
  position: relative;
  margin: 4px 0;
}

.tree-node-content {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 220px;
}

.tree-node-content:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(14,60,175,0.1);
}

.tree-node-content.root {
  border-color: var(--blue);
  background: var(--blue-light);
}

.tree-node-content.admin-node {
  border-color: var(--orange);
  background: var(--orange-light);
}

.tree-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.tree-info .tree-name { font-weight: 600; font-size: 13px; color: var(--gray-800); }
.tree-info .tree-level { font-size: 11px; color: var(--gray-500); }
.tree-info .tree-stats { font-size: 11px; color: var(--blue); font-weight: 600; }

.tree-children {
  padding-left: 40px;
  position: relative;
}

.tree-children::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 16px;
  width: 2px;
  background: var(--gray-200);
}

.tree-children .tree-node::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 20px;
  width: 22px;
  height: 2px;
  background: var(--gray-200);
}

/* ─── Calendar / Fristen ─────────────────────────────────────── */
.fristen-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  background: white;
  margin-bottom: 8px;
  transition: all var(--transition);
}

.fristen-item:hover { box-shadow: var(--shadow); }

.fristen-item.urgent { border-color: var(--red); background: #fff8f8; }
.fristen-item.warning { border-color: var(--yellow); background: #fffef8; }
.fristen-item.ok { border-color: var(--green); background: #f8fff8; }

.fristen-countdown {
  text-align: center;
  min-width: 60px;
}

.fristen-days {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.fristen-days.urgent { color: var(--red); }
.fristen-days.warning { color: var(--yellow); }
.fristen-days.ok { color: var(--green); }

.fristen-days-label { font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.active, .modal-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-20px);
  transition: transform var(--transition);
}

.modal-overlay.active .modal, .modal-overlay.show .modal { transform: translateY(0); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  font-size: 16px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--gray-200); }

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  justify-content: center;
}

.page-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--gray-200);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-700);
  transition: all var(--transition);
}

.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); border-color: var(--blue); color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13.5px;
  max-width: 300px;
  margin: 0 auto 16px;
}

/* ─── Loading ────────────────────────────────────────────────── */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  flex-direction: column;
  gap: 12px;
  color: var(--gray-500);
  font-size: 13.5px;
}

/* ─── Toast Notifications ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  animation: slideInRight 0.3s ease;
  cursor: pointer;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { background: #065f46; color: white; }
.toast.error { background: #991b1b; color: white; }
.toast.info { background: var(--blue); color: white; }
.toast.warning { background: var(--yellow); color: #1f2937; }

/* ─── Hamburger Button ───────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background .15s;
}
.hamburger:hover { background: var(--blue-dark, #0f3d28); }
.hamburger:active { transform: scale(.93); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
  opacity: 0;
  transition: opacity .2s;
}
.sidebar-overlay.visible {
  display: block;
  opacity: 1;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }

  /* Page Header */
  .page-header {
    padding: 14px 16px 14px 56px; /* Platz für Hamburger */
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-header h1 { font-size: 17px; }
  .page-header .d-flex { width: 100%; }

  /* Content */
  .page-body { padding: 12px; }

  /* Forms */
  .form-row.cols-2,
  .form-row.cols-3,
  .form-row.cols-4 { grid-template-columns: 1fr; }

  /* Stats */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; }

  /* Toolbar */
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .search-box { max-width: 100%; }

  /* Tabellen horizontal scrollbar */
  .table-responsive,
  .card-body:has(table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table { min-width: 600px; }

  /* Dashboard Grid */
  .dashboard-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Detail Grid */
  .detail-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Cards */
  .card { border-radius: 8px; }
  .card-header { padding: 12px 14px; }
  .card-body { padding: 14px; }

  /* Modal */
  .modal-content { margin: 8px; max-height: 92vh; }

  /* Pipeline */
  .pipeline-wrap { gap: 10px; padding-bottom: 12px; scroll-snap-type: x mandatory; }
  .pipeline-col { flex: 0 0 80vw; min-width: 80vw; scroll-snap-align: start; }
  .pipeline-stats { gap: 8px; }
  .ps-item { padding: 8px 12px; font-size: 12px; }
  .ps-item strong { font-size: 18px; }

  /* Buttons */
  .btn { padding: 8px 14px; font-size: 13px; }
}

/* ─── Misc Utilities ─────────────────────────────────────────── */
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gray { color: var(--gray-500); }
.text-muted { color: var(--gray-400); }
.text-bold { font-weight: 700; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }
.admin-only { display: none; }
.body-admin .admin-only { display: initial; }

/* Number formatting */
.num { font-variant-numeric: tabular-nums; font-family: 'Courier New', monospace; }

/* ─── Dashboard Grid ─────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

/* ─── Customer Detail Layout ─────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1000px) {
  .detail-grid { grid-template-columns: 1fr; }
}

/* ─── Invoice Status Colors ──────────────────────────────────── */
.inv-offen { color: #1e40af; font-weight: 600; }
.inv-bezahlt { color: #065f46; font-weight: 600; }
.inv-überfällig { color: #991b1b; font-weight: 600; }
.inv-storniert { color: var(--gray-500); font-weight: 600; text-decoration: line-through; }
