@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
  /* LGM Red Theme */
  --primary: #D40D12;
  --primary-dark: #b91c1c;
  --primary-faint: rgba(212, 13, 18, 0.08);

  --bg-body: #f3f4f6;
  --bg-panel: #ffffff;
  
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;

  --radius: 16px;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
  --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px 60px;
}

.container {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* Header */
.brand-header {
  background: var(--bg-panel);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.brand-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.brand-header .logo { flex-shrink: 0; line-height: 0; }
.brand-header .logo img { height: 60px; width: auto; display: block; transition: transform 0.3s ease; }
.brand-header .logo img:hover { transform: scale(1.03); }

.brand-header .brand-text { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.brand-header h1 {
  color: var(--text-main);
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.brand-header .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  font-weight: 400;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--bg-panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted);
}
.topbar strong {
  color: var(--text-main);
  font-weight: 600;
}
.topbar .nav-links {
  display: flex;
  gap: 20px;
}
.topbar a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.topbar a:hover { color: var(--primary); }

/* Content Area */
.content { 
  background: transparent;
  padding: 0;
}

.block-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.block-title .hint { font-size: 13px; color: var(--text-muted); font-weight: 400; background: rgba(0,0,0,0.05); padding: 4px 10px; border-radius: 20px; }
.cache-age { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: auto; opacity: 0.7; }
.refresh-link { font-size: 14px; color: var(--text-muted); text-decoration: none; margin-left: 8px; margin-right: 10px; opacity: 0.5; transition: opacity 0.2s, color 0.2s; }
.refresh-link:hover { opacity: 1; color: var(--primary); }
.billbee-ext-btn { font-size: 12px; font-weight: 600; color: var(--text-muted); text-decoration: none; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; margin-left: 4px; transition: color 0.15s, border-color 0.15s; vertical-align: middle; }
.billbee-ext-btn:hover { color: var(--primary); border-color: var(--primary); }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card::after {
  content: '→';
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 20px;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-faint);
  transform: translateY(-4px);
}

.sort-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  cursor: pointer;
  margin-left: auto;
  margin-right: 10px;
  vertical-align: middle;
  transition: all 0.2s;
}
.sort-btn:hover { color: var(--primary); border-color: var(--primary); }
.sort-btn-active { color: var(--primary) !important; border-color: var(--primary) !important; background: var(--primary-faint) !important; }

.cards.sorting .card { cursor: grab; }
.cards.sorting .card:active { cursor: grabbing; }
.card.dragging { opacity: 0.3; transform: scale(0.96); box-shadow: none; }
.card.drag-over { outline: 2px dashed var(--primary); outline-offset: 3px; }

.card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--primary-faint);
  color: var(--primary);
  transition: transform 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.card-logo {
  height: 56px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.card-logo img {
  height: 36px;
  width: auto;
  transition: transform 0.3s ease;
}

.card:hover .card-logo img {
  transform: scale(1.05);
}

.card-logo-trio {
  gap: 8px;
}

.card-logo-trio img {
  height: 28px;
}

.trio-connector {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #4b5563;
  color: #fff;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 0 0 2px #e5e7eb;
}

.card h2 { 
  font-size: 18px; 
  font-weight: 600;
  margin: 0 0 8px; 
  color: var(--text-main); 
}
.card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
  padding-right: 30px;
}

.card-main-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

div.card::after { display: none; }

.card-tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-tool-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  background: var(--primary-faint);
  padding: 3px 10px;
  border-radius: 20px;
  transition: background 0.15s, color 0.15s;
}

.card-tool-link:hover {
  background: var(--primary);
  color: #fff;
}

.stats-placeholder {
  background: var(--bg-panel);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 40px;
  transition: border-color 0.3s;
}
.stats-placeholder:hover {
  border-color: var(--primary);
}

.stat-tiles {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.billbee-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 30px;
}


.billbee-action-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.billbee-action-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-faint);
}

.billbee-api-usage {
  font-size: 12px;
  color: var(--text-muted);
}

.billbee-api-usage summary {
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  user-select: none;
}

.billbee-api-usage summary::-webkit-details-marker {
  display: none;
}

.billbee-api-usage[open] summary,
.billbee-api-usage summary:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-faint);
}

.billbee-api-usage-body {
  min-width: 230px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  line-height: 1.45;
  box-shadow: var(--shadow-card);
}

.billbee-api-usage-muted {
  color: #9ca3af;
}
.stat-tile {
  flex: 1;
  min-width: 140px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
}
.stat-tile-alert { border-top-color: var(--primary); }
.stat-tile-warn  { border-top-color: #f0a500; }
.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-tile-alert .stat-value { color: var(--primary); }
.stat-tile-warn  .stat-value { color: #b8680a; }
.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}
.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}
.stat-delta {
  display: block;
  font-size: 11px;
  margin-top: 6px;
  font-weight: 500;
}
.stat-delta-up   { color: #1a8c3a; }
.stat-delta-down { color: var(--text-muted); }
.stat-delta-flat { color: var(--text-muted); }

.insight-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.insight-heading .hint { font-size: 12px; color: var(--text-muted); font-weight: 400; }

.appt-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.appt-card {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: box-shadow 0.15s ease, border-top-color 0.15s ease;
}
.appt-card:hover { box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06)); }
.appt-when { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.appt-customer { font-weight: 700; font-size: 14px; color: var(--text-main); margin-bottom: 4px; }
.appt-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.appt-notes {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.appt-price { font-size: 12px; font-weight: 600; color: #1a6630; margin-top: 4px; }

.insight-day-today { color: var(--primary); font-weight: 700; }
.insight-day-tomorrow { color: #b8680a; font-weight: 700; }
.insight-time { color: var(--text-muted); font-size: 13px; }

.insight-table { width: 100%; border-collapse: collapse; margin-bottom: 40px; }
.insight-table th, .insight-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.insight-table th { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }

.insight-pending { margin: 0 0 24px; font-size: 13px; color: var(--primary-dark); font-weight: 600; }

/* Login */
.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}
.login-logo { margin-bottom: 32px; }
.login-logo img { max-width: 180px; height: auto; }
.login-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-box h1 {
  font-size: 22px;
  margin: 0 0 24px;
  color: var(--text-main);
  text-align: center;
  font-weight: 700;
}
.login-box label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text-main); }
.login-box input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s;
  background: #f9fafb;
}
.login-box input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-faint); }
.login-box button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.login-box button:hover { background: var(--primary-dark); }
.login-box button:active { transform: scale(0.98); }

.error { 
  color: #ef4444; 
  font-size: 14px; 
  margin-bottom: 20px; 
  padding: 12px;
  background: #fef2f2;
  border-radius: 8px;
  text-align: center;
}

/* Admin tables */
table { width: 100%; border-collapse: collapse; background: var(--bg-panel); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); margin-bottom: 24px; }
th, td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--text-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; background: #f8fafc; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }
form.inline { display: inline; }
select, input[type=text], input[type=password] { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }
button.small { padding: 6px 12px; font-size: 13px; border-radius: 6px; border: 1px solid var(--border); background: white; cursor: pointer; font-weight: 500; transition: all 0.2s; }
button.small:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-faint); }
button.small.danger { color: #ef4444; border-color: #fca5a5; }
button.small.danger:hover { background: #fef2f2; border-color: #ef4444; }

.section { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; margin-top: 32px; box-shadow: var(--shadow-card); }
.section h2 { margin-top: 0; font-size: 18px; margin-bottom: 20px; color: var(--text-main); border-bottom: 1px solid var(--border); padding-bottom: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .page { margin: 16px auto; padding: 0 16px 40px; }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
  }
  .topbar .nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 14px;
  }
  .topbar a { font-size: 13px; }
  .cards { grid-template-columns: 1fr; }
  .stat-tiles { gap: 10px; }
}

@media (max-width: 480px) {
  /* Layout */
  .page { margin: 0; padding: 0 10px 40px; }

  /* Brand header */
  .brand-header { padding: 12px 14px; margin-bottom: 10px; }
  .brand-header .logo { display: none; }
  .brand-header h1 { font-size: 17px; }
  .brand-header .subtitle { font-size: 11px; }

  /* Topbar / Nav */
  .topbar {
    padding: 10px 12px;
    margin-bottom: 14px;
    gap: 6px;
    border-radius: 10px;
  }
  .topbar > span:first-child { font-size: 12px; text-align: center; color: var(--text-muted); }
  .topbar .nav-links { gap: 4px 10px; }
  .topbar a {
    font-size: 13px;
    padding: 5px 10px;
    background: var(--bg-body);
    border-radius: 20px;
    color: var(--text-muted);
  }
  .topbar a:hover { background: var(--primary-faint); color: var(--primary); }

  /* Stat tiles — 2 Spalten */
  .stat-tiles { gap: 8px; }
  .stat-tile { min-width: calc(50% - 4px); padding: 12px 10px; }
  .stat-value { font-size: 26px; }
  .stat-label { font-size: 12px; }
  .stat-sub { font-size: 10px; }
  .stat-delta { font-size: 10px; }

  /* Billbee actions */
  .billbee-actions { flex-wrap: wrap; gap: 6px; }

  /* Booking Termine */
  .appt-row { flex-direction: column; gap: 10px; }
  .appt-card { min-width: 0; }

  /* Titles */
  .block-title { font-size: 15px; }
  .content { padding-top: 0; }

  /* Daily notes */
  .dn-row { padding: 10px 12px; }
  .dn-meta { flex-wrap: wrap; gap: 6px; }
  .daily-notes-wrap .block-title { margin-bottom: 8px; }

  /* Side panel — full screen auf Phone */
  .side-panel {
    width: 100vw;
    height: 100dvh;
    height: 100vh;
    border-radius: 0;
  }
  .side-panel-header { padding: 14px 16px 12px; }
  .side-panel-title { font-size: 16px; }
  .side-panel-tabs { padding: 0 4px; }
  .panel-tab { padding: 10px 12px; font-size: 12px; }
  .panel-order-row { padding: 12px 16px; }
  .panel-table th, .panel-table td { padding: 8px 10px; }
  .panel-table { font-size: 12px; }
  .panel-order-header { flex-wrap: wrap; gap: 4px 8px; }
  .panel-order-total { width: 100%; margin-left: 0; }

  /* Login */
  .login-wrap { padding: 20px 12px; }
  .login-box { padding: 24px 16px; border-radius: 12px; }
  .login-box h1 { font-size: 20px; }

  /* Cards kompakter */
  .card { padding: 16px; }
  .card h2 { font-size: 15px; }
}

/* Quicklinks */
.ql-cards { align-items: start; }

.ql-cat-card {
  background: var(--bg-panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.ql-cat-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-faint);
  transform: translateY(-3px);
}

.ql-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-faint);
}

.ql-cat-icon {
  font-size: 22px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-faint);
  border-radius: 10px;
  flex-shrink: 0;
}

.ql-cat-title { font-size: 15px; font-weight: 600; color: var(--text-main); }

.ql-item {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.ql-item:last-child { border-bottom: none; padding-bottom: 2px; }

.ql-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ql-item-title a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s;
}

.ql-item-title a:hover { color: var(--primary); }

.ql-note {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0,0,0,0.05);
  border-radius: 10px;
  padding: 1px 7px;
  text-decoration: none;
}

.ql-note-link:hover { background: var(--primary-faint); color: var(--primary); }

.ql-link-icon {
  color: var(--text-muted);
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.6;
}

.ql-extra {
  display: flex;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: wrap;
}

.ql-url-chip {
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-faint);
  border-radius: 10px;
  padding: 2px 10px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.ql-url-chip:hover { background: var(--primary); color: #fff; }

/* Daily Notes / Übergabe */
.daily-notes-wrap { margin-bottom: 8px; }

.daily-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.dn-row {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.dn-own { border-left: 3px solid var(--primary); }

.dn-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.dn-author { font-weight: 600; font-size: 13px; color: #111827; }

.dn-time { font-size: 12px; color: #6b7280; }

.dn-body {
  font-size: 14px;
  color: #111827;
  line-height: 1.55;
  white-space: pre-wrap;
}

.dn-link-btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #6b7280;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
  line-height: 1;
}
.dn-link-btn:hover { color: var(--primary); }
.dn-delete-btn { margin-left: auto; color: #9ca3af; }

.dn-edit-area { margin-top: 8px; }

.dn-textarea {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  resize: vertical;
  min-height: 70px;
  outline: none;
  transition: border-color 0.15s;
}
.dn-textarea:focus { border-color: var(--primary); }

.dn-edit-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.dn-save-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
  transition: background 0.15s;
}
.dn-save-btn:hover { background: var(--primary-dark); }

.dn-empty {
  color: #6b7280;
  font-size: 13px;
  padding: 6px 0;
}

.dn-new-form { background: #f9fafb; border-style: dashed; }

/* Side Panel (Versand-offen) */
.panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 200;
  pointer-events: none;
  transition: background 0.25s ease;
}
.panel-backdrop.panel-open {
  background: rgba(0,0,0,0.35);
  pointer-events: auto;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 96vw);
  height: 100vh;
  background: #fff;
  box-shadow: -6px 0 32px rgba(0,0,0,0.13);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.side-panel.panel-open { transform: translateX(0); }

.side-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.side-panel-title { margin: 0; font-size: 18px; font-weight: 700; color: #111; }
.side-panel-sub   { margin: 3px 0 0; font-size: 12px; color: #9ca3af; }

.panel-billbee-link {
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}
.panel-billbee-link:hover { color: var(--primary); border-color: var(--primary); }

.side-panel-close {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  font-family: inherit;
}
.side-panel-close:hover { color: #111; }

.side-panel-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  padding: 0 8px;
}

.panel-tab {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.panel-tab:hover { color: #111; }
.panel-tab-active { color: var(--primary); border-bottom-color: var(--primary); }

.panel-refresh-btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  font-size: 12px;
  color: #9ca3af;
  cursor: pointer;
  font-family: inherit;
  margin-left: auto;
  padding: 0 8px;
}
.panel-refresh-btn:hover { color: var(--primary); }

.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.panel-loading {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  padding: 48px 24px;
}

/* Artikel-Tabelle */
.panel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.panel-table th {
  text-align: left;
  padding: 10px 16px;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
  position: sticky;
  top: 0;
  z-index: 1;
}
.panel-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}
.panel-table tr:hover td { background: #fafafa; }

.panel-qty {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  text-align: right;
  white-space: nowrap;
}

.panel-art-title { font-weight: 500; color: #111; }
.panel-art-sku   { font-size: 11px; color: #9ca3af; font-family: monospace; }

.panel-order-chip {
  display: inline-block;
  font-size: 11px;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 2px 7px;
  margin: 2px 3px 2px 0;
  color: #374151;
  text-decoration: none;
  white-space: nowrap;
}
.panel-order-chip:hover { background: var(--primary-faint); color: var(--primary); }

/* Bestell-Liste */
.panel-order-row {
  padding: 14px 24px;
  border-bottom: 1px solid #f3f4f6;
}
.panel-order-row:last-child { border-bottom: none; }

.panel-order-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.panel-order-num {
  font-weight: 600;
  font-size: 13px;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
}
.panel-order-num:hover { color: var(--primary); }

.panel-order-meta { font-size: 12px; color: #9ca3af; }
.panel-order-total { font-size: 13px; font-weight: 600; margin-left: auto; color: #374151; white-space: nowrap; }

.panel-item-list { list-style: none; margin: 0; padding: 0; }
.panel-item-list li { font-size: 13px; color: #4b5563; padding: 2px 0; display: flex; align-items: center; gap: 8px; }
.panel-item-list li::before { content: '→ '; color: #d1d5db; flex-shrink: 0; }

.panel-art-cell { display: flex; align-items: center; gap: 10px; }

.panel-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #f9fafb;
}
.panel-thumb-empty {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1d5db' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E") center/60% no-repeat;
}
.panel-thumb-sm {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

/* Klickbare Stat-Tile */
.stat-tile-clickable { cursor: pointer; }
.stat-tile-clickable:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-1px); }
